You are here

Where is the documentation for the tool that converts a PAF tree into a paf.exe?

10 posts / 0 new
Last post
otheus
Offline
Last seen: 5 years 3 months ago
Joined: 2008-06-06 07:04
Where is the documentation for the tool that converts a PAF tree into a paf.exe?

2015-10-29: After answers from JTH and others, I have revamped this post for the benefit of others to follow.

I almost choked on my own spittle trying to navigate this site in the hopes of converting an already stand-alone app into a paf.exe. The first challenge is that the starting point isn't so clear. There are 4 use-cases here, and the "Guerilla Field Guide" covers one of them; using it for the others is like using a shotgun to kill a housefly. The four use-cases are:

  • Installing a completely stand-alone app into an existing PAF installation. (As the user-help describes, this is as simple as creating a directory for the program, dropping the executable into that directory, and executing "refresh App icons" from within the PAF menu.)
  • Refreshing, updating, or site-customizing an existing PA which is already in the PAF.
  • Installing a completely stand-alone app within the PAF and packaging it for redistribution as a self-installing paf.exe
  • Installing an application, which is not stand-alone, has dependencies on the Windows registry or external DLLs, and packaging it for redistribution as a self-installing paf.exe

The Guerilla Field guide covers the last use-case, which is by far the most common and complicated.

The second challenge was caused by a combination of my own exhaustion, my pedantic use of the English language, and the dubious choice of the word "Installer" for the tool that packages an app along with an installer into a .paf.exe files. I was firmly convinced that I had already installed the "Installer", when in fact, I had installed the installer for the "platform setup". Pardon (*cough*) my confusion on this point. This last point was for me the convergence-point of all my day's frustrations.

A third challenge was the expectation that the "LauncherGenerator" would actually ease the steps of creating the PAF directory for me. Hint: it doesn't. Or, that the downloadable template folder would populate the files required by the Generator. Hint: it does a few.

Many thanks to JTH and the others on this forum and who are involved in this project. Software is difficult, and open software much more so. As frustrated as I was in trying to get this small task accomplished, I was nonetheless impressed by how polished the end-product is and how far it has come in 7+ years since I last began using it.

John T. Haller
John T. Haller's picture
Offline
Last seen: 1 hour 13 min ago
AdminDeveloperModeratorTranslator
Joined: 2005-11-28 22:21
Format First, Installer Second

You must first put your app in the appropriate format and then package it. Packaging a PAF is not a point and click affair. It can not be accomplished with a simple wizard.

You first need to ensure your app is in the appropriate format. You must create the directories and files according to the PortableApps.com Format specifications. You can base this on another app or start with the bare-bones PortableApps.com Application Template.

If the app is not already portable, you may use the PortableApps.com Launcher to handle registry keys, config files, directories, etc. This is more involved than simply packaging. You can look at other apps and how they work and look up specific things in the PortableApps.com Launcher Manual.

Only when the app is working and in PortableApps.com Format do you then package it as a PAF. This is accomplished by running the PortableApps.com Installer and pointing it at your app's directory.

Again, packaging a PAF is not a point-and-click affair. It requires understanding a given app, how it stores its data, and then adjusting each of those parameters to work portably and store its data in the appropriate place. I personally do this in a clean Windows virtual machine running RegShot Portable before and afterwards to get an idea of how the app stores its data by default. I then look at the app's manual, command line help, and source code (if available) to see how it might be redirected to store portably (usually by a command line switch, included config file, included directory, environment variable, or similar). If it can, I use that. If it can't, I configure the PA.c Launcher to move files on and off the local machine. It's an involved process and is best begun looking at other apps that use the PA.c Launcher to understand how it works.

All the above links are included on the Development page. The PAL generator is unofficial and may not work right. The other link you included above is from 2007, when every single launcher had to be manually written from scratch in NSIS and before the automated installer existed.

Sometimes, the impossible can become possible, if you're awesome!

otheus
Offline
Last seen: 5 years 3 months ago
Joined: 2008-06-06 07:04
First, please read my

First, please read my revamped question. Second, thanks for your measured response and for de-escalating my frustration. Third, with your help (and a clearer head) I was able to get my application packaged today.

Some comments and suggestions, below.

Again, packaging a PAF is not a point-and-click affair. It requires understanding a given app, how it stores its data, and then adjusting each of those parameters to work portably and store its data in the appropriate place.

For sure, that's a common use-case, but not the only one. Many apps are well-enough constructed to portabalize without the need for jumping big hoops -- only the little hoops presented by putting things in the PAF in the first place. Perhaps this isn't the place to discuss, but I imagine an app that :

  • Requests from the user the binary to portablize
  • Requests from the user the appropriate icon to use, version information, publisher, command-line options, admin privileges required, etc.
  • Generates the required directory structure and stubs for the required files
  • Generates a todo-list specific to the know information so far.
  • Runs the "installer" with the warning that resulting product may be incomplete.


You must create the directories and files according to the PortableApps.com Format specifications.

Yeah, I did this, to the best I could follow that document. I'm sure you've gleaned by now the problem -- my problem -- was thinking the "installer" was for the PAF and not the tool that creates paf.exe's.

Even within that document, the "Installer" is mentioned often -- it even has its own section. The Installer's home page itself leaves quite a lot of doubt to its purpose, and this section is of no help: What does it do, how and when should you use it. There seems to be two parts to the "Installer", and this equivocation is what frustrates me still: The app named the "installer" actually does the packaging for a target application and bundles that application with yet another installer. The above-mentioned section within the Format specification seems to refer to the latter -- the end-user installer binary and not the "installer" used by the dev to prepare such a binary. I pray that the dev team might come up with different names in order to disambiguate here.


You can base this on ... or start with the bare-bones PortableApps.com Application Template.

I tried that, but the current download contains almost precisely nothing of use. There is no help.html file or stub, no launcher.ini, and there are files in other which are superfluous (at least, my current application works fine without them).

Finally: the readme.html is mentioned, but is it actually required? The installer won't create a package without it, but it can be empty, and once installed, may safely be removed without obvious harm. If it is really required, shouldn't there be an html stub somewhere?

John T. Haller
John T. Haller's picture
Offline
Last seen: 1 hour 13 min ago
AdminDeveloperModeratorTranslator
Joined: 2005-11-28 22:21
Generator, Help, Readme

The goal would be a generator, but we're all unpaid volunteers with limited time. I've operated PortableApps.com at an overall (large) loss for 10 years.

There is a tool called the PortableApps.com Installer. It lets you take the files laid out in PA.c Format and package them into a .paf.exe installer. The tool may be renamed to PA.c Installer Packager/Generator/etc or similar at some point to eliminate confusion.

The template includes the necessary help.html file for the app itself. It only includes a very basic help file to help you package in the form of template-readme.txt. The readme.txt in Other Source is required and should include licensing information as well as information on how to use the AppNamePortable.ini file. It is required. If you're using PA.c Launcher to launch or portablize your app, it should contain the details that apply to the PA.c Launcher so an end user knows how to disable the splash (if appropriate) pass in command line options via AdditionalParameters= in the INI file, etc.

Sometimes, the impossible can become possible, if you're awesome!

Dan Carroll
Dan Carroll's picture
Offline
Last seen: 10 months 3 weeks ago
Joined: 2015-10-26 08:58
PA.c Generator?

John, if you could give me a short list of requirements I'd like a go putting together the generator you mentioned above. Been a long time fan and would like to get involved in the development. Planning on portabalizing some open source packages in the PAF format. Good time for me to sink my teeth into some projects.

Thinking maybe a PA.c lint utility would be nice.

Dan "FloriDan" Carroll
Just an old hacker having fun.

vf2nsr
vf2nsr's picture
Offline
Last seen: 8 years 1 month ago
Developer
Joined: 2010-02-13 17:10
Might take lookat this

One of our developers had this release in alpha

https://portableapps.com/node/27502

“Be who you are and say what you feel because those who mind don't matter and those who matter don't mind.” Dr. Seuss

Dan Carroll
Dan Carroll's picture
Offline
Last seen: 10 months 3 weeks ago
Joined: 2015-10-26 08:58
Development Toolkit?

Saw that already vf2nsr. Dismissed it as it seems to not have been update in four years. But will take a look at it.

Dan "FloriDan" Carroll
Just an old hacker having fun.

vf2nsr
vf2nsr's picture
Offline
Last seen: 8 years 1 month ago
Developer
Joined: 2010-02-13 17:10
Ah ok

thought by looking through it it might clue you in on the different things that need to be in it.

“Be who you are and say what you feel because those who mind don't matter and those who matter don't mind.” Dr. Seuss

depp.jones
Offline
Last seen: 1 hour 6 min ago
DeveloperTranslator
Joined: 2010-06-05 17:19
.paf-assistant

Did you try the .paf-assistant? It is clearly alpha state with some bugs in it, but it seems to be the kind of tool you were looking for - at least for your third challenge. I think DatLicht has stopped development (maybe I scared him away with too much information Pardon ). It falls short of some basics like generating a full format compliant folder set and some more. But If you combine that with the template - e.g. extract the template in the destination folder prior to using the tool - the result seems to be a very good start for further refinement.
One caveat is that the ini-files just use LF (line-feeds) instead of CR (carriage returns), but at least the PA.c-launcher is forgiving of that.

Maybe DatLicht feels like some further development some time or someone picks up this project - don't know, if the license (CC Attribution-Sharealike 3.0) interferes with such an effort.
-edit-
Second run produced correct inis, no idea what went wrong the first time...

depp.jones
Offline
Last seen: 1 hour 6 min ago
DeveloperTranslator
Joined: 2010-06-05 17:19
In addition to what John

In addition to what John explained - did you find the Guerilla Field Guide written by Oliver K some years ago? It's the first sticky in the forum where you just posted your thread. Yes, it is outdated because there was no PortableApps.com Launcher these days, but it explains a good way to plan making an app portable.

I myself always considered the documentation of the tools very good. It is no step-by-step guide, but making an app portable is not the simplest task sometimes. There is no beginners guide so far, because no one had the time do write one (Oliver Ks work is what comes closest to that). If you like to work your way into these things and have the time to write one yourself, you are very welcome to do so. Maybe someone will help.

I was about to write such a guide some years ago, but my reallife job and family left no time for that.

The best way to start making a portable app is to just start with an example as John said and ask in the forums when you don't get further. Even while the great development wave seems to be over, there will certainly be some assistance.

- edit -
The paf-assistant (one thread below to date), that DatLicht started to develop some time ago may be a good start to create the template and put things in place. But you still have to check the results thorrowly since he seems to have stopped development in early state.

Log in or register to post comments