Help making app portable

Discuss anything related to portable freeware here.
Post Reply
Message
Author
garbanzo
Posts: 248
Joined: Thu May 15, 2008 3:00 am

Help making app portable

#1 Post by garbanzo »

I have found the ideal program launcher, but unfortunately it is not portable. I sent a message to the developer, and am still waiting to hear back.

The app doesn't write to the registry other than uninstall info, but all settings are saved to %appdata% - an INI, an XML, and a DAT file. If these can somehow be wrapped up with the exe then all will work fine.

I would like to learn how to do this. Can anyone point me in the right direction? Is this even possible?

http://www.dvasoft.com/fast_launcher/

(UniExtract wouldn't work, i had to install it in Sandboxie)

Thanks!

sleepydvdr
Posts: 14
Joined: Mon Jun 23, 2008 11:43 am

#2 Post by sleepydvdr »

I used ISUnpacker to unpack the installer. All the files are in its program file folder (in other words, it does not dump anything in to the Sys32 or Windows directory). It looks like you can easily make it portable if you don't mind the files being in one folder. The program uses .xml files in the same folder as the executable. Just copy the program folder to a usb stick and there you go.

If you want to make it into one executable file, you can do so. However, any changes you make to the launcher will be lost each time you start it up. But if you don't think you'll ever want to add / subtract from it, then you'll be fine.

The easiest way to make a portable app is with WinRAR:
1. select all the files in its program folder
2. right click on one of them and go to "add to archive"
3. put a check mark in the box next to "Create SFX Archive"
4. go to the Advanced tab
5. click on SFX Options
6. in the "Run after extraction" box, put the name of the executable (in this case, you would type fl.exe)
7. go to the Modes tab
8. put a check mark in the box next to "Unpack to temporary folder"
9. choose the options "Hide all" and "Overwrite all files"
10. if you want to use and icon, go to the Text and icon tab
11. use the browse button for "Load SFX icon from the file" to browse for the icon.

Of course, if you want to use the icon, you will need to use something like Resource Hacker to extract the icon.

Hope this helps and good luck!
Last edited by sleepydvdr on Wed Jun 25, 2008 4:55 am, edited 1 time in total.

garbanzo
Posts: 248
Joined: Thu May 15, 2008 3:00 am

#3 Post by garbanzo »

thanks for the detailed post!

i have never heard of ISUnpacker, i'll look it up. as for the program running with all the files in the same directory, well i assumed that since the installer stuck a few config files in appdata, that's where they had to stay, but the developer got back to me and said they can go in the main app folder like you said.

and that winrar trick - that will come in handy i think!

thanks again :D

GeddichNixan
Posts: 159
Joined: Fri May 09, 2008 6:03 am

#4 Post by GeddichNixan »

@sleepydvdr

Hi,

I read your posting about WinRAR with great interest. Once I saw a prog which temorarily unpacked itself and cleaned up all files after closing, but I didn't know that making this kind of packed program is so easy.
Do you probably know about any freeware alternative which can make the same kind of SFX like WinRAR (i.e. autounpacking, autorun an exe after unpacking, cleaning up all files upon closure)? I tried ALZip and it worked but it writes a bit too much into the registry. I also found Stubbieman on the internet but my antivirus prog doesn't like it. Any other suggestion?

Greetings

GeddichNixan

User avatar
m^(2)
Posts: 890
Joined: Sat Mar 31, 2007 2:38 am
Location: Kce,PL
Contact:

#5 Post by m^(2) »

GeddichNixan wrote:@sleepydvdr

Hi,

I read your posting about WinRAR with great interest. Once I saw a prog which temorarily unpacked itself and cleaned up all files after closing, but I didn't know that making this kind of packed program is so easy.
Do you probably know about any freeware alternative which can make the same kind of SFX like WinRAR (i.e. autounpacking, autorun an exe after unpacking, cleaning up all files upon closure)? I tried ALZip and it worked but it writes a bit too much into the registry. I also found Stubbieman on the internet but my antivirus prog doesn't like it. Any other suggestion?

Greetings

GeddichNixan
Squeez Something. I don't remember full name and don't know if it's free, but there's free plugin for Total Commander that lets you do this.

sleepydvdr
Posts: 14
Joined: Mon Jun 23, 2008 11:43 am

#6 Post by sleepydvdr »

GeddichNixan wrote:@sleepydvdr

Hi,

I read your posting about WinRAR with great interest. Once I saw a prog which temorarily unpacked itself and cleaned up all files after closing, but I didn't know that making this kind of packed program is so easy.
Do you probably know about any freeware alternative which can make the same kind of SFX like WinRAR (i.e. autounpacking, autorun an exe after unpacking, cleaning up all files upon closure)? I tried ALZip and it worked but it writes a bit too much into the registry. I also found Stubbieman on the internet but my antivirus prog doesn't like it. Any other suggestion?

Greetings

GeddichNixan
Yes, there is another way of doing it which is even better (I'll explain why in a moment). It's 7zip (I mentioned this in another post a few days ago). Here's a guide that tells you 98% of how to do it:

http://www.msfn.org/board/How-to-make-a ... 39048.html

The main purpose of that guide is to make a silent installer, but all you have to do is replace 'program.exe' with the main executable of your program (and dump the switches).

Now why is 7zip better? Compression is almost always better for one. But the other thing is that Winrar archives sometimes hang for up to a minute while decompressing and users usually get impatient and double click it quite a few times and then all of a sudden the app comes up over and over again for each time you ran it.

The only problem with it is that it's a little more complicated. But once you get the hang of it, it's not that hard and doesn't take much more time to do.

Baas
Posts: 60
Joined: Fri Jun 13, 2008 6:26 pm

#7 Post by Baas »

m^(2) wrote: Squeez Something. I don't remember full name and don't know if it's free, but there's free plugin for Total Commander that lets you do this.
Squeeze is not free http://www.speedproject.de/enu/squeez/ :(

User avatar
m^(2)
Posts: 890
Joined: Sat Mar 31, 2007 2:38 am
Location: Kce,PL
Contact:

#8 Post by m^(2) »

Baas wrote:
m^(2) wrote: Squeez Something. I don't remember full name and don't know if it's free, but there's free plugin for Total Commander that lets you do this.
Squeeze is not free http://www.speedproject.de/enu/squeez/ :(
As I said, you can use TC plugin, it's fully functional. TC is not free either, but there are numerous other file managers that implement TC plugin interface.

ashghost
Posts: 384
Joined: Wed Feb 06, 2008 2:55 pm
Location: South Carolina

#9 Post by ashghost »

@m^(2): I've never seen a free file manager that supports TC plugins. I've been trying Google since reading your post with no success. Can you list some?

User avatar
m^(2)
Posts: 890
Joined: Sat Mar 31, 2007 2:38 am
Location: Kce,PL
Contact:

#10 Post by m^(2) »

FAR with this plugin and File Commander. There's also command line tool that you can use with any other, but I just found that it supports extraction only.

GeddichNixan
Posts: 159
Joined: Fri May 09, 2008 6:03 am

#11 Post by GeddichNixan »

WOW, WOW, WOW, what a mass of answers! Thank you guys for all those posts. I think I will try the 7-zip trick first and the plugin thing if 7-zip doesn't work. And ALZip remains as last resort if everything else fails. Many thanks again.

GeddichNixan
Posts: 159
Joined: Fri May 09, 2008 6:03 am

#12 Post by GeddichNixan »

I tried the 7zip trick. It really was a bit complicated anyhow compared to WinRAR and ALZip, but finally it worked like a dream. Not only that I could pack an app into a single executable, but there was nothing to see of the files of the packed program, neither during execution nor afterward. It is even better than the prog I saw, because in that case the temporarily unpacked files were visible.
So once again special thank to sleepydvdr for his hint and all the others for their suggestions and comments.

User avatar
Queue
Posts: 197
Joined: Mon Oct 08, 2007 2:41 am
Contact:

#13 Post by Queue »

Are you positive that the 7zip packed files aren't extracted somewhere temporarily? I haven't tried it, but to me it sounded no different than any other self-extracting archive setup (which is why I haven't tried it...).

Queue

GeddichNixan
Posts: 159
Joined: Fri May 09, 2008 6:03 am

#14 Post by GeddichNixan »

@Queue
As a matter of fact I found a very similar German description on the German nLite site with a download link to a ZIP including three different kinds of the file 7z.sfx (i.e. 7z.sfx, 7zS.sfx, 7zS_silent.sfx). I took the one named "7zS_silent.sfx" and my packed app behaved as I described above.

[...]
I checked it and the files are temporarily unpacked into "current user\Local Settings\tmp\xxx.tmp" and cleaned up afterward. I was obviously a bit too enthusiastic about the result first. The packs I made so far unpacked themselves into the folder where the EXE was located. Unpacking into the TMP seems to be a default in this case. (Possibly because I used a different SFX module? I don't know.) So finally it doesn't behave fundamentally diffent like any other self extracting archive. I am nevertheless still very pleased with the result and it still fits my needs even with the recoverable traces it leaves behind.

BTW my EXE is smaller than the total size of the original files plus the config.txt and 7zS.sfx and it doesn't seem to run substantially slower than the original. It was a very small and simple portable app I packed, larger ones may work slower.

Post Reply