You are here

Changes on the lancher.ini file

15 posts / 0 new
Last post
tapsklaps
Offline
Last seen: 4 years 3 months ago
Developer
Joined: 2010-10-17 08:11
Changes on the lancher.ini file

Assuming I have performed some changes at the lancher.ini file. Are these changes effective immediately or must I re-create the launcher?

Ken Herbert
Ken Herbert's picture
Online
Last seen: 54 min 50 sec ago
DeveloperModerator
Joined: 2010-05-25 18:19
As far as I know...

It depends on the change(s) made.

Some changes require that the Launcher be rebuilt (because it needs to recompile with extra NSIS modules, or details held within the Launcher.exe have changed) but others don't. As far as I know the ones where extra modules are required actually warn you when you try to run the old AppNamePortable.exe.

As a "just in case" measure I always rebuild the Launcher when I change the launcher.ini.

Gord Caswell
Gord Caswell's picture
Offline
Last seen: 15 hours 8 min ago
DeveloperModerator
Joined: 2008-07-24 18:46
depends on the change

It depends on the change.

For the most part, the launcher picks up changes automatically. Off hand the only thing i recall that it doesn't is if you change the runasadmin setting.

tapsklaps
Offline
Last seen: 4 years 3 months ago
Developer
Joined: 2010-10-17 08:11
optimal solution

Thanks for the immediate answer. Because of possible different special cases where the formation of the launcher is required again, I am of the same opinion as winterblood. Therefore it's probably the best solution to rebuilt the launcher after every change of the launcher.ini file.

Gord Caswell
Gord Caswell's picture
Offline
Last seen: 15 hours 8 min ago
DeveloperModerator
Joined: 2008-07-24 18:46
indeed

I agree, and I would recommend rebuilding the launcher every time as well.

Chris Morgan
Chris Morgan's picture
Offline
Last seen: 7 years 7 months ago
Joined: 2007-04-15 21:08
Almost correct

As well as RunAsAdmin you also have some of the [Activate] keys; [Activate]:Registry needs recompilation. (Thus, anything that depends on the registry needs it.)

However, you don't need to worry much about these as the launcher still checks them at runtime and if you have changed the value from what it was when it compiled it, it will warn you that it's not doing what you want.

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

tapsklaps
Offline
Last seen: 4 years 3 months ago
Developer
Joined: 2010-10-17 08:11
3 conclusions

Accordingly, I can derive the following 3 conclusions:

  1. conclusion #1
    In case of anything that depends on the registry a recompilation of the launcher is necessary.
  2. conclusion #2
    If after some changes in the launcher.ini I get a warning of the launcher at the runtime, then it's also necessary to recompile the launcher.
  3. conclusion #3>
    In all other cases than described under conclusion # 1 and conclusion #2 I can use the unchanged launcher.
Gord Caswell
Gord Caswell's picture
Offline
Last seen: 15 hours 8 min ago
DeveloperModerator
Joined: 2008-07-24 18:46
middle of a night shift

Ah yes, that's right. Still, remembering even one thing that requires recompilation when I'm in the middle of a night shift, and don't have access to my computer to verify, is not bad. Smile

tapsklaps
Offline
Last seen: 4 years 3 months ago
Developer
Joined: 2010-10-17 08:11
Usage of a special AppNamePortable.ini file

After the extraction of the "PortableApps.com_Application_Template_2.4.zip" file I have detected in the folder "PortableApps.com_Application_Template_2.4\AppNamePortable\Other\Sources" the 2 files "AppNamePortable.ini" and "Readme.txt". In the file Readme.txt is described the usage of the file AppNamePortable.ini. Accordingly I can rename the file AppNamePortable.ini to **AppID**Portable.ini. Afterwards I can paste this renamed file in the folder AppNamePortable next to the file AppNamePortable.exe.

My main question is now, is it only possible to change the 3 keys (AdditionalParameters, DisableSplashScreen and RunLocally) as described in the Readme.txt file? Or can I change also other keys, which are not explained in the Readme.txt file?

Accordingly to the describtions in the Readme.txt file I have concluded, that I can Change in this can the file AppNamePortable. ini without the necessary to recompile the launcher again.

EDIT: Accordingly to the descriptions in the file Readme.txt I have concluded, that I can change the file AppNamePortable.ini without the necessity of a recompilation of the launcher.

John T. Haller
John T. Haller's picture
Offline
Last seen: 1 hour 11 min ago
AdminDeveloperModeratorTranslator
Joined: 2005-11-28 22:21
Readme Only

You can do exactly what is described in the readme. No more. That AppNamePortable.ini is for end users, not for developers. It has nothing to do with compiling the launcher.

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

tapsklaps
Offline
Last seen: 4 years 3 months ago
Developer
Joined: 2010-10-17 08:11
Allowing extra user configuration

In my last comment I mentioned a problem, which I want to repeat for clarification:

My main question is now, is it only possible to change the 3 keys (AdditionalParameters, DisableSplashScreen and RunLocally) as described in the Readme.txt file? Or can I change also other keys, which are not explained in the Readme.txt file?

You have explicitly negated the possibility, that the user can more do as to change these 3 keys. But this statement is false. The opposite statement is described in the section Allowing extra user configuration (see at the end of the documentation with respect to the topic "Custom code").

Accordingly can the developer about the appropriate code in the file custom.nsh offer additional lines in the file **AppID**Portable.ini next to the file AppNamePortable.exe. And now has the user the possibility for changing also these additional lines.

John T. Haller
John T. Haller's picture
Offline
Last seen: 1 hour 11 min ago
AdminDeveloperModeratorTranslator
Joined: 2005-11-28 22:21
Custom Code

You can if you write custom code. But we don't normally do that as there isn't much call for additional configuration options until you get into a very complicated launcher with very specific needs (see: Iron Portable). As a general rule -- literally 99% of the time -- no, you get those 3 options and no others.

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

tapsklaps
Offline
Last seen: 4 years 3 months ago
Developer
Joined: 2010-10-17 08:11
Offer additional lines

I share your opinion and simply wanted to point out to the potential possibility, that it is possible to offer the user more than 3 keys to be changed.

But how can I offer the user more than one additional line? Can I do that with the following code in the file custom.nsh in the case of 2 additional lines?

${ReadUserConfig} $0 KeyName1
${ReadUserConfig} $1 KeyName2
John T. Haller
John T. Haller's picture
Offline
Last seen: 1 hour 11 min ago
AdminDeveloperModeratorTranslator
Joined: 2005-11-28 22:21
Complicated

In addition to just that, you need to write custom code for how that configuration is actually handled. So, you'd need to read in a specific config option and then programatically do something based on it. Then read in the next and programatically do something based on it. Or define custom variables to hold the values within your custom.nsh. Reading it in on its own does nothing at all. Again, see the Iron Portable custom.nsh.

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

tapsklaps
Offline
Last seen: 4 years 3 months ago
Developer
Joined: 2010-10-17 08:11
Definition of custom variables

According to your recommendation, I could do the following:

Var example1
Var example2

${ReadUserConfig} $example1 KeyName1
${ReadUserConfig} $example2 KeyName2

But of course I'm going to look thoroughly into the file Iron Portable custom.nsh for a better understanding of that issue.

Log in or register to post comments