With the new installer, AppCompactor, and menu... we've been getting a lot of people willing to take their time and make PortableApps for the site. As I already know, OliverK made another "Making a PortableApp Guerilla field" or something like that. However, I think it's also a little confusing. I didn't understand any of it and had to had Kevin Porter translate it into human for me when I got here almost a year ago. So I'll be targeting this at somebody with no technology background.
To start, I think the most important thing is to understand there is no easy way out to making a Portable App. You need to put time and effort into this and sit down to read the NSIS manual (programming language we use to make launchers).
A launcher is what the developers here make when designing the Portable App. Launchers are made from codes and commands to do what the user wants. A.K.A. a basic program. So in short a launcher is another program running on top of another, managing it's settings. But we'll get into that later.
First, let's understand what they're made of. Like I said before launchers are made from codes and commands typed in from the user/programmer. All that text is put into a AppNamePortable.nsi file (AppName being your app you want portable) in the Source folder. .nsi stands for "Nullsoft Installer" and NSIS for "Nullsoft Scriptible Install System". NSIS is the name of the programming language. NSI is just a short version of it and a file extention to tell the Opperating System that THIS IS A NSIS FILE!!! NSIS files (or .nsi files) are later compiled turned into .exe (executables) with a file (comes with NSIS) makensis.exe . The definition of a compiler is something used to turn something a human can read to something the computer can read. For security reasons and unstable, this process cannot work the other way around. But there are some exceptions. For example, AutoHotKey and AutoIT has a uncompile feature, but need a password from the original creator. One thing I was confused about was that NSIS is for installers, but John found a way to use it for our launchers too.
Another important thing to understand is how launchers are doing their jobs. In summary, once they're launched, they move all AppName's settings to someplace else, then import (from the Data folder) it's own into wherever it should be or where the original settings were. AppNamePortable.exe hangs around hiding in the background until it detects that AppName.exe quits. Then it exports all the settings into the Data folder and moves the original settings back. Of couse, leaving as close to nothing as it can on the computer.
Think of the AppCompactor and PortableApps.com Installer as tools to polish and dust off the program (AppNamePortable.exe) you made. You don't need them to make the programs. However, we'll get into what you do need later.
The AppCompactor just make the files smaller, and gets rid of unneeded stuff in the folders. You should compress as much as you can. Usually it only makes it about a litte less than a meg smaller. But that depends on the program you're portablizing and what programming language it's built in. You should generally only compress the App\AppName folder, why? Because the AppNamePortable.exe can't be compressed. (If a NSIS program/installer is compressed, it'll break the program.)
The PortableApps.com Installer puts your app into that nice package, after you've finished eveything (compressed, compiled, etc). So all it does is just put your program in a box, to sail off to PortableApps.com Land.
We're ready to start the programming. Here's some tools you'll be needing. (I've linked to the Portable Versions, but you can also get the local versions).
- Eclipse - Editor (Requires java, so it'll take up about 250 MB, if you can't fit that, go for HM NIS. I really recommend this it it's 10 times better than HM NIS if you get it working.)
- HMNIS Edit - Editor
- IcoFX - Icon editor, you'll need this for the appicon.ico in App\AppInfo
- NSIS - Compiler
- RegShot - Finds out where SOME of the settings of AppName are stored.
- winMD5Sum - Checks the MD5 for your programs
- AppCompactor - Compresses your program
- PortableApps.com Installer - Puts it in a box to ship to PortableApps.com Land
Now that we have all the files and utilties we need, let's start understanding the paf format. PAF stands for PortableApps.com Format, and what it is exactly is how the folders in our programs and information is managed through the package. More information on it is over here...
Download this file over here... it's a template and a finished paf format. All you have to do is update everything for your app and finish the launcher. Rename everything in there with AppName to the name of your application. (ex: rename AppNamePortable to FirefoxPortable, App\AppName to App\Firefox, an so on). We'll get into renaming inside the files in the next step.
(Still in work)