maemo.org - Talk

maemo.org - Talk (https://talk.maemo.org/index.php)
-   Games (https://talk.maemo.org/forumdisplay.php?f=12)
-   -   New Port: FreeCiv SDL (https://talk.maemo.org/showthread.php?t=16754)

mikkov 2009-12-12 15:03

Re: New Port: FreeCiv SDL
 
Quote:

Originally Posted by go1dfish (Post 423877)
I have moved my /usr/share/icons dir to MyDocs and symlinked back, can't wait to see how much havock the first OTA update is going wreak on my customizations :cool:

If you want move the icons directory somewhere, move it to /opt. MyDocs is not unix filesystem and package installations and especially upgrades are going to fail

go1dfish 2009-12-12 22:37

Re: New Port: FreeCiv SDL
 
Quote:

Originally Posted by mikkov (Post 424436)
If you want move the icons directory somewhere, move it to /opt. MyDocs is not unix filesystem and package installations and especially upgrades are going to fail

Ah yeah, I misspoke, I actually moved them to /opt/shared-icons/

Corwin 2009-12-13 20:27

Re: New Port: FreeCiv SDL
 
OK, now I am having only one more question ;)
Wanted to install it via the application manager but it tells me it can not be installed.

Do I use dpkg instead? Would be thankful for instructions.

Thanks,
Corwin

ldrn 2009-12-14 01:56

Re: New Port: FreeCiv SDL
 
Yep, the Application Manager can't install .deb files anymore (I believe).

To install right now... you need to drop down to the terminal, get root privileges, and do "sudo dpkg -i freeciv*" -- in the same directory as the .deb files.

As soon as Garage is back up, I'll try to get a version into Extras (well, devel or testing anyway) so you don't need to do that..

REMFwhoopitydo 2009-12-14 08:51

Re: New Port: FreeCiv SDL
 
excellent news, cheers. :)

ldrn 2009-12-25 17:14

Re: New Port: FreeCiv SDL
 
Freeciv is committed to Extras-Devel now and built successfully -- it should make it into the actual repository soon. Merry Christmas. :)

rgoble4 2009-12-25 23:40

Re: New Port: FreeCiv SDL
 
Quote:

Originally Posted by ldrn (Post 441465)
Freeciv is committed to Extras-Devel now and built successfully -- it should make it into the actual repository soon. Merry Christmas. :)

Ugh. I'm sure this is user error, but I've managed to install via application manager from extras-devel and got the following error: "unable to install freeciv"

Status is broken, but able to update. I am unable to uninstall or update freeciv without error.

Dropping to command line got me this message: unable to execute old post-removal script, no such file or directory.

Any ideas?

Thanks!

J0ph33 2009-12-26 01:25

Re: New Port: FreeCiv SDL
 
Quote:

Originally Posted by rgoble4 (Post 441765)
...: "unable to install freeciv"...

Thanks!

same problem here (exactly like he explained it)

markusm 2009-12-26 09:30

Re: New Port: FreeCiv SDL
 
I've got the same problem as well. I have no idea what to do..?

Flandry 2009-12-26 14:37

Re: New Port: FreeCiv SDL
 
I took a look at the rules file and i'm not sure what's causing the broken install, but there seems to be some weirdness with the optification. It seems that the .desktop file and icons are all put in /opt, which afaik isn't going to work as intended. Without comparing the previous rules to the present rules it's hard to say if any of the changes for optification are causing the break, but it's possible. There's actually one point where it looks like a file that shouldn't exist in that location is being moved during install, but i have rather poor comprehension as of yet in the arcane languages of make and its ilk.

mtjioe 2009-12-26 15:53

Re: New Port: FreeCiv SDL
 
I have the same problem. Even uninstall is not possible.

Robot101 2009-12-26 19:11

Re: New Port: FreeCiv SDL
 
The package is broken for most people because it uses /bin/bash in its pre/post install/remove scripts, and the N900 only has /bin/sh by default. As a workaround, you can 'apt-get install bash' from a root shell, then the packages will install/uninstall correctly.

Unfortunately, you then find that because its only a basic port, many game screens are too tall to fit on the screen with the title bar, and you can't put it in full screen. Needs more work...

mtjioe 2009-12-26 21:21

Re: New Port: FreeCiv SDL
 
thank you unfortunately this returns with an error, it will not uninstall
/usr/bin/dpkg returned error code (1)

ldrn 2009-12-26 21:50

Re: New Port: FreeCiv SDL
 
Thank you, Robot101... that seems to be why. The rest of what you said is also accurate. Full screen mode is possible though unintuitive, but makes hitting the options screen impossible -- trying launches the WM window selector instead. Similarly, all the unclosable dialogs I've encountered so far can be closed -- but only by, say, hitting the options screen button (just tapping off the dialog moves the map in the background.)

It needs a lot more work, and I am not sure I have the know-how to do it. Very sorry to everyone who tried the packages and had their systems break... I tried locally, again, in scratchbox and on my device, but since the first think I do is always to install bash and make it my defualt shell, I never even thought to test it sans-bash. Anyway, I just committed a repackaged version that uses sh instead, but I'm not sure if that will be enough to fix mtjioe and markusm's issues or anyone who managed to install in it spite of that, but without bash.

new_bee 2009-12-26 21:55

Re: New Port: FreeCiv SDL
 
Quote:

Originally Posted by mtjioe (Post 442390)
thank you unfortunately this returns with an error, it will not uninstall
/usr/bin/dpkg returned error code (1)

first you need access
type 'sudo gainroot'
then 'apt-get install bash'

Flandry 2009-12-26 21:55

Re: New Port: FreeCiv SDL
 
Quote:

Originally Posted by ldrn (Post 442414)
Thank you, Robot101... that seems to be why. The rest of what you said is also accurate. Full screen mode is possible though unintuitive, but makes hitting the options screen impossible -- trying launches the WM window selector instead. Similarly, all the unclosable dialogs I've encountered so far can be closed -- but only by, say, hitting the options screen button (just tapping off the dialog moves the map in the background.)

This will be "fixed" in the next firmware (which is already in testing as PR 1.1).:
https://bugs.maemo.org/show_bug.cgi?id=5601

J0ph33 2009-12-26 22:24

Re: New Port: FreeCiv SDL
 
Quote:

Originally Posted by new_bee (Post 442419)
first you need access
type 'sudo gainroot'
then 'apt-get install bash'

yeah, then it asks to uninstall freeciv, if u choose yes, it will show the error mtjioe mentioned

so how do we get rid off freeciv...trying to update with the fixed version does not work :(

ldrn 2009-12-26 22:47

Re: New Port: FreeCiv SDL
 
Quote:

Originally Posted by J0ph33 (Post 442449)
so how do we get rid off freeciv...trying to update with the fixed version does not work :(

Theoretically, this might work...

sudo gainroot
apt-get -f install

... or if it doesn't...

sudo gainroot
cd /var/lib/dpkg/info
mv freeciv-*post* /tmp
apt-get remove freeciv-client-sdl freeciv-data freeciv-server

... but it might not, too, and might break things more. (Not a confident disclaimer, but I'd seriously wait for someone else who knows more about debian packaging to chime in.)

Quote:

Originally Posted by Flandry (Post 442420)
This will be "fixed" in the next firmware (which is already in testing as PR 1.1).:
https://bugs.maemo.org/show_bug.cgi?id=5601

That's great news! But I think the best solution is going to be to have a task switcher button there anyway; I have hqh's camkeyd installed, but most people are going to need a software key to switch out, and that's the best place for it for consistency.

And/or a fullscreen toggle button in the bottom right, but the old always fullscreen behavior with a task switcher button would be a much easier way to work around the too-tall dialogs issue.

Robot101 2009-12-27 02:30

Re: New Port: FreeCiv SDL
 
The fix to allow uninstalling it with apt-get would be to 'sudo gainroot' then edit (I used vi, but I don't know what other editors there are) /var/lib/dpkg/info/freeciv-*.p* and change each #!/bin/bash to #!/bin/sh - then the pre/postrm scripts can run properly.

markusm 2009-12-28 14:11

Re: New Port: FreeCiv SDL
 
Quote:

Originally Posted by Robot101 (Post 442631)
The fix to allow uninstalling it with apt-get would be to 'sudo gainroot' then edit (I used vi, but I don't know what other editors there are) /var/lib/dpkg/info/freeciv-*.p* and change each #!/bin/bash to #!/bin/sh - then the pre/postrm scripts can run properly.

Did that - didn't work. It listed seven files and I made the bash->sh change in every one of them. Still won't install or even apply the update.

Any other ideas?

mtjioe 2009-12-28 19:20

Re: New Port: FreeCiv SDL
 
It worked for me though. Changed all bash->sh and could uninstall it.
Haven't tried to reinstall it though. I will wait for a proper version.

markusm 2009-12-28 20:53

Re: New Port: FreeCiv SDL
 
Finally worked for me too. Must have missed something on the first couple of tries.

jsomby 2009-12-29 14:35

Re: New Port: FreeCiv SDL
 
So how to install this game? After reading two pages of mystery can anyone make conclusion? :D

trotor 2009-12-29 17:43

Re: New Port: FreeCiv SDL
 
This worked for me (might need adjusting?)

1. Install bash
1.1. sudo gainroot
1.2. apt-get install bash
2. install freeciv
2.1. Open normal appinstaller and select freeciv from there.
3. Have fun

In case you installed freeciv before you had bash, you need to change bash to sh in those dpkg files previously mentioned. It is not hard job with nano (sudo gainroot, apt-get install nano). N900 keyboard and screen are bit small for this, but you can always SSH to your N900 and do it with putty on your computer. IP number of your N900 can be easily seen with ip number widget or by commandline tools from prompt.

trotor 2009-12-29 17:45

Re: New Port: FreeCiv SDL
 
Quote:

Originally Posted by markusm (Post 443867)
Did that - didn't work. It listed seven files and I made the bash->sh change in every one of them. Still won't install or even apply the update.

Any other ideas?

Did you uninstall previous Freeciv before trying reinstall? With apt-get upgrade or something similar command ?

SubCore 2009-12-29 18:26

Re: New Port: FreeCiv SDL
 
Quote:

Originally Posted by trotor (Post 445468)
Did you uninstall previous Freeciv before trying reinstall? With apt-get upgrade or something similar command ?

see comment #102 in this thread - he already solved it.

ldrn 2009-12-29 19:28

Re: New Port: FreeCiv SDL
 
A new version of Freeciv should be showing up in Extras-Testing soon. I've updated it upstream's 2.1.10, and last night made fullscreen default and added a task switch button to the upper left. (It should work even after 5601 is resolved.) If anyone has the free time to test it, that would be really cool.

I also made the default mouse invisible... does anyone prefer it the other way around or have any other suggestions?

markusm 2009-12-29 20:30

Re: New Port: FreeCiv SDL
 
Does it still require the installing of bash or is it ok to install 'normally'?

ldrn 2009-12-29 20:44

Re: New Port: FreeCiv SDL
 
It should be okay to install normally.

*That* problem is fixed, and I have no issues with it on my N900 yet, but it's still untested at large.

Ashley 2010-01-09 16:13

Re: New Port: FreeCiv SDL
 
Hey

This is my first post on Maemo.org. I made the mistake of installing this app a little early and like many of you i am unable to install the broken app. Since then I have only being installing apps from the testing rep. Anyway... My efforts to uninstall this app have been unsuccessful. I have enabled root access and tried to install bash via the terminal ( apt-get install bash ), but this failed, a number of possible reasons listed. The working method seems to be to change bash to sh, however i dont understand what this means nor how to do it. I'm not an experienced linux user but i'm fine with copying commands into the terminal. I dont want to do anything where there is a risk of further damage. Please could somone spare some time to provide a step by step guide to uninstall this broken app using the bash->sh method. Many thanks & Cheers... :)

ldrn 2010-01-09 19:26

Re: New Port: FreeCiv SDL
 
Hi Ashley... I am *really* sorry the package I made broke your system like that. :( To change bash to sh in one line on the terminal, try this:
Quote:

sudo gainroot
sed -i 's/bash/sh/' /var/lib/dpkg/info/freeciv*inst

Also, is anyone using the version of freeciv currently in extras-devel? I have been using it and it seems stable enough to promote, but am not sure I should.

For possible future development, my thoughts were a "close" button in the top right, the task switch button on the title screen as well as during gameplay, and possibly a button to toggle "clicking" so you could get tooltip help for a button before triggering it... anyone have other ideas on this? It isn't a hildonized app since it's SDL, but it plays pretty well with the stylus.

Ashley 2010-01-09 22:34

Re: New Port: FreeCiv SDL
 
Quote:

Originally Posted by ldrn (Post 461467)
Hi Ashley... I am *really* sorry the package I made broke your system like that. :( To change bash to sh in one line on the terminal, try this:



Also, is anyone using the version of freeciv currently in extras-devel? I have been using it and it seems stable enough to promote, but am not sure I should.

For possible future development, my thoughts were a "close" button in the top right, the task switch button on the title screen as well as during gameplay, and possibly a button to toggle "clicking" so you could get tooltip help for a button before triggering it... anyone have other ideas on this? It isn't a hildonized app since it's SDL, but it plays pretty well with the stylus.

Hey, thanks for your reply. I tried a few things:

lines entered:
~ s sudo gainroot
Root shell enabled

/home/user # sed-i's/bash/sh'/var/lib/dpkg/info/freeciv*inst
[enter]
/bin/sh: sed-is/bash/sh/var/lib/dpkg/info/freeciv*inst: not found
/home/user #
(Also tried)
/home/user # apt-get install bash
[enter]
Reading package lists... Done
Building dependency tree
Reading state information... Done
E: The package freeciv-client-sdl needs to be reinstalled, but i can't find an archive for it.

(ExtrasDev and ExtrasTesting both enabled and wifi connected)

Any suggestions? Thanks

ldrn 2010-01-09 22:43

Re: New Port: FreeCiv SDL
 
Quote:

Originally Posted by Ashley (Post 461720)
/home/user # sed-i's/bash/sh'/var/lib/dpkg/info/freeciv*inst

Thank you for the detailed information! This could be a mispaste, but do you have a space between "sed" and "-i" and "-i" and "s/bash/sh/" and "s/bash/sh/" and "/var/lib/dpkg/info/freeciv*inst"? It should be like...

Code:

sed    -i      's/bash/sh/'      /var/lib/dpkg/info/freeciv*inst
(well, I went overkill, but that should be fine, too.)

You could also try this:

Code:

dpkg --remove --force-remove-reinstreq freeciv-client-sdl

Ashley 2010-01-09 23:02

Re: New Port: FreeCiv SDL
 
Quote:

Originally Posted by ldrn (Post 461730)
Thank you for the detailed information! This could be a mispaste, but do you have a space between "sed" and "-i" and "-i" and "s/bash/sh/" and "s/bash/sh/" and "/var/lib/dpkg/info/freeciv*inst"? It should be like...

Code:

sed    -i      's/bash/sh/'      /var/lib/dpkg/info/freeciv*inst
(well, I went overkill, but that should be fine, too.)

You could also try this:

Code:

dpkg --remove --force-remove-reinstreq freeciv-client-sdl


Hey, the first time i tried, i entered the command with the spaces and it executed without error, but then i tried to uninstall using the app manager and the uninstallation failed.

I just tried again, typed the command perfectly with spaces and now the responce is:
sed: unmatched '/'

I have tripple checked and there was no typos.

Cheers

Ashley 2010-01-09 23:12

Re: New Port: FreeCiv SDL
 
Tried the forced removal:

(i'm not going to type it all, but here are the important bits)
dpkg - warning, overriding problem because --force enabled:
Package is in a very bad inconsistent state - you should reinstall it before attempting a removal.
Removing freeciv-client-sdl ...
dpkg (subprocess): unable to execute post-removal script: No such file or directory

Hope this helps too

Ashley 2010-01-09 23:17

Re: New Port: FreeCiv SDL
 
I am guessing that the game's files and folders have been removed? But the App Manager still thinks its installed. As in somewhere between the pre-removal scrips and the post removal scrips an error has occured? this all coming from a newby btw.

ldrn 2010-01-10 01:45

Re: New Port: FreeCiv SDL
 
If that is the case, you *should* be able to remove things with...
Code:

sudo gainroot
mv /var/lib/dpkg/info/freeciv* /tmp/
dpkg --remove --force-depends --force-remove-reinstreq freeciv freeciv-client-sdl freeciv-server freeciv-data

... but if the files are still there, you'd need to manually delete the files after.

Ashley 2010-01-10 13:03

Re: New Port: FreeCiv SDL
 
I got several serious warnings, I think most of the packages were missing. The good news is that freeciv has now gone from the list of installed apps in app manager. I feel fairly confident that the files are gone, but i shall have a look when i figure out how to view the root dir. There is an app in extras dev that will generate a list of all installed packages and their file sizes etc, when this gets promoted to extras testing, i can check to see if any freeciv packages remain, which i doubt they will. Thanks...

J0ph33 2010-01-14 17:02

Re: New Port: FreeCiv SDL
 
Quote:

Originally Posted by Robot101 (Post 442631)
The fix to allow uninstalling it with apt-get would be to 'sudo gainroot' then edit (I used vi, but I don't know what other editors there are) /var/lib/dpkg/info/freeciv-*.p* and change each #!/bin/bash to #!/bin/sh - then the pre/postrm scripts can run properly.

hey
still have the problem, that i can not uninstall freeciv

can someone just write a step by step guide how to do the quoted, which commands exactly and so on...i am really not familiar with console based text editors

thx!

optimaxxx 2010-01-15 08:12

Re: New Port: FreeCiv SDL
 
ok, some q's about freeciv, how do i access the function buttons?

and is sound on the cards?

otherwise going great!


All times are GMT. The time now is 10:04.

vBulletin® Version 3.8.8