You are here

New Environmental Variable Request

7 posts / 0 new
Last post
terra666
Offline
Last seen: 2 years 1 month ago
Joined: 2014-06-22 13:42
New Environmental Variable Request

Hi,
Is it possible to add a new environmental variable to the platform for PAL:LastPortableAppsDir which will store PAL:PortableAppsDir for next time.
The reason for the request is that the other two available options are either to far in or to far out.

John T. Haller
John T. Haller's picture
Online
Last seen: 34 min 49 sec ago
AdminDeveloperModeratorTranslator
Joined: 2005-11-28 22:21
Unneeded

It's unneeded since PAL:PortableAppsBaseDir and PAL:LastPortableAppsBaseDir handle portablization of that path just fine. There's no scenario we support where the PortableApps path itself would change but not the path above it (where Start.exe is).

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

terra666
Offline
Last seen: 2 years 1 month ago
Joined: 2014-06-22 13:42
The reason I was asking for

The reason I was asking for that variable was because, I was rereading requirements for portable App submission and one of the things their was a what if scenario where portable app was installed outside the platform, as a stand alone app. As such I needed a way to keep track of where the directory was between runs.

John T. Haller
John T. Haller's picture
Online
Last seen: 34 min 49 sec ago
AdminDeveloperModeratorTranslator
Joined: 2005-11-28 22:21
Still Works

That environment variable still works outside of the platform. It's just two directories up regardless of whether the user uses the platform.

The primary purpose of it is to handle relative paths to things like documents. Mainly in the default structure of the PortableApps.com Platform.

The other environment variables handle things like internal bits. Specifically the PAL:PackagePartialDir which is used in conjunction with the PAL:Drive variable. Both have a corresponding LAST variable to match with.

Look at other apps. Most use a combination of the three replacements. The internal path via PackagePartialDir, the PA path with the PortableAppsBase, and the drive itself to handle all other stragglers.

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

terra666
Offline
Last seen: 2 years 1 month ago
Joined: 2014-06-22 13:42
That is true.But it is still

That is true.
But it is still two directories up. What happens when that skipped directory changes. The reason for my question is that the program I am trying to portabalize would like to call another program, let's call it "jump." Their is a portable version of "jump" available as such I need to keep track of "jump" between sessions/runs however, what if user want's to use their internal "jump" as such my current method of overwriting the value at each program start-up is inefficient, and therefore I would like to do search and replace. However, at current time if the intermediate directory is changed in any way it will make find function fail, which means that replace does not happen.

John T. Haller
John T. Haller's picture
Online
Last seen: 34 min 49 sec ago
AdminDeveloperModeratorTranslator
Joined: 2005-11-28 22:21
Already Works

It's fairly unlikely, as a user would likely have a consistent container directory for all their apps and that directory would remain unchanged. For example, they'd have a "My Apps" in the root of their flash drive and all their apps within. Or they'd have an "Apps" directory within Dropbox and then all their apps within. In either case, the directory doesn't need to be "PortableApps" and it'll still work. Installing a lot of apps to the root directory being synced... either directly to the root of the flash drive or directly to Dropbox... would be rather unusual. I've never seen a user do that myself.

Fun fact, though, in either of the above-mentioned cases, the sync would still work with the set of 3 replacements I mentioned above. In the case of Dropbox, the containing directory would be Dropbox on each PC and the sync would work. In the case of the root directory of a flash drive, the drive replacement I mentioned in the previous post would work.

In short, you'd only need the requested variable for an extreme edge case of a user modifying one specific directory for no real reason. And a user who does that and expects things to work would be just as likely to modify the directory of the other app, which would break the link anyway.

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

terra666
Offline
Last seen: 2 years 1 month ago
Joined: 2014-06-22 13:42
Thank you for your help.

Thank you for your help.

Log in or register to post comments