Re: Updated package for the puzzle collection
EdorFaus wrote: On Tuesday 22 September 2009 19:46:50 Steven ** wrote: Perhaps you could do both? By default, install a wrapper script. But also provide a second ipk that creates all the .desktop files for each game. I ended up doing this, but in reverse: by default, install all the .desktop files, but if a launcher is installed, remove them automatically (until launcher is removed). See below for details. I've also created a simple launcher - my thanks to MiPal on opkg.org, who showed me (with an example) that it wasn't very difficult to make such things with Elementary, and thus pointed me in the right direction for making one. It will be packaged separately, once I find the time to do it properly, and will work with the new version of the base package. I only play 3 or 4 of the 24 games anyways... I don't play all of them either. Maybe we could come up with some system for the .desktop files that would let the user disable some, without having them return when the package is upgraded (like they would if they were deleted)? I've now created such a system. Does the following sound usable? (I'm working on finishing the packaging and setting up a public svn repo for it, and will post the new version of the package once that's ready.) The package no longer contains the .desktop files directly, but instead installs a script that generates and removes them, which is called automatically by postinst/prerm. This is based on an included file containing information on all of the games, that can also be used by a launcher to make its own list of games (like my launcher above does). This script looks for a has-launcher file in a specific shared location, and if it exists, removes all the .desktop files instead of installing them (thus removing all the icons except the launcher). This makes it relatively simple for a launcher package to get rid of the other icons, just include that file and call the script to update them in postinst and postrm (to get them back when removing the launcher). (There will be an example of this, is the package for my launcher.) This script can also be called manually, with parameters for disabling and enabling individual desktop icons (regardless of having a launcher or not), without having them just return when the package is updated. This means that people who only play a few games can have just those icons on the desktop, without a separate launcher. It's also possible to have a launcher, but still keep some of the icons on the desktop - which could be useful if you play a few games often, but still play the others sometimes. To do this, it keeps a config file in /etc/sgt-puzzles.conf that it edits when the user changes something. Soo... What do you think? Too horrible to ship? Or maybe even usable? Oh, and, for simplicity I'm thinking it's best to use the MIT license for this code (the part in the base puzzles package anyway), since the games are under the MIT license - but IANAL, so I don't know if there are any (significant) negative consequences of this... Does anyone know? -- EdorFaus ___ Openmoko community mailing list community@lists.openmoko.org http://lists.openmoko.org/mailman/listinfo/community
Re: Updated package for the puzzle collection
Aapo Rantalainen wrote: Looks nice. Release makefile in any place and put link to mailing list. 27 icons in desktop is way too much. (...) The author of BootAtor provides a script which checks if sortdesk is installed (only works with the latest version of sortdesk afaik) this script can easily be modified to check for version 0.2 of sortdesk and place the icons in the correct cetegory (i described how to use flaunch sortdsk 0.2 with the nEo theme on jmccloud.jm.funpic.de) some people are using it, i dunno if it is worth the work though. but what might be worth half an hour of script writing is to check if launcher is installed and add the games to the corresponding category, or at least lets th euser choose on install in which category the icons should be placed (very few lines of sqlite in the script). if this script accepts user input wether the icons shoudl be placed in a launcher category, udating will also work very well since the user can choose if he wants the icons to be placed in any launche category or not. if the user updates the games collection and simply chooses no nothign is changed in launcher sqlite database an everythign si still in order. i cannot really contribute myself, because the last time i worked with sql was some years ago and i currently use gprs to connect to teh internet and researchign would take ages. if nothign is doen within the next 4 weeks i could do it (i shoudl have broadband internet till then) this si just a suggestion that can be applied to any package. (or at least packages like oh-puzzles or metapackages which install lots of apps at once with lots of icons) or package a scrip in aseperate package, to categorize apps from commandline, which woudl be much faster than doing it in launcher if you have many icons that need the same category (note the last launcer version i used was 0.2 or something like that i dunno how user friendly categorizing has become since then) br ___ Openmoko community mailing list community@lists.openmoko.org http://lists.openmoko.org/mailman/listinfo/community
Re: Updated package for the puzzle collection
On Tuesday 22 September 2009 16:53:41 Aapo Rantalainen wrote: Looks nice. Release makefile in any place and put link to mailing list. Well, here's the (cleaned-up) patch for the makefile generator at least. I've sent this upstream, so hopefully it'll compile out of the box soon. 27 icons in desktop is way too much. Make a simple application or script that loads all icons and shows them with name of game and then user can click which want to play (or quit). Then execute that binary. You make it sound so easy... I've never done GUI programming in C before, nor any programming at all in Python or Perl... I've mostly done PHP and Java the last few years. Do you have any hints as to where I should start, to make something like this? No monolithic binary. Agreed. Not by my hand anyway - I've got better things to spend my time on. Are some of these games un-playable with touchscreen? Maybe they can be dropped until it is fixed. At least one is (pattern), though I'm intending to try to fix that (see below). Not sure if I want to remove it just because of that though, it seems some people have setups that let them right-click (e.g. using literki), and pattern was present in oh-puzzles too. Some other games are more difficult without right-clicking, but still playable. If any game can be modified one-button-friendly maybe upstream is interested in it too. I'm intending to try to do this modification, and have asked upstream if they'd be interested in those changes. Can't promise anything about when though. Oh, and not so much modify the game itself, but making right-click emulation possible in the gtk game frontend, for those games that need it. -- EdorFaus Index: mkfiles.pl === --- mkfiles.pl (revision 8657) +++ mkfiles.pl (working copy) @@ -1100,7 +1100,7 @@ \n. # You can define this path to point at your tools if you need to\n. # TOOLPATH = /opt/gcc/bin\n. -CC = \$(TOOLPATH)cc\n. +CC := \$(TOOLPATH)\$(CC)\n. # You can manually set this to `gtk-config' or `pkg-config gtk+-1.2'\n. # (depending on what works on your system) if you want to enforce\n. # building with GTK 1.2, or you can set it to `pkg-config gtk+-2.0'\n. @@ -1108,9 +1108,9 @@ # to 1.2 if it isn't found.\n. GTK_CONFIG = sh -c 'pkg-config gtk+-2.0 \$\$0 2/dev/null || gtk-config \$\$0'\n. \n. -splitline(CFLAGS = -O2 -Wall -Werror -ansi -pedantic -g . +splitline(CFLAGS := -O2 -Wall -Werror -ansi -pedantic -g . (join , map {-I$dirpfx$_} @srcdirs) . - `\$(GTK_CONFIG) --cflags`).\n. + `\$(GTK_CONFIG) --cflags` \$(CFLAGS)).\n. XLDFLAGS = `\$(GTK_CONFIG) --libs`\n. ULDFLAGS =#\n. INSTALL=install\n, ___ Openmoko community mailing list community@lists.openmoko.org http://lists.openmoko.org/mailman/listinfo/community
Re: Updated package for the puzzle collection
On Tuesday 22 September 2009 19:46:50 Steven ** wrote: What are the new games? Filling, Galaxies and Unequal are new, and in a way Loopy too, since it never worked (for me anyway) in oh-puzzles. There are also new features, such as Loopy supporting more than just square grid layouts (but I don't know everything about what's new - I don't even know when oh-puzzles was forked). I'd prefer to be able to launch a specific game right away, as opposed to some sort of launcher script that makes me select which game I want to launch. Same here, really. But I can understand that others might want one. Perhaps you could do both? By default, install a wrapper script. But also provide a second ipk that creates all the .desktop files for each game. Well, that would have the wrapper show up as an icon even when you have the other package installed. However, I could make two extra packages - one for separate icons, and one with the wrapper, and Recommends: both as alternatives (with OR between them). That should satisfy both use cases, right? Um... does opkg support Recommends: to suggest installation of other packages? (Like how apt does unless you tell it not to?) If not, I suppose I could come up with some kind of postinst magic to remove the wrapper if the other package is installed... I only play 3 or 4 of the 24 games anyways... I don't play all of them either. Maybe we could come up with some system for the .desktop files that would let the user disable some, without having them return when the package is upgraded (like they would if they were deleted)? Or maybe the games should be split into separate packages? Seems a bit much with 27 different packages though, yet otherwise, what games should be put together in the same package? -- EdorFaus ___ Openmoko community mailing list community@lists.openmoko.org http://lists.openmoko.org/mailman/listinfo/community
Updated package for the puzzle collection
Hi, I finally got tired enough of Loopy not working to do something about it, and ended up creating an updated package. This package has only been tested on SHR-U, but I think it should work on OM and other opkg-based ones too? As long as they have GTK+... The oh-puzzles package is an old fork of Simon Tatham's Portable Puzzle Collection[1], that doesn't seem to be updated these days. So I grabbed the original source from ST's repository instead, and compiled that with the OM toolchain. Only minor changes to the makefile was needed. Just for the record, this is NOT a new fork, nor do I intend to make one, this is just a build of the upstream source. Compared with oh-puzzles, this new package contains several new games and features, a working Loopy, and icons on all the desktop shortcuts. The icons were generated from the same source, using code that already existed for that purpose. The .desktop files are my addition though. On that note: does anyone know what the size(in pixels) is of the desktop icons on the default launcher? (so I can provide that size) I intend to maintain this package as new versions come out, and have (with that in mind) created a personal repository[2] holding it. I also uploaded it to opkg.org[3], so people can find it. I'm going to do some work on automating the building process, and hopefully get my changes into upstream source when I'm done (there's already code there for other platforms). One problem is the icon generation, which needs an X server and to run the built executables. In the meantime, anyone who wants more detail on the makefile changes or other parts of the process, can just ask me. I also hope to take a look at the frontend and getting support for singlebutton mice (such as the touchscreen) into it, and have some ideas for how to do that; but as I'm not familiar with GTK, don't hold your breath. This probably won't happen (by my hand) anytime soon. One thing of note is that having 27 new icons on the desktop from just this one package can be a bit much (though similiar to oh-puzzles' 24). Having a launcher (as fylefou suggested on opkg.org) might be a good alternative, but I don't know how (best) to make one, and don't know if everyone would like one (people using sortdesk might prefer not). I also considered making a monolithic binary with all the games in one, but as I would have to make a new frontend to do that, it's not something I could do quickly. Besides, that would probably take more memory to run. If anyone has any good ideas for this, I'm listening. -- EdorFaus [1] http://www.chiark.greenend.org.uk/~sgtatham/puzzles/ [2] http://ipk.edorfaus.info/armv4t [3] http://www.opkg.org/package_283.html ___ Openmoko community mailing list community@lists.openmoko.org http://lists.openmoko.org/mailman/listinfo/community
Re: Updated package for the puzzle collection
Looks nice. Release makefile in any place and put link to mailing list. 27 icons in desktop is way too much. Make a simple application or script that loads all icons and shows them with name of game and then user can click which want to play (or quit). Then execute that binary. No monolithic binary. Are some of these games un-playable with touchscreen? Maybe they can be dropped until it is fixed. If any game can be modified one-button-friendly maybe upstream is interested in it too. -Aapo Rantalainen ___ Openmoko community mailing list community@lists.openmoko.org http://lists.openmoko.org/mailman/listinfo/community
Re: Updated package for the puzzle collection
What are the new games? I have oh-puzzles installed with the 24 separate icons. But, I'm using c_c's launcher app to provide a Games category. I'd prefer to be able to launch a specific game right away, as opposed to some sort of launcher script that makes me select which game I want to launch. I only play 3 or 4 of the 24 games anyways... Perhaps you could do both? By default, install a wrapper script. But also provide a second ipk that creates all the .desktop files for each game. -Steven On Tue, Sep 22, 2009 at 7:45 AM, EdorFaus edorf...@xepher.net wrote: Hi, I finally got tired enough of Loopy not working to do something about it, and ended up creating an updated package. This package has only been tested on SHR-U, but I think it should work on OM and other opkg-based ones too? As long as they have GTK+... The oh-puzzles package is an old fork of Simon Tatham's Portable Puzzle Collection[1], that doesn't seem to be updated these days. So I grabbed the original source from ST's repository instead, and compiled that with the OM toolchain. Only minor changes to the makefile was needed. Just for the record, this is NOT a new fork, nor do I intend to make one, this is just a build of the upstream source. Compared with oh-puzzles, this new package contains several new games and features, a working Loopy, and icons on all the desktop shortcuts. The icons were generated from the same source, using code that already existed for that purpose. The .desktop files are my addition though. On that note: does anyone know what the size(in pixels) is of the desktop icons on the default launcher? (so I can provide that size) I intend to maintain this package as new versions come out, and have (with that in mind) created a personal repository[2] holding it. I also uploaded it to opkg.org[3], so people can find it. I'm going to do some work on automating the building process, and hopefully get my changes into upstream source when I'm done (there's already code there for other platforms). One problem is the icon generation, which needs an X server and to run the built executables. In the meantime, anyone who wants more detail on the makefile changes or other parts of the process, can just ask me. I also hope to take a look at the frontend and getting support for singlebutton mice (such as the touchscreen) into it, and have some ideas for how to do that; but as I'm not familiar with GTK, don't hold your breath. This probably won't happen (by my hand) anytime soon. One thing of note is that having 27 new icons on the desktop from just this one package can be a bit much (though similiar to oh-puzzles' 24). Having a launcher (as fylefou suggested on opkg.org) might be a good alternative, but I don't know how (best) to make one, and don't know if everyone would like one (people using sortdesk might prefer not). I also considered making a monolithic binary with all the games in one, but as I would have to make a new frontend to do that, it's not something I could do quickly. Besides, that would probably take more memory to run. If anyone has any good ideas for this, I'm listening. -- EdorFaus [1] http://www.chiark.greenend.org.uk/~sgtatham/puzzles/ [2] http://ipk.edorfaus.info/armv4t [3] http://www.opkg.org/package_283.html ___ Openmoko community mailing list community@lists.openmoko.org http://lists.openmoko.org/mailman/listinfo/community ___ Openmoko community mailing list community@lists.openmoko.org http://lists.openmoko.org/mailman/listinfo/community