webOS Nation Forums

webOS Nation Forums (/)
-   Canuck Coding (http://forums.webosnation.com/canuck-coding/)
-   -   Ipk Packager (http://forums.webosnation.com/canuck-coding/237326-ipk-packager.html)

Jason Robitaille 03/19/2010 10:32 PM

Ipk Packager
 
[B][U]Ipk Packager v1.5[/U][/B]

This is a simply utility to quickly build ipk files. It's cross-platform, so virtually anyone can use it.

Supports the full range of webOS ipk features, including postinst/prerm scripts and the source JSON details.

Uses my custom jpkg-webos library: [url=http://code.google.com/p/jpkg-webos/]jpkg-webos - Project Hosting on Google Code[/url]

Follows the WebOS-Internals packaging standard: [url=http://www.webos-internals.org/wiki/Packaging_Standards]Packaging Standards - WebOS Internals[/url]


In addition, if the folder you select is a webOS app folder (as most would be), several of the text field will auto-load from the appinfo.json file. Saves time that way :D



[B][URL="http://ipk-packager.googlecode.com/files/Ipk%20Packager.jar"][SIZE="3"]Download Here[/SIZE][/URL][/B]


[URL=http://img179.imageshack.us/img179/3160/ipkpackager.jpg][IMG]http://img179.imageshack.us/img179/3160/ipkpackager.th.jpg[/IMG][/URL] [URL=http://img132.imageshack.us/img132/3980/ipkpackager2.jpg][IMG]http://img132.imageshack.us/img132/3980/ipkpackager2.th.jpg[/IMG][/URL]

This is an MIT opensource release: [url=http://code.google.com/p/ipk-packager/]ipk-packager - Project Hosting on Google Code[/url]

I made this app for 2 reasons: (1) I wanted to test out jpkg-webos java library and (2) for homebrew developers. Testing was successful, so here's it's first public release.

Up until now, the only way to create advanced homebrew ipk packages (with postinst/prerm scripts) was via Linux commandline scripts. Now, anyone can, and little knowledge is needed.

Hopefully this can help others, in the same way Unified Diff Creator has helped others :)


[B]Change Log[/B]
v1.5 - January 3, 2011
- Re-added Source field for json
- Added MinWebOSVersion and MaxWebOSVersion json fields
- Added custom support for pmPostInstall and pmPreRemove scripts

v1.32 - December 27, 2010
- Replaced Source field with a Location field to to immediate priority; Source, and the other new parameters will be included in a future release

v1.3 - April 16, 2010
- Fixed an issue preventing palm-style scripts from running
- Improved appinfo.json detection
- Fixed source json Type field output

v1.2 - April 3, 2010
- Now supports Palm's special pmPostInstall and pmPreRemove scripts
- Fixed several minor "Author" field issues
- Improved text field handling overall
- Increased the screenshot url list to now be 3 lines height
- Improved Control parsing

v1.1 - March 29, 2010
- Automatic Windows-to-Linux endline conversion for postinst/prerm scripts
- Can auto-detect postinst, and prerm files
- Can auto-detect and parse control files
- Fixed issue with package type and architecture not appearing correctly in outputted ipk
- Fixed issue with description text box always setting caret to end

v1.0 - March 19, 2010
- Initial release

Veritas06 03/19/2010 10:42 PM

I saw your tweet when you updated your jpkg packager. Thanks for yet another webOS application!

amateurhack 03/20/2010 12:01 AM

you know i'm not a programmer, but I appreciate all that you do, and appreciate that thos will help other programmers.

somline 03/20/2010 04:15 AM

Thanks Jason, would be nice to have.

Unfortunately your Prog does not work on (my) OSX. As soon as I define a directory it resizes the window to a very small portion. From this point it's not usable.
Would love to use your prog instead of the [URL="http://forums.precentral.net/web-os-development/235149-extract-build-ipkg-mac-osx.html"]scripts[/URL] I found for that matter

Jason Robitaille 03/20/2010 04:19 AM

[QUOTE=somline;2318654]Thanks Jason, would be nice to have.

Unfortunately your Prog does not work on (my) OSX. As soon as I define a directory it resizes the window to a very small portion. From this point it's not usable.
Would love to use your prog instead of the [URL="http://forums.precentral.net/web-os-development/235149-extract-build-ipkg-mac-osx.html"]scripts[/URL] I found for that matter[/QUOTE]
hmm, very interesting, I'll look into it. What's your screen resolution?

somline 03/20/2010 04:27 AM

[QUOTE=Jason Robitaille;2318656]hmm, very interesting, I'll look into it. What's your screen resolution?[/QUOTE]

That would be nice ;-)
1280 x 800 (MacBook)

Jason Robitaille 03/20/2010 04:50 AM

[QUOTE=somline;2318658]That would be nice ;-)
1280 x 800 (MacBook)[/QUOTE]
K, I just released a hotfix. Redownload from the first post (may need to clear browser cache). Should fix the issue :)

somline 03/20/2010 04:58 AM

[QUOTE=Jason Robitaille;2318667]K, I just released a hotfix. Redownload from the first post (may need to clear browser cache). Should fix the issue :)[/QUOTE]

Thanks alot Jason. Works like a charm (like all your stuff ;-).

Blacklight 03/21/2010 09:19 AM

1 Attachment(s)
Thanks Jason.. however, I still have GUI problems on my MacBook, see attachment for a screenshot. I can't resize it to make it bigger.

Maybe setPreferredSize(Dimension) or setMinimumSize(Dimension) on your ContentPane fixes it :)

EDIT: Nevermind.. that's weird, it worked the second time I opened it. Thanks anyway ;)

somline 03/21/2010 09:31 AM

[QUOTE=Blacklight;2320615]Thanks Jason.. however, I still have GUI problems on my MacBook, see attachment for a screenshot. I can't resize it to make it bigger.

Maybe setPreferredSize(Dimension) or setMinimumSize(Dimension) on your ContentPane fixes it :)

EDIT: Nevermind.. that's weird, it worked the second time I opened it. Thanks anyway ;)[/QUOTE]

I had the same, just ignore it the first time.

SiLlY 03/21/2010 11:06 AM

Awesome! Trying to upload some things to the emu for packaging.. wasn't working because of size limitation. Thanks!! This will make it way easier!

DrewPre 03/22/2010 09:15 PM

I have a java service that I have created a ipk for.....however, the script files reside in the Jar file with the class file.

The service fails though....saying it can't find the sript file specified.

If the path within the Jar file is as stated below how should I code the JAVA file so that it references the right path in order to see the script file.

Jar File:
[code]
/com/tntservices/ppbkuservice/PPBkuService.class
/com/tntservices/ppbkuservice/ppbku
/com/tntservices/ppbkuservice/pprstr
/com/tntservices/ppbkuservice/ppfldr
/com/tntservices/ppbkuservice/bldIncList
/com/tntservices/ppbkuservice/bldExList [/code]

my java source references "ppbku" as the executable script file currently.

Should it be the full path as specified??? edit: I am lost cuz that didn't work either.

Jason Robitaille 03/22/2010 09:41 PM

[QUOTE=DrewPre;2324223]I have a java service that I have created a ipk for.....however, the script files reside in the Jar file with the class file.

The service fails though....saying it can't find the sript file specified.

If the path within the Jar file is as stated below how should I code the JAVA file so that it references the right path in order to see the script file.

Jar File:
[code]
/com/tntservices/ppbkuservice/PPBkuService.class
/com/tntservices/ppbkuservice/ppbku
/com/tntservices/ppbkuservice/pprstr
/com/tntservices/ppbkuservice/ppfldr
/com/tntservices/ppbkuservice/bldIncList
/com/tntservices/ppbkuservice/bldExList [/code]

my java source references "ppbku" as the executable script file currently.

Should it be the full path as specified??? edit: I am lost cuz that didn't work either.[/QUOTE]
hmm, this seems completely off topic. Is there an Ipk Packager connection I'm missing? Might be best to create a separate thread if it's unrelated

For my services, whenever I need to extract a script file to execute, I just use something like super.getClass().getResourceAsStream("resources/script.sh") and write the stream out to a new file in /tmp/.

Jason Robitaille 03/29/2010 08:16 PM

I've just updated Ipk Packager to v1.1.

v1.1 - March 29, 2010
- Automatic Windows-to-Linux endline conversion for postinst/prerm scripts
- Can auto-detect postinst, and prerm files
- Can auto-detect and parse control files
- Fixed issue with package type and architecture not appearing correctly in outputted ipk
- Fixed issue with description text box always setting caret to end

Jason Robitaille 04/03/2010 02:49 AM

Another update :)

v1.2 - April 3, 2010
- Now supports Palm's special pmPostInstall and pmPreRemove scripts
- Fixed several minor "Author" field issues
- Improved text field handling overall
- Increased the screenshot url list to now be 3 lines height
- Improved Control parsing


The big thing with supporting pmPostInstall and pmPreRemove scripts is that the built-in ApplicationInstallUtility on the webOS (that installs apps via palm in-install with the SDK, as well as from the App Catalog) runs theses scripts if they're found.

Yes, that is a security risk, and that's the main reason Palm doesn't include (nor allow) 3rd party apps with such scripts.

The main advantage is that you can remove these apps via orange+tap on the launcher icon, like other apps, and the advanced homebrew will uninstall with the script.

This technique is currently only used by Preware Alpha, but now with the ease-of-use Ipk Packager, now virtually any advanced homebrew developer to use the special palm postinst/prerm scripts :)

DrewPre 04/13/2010 08:01 PM

what do I specify in the 'add a depends' dialog??

I need to add a dependancy for Lighty Web Server and ez-ipupdate.

I also can't get my service to register as anything other than an application. It's not an application, its a service. And no matter what I put for 'Category', 'Type', or 'Section', it keeps showing up in Applications in PreWare.

Any help would be appreciated.

Update:

First I want to thank you, Jason. Your app saved me hours and a few gray hairs.

Thank you thank you thank you!

I still haven't figured out what to put for dependencies.... but I have resolved all the other issues.

the ipk pkgr works wonderfully, but there is a flaw that I have been able to reproduce consistently.

Namely whatever, I put in for 'Category' or 'Type', the IPK gets built with those two flags set to MISC and Application.

I used a script I was provided with the unbuild the ipk that ipk pkgr built and inspected the CONTROL file and this was the case. I was able to reproduce it several times. So I ended up just editing the control file and using the script to rebuild the ipk after ipk pkgr designed the CONTROL file I new exactly what to put and where so it would be correctly categorized in PreWare and webOS QI!

Just thought you should know. Awesome app! Luv your work Bro!

Jason Robitaille 04/16/2010 06:57 AM

Ipk Packager's been updated

v1.3 - April 16, 2010
- Fixed an issue preventing palm-style scripts from running
- Improved appinfo.json detection
- Fixed source json Type field output





[QUOTE=DrewPre;2380447]what do I specify in the 'add a depends' dialog??
[...]
whatever, I put in for 'Category' or 'Type', the IPK gets built with those two flags set to MISC and Application.[/QUOTE]
For depends, you add package ids of packages that yours depends on being installed.

Actually, Category is set properly in the Source's JSON :) I leave the Section field in the control area as Misc as category is primarily determined via Source JSON and in the style of palm-package having Section as "Misc."

And as for Type, yea, that was a bug, thanks for reporting it. :) Ipk Packager 1.3 fixes it.

morellox 06/03/2010 08:59 AM

I used this to package my second application.... 2 days before it was to be used for an event.... it never went live, my first similar app went live in a matter of hours on the beta catalog.... I just assumed this would be fine, I checked on it after the event... still pending/submitted or whatever...

then i get an email tuesday that said basically that I didn't package it with palm-package so they denied it...

so I wrote them back a pretty fired up email, no response.... total fail

not your fault of course Jason, appreciate all your work, but dammit.... that screwed me...

palm-package refuses to run for me for whatever reason, I packaged my first app by copying the folder out of my workspaces in Eclipse, pushing it up to Ares and then having Ares package the files.


All times are GMT -5. The time now is 05:15 PM.



Content Relevant URLs by vBSEO 3.6.0