maemo.org - Talk

maemo.org - Talk (https://talk.maemo.org/index.php)
-   Development (https://talk.maemo.org/forumdisplay.php?f=13)
-   -   PyPackager (https://talk.maemo.org/showthread.php?t=9617)

Khertan 2007-09-09 21:33

PyPackager
 
http://khertan.net/images/pypackager1.png

I've just release an alpha version of PyPackager, a small GUI tool to create package on maemo based on bdist_maemo.

You can find it on my web site : http://khertan.net/

It s an alpha version.

Khertan 2007-09-11 08:01

Re: PyPackager
 
PyPackager 0.2.0 is available. Now PyPackager remove MacOSX hidden file when making a package.

twaelti 2007-09-11 09:33

Re: PyPackager
 
You are my saviour :-) This way, I might finally be able to pack my "mClock" application into something distributable!
One first question: What kind of stuff do I need to put in the source folder? How to structure it (subfolders?) I put the two .py files in there, plus some .jpg-Images. However, I've also prepared a mClock.desktop file and a .png-Icon. Do they get used or do you create a default.desktop and icon yourself within pyPackager?
(is it based on the updated script available here? this would already offer icon support)

Glad for two lines of help :-)
Thanks!
-Tom

pipeline 2007-09-11 18:15

Re: PyPackager
 
I'm also interested in example... i just have 1 .py file in directory and nothing happens

Traecer 2007-09-11 19:01

Re: PyPackager
 
OH thank you! This will come in handy, if I can ever get my app to work!

Khertan 2007-09-11 20:16

Re: PyPackager
 
I ll write a tutorial on how to use it.

But briefly,

It s a tool to create a package from a folder witch contains the files to install in tree structure.

For example, for a simple python script nammed 'plong.py' launched by a sh script you need to create this structure in a folder nammed 'sources' :

sources/usr/bin/plong (a sh file with a simple command : python '/usr/lib/plong/plong.py'
sources/usr/lib/plong/plong.py
sources/usr/share/application/hildon/plong.desktop
sources/usr/share/pixmaps/plong.png

then select the folder 'sources' with the choose folder in PyPackager

Khertan 2007-09-12 07:44

Re: PyPackager
 
A new version of PyPackager is available. I've added an open/save function to open and save package project, i've added an icon, and added an function to calc automatically the "installed-size" information in created package.

Still available on my web site : http://khertan.net/
Don't hesitate to report any bugs to my bugs tracker.

twaelti 2007-09-12 13:59

Re: PyPackager
 
1 Attachment(s)
Quote:

Originally Posted by Khertan (Post 74973)
A new version of PyPackager is available.

...and allowed me to finally create a PACKAGED alpha version of mClock, my simple clock for the N800 that includes a day/night worldmap. Download the attachement (90 kB) to try it out.
Version 0.0.1 however, so be warned :-) Press the bottom left corner of the screen to switch between a small and a large clock view. Press any hardware button to quit. Still quite a ressource hog, don’t let it run too long or it might empty your battery… But ok for a first glimpse. have fun and a very big thank you to Khertan!

konttori 2007-09-12 15:21

Re: PyPackager
 
Great Stuff!! Kudos To You Khertan!

cvmiller 2007-09-30 15:36

Re: PyPackager
 
Quote:

Originally Posted by Khertan (Post 74973)
A new version of PyPackager is available. I've added an open/save function to open and save package project, i've added an icon, and added an function to calc automatically the "installed-size" information in created package.

Still available on my web site : http://khertan.net/
Don't hesitate to report any bugs to my bugs tracker.

Great stuff Khertan! I have a couple of questions, though.
1) I have successfully created a deb from a tree containing a binary applicaiton. When I run the application, no icon appears in the lower left menu bar (showing the applications that are running). What does one need to get the icon for the app to show up in the "task bar"?

2) this application is not GTK based (it is Nedit, a powerful GUI editor), could this be my problem with the icon not showing up in the "task bar"?

Thanks in advance!

Craig...

Khertan 2007-10-01 07:06

Re: PyPackager
 
Hi,

0) Thanks :)

1) You need to add your icon to /usr/share/pixmaps/youricon.png and declare it in the /usr/share/applications/hildon/nedit.desktop take a look at the pypackager desktop file in /usr/share/applications/hildon/pypackager.desktop

2) I don't think it 's a problem.

twaelti 2007-10-01 11:44

Re: PyPackager
 
Quote:

Originally Posted by cvmiller (Post 78597)
1) I have successfully created a deb from a tree containing a binary applicaiton. When I run the application, no icon appears in the lower left menu bar (showing the applications that are running). What does one need to get the icon for the app to show up in the "task bar"?

2) this application is not GTK based (it is Nedit, a powerful GUI editor), could this be my problem with the icon not showing up in the "task bar"?

1) see 2 :-)
2) I got this information on the maemo developers list a few days ago (and have since fixed MClock, but not yet uploaded...): Your problem is "that the WM_CLASS provided by your application window and the one specified in its .desktop file do not match. Therefore Maemo Task Navigator cannot match what was started from the menu and the window the application opened. [...]
Gtk sets WM_CLASS automatically to the application (binary) name, so this is usually only a problem for non-Gtk apps, e.g. SDL games."

Therefore, just make sure to set the X11 WM_CLASS inside your application to the same value that you wrote into yourapp.desktop file.

twaelti 2007-10-01 11:46

Re: PyPackager
 
Quote:

Originally Posted by Khertan (Post 78735)
1) You need to add your icon to /usr/share/pixmaps/youricon.png and declare it in the /usr/share/applications/hildon/nedit.desktop take a look at the pypackager desktop file in /usr/share/applications/hildon/pypackager.desktop

Important: this explanation only suffices for GTK apps! If someone has a SDL or pure PyGame app, it won't work. See details in my previous post.

BUT: if you're already mentioning that icon... :) Could you add a feature to PyPackager that would automatically take this icon (or let me manually select an icon), then encode it in the debian package? This way, PyPackaged debs could have their proper icon instead of the default one :D

Thanks again!
-Tom

cvmiller 2007-10-01 14:41

Re: PyPackager
 
Quote:

Originally Posted by twaelti (Post 78769)
1) see 2 :-)
2) I got this information on the maemo developers list a few days ago (and have since fixed MClock, but not yet uploaded...): Your problem is "that the WM_CLASS provided by your application window and the one specified in its .desktop file do not match. Therefore Maemo Task Navigator cannot match what was started from the menu and the window the application opened. [...]
Gtk sets WM_CLASS automatically to the application (binary) name, so this is usually only a problem for non-Gtk apps, e.g. SDL games."

Therefore, just make sure to set the X11 WM_CLASS inside your application to the same value that you wrote into yourapp.desktop file.

Thanks! This make sense. I'll have to poke around the Nedit to see what the WM_CLASS is.

Thanks!

Craig...

Khertan 2007-10-05 07:45

Re: PyPackager
 
PyPackager has just been updated to version 0.4 ...

"
BUT: if you're already mentioning that icon... Could you add a feature to PyPackager that would automatically take this icon (or let me manually select an icon), then encode it in the debian package? This way, PyPackaged debs could have their proper icon instead of the default one "
You can do it now ... :)

konttori 2007-10-06 07:48

Re: PyPackager
 
Hey...Great stuff! I need to start using your packager soon to package ukmp.

Another feature request would be if you have the time to do it, is:
Can you add support to upload the package to the extras repository?
There are instructions on how to do it, but it's been too painful for me so far (as an osx user) to do it (mostly because there is no dedsign for osx). After that, it would make your application a one-stop place to create maemo applications and submit them for the general public to consume. Also would make it easy for people to create updates of their applications.

twaelti 2007-10-07 19:19

Re: PyPackager
 
Quote:

Originally Posted by Khertan (Post 79887)
You can do it now ... :)

BEAUTIFUL - thanks!

Darius2006 2007-10-07 23:26

Re: PyPackager
 
Quote:

Originally Posted by Khertan (Post 79887)
PyPackager has just been updated to version 0.4 ...

"
BUT: if you're already mentioning that icon... Could you add a feature to PyPackager that would automatically take this icon (or let me manually select an icon), then encode it in the debian package? This way, PyPackaged debs could have their proper icon instead of the default one "
You can do it now ... :)

Really great stuff.
Just downloaded, installed and testing.
Opening files system tree to save a file in PP
/usr/bin hangs on my N770 for 20-30 sec.

Darius

Darius2006 2007-10-07 23:26

Re: PyPackager
 
Quote:

Originally Posted by Khertan (Post 79887)
PyPackager has just been updated to version 0.4 ...

"
BUT: if you're already mentioning that icon... Could you add a feature to PyPackager that would automatically take this icon (or let me manually select an icon), then encode it in the debian package? This way, PyPackaged debs could have their proper icon instead of the default one "
You can do it now ... :)

Really great stuff.
Just downloaded, installed and testing.
Opening files system tree to save a file in PP
/usr/bin hangs on my N770 for 20-30 sec.
Mayby due to low on memory.

Darius

pipeline 2007-10-07 23:58

Re: PyPackager
 
Keeps getting better! Thanks my icon now shows up in application manager... perfect!

Darius why are you opening /usr/bin? I usually set up a directory like /home/usr/sources and copy only my files directories into respective subdirectories. Pypackager would then point to /home/user/sources root directory. If the file you want to backup is in the bin directory then copy it from xterm to your /home/usr/sources/bin/ directory. Thats kind of a merge tree. Hope i understood your question right.

Khertan 2007-10-08 04:22

Re: PyPackager
 
Quote:

Opening files system tree to save a file in PP
/usr/bin hangs on my N770 for 20-30 sec.
Too many files ... it s normal...

Quote:

Can you add support to upload the package to the extras repository?
There are instructions on how to do it, but it's been too painful for me so far (as an osx user) to do it (mostly because there is no dedsign for osx). After that, it would make your application a one-stop place to create maemo applications and submit them for the general public to consume. Also would make it easy for people to create updates of their applications.
I'm studying it, because my repository doen't work and i don't have the time to maintain it. But i ll be slow to implements. I dev mainly in the public transport. So without wireless connection to test it :)

cvmiller 2007-10-08 21:40

Re: PyPackager
 
Quote:

Originally Posted by Khertan (Post 79887)
PyPackager has just been updated to version 0.4 ...

Hey that is great!. I just used 0.4 and noted the place for the icon. I have a feature request to increase the size of the "Description" field. I know that it scrolls to the right, but I think a 2 or 3 line description field would encourage deb creators to put in more info in that field.

I have run across too many debs which are too brief in their description.

Thanks for the great app!

Craig...

Khertan 2007-10-09 07:08

Re: PyPackager
 
Quote:

but I think a 2 or 3 line description field would encourage deb creators to put in more info in that field.
Good idea ... i ll need to modify the UI to have a notebook (not very difficult) ... there no place left on the screen :)

cvmiller 2007-10-11 01:38

Re: PyPackager
 
1 Attachment(s)
Quote:

Originally Posted by Khertan (Post 80753)
Good idea ... i ll need to modify the UI to have a notebook (not very difficult) ... there no place left on the screen :)

Perhaps it appears there is more room on my screen. But a little copying and pasting with GIMP, and the screen could look like this:

Craig...

BTW, great stuff!

Khertan 2007-10-11 04:12

Re: PyPackager
 
You have room because the onscreen virtual keyboard isn't displayed here ... ;)

cvmiller 2007-10-12 02:18

Re: PyPackager
 
Quote:

Originally Posted by Khertan (Post 81269)
You have room because the onscreen virtual keyboard isn't displayed here ... ;)

Good point. I am always using my "think outside" BT keyboard (makes it easier for typing that longer description).

Thanks for the really useful software.

Craig...

Khertan 2007-10-16 11:48

Re: PyPackager
 
PyPackager updated to version 0.5.0.

I've modify "save" function and added a "save as" feature.
I've also change the UI to be able to enter a multi-line description ;)

smackpotato 2007-10-25 03:45

Re: PyPackager
 
The packages i created wouldn't install. When i ran dpkg directly it had a problem with subprocesses tar and find although a deb was created any suggestions.
thanks

Khertan 2007-10-25 07:10

Re: PyPackager
 
Hum ...

Could you send me the .deb created and the folder tree to create this .deb ?
Also could you send me the error wich is output by dpkg ?

khertan_atwithoutspam_khertan dot withoutspam net

Thanks.

pipeline 2007-10-29 12:17

Re: PyPackager
 
I have run into a situation where i might need a postinst script (or modification to existing one?) and was wondering if this was functionality you might want to add into pypackager (or maybe it can already be done).

Are you generating an install script which gets executed? If so can you add text field where we can add line(s) to be inserted at a certain point?

Thanks again for great program!

Khertan 2007-10-29 13:33

Re: PyPackager
 
At this time it's not possible to add post install script and post remove script with the existing PyPackager version.

But as you need it, i ll make a new version with this feature. I'll try to do it for tomorrow, but i can't garantee it. At last it's ll be available at the end of the week.

pipeline 2007-10-29 15:27

Re: PyPackager
 
Thanks that would be great. No rush, I still need to figure out what i'm going to put into the script.

Khertan 2007-10-30 08:13

Re: PyPackager
 
For information pre/post install/remove script is working for the next release. I need to do more test to be sure all work. But it ll be available soon.

pipeline 2007-10-30 11:07

Re: PyPackager
 
:)

Thanks, this program is becoming more and more useful.

I think you ought to add some text to package descriptions like ('\nPackaged with PyPackager'). It could be default text (optional overwrite) or mandatory (concatenated to description on pakage generation).

Khertan 2007-10-30 12:19

Re: PyPackager
 
At the beginning of pypackager, i want to add a concatenated description on the package created, but i think it more annoying than usefull.

I prefer user like you witch freely said that they use pypackager :)

Furthermore, it ll be annoying for users when they make a search on a package with the string "pypackager" seeing millions ( ;) ) packages in the result.

Khertan 2007-10-30 12:48

Re: PyPackager
 
New version 0.6.0 is now available.

http://khertan.net/
or
http://maemo.org/

pipeline 2007-10-30 16:06

Re: PyPackager
 
Quote:

Originally Posted by Khertan (Post 88595)
I prefer user like you witch freely said that they use pypackager :)

Yes, I definately would and do mention it whenever possible.

Thanks again, it may take a bit to fully test out how i intend to use it but i'll let you know. Can I do python in these scripts? If not i have workaround that doesn't need python. Just some pattern matching to /etc/sudoers that i think requires perl or python and i already require python.

TA-t3 2007-10-30 16:16

Re: PyPackager
 
For debian package pre/post rm/inst scripts you can use whatever you want, even Python. The requirement is simply that the interpreter or programs you call are actually available on the N800/770.

(That's one of the problems with just rebuilding a standard debian desktop package, quite often the standard scripts are a bit too fancy (using non-tablet-existing tools) to run. Which is probably the reason for the problems with de-installing the zsh package, for example.)

pipeline 2007-10-30 18:18

Re: PyPackager
 
Excellent explanation, thanks. If i ever need a remove script, i'll use standard shell script to be safe.

twaelti 2007-10-30 21:48

Re: PyPackager
 
Quote:

Originally Posted by Khertan (Post 88603)
New version 0.6.0 is now available.

Thanks - now it has already surpassed my needs :-)
(BTW: in maemo downloads, your homepage links to an old version, not to your project homepage)


All times are GMT. The time now is 02:46.

vBulletin® Version 3.8.8