How to make an application portable?

Chat about just about anything else
Post Reply
thedarkboy77
Level 1
Level 1
Posts: 4
Joined: Sun Sep 30, 2018 2:13 am

How to make an application portable?

Post by thedarkboy77 » Thu Oct 18, 2018 3:51 am

I know this is a Linux forum, but on Software subreddit, I've seen response such as "(Linux) is for non-tech people (...) and people who don't need high quality and/or industry-standard software". So, I figured I would find more software experienced response here.

I did some research on how I can make an application portable and they all require an image capture of the installation before and after. I found that apps like Cameyo and ThinApp VMWare, but they are not really portable.
ThinApp VMWare compiles the whole application into one exe file, which doesn't always run on other computer.
Cameyo also compiles it too much and acts as a "middleware" whenever you want to open.

I have two versions of "portable" application, which I have downloaded a long time ago. They are both portable in the sense that they don't require installation.
The first application can run on my Windows Vista, 7 desktop and 8 computers. I just need to copy and paste the folder (no rar or zip required) on a USB to another computer. Its exe file is small and it actually has a portable registry file(.reg). I consider this app to be truly portable since I never had any issue with it. Another interesting feature on this app is that is it seperated into two subfolder: App and Data. I just discovered that this app was made portable with an application called "Portable App Creator". It is an open-source applicatio
that no longer exist.
As for the second application, it can only run on my Vista, it is powered by VMWare and its exe file is too compiled.

I will be doing this on my Windows 7 that is dual booted with Linux.
Is there any download link to "Portable App Creator" application?
Maybe my Linux OS can do an image capture of my Windows 7 disk partition before and after installation, but I prefer to use a Windows packager software to keep things simple.
Maybe there is also a way to run a Linux image capture application on Windows.
If there aren't any packager, then I also don't mind manually copying and packaging the portable app. Any tutorial links on how to manually make an application portable and the tools required would be great. Of course, by manual, I don't mean 100% manual.

User avatar
administrollaattori
Level 14
Level 14
Posts: 5460
Joined: Tue Sep 03, 2013 4:51 am
Location: Finland
Contact:

Re: How to make an application portable?

Post by administrollaattori » Thu Oct 18, 2018 4:44 am

Just collect all required libraries and files into portable application. Of course paths must be correct into portable application.

thedarkboy77
Level 1
Level 1
Posts: 4
Joined: Sun Sep 30, 2018 2:13 am

Re: How to make an application portable?

Post by thedarkboy77 » Thu Oct 18, 2018 10:40 am

Is there any application that checks the difference between before and after an installation? How can I change the directory?

MScott
Level 1
Level 1
Posts: 23
Joined: Mon Jan 22, 2018 3:06 pm

Re: How to make an application portable?

Post by MScott » Thu Oct 18, 2018 12:49 pm

I'm assuming Windows here :) Sorry if I misunderstood :(

Have you looked at -> https://portableapps.com/development -- you might get an idea or 2.

Or here -> https://www.portablefreeware.com/faq.php -- check (search) the forums for various wrapper portability ideas.

There are various utilities used to test portability -- registry snapshot tools, file dependency tools, etc.

I've come to prefer portable apps, stealth if possible. So far so good.

BTW, there's a video by Joe Collins on Youtube where he spent some time explaining the way Windows handles files & folders is very different from Linux, IIRC you can't redirect or drop apps in any folder on Linux like you can on Windows (in most cases)???
Still using Windows, testing in progress to determine if I can completely move over to Linux Mint and not lose any software or hardware needs. I'm very hopeful Mint will be my next OS.

User avatar
administrollaattori
Level 14
Level 14
Posts: 5460
Joined: Tue Sep 03, 2013 4:51 am
Location: Finland
Contact:

Re: How to make an application portable?

Post by administrollaattori » Thu Oct 18, 2018 1:07 pm

thedarkboy77 wrote:
Thu Oct 18, 2018 10:40 am
How can I change the directory?
https://en.wikipedia.org/wiki/Portable_ ... ke_systems
Programs are therefore generally designed to use the HOME environment variable to store settings (e.g. $HOME/.w3m for the w3m browser). The dynamic linker provides an environment variable LD_LIBRARY_PATH that programs can use to load libraries from non-standard directories. Assuming /mnt contains the portable programs and configuration, a command line may look like:

HOME=/mnt/home/user LD_LIBRARY_PATH=/mnt/usr/lib /mnt/usr/bin/w3m www.example.com

A Linux application without need for a user-interaction (e.g. adapting a script or environment variable) on varying directory paths can be achieved with the GCC Linker option $ORIGIN which allows a relative library search path.[5]

Not all programs honor this—some completely ignore $HOME and instead do a user look-up in /etc/passwd to find the home directory, therefore thwarting portability.

Post Reply

Return to “Open chat”