You are here

Making a Portable App.-

13 posts / 0 new
Last post
Aciago
Aciago's picture
Offline
Last seen: 6 months 3 weeks ago
Joined: 2007-01-24 14:23
Making a Portable App.-

I have an App that is not portable, but it is self contained in a folder... it's not portable because it leaves a *.conf file in Docs&sets/user/AppData/... even copying that file into the App folder it creates the conf file again.

My question is... How can I make a launcher to 1) read the conf file from the App folder, copy it into the AppData folder, and launch the App... and 2) close the App, copy the conf file into the App folder and delete the AppData file???

I know it can be done... in fact is the way most PortableApps works with the registry... but I just don't know how to do it... Sad

I already checked the Portable Application Template and understood nothing... Cry

Thanks in advance...

Aciago.-

Zach Thibeau
Zach Thibeau's picture
Offline
Last seen: 1 year 6 months ago
Developer
Joined: 2006-05-26 12:08
Well

I use this
!define !define SETTINGSFILES "$APPDATA\Media Player Classic\default.mpcpl"
and then in your installer section add this
System::Call 'Kernel32::SetEnvironmentVariableA(t, t) i("USERPROFILE", "$EXEDIR\Data").r0'
StrCpy "$R0" "${SETTINGSFILES}"
Make sure you do this before executing the program though.
or you can try (Don't use the one on top if your using this one)
System::Call 'Kernel32::SetEnvironmentVariableA(t, t) i("YOURAPP_HOME", "$EXEDIR\Data\settings").r0'
Both ways work for me (Second one works for some apps not all though. in that case use the first solution)
-----------------------------
"I don't fear Computers. I fear the lack of them" Isaac Asimov
My Personal Blog in the making at a new address thibeaz.com Biggrin

your friendly neighbourhood moderator Zach Thibeau

Patrick Patience
Offline
Last seen: 4 years 4 months ago
DeveloperModerator
Joined: 2007-02-20 19:26
Yea, the second if the new way I learned.

And I figured it might now work for all apps.

Ttech2
Offline
Last seen: 16 years 6 months ago
Joined: 2007-07-15 15:47
Question?

What are the things in the NSIS script that need to be changed and the things that need to be left alone.

Patrick Patience
Offline
Last seen: 4 years 4 months ago
DeveloperModerator
Joined: 2007-02-20 19:26
As I recently discovered.

Either need to copy/rename the files (knew that) or I think set the folder "AppData" as your App folder. I should be able to modfy one of John launchers for you. And if it's open source, package it all up. Smile Give me and e-mail at:

monopurpura(at)gmail(dot)com

I'll be home later tonight.

_______________________________________________
It's kinda scary when my desktop is messier than my room...

Ryan McCue
Ryan McCue's picture
Offline
Last seen: 14 years 7 months ago
Joined: 2006-01-06 21:27
Oh, and

If he can't do it by any chance, email me at cubegames[at]gmail.com or ryanmccue[at]cubegames.net (Not as though I doubt you Patrick Wink Blum )
----
Ryan McCue.
Blog.
So all that Airbus-delay trouble over here in Europe is because of YOU!
Simeon.

"If you're not part of the solution, you're part of the precipitate."

Patrick Patience
Offline
Last seen: 4 years 4 months ago
DeveloperModerator
Joined: 2007-02-20 19:26
Yes you do!

Haha, if it doesn't have the command line function, I still now how to make it copy file, GOSH!

_______________________________________________
It's kinda scary when my desktop is messier than my room...

Aciago
Aciago's picture
Offline
Last seen: 6 months 3 weeks ago
Joined: 2007-01-24 14:23
I quit...

I try and try but can't make it works... I'm very confused with this stuff...

So, have some patience, I'm going to send the info to you by mail... Sad

------------------
I have no signature again... Cry

If a packet hits a pocket on a socket on a port,
and the bus is interrupted as a very last resort,
and the address of the memory makes your floppy disk abort,
then the socket packet pocket has an error to report Biggrin

Aciago
Aciago's picture
Offline
Last seen: 6 months 3 weeks ago
Joined: 2007-01-24 14:23
???

Mono Purpura?

Can I ask why that name for a mail? Do you know what that mean? Do you speak Spanish?

Mail sent...

------------------
I have no signature again... Cry

If a packet hits a pocket on a socket on a port,
and the bus is interrupted as a very last resort,
and the address of the memory makes your floppy disk abort,
then the socket packet pocket has an error to report Biggrin

Patrick Patience
Offline
Last seen: 4 years 4 months ago
DeveloperModerator
Joined: 2007-02-20 19:26
I don't speak spanish.

But I like purple monkeys and those are two words from the limited vocabulary of Spanish I have. I have a couple friends that live in Mexico, they teach me a bit over IM.

_______________________________________________
It's kinda scary when my desktop is messier than my room...

Aciago
Aciago's picture
Offline
Last seen: 6 months 3 weeks ago
Joined: 2007-01-24 14:23
LOL

------------------
I have no signature again... Cry

If a packet hits a pocket on a socket on a port,
and the bus is interrupted as a very last resort,
and the address of the memory makes your floppy disk abort,
then the socket packet pocket has an error to report Biggrin

Aciago
Aciago's picture
Offline
Last seen: 6 months 3 weeks ago
Joined: 2007-01-24 14:23
:'(

I tried your launcher yesterday... it looks like it works fine (I like the launch screen very much) but it doesn't keep my settings, so I think that it's not saving the conf file when exiting the App...

Thanks god that you "have some patience" because you are going to need it with me... Wink

------------------
I have no signature again... Cry

If a packet hits a pocket on a socket on a port,
and the bus is interrupted as a very last resort,
and the address of the memory makes your floppy disk abort,
then the socket packet pocket has an error to report Biggrin

Patrick Patience
Offline
Last seen: 4 years 4 months ago
DeveloperModerator
Joined: 2007-02-20 19:26
Sorry.

Just contacted you by e-mail, I think I know what it was, I'm looking into it.

_______________________________________________
It's kinda scary when my desktop is messier than my room...

Log in or register to post comments