Hello, everyone. For my first post on the PortableApps.com Forum, I am going to share a method that I have figured out that allows you to portablize apps that don't run from their base directory (for those who have the know-how, I just create a dynamic shortcut to the .exe using a batch file then convert the batch file into an exe so portableapps can see it). Before I go into detail, there are a few prerequisites for the apps that this method will work on:
1. The app must be self-contained. (meaning that all of the folders for its internal files/dependencies must be in the base directory)
2. The app must have a single executable (.exe) that you run to start it*
3. Any separate installable runtime/dependencies (i.e: Adobe Flash, Java, Python, etc.) must be installed on whatever computer you want to run the app on**
*Note1: There are a few exceptions/workarounds to this. I can clarify on a case by case basis
**Note2: An easy fix for this is to carry the installers for the runtimes of the portable apps on the same drive, and just install them whenever you use a new computer
Alright let's begin:
First, you will want to copy the install directory for the application to the 'portableapps' folder on your portableapps.com drive. Once this is done, go into the root folder of the install directory. Create a new text document there titled "AppName.bat" ensuring that the file has the .bat extension and not .txt. Open and edit the .bat file by right-clicking and selecting 'Edit'. Now what you do is type
start %CD%\...........
filling in the .......... with the path to program's executable file RELATIVE TO THE .BAT FILE so it will look like this:
start %CD%\path\to\yourprogram.exe
For the text above your filetree would be something like below:
.......................................................InstallDirectory>>>>>>> create the .bat file here
______________________________| |__________________________
| ................................................................................................................... |
path...........................................................................................................otherfolder1
|
to
|
yourprogram.exe
Once you are done with that, hit return and type "exit" at the end, to ensure that the shell quits once it has opened the program you want.
Now it should look like this:
start %CD%\path\to\yourprogram.exe
exit
Now the bat file will run the program from the base folder of the install directory. There's only one problem, IT DOES'NT SHOW UP IN THE PORTABLEAPPS MENU! To fix this, we just need to convert the .bat file into a .exe. I recommend using Quick Batch File Compiler as it is easy to use and quick, but you are welcome to use other programs if you prefer. All you need to do from here is open the .bat file you just made from within the program, select the "Options" Button and check the "use same name and location as original file" checkbox (if you are certain that it will work right away, you can choose "ghost application" to hide any cmd console windows), after that, select the "Embedded Files" tab. If your program requires admin permissions to run, check the "Add Administrator manifest" checkbox, then you can optionally choose an icon for your program.
When all of that is said and done, click the "Build" Button. This will turn your .bat file into a .exe. Now when you refresh your portableApps icons, you should see a new program in your programs list.
I hope this tutorial helped. I am open to any questions regarding the content of this post, and will respond as soon as I notice any replies.
What's wrong with setting "ProgramExecutable=AppName\AppName.exe"
in "AppNamePortable\App\AppInfo\Launcher\AppNamePortable.ini" then having "Start=AppNamePortable.exe" in "AppNamePortable\App\AppInfo\appinfo.ini" then running
the PortableApps.com Launcher to generate "AppNamePortable.exe"?
I also discovered that copying another "AppNamePortable.exe"(the launcher) then renaming it works.
It will show in the menu after all this.
There is a great open source project called - Boostnote (https://github.com/BoostIO/Boostnote).
They have partial support for Portable Mode (https://github.com/BoostIO/Boostnote/issues/344).
Some one tweaked it as following - https://github.com/BoostIO/Boostnote/issues/344#issuecomment-318354371.
How can I, on my machine, create a Portable App for that?