You are here

Portable App Methodoligy

9 posts / 0 new
Last post
rustyz82
Offline
Last seen: 16 years 7 months ago
Joined: 2006-04-17 18:46
Portable App Methodoligy

I have been an avid user of several of the portable apps offered for for a while now and am looking at developing some of my own and making some of the applications I use daily portable. I'm wondering how exactly most people accomplish this. I know Portable Firefox runs without ever using the computers registry, at least thats what my monitoring indicates. Some other applications seem to use a Wrapper like RegRapper to remove the entries after the program is gone. Which method do you guys prefer? Ideals I would like to make it so the application never touches the registry at all, but i'm still researching how to do that. I'm wanting to get the jist of how it works so I can code my own using the same methods. Any direction or suggestions are appriciated.

Deuce
Offline
Last seen: 14 years 1 month ago
Developer
Joined: 2005-12-24 16:32
Well...

John uses the USERPROFILE switch used in all mozilla aplications to make Firefox work. For others, it can be as simple as commandline switch that the programmer wrote into the program. or it can be a little more complicated when the software designer uses the registry to store settings. For this you would need to "wrap" the settings in and out of the registry. Essentially saving your settings to a file and rewriting to the registry on startup of the prog. This is what Registry Rapper was written for. The most complicated would be to take the source code and rewrite to store settings elswhere or stop from using the registry. Of course this is usually what a seasoned programmer would do.

That is pretty much a quick overview of the ways to make an app portable. hope this helps

***********************************
Deuce {The Core}
"Portable Software: Just the beginning.

Deuce
Portable Software: Just the beginning.

rustyz82
Offline
Last seen: 16 years 7 months ago
Joined: 2006-04-17 18:46
So for applications that

So for applications that were designed to use the registry the only option is to use something like registry wrapper or re-write the program to not use the registry? Some of the programs I want to make portable are not open source so I don't have access to the source code so I guess i'll have to check out RegRapper.

Deuce
Offline
Last seen: 14 years 1 month ago
Developer
Joined: 2005-12-24 16:32
Correct...

Just look in the Beta Forum for regrapper.

***********************************
Deuce {The Core}
"Portable Software: Just the beginning.

Deuce
Portable Software: Just the beginning.

John T. Haller
John T. Haller's picture
Offline
Last seen: 13 hours 18 min ago
AdminDeveloperModeratorTranslator
Joined: 2005-11-28 22:21
Multipronged

It's a multipronged approach. For the Mozilla apps, the following take place:

1. the profile is updated so paths are correct
2. the pluginregistry is deleted so it will be regenerated by FF, etc
3. a plugin path environment variable is set
3. the app is launched with the -profile switch and the proper profile path

Additionally, users can select to use a USERPROFILE environment variable, have a local homepage rewritten into the prefs.js on launch, and a few other things.

Other apps work differently. OpenOffice.org requires a prefs file be rewritten with the proper path. So does ClamWin. Thunderbird requires registry entries be backed up and rewritten. So does Audacity. Each app is unique and must be analyzed to see what it requires, what it affects and how it works. Snapshotting systems before and after installs and runs helps quite a bit with this.

On top of all the actual runtime stuff... I also make changes to settings and such to minimize writes where appropriate (disable FF cache and history, disable GIMP tile cache, etc). The app is also run through a set of scripts I have that do JAR recompression using 7zip and EXE and DLL compression using UPX. Sometimes, some files need to be excluded (5 files for GIMP, 2 for AbiWord for instance) from this compression as they'll fail if compressed.

I'm compiling much of this for the development section. I think folks are happy with the blogs and project pages, so some of the projects will be coming online, hopefully this week, as the project pages are completed and a layout is chosen.

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

rustyz82
Offline
Last seen: 16 years 7 months ago
Joined: 2006-04-17 18:46
Thank you very much for the

Thank you very much for the insight. This is exactly the information I was looking for. I assume most of the work related to running it through scripts and and writing the settings is done in the launcher program or was it added into the program itself?

John T. Haller
John T. Haller's picture
Offline
Last seen: 13 hours 18 min ago
AdminDeveloperModeratorTranslator
Joined: 2005-11-28 22:21
Launcher

All of it is in the launchers. The goal is to avoid any changes to the base programs aside from UPX and 7zip compression and appropriate settings changes.

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

rustyz82
Offline
Last seen: 16 years 7 months ago
Joined: 2006-04-17 18:46
From what I can tell I would

From what I can tell I would need the source code for the exe to impliment UPX?

rustyz82
Offline
Last seen: 16 years 7 months ago
Joined: 2006-04-17 18:46
Ahh ok I see now, thank you

Ahh ok I see now, thank you very much for the information. Time to get to work!

Topic locked