You are here

Copy additional binaries file in the same location as the .exe file

4 posts / 0 new
Last post
mpastor
Offline
Last seen: 12 years 1 month ago
Joined: 2012-10-14 12:38
Copy additional binaries file in the same location as the .exe file

My program requires the MyApp.exe file and the MyAppLibs directory to reside in the same directory location.

I want to use the portable apps installer program to create the install package. I can get it all working except I can not figure out how to get the MyAppLibs directory included in the installer. I did successfully work around this using the [optional component] section - but I do not want the user to need to click to install the necessary library files.

How do I get this additional directory of stuff included in the installer package?

John T. Haller
John T. Haller's picture
Online
Last seen: 8 min 53 sec ago
AdminDeveloperModeratorTranslator
Joined: 2005-11-28 22:21
Within App

Keep the MyApp.exe and MyAppLibs folder within a MyApp folder in the AppNamePortable\App directory. Then create a simple launcher using the PortableApps.com Launcher to launch MyApp.exe. If your app needs nothing else, for example, you'd just create a Launcher directory within the AppInfo directory and a MyAppPortable.ini file within there with the following:

[Launch]
ProgramExecutable=MyApp\MyApp.exe

If you'd like to pass it parameters or additional items so that it properly puts its Data within the Data directory, you can also pass environment variables. You can use things like %PAL:DataDir% to indicate the data directory. So, for example, if your app took an argument called -settings= that allowed you to set the directory to store your apps data, you'd add one line to the [Launch] section of your MyAppPortable.ini file we created above:

CommandLineArguments='-settings="%PAL:DataDir%\"'.

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

mpastor
Offline
Last seen: 12 years 1 month ago
Joined: 2012-10-14 12:38
Thanks John - I will give

Thanks John - I will give that a try. I was trying to avoid using Launcher because I am interesting in getting my program packaged for potential distribution via Portable Apps. Don't I need to leverage Installer and NOT Launcher if that is what I am trying to accomplish? Or are both paths somehow viable?

Pardon my confusion if that is the case.
Regards.

John T. Haller
John T. Haller's picture
Online
Last seen: 8 min 53 sec ago
AdminDeveloperModeratorTranslator
Joined: 2005-11-28 22:21
Both

All our apps utilize both a launcher and then are packaged in the installer. The launcher allows you to easily portablize an app. Or, for apps that are already portable, it can act as a convenient 'portable shortcut' for easily launching it (the launcher supports just starting up an EXE and exiting without waiting for it to finish or doing anything more advanced than being a portable version of a Windows shortcut in addition to its more advanced features). Even though the platform can handle be pointing to an EXE in AppNamePortable\App\AppName to launch, we like having a single EXE in the root as well to make it easy for folks who don't use the platform.

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

Log in or register to post comments