You are here

Question regarding [DirectoriesMove]

9 posts / 0 new
Last post
bill_gagliardi
bill_gagliardi's picture
Offline
Last seen: 2 weeks 6 days ago
Joined: 2008-11-05 22:44
Question regarding [DirectoriesMove]

I'm trying to learn how the launcher works, and make a program portable, by examining other PortableApps. I ran into trouble though. I found that FoxIt Portable uses the following in it's launcher.ini.

[DirectoriesMove]
-=%APPDATA%\Foxit Software\Foxit Reader
-=%APPDATA%\Foxit Software\RMS

This unfortunately, completely lost me. What is the -= at the beginning of those lines about? What I'm trying to do is this. I have a program that writes data to the location

%USERPROFILE%\.Arachnophilia

I want to store anything that is currently there, if the location exists, then restore it upon program exit. I also want to store anything created while the program is running in the Data directory. I'm sure this can be done, but I'm not following.

In the FoxIt example, looking at it, to me, seems like it's saying what to move, but not where. I'm sure I'm wrong. Any help would be appreciated.

P.S. I did go on to #portableapps-dev early this morning, but I think I was the only "live" person there. Sad

Chris Morgan
Chris Morgan's picture
Offline
Last seen: 8 years 10 months ago
Joined: 2007-04-15 21:08
Keep local data safe but don't save portable data

[DirectoriesMove]
If you do not wish to save the data but only want to keep a local version safe and throw away any changes, set the source directory to -, so you end up with -=[target location].

- is a special value. As you want to save the contents of that folder, you want a line like config=%USERPROFILE%\.Arachnophilia (the value on the left doesn't really matter, just don't use settings).

I am a Christian and a developer and moderator here.

“A soft answer turns away wrath, but a harsh word stirs up anger.” – Proverbs 15:1

bill_gagliardi
bill_gagliardi's picture
Offline
Last seen: 2 weeks 6 days ago
Joined: 2008-11-05 22:44
Thanks

I *thought* I had seen something about the minus sign before, but when I went looking for it, I couldn't find it. Isn't that the way it usually works? Smile Anyway, I take it from your description, that you only have to reference what is to be moved, not where it's going? That's pretty slick. Thank you for the help. Peace...

Bill G.
Frozen St. Paul, MN
land of the frozen mosquito

tapsklaps
Offline
Last seen: 5 years 6 months ago
Developer
Joined: 2010-10-17 08:11
understandable explanations

Unfortunately, a large part of the reference was written in a very abstract and often ambiguous kind. I personally perceive that as a very great lack of the reference. Therefore, it is primarily not your failure if you have problems understanding this reference. For this reason I will try to explain your question in a more understandable kind. To this end, I will hereafter distinguish several cases.

  1. Case 1

    Preconditions: Besides your portable version exist a local installed version of the app.
    Aim: Both from the portable version as well as the locally installed version of the program should are stored the settings.
    Necessary command:

    [DirectoriesMove]
    config=%USERPROFILE%\.Arachnophilia

    Explanations: In a first step, by default, a backup of the folder %USERPROFILE%\.Arachnophilia concerning the settings of the locally installed version of the program will created. Afterwards this folder will deleted. Now the portable version of the program will started and an appropriate folder %USERPROFILE%\.Arachnophilia will created. After closing of the portable app this folder will deleted and in the folder "config" will now stored the settings of the portable app. This folder "config" resides in the folder Data. In a last step the settings of the locally installed app, which are stored in a backup at the beginning, will now restored on the host PC.

  2. Case 2

    Preconditions: Besides your portable version exists a local installed version of the app.
    Aim: Only from the locally installed version of the program should are stored the settings.
    Necessary command:

    [DirectoriesMove]
    -=%USERPROFILE%\.Arachnophilia

    Explanations: In a first step, by default, a backup of the folder %USERPROFILE%\.Arachnophilia concerning the settings of the locally installed version of the program will created. Afterwards this folder will deleted. Now the portable version of the program will started and an appropriate folder %USERPROFILE%\.Arachnophilia will created. After closing of the portable app this folder will deleted and all settings are discarded, i.e. nothing will stored in an appropriate folder, which resides in the folder Data. In a last step the settings of the locally installed app, which are stored in a backup at the beginning, will now restored on the host PC.

  3. Case 3

    Preconditions: A portable version exists and no local installed version of the app.
    Aim: From the portable version should stored the settings.
    Necessary command:

    [DirectoriesMove]
    config=%USERPROFILE%\.Arachnophilia

    Explanations The portable version of the program will started and an appropriate folder %USERPROFILE%\.Arachnophilia will created. After closing of the portable app this folder will deleted and in the folder "config" will now stored the settings of the portable app. This folder "config" resides in the folder Data.

  4. Case 4

    Preconditions: A portable version exists and no locally installed version of the app.
    Aim: From the portable version should stored no settings.
    Necessary command:

    [DirectoriesMove]
    -=%USERPROFILE%\.Arachnophilia

    Explanations: The portable version of the program will started and an appropriate folder %USERPROFILE%\.Arachnophilia will created. After closing of the portable app this folder will deleted and all settings are discarded, i.e. nothing will stored in an appropriate folder, which resides in the folder Data.

Pyromaniac
Pyromaniac's picture
Offline
Last seen: 9 years 2 weeks ago
Developer
Joined: 2008-09-30 19:18
Overkill

Frankly, I think you learn all that faster and more thoroughly when messing with apps yourself, and see the manual more as a fair overview of a given feature and lets the devs learn the rest through experience.

tapsklaps
Offline
Last seen: 5 years 6 months ago
Developer
Joined: 2010-10-17 08:11
matter of opinion

I think that every people should get the chance to learn with clear instructions in a systematic and constructive way. The same applies to you too. Or did you first learned in the mathematics the integral calculus and afterwards the basic arithmetic? Surely not!!!!!

gluxon
gluxon's picture
Offline
Last seen: 3 years 7 months ago
Developer
Joined: 2008-06-21 19:26
I really like comparing

I really like comparing programming to legos. Both require time and patience, and create something magnificent in the end. You can let your creativity fly and make your own structures, or follow the manual. Whatever suits you, but at some point, we do all need correct documentation to refer to.

That's for posting that tapsklaps.

tapsklaps
Offline
Last seen: 5 years 6 months ago
Developer
Joined: 2010-10-17 08:11
creativity vs. manual

It may be that you see a contradiction between the development of creativity and the usage of instructions. Personally, I see in both two essential complementary components. And certainly is the basis for the development of creativity a fundamental knowledge. Btw, you can save with well-established knowledge a lot of time and patience. And certainly our life is too short to waste the precious time uselessly. Or do you prefer instead to guess a solutions and hence to spend your time? And of course has such a kind of finding a solution nothing to do with creativity.

Incidentally, my instructions are directed primarily at those here in the forum, which still stand at the beginning of your employment with portable programs.

bill_gagliardi
bill_gagliardi's picture
Offline
Last seen: 2 weeks 6 days ago
Joined: 2008-11-05 22:44
Thank you

Thank you for the clear explanation, tapsklaps. I even understood it all. Smile I tend to need see what is happening in order to understand it. Reading comprehension is not my best thing. Anyway, thanks again for taking the time to explain. I appreciate it. Peace..

Bill G.
Frozen St. Paul, MN
land of the frozen mosquito

Log in or register to post comments