Application Package Woes
Posted: Sun Jul 31, 2011 7:07 pm
Hello,
I have pondered for a longer time whether packages that appear on not only OS4Depot but elsewhere should be packaged in a uniform manner - especially applications.
So the questions and issues raised here are not only relevant to Orgin (who I believes is the current maintainer of OS4Depot), but also the Development Team and the wider developer community.
Are there any guidelines that have been laid down anywhere that developers should try and adopt, best practices and such like when it comes to packaging their software for distribution?
If I may elaborate. As some of you may know I am responsible for Jack (http://www.os4depot.net/index.php?funct ... h/jack.lha ). One component of Jack is the App Store. It shows applications that appear on OS4Depot outside the world of the browser. A user can look at information about a package (the readme file) or even download it from within Jack - complete with progress bar. Jack will then extract the archive to the Downloads drawer (if using Push4Dock) or an elected download path.
Now, I'd like to expand this further to something akin to Apple's App-store.
1. I'd like Jack to not only extract the archive, but also detect whether the package has an Installation Script and if so run it automatically.
2. On finishing the installation and quiting the installation script assuming the installation doesn't require a reboot - I'd like Jack to then run the arexx scripts (which are natively available in AmigaOS 4.x) to add the Application to the AmiDock.
In an ideal world this should be straightforward, but every package is set out differently in the archive.
So once again is there a guideline set out by anyone in regard to how a package should be set out in terms to the directory structure?
After looking at various archives I suspect not, I am not saying that submitters should be compelled to adopt a strict directory structure, but it will surely prove beneficial to everyone involved.
Common inconsistencies I've seen in archive file structure:
Problem: Person doesn't include an outer drawer for their application. (My pet hate)
Symptom: When the archive is extracted random files are scattered into the selected destination drawer.
Best Practice: Include an outer drawer in the archive with everything the package contains within.
Problem: There is no installation script.
Symptom: User is free to do whatever, package might also say install X, Y, Z manually.
Best Practice: Include an installation script with a common filename; eg. Install X.
Problem: There is an installation script, but its filename doesn't begin with the word Install.
Best Practice: Include the world Install in the filename.
Problem: There is an installation script, but it requires third-party libraries or datatypes that are freely available.
(Unrelated to the purpose of this thread, but still damn important!)
Best Practice: Now you have two choices, 1) Include the required third party components in the archive if the license allows it or 2) Consider using Wget or similar to do the dirty work for them and download the required resources.
This is of course depends on the nature of the third-party resources... if its just a library simply copy it to libs after performing a version check.
My suggested file archive structure for a program called Example:
Example/
Example/Install Example
Example/Install Example.info
Example/Distribution*
Example/Distribution/Example
Example/Distribution/Example.info
Example/Distrbution/Libs**
* A self-contained drawer with an appropriate title.
** If required a libraries drawer containing freely available libraries that can easily be called upon during an installation script.
Of course the directory structure can differ from application to application, some may choose to remove the Distribution drawer entirely, but it would be ideal if I could detect the Installation Script itself more easily.
---
And then of course there are different Installation Script types. Some people use batch files contain AmigaDOS commands and call requestfile etc.. to pull it off. Some people use the old Commodore Installer, some of us use Python to do this. And there are these 'things' called Auto-Install?
What approach should Jack take? I'd love for it to purely use Python scripts only - as this is the official AmigaOS protocol right?
Incidentally, how does one actually create an installation script in Python? Does anyone have an example showing how I would create a drawer, copy files/drawers X, Y and Z, check a file version etc...?
I meant to keep this short, but ha so much to discuss.
Look forward to responses.
Rick
I have pondered for a longer time whether packages that appear on not only OS4Depot but elsewhere should be packaged in a uniform manner - especially applications.
So the questions and issues raised here are not only relevant to Orgin (who I believes is the current maintainer of OS4Depot), but also the Development Team and the wider developer community.
Are there any guidelines that have been laid down anywhere that developers should try and adopt, best practices and such like when it comes to packaging their software for distribution?
If I may elaborate. As some of you may know I am responsible for Jack (http://www.os4depot.net/index.php?funct ... h/jack.lha ). One component of Jack is the App Store. It shows applications that appear on OS4Depot outside the world of the browser. A user can look at information about a package (the readme file) or even download it from within Jack - complete with progress bar. Jack will then extract the archive to the Downloads drawer (if using Push4Dock) or an elected download path.
Now, I'd like to expand this further to something akin to Apple's App-store.
1. I'd like Jack to not only extract the archive, but also detect whether the package has an Installation Script and if so run it automatically.
2. On finishing the installation and quiting the installation script assuming the installation doesn't require a reboot - I'd like Jack to then run the arexx scripts (which are natively available in AmigaOS 4.x) to add the Application to the AmiDock.
In an ideal world this should be straightforward, but every package is set out differently in the archive.
So once again is there a guideline set out by anyone in regard to how a package should be set out in terms to the directory structure?
After looking at various archives I suspect not, I am not saying that submitters should be compelled to adopt a strict directory structure, but it will surely prove beneficial to everyone involved.
Common inconsistencies I've seen in archive file structure:
Problem: Person doesn't include an outer drawer for their application. (My pet hate)
Symptom: When the archive is extracted random files are scattered into the selected destination drawer.
Best Practice: Include an outer drawer in the archive with everything the package contains within.
Problem: There is no installation script.
Symptom: User is free to do whatever, package might also say install X, Y, Z manually.
Best Practice: Include an installation script with a common filename; eg. Install X.
Problem: There is an installation script, but its filename doesn't begin with the word Install.
Best Practice: Include the world Install in the filename.
Problem: There is an installation script, but it requires third-party libraries or datatypes that are freely available.
(Unrelated to the purpose of this thread, but still damn important!)
Best Practice: Now you have two choices, 1) Include the required third party components in the archive if the license allows it or 2) Consider using Wget or similar to do the dirty work for them and download the required resources.
This is of course depends on the nature of the third-party resources... if its just a library simply copy it to libs after performing a version check.
My suggested file archive structure for a program called Example:
Example/
Example/Install Example
Example/Install Example.info
Example/Distribution*
Example/Distribution/Example
Example/Distribution/Example.info
Example/Distrbution/Libs**
* A self-contained drawer with an appropriate title.
** If required a libraries drawer containing freely available libraries that can easily be called upon during an installation script.
Of course the directory structure can differ from application to application, some may choose to remove the Distribution drawer entirely, but it would be ideal if I could detect the Installation Script itself more easily.
---
And then of course there are different Installation Script types. Some people use batch files contain AmigaDOS commands and call requestfile etc.. to pull it off. Some people use the old Commodore Installer, some of us use Python to do this. And there are these 'things' called Auto-Install?
What approach should Jack take? I'd love for it to purely use Python scripts only - as this is the official AmigaOS protocol right?
Incidentally, how does one actually create an installation script in Python? Does anyone have an example showing how I would create a drawer, copy files/drawers X, Y and Z, check a file version etc...?
I meant to keep this short, but ha so much to discuss.
Look forward to responses.
Rick