webOS Nation Forums >  webOS Developer Forums >  Canuck Coding > Ipk Packager
Ipk Packager
  Reply
Like Tree6Likes

 
Thread Tools Display Modes
Old 03/19/2010, 11:32 PM   #1 (permalink)
Legend
 
Jason Robitaille's Avatar
 
Posts: 3,856
Ipk Packager v1.5

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: jpkg-webos - Project Hosting on Google Code

Follows the WebOS-Internals packaging standard: Packaging Standards - WebOS Internals


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



Download Here




This is an MIT opensource release: ipk-packager - Project Hosting on Google Code

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


Change Log
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
__________________
If you've liked my software, please consider to towards future development.

Developer of many apps such as: WebOS Quick Install, WebOS Theme Builder, Ipk Packager, Unified Diff Creator, Internalz Pro, ComicShelf HD, LED Torch, over 70 patches and more.

@JayCanuck @CanuckCoding Facebook

Last edited by Jason Robitaille; 01/03/2011 at 01:52 PM.
Jason Robitaille is offline   Reply With Quote
Liked by GreenHex, mhous33, sshaka and 2 others like this.
Old 03/19/2010, 11:42 PM   #2 (permalink)
Member
 
Veritas06's Avatar
 
Posts: 603
I saw your tweet when you updated your jpkg packager. Thanks for yet another webOS application!
__________________
Fix 'Hidden' SMS Conversations
PreThemer Profile
Hide Amazon MP3 Store
Veritas06 is offline   Reply With Quote
Old 03/20/2010, 01:01 AM   #3 (permalink)
Member
 
amateurhack's Avatar
 
Posts: 310
you know i'm not a programmer, but I appreciate all that you do, and appreciate that thos will help other programmers.
amateurhack is offline   Reply With Quote
Old 03/20/2010, 05:15 AM   #4 (permalink)
Member
 
Posts: 2,586
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 scripts I found for that matter
somline is offline   Reply With Quote
Old 03/20/2010, 05:19 AM   #5 (permalink)
Legend
 
Jason Robitaille's Avatar
 
Posts: 3,856
Quote:
Originally Posted by somline View Post
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 scripts I found for that matter
hmm, very interesting, I'll look into it. What's your screen resolution?
__________________
If you've liked my software, please consider to towards future development.

Developer of many apps such as: WebOS Quick Install, WebOS Theme Builder, Ipk Packager, Unified Diff Creator, Internalz Pro, ComicShelf HD, LED Torch, over 70 patches and more.

@JayCanuck @CanuckCoding Facebook
Jason Robitaille is offline   Reply With Quote
Old 03/20/2010, 05:27 AM   #6 (permalink)
Member
 
Posts: 2,586
Quote:
Originally Posted by Jason Robitaille View Post
hmm, very interesting, I'll look into it. What's your screen resolution?
That would be nice ;-)
1280 x 800 (MacBook)
somline is offline   Reply With Quote
Old 03/20/2010, 05:50 AM   #7 (permalink)
Legend
 
Jason Robitaille's Avatar
 
Posts: 3,856
Quote:
Originally Posted by somline View Post
That would be nice ;-)
1280 x 800 (MacBook)
K, I just released a hotfix. Redownload from the first post (may need to clear browser cache). Should fix the issue
__________________
If you've liked my software, please consider to towards future development.

Developer of many apps such as: WebOS Quick Install, WebOS Theme Builder, Ipk Packager, Unified Diff Creator, Internalz Pro, ComicShelf HD, LED Torch, over 70 patches and more.

@JayCanuck @CanuckCoding Facebook
Jason Robitaille is offline   Reply With Quote
Thanked By: somline
Old 03/20/2010, 05:58 AM   #8 (permalink)
Member
 
Posts: 2,586
Quote:
Originally Posted by Jason Robitaille View Post
K, I just released a hotfix. Redownload from the first post (may need to clear browser cache). Should fix the issue
Thanks alot Jason. Works like a charm (like all your stuff ;-).
somline is offline   Reply With Quote
Thanked By: Jason Robitaille
Old 03/21/2010, 10:19 AM   #9 (permalink)
Member
 
Blacklight's Avatar
 
Posts: 160
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
Attached Images
File Type: png jasonipk.png (4.8 KB, 37 views) Email Attachment
__________________
IPK FETCHER <-> An attempt against geo-filtering
Blacklight is offline   Reply With Quote
Old 03/21/2010, 10:31 AM   #10 (permalink)
Member
 
Posts: 2,586
Quote:
Originally Posted by Blacklight View Post
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
I had the same, just ignore it the first time.
somline is offline   Reply With Quote
Old 03/21/2010, 12:06 PM   #11 (permalink)
Member
 
SiLlY's Avatar
 
Posts: 272
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!
SiLlY is offline   Reply With Quote
Old 03/22/2010, 10:15 PM   #12 (permalink)
Member
 
DrewPre's Avatar
 
Posts: 818
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
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.
__________________

Palm Pre Backup Utility...done!
Locate Pre....done!
DrewPre is offline   Reply With Quote
Old 03/22/2010, 10:41 PM   #13 (permalink)
Legend
 
Jason Robitaille's Avatar
 
Posts: 3,856
Quote:
Originally Posted by DrewPre View Post
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
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.
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/.
__________________
If you've liked my software, please consider to towards future development.

Developer of many apps such as: WebOS Quick Install, WebOS Theme Builder, Ipk Packager, Unified Diff Creator, Internalz Pro, ComicShelf HD, LED Torch, over 70 patches and more.

@JayCanuck @CanuckCoding Facebook
Jason Robitaille is offline   Reply With Quote
Old 03/29/2010, 09:16 PM   #14 (permalink)
Legend
 
Jason Robitaille's Avatar
 
Posts: 3,856
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
__________________
If you've liked my software, please consider to towards future development.

Developer of many apps such as: WebOS Quick Install, WebOS Theme Builder, Ipk Packager, Unified Diff Creator, Internalz Pro, ComicShelf HD, LED Torch, over 70 patches and more.

@JayCanuck @CanuckCoding Facebook
Jason Robitaille is offline   Reply With Quote
Old 04/03/2010, 03:49 AM   #15 (permalink)
Legend
 
Jason Robitaille's Avatar
 
Posts: 3,856
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
__________________
If you've liked my software, please consider to towards future development.

Developer of many apps such as: WebOS Quick Install, WebOS Theme Builder, Ipk Packager, Unified Diff Creator, Internalz Pro, ComicShelf HD, LED Torch, over 70 patches and more.

@JayCanuck @CanuckCoding Facebook

Last edited by Jason Robitaille; 04/03/2010 at 04:11 AM.
Jason Robitaille is offline   Reply With Quote
Thanked By: Veritas06
Old 04/13/2010, 09:01 PM   #16 (permalink)
Member
 
DrewPre's Avatar
 
Posts: 818
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!
__________________

Palm Pre Backup Utility...done!
Locate Pre....done!

Last edited by DrewPre; 04/15/2010 at 03:39 AM. Reason: Problems resolved.
DrewPre is offline   Reply With Quote
Old 04/16/2010, 07:57 AM   #17 (permalink)
Legend
 
Jason Robitaille's Avatar
 
Posts: 3,856
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:
Originally Posted by DrewPre View Post
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.
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.
__________________
If you've liked my software, please consider to towards future development.

Developer of many apps such as: WebOS Quick Install, WebOS Theme Builder, Ipk Packager, Unified Diff Creator, Internalz Pro, ComicShelf HD, LED Torch, over 70 patches and more.

@JayCanuck @CanuckCoding Facebook
Jason Robitaille is offline   Reply With Quote
Old 06/03/2010, 09:59 AM   #18 (permalink)
Member
 
Posts: 110
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.
morellox is offline   Reply With Quote
Old 06/03/2010, 10:05 AM   #19 (permalink)
Member
 
major payne's Avatar
 
Posts: 970
Wonder what the differences are?
__________________
In a world of droid, Pre does it better.

Shouldn't we treat this world like the Garden of Eden and avoid the apple at all costs?
major payne is offline   Reply With Quote
Old 08/23/2010, 07:58 PM   #20 (permalink)
Member
 
StyrkaValkare's Avatar
 
Posts: 548
I don't know what I'm doing wrong but when I try to select the folder by clicking the "..." button it doesn't do anything.
Doesn't allow me to select the folder at all.
It used to work before.
__________________
If the only one who knows the truth about a terrible secret is unaware they hold the answer to a mystery that could mean life or death.
The search for the key leads to the most dangerous place in the world, the human mind.
StyrkaValkare is offline   Reply With Quote
Reply

 

Thread Tools
Display Modes



 


Content Relevant URLs by vBSEO 3.6.0