Error Message
MessageBox: 48: ""DataDirectory" was not set in INI file. Please check your configuration!"
Invalid command: {registry::Unload}
Error in script "E:\TestPortable\Source\TestPortable.nsi" on line 437 -- aborting creation process
Just FYI, this script dosen't work well with massive registry values. I'm tring to portabalize a game that has a value thats 5273 lines long with 79 chars in each line, or around 416000 characters (yes, 416000 chars long; pick your jaw up off the floor). It drops the key with no warning causing the game not to run.
Also, this does seem kinda old. Is this script still good?
this is really a lot of stuff 416000 characters. It will definitely need some time.
Each key is stored in stack before it is checked.
First try USEREGKEYSFILE setting FALSE which will prevent loading all keys into stack. Instead enter the registry key parent intop REGKEYS. This should speed up a bit.
Then with change in 2.6.5 using regedit instead of registry function of NSIS/Plugin this might also work (if regedit allows importing such huge registry files.)
Maybe this works.
I haven't used this script for a long time now, so I'm not sure whether it still complies to the latest PAF format.
hello everyone, this is my first comment,
i´m using the apt 2.6.5 and it works perfect, but when i´m trying to compile the 2.7 template
the log it says this:
label "ReadINIFile" not used
label "InitDataDIR" not used
And the launcher does not make datadir, regfiles, settingsdirs and settingsfiles...
And i`m using HM NSIS 2.0.3 and NSIS 2.46
Can you add support for ALLUSERSPROFILE?. I'm trying to use PAT to portalize some programs which store data files in the all users profile folder:
C:\Documents and Settings\All Users\Application Data (WINXP)
C:\ProgramData (Vista / Windows 7)
Thanks for this great and simple to use template.
Thanks for your quick response. I will test the PortableApps.com Launcher with Hostsman (http://www.abelhadigital.com/hostsman) and report back my findings.
Yeah, i know this is a stupid question, but could you give me a example of your template.
It is great but people like me who are making portable softwares for the first time will take a long time to understand the way/place you should type data, for example: i don't know what to type in the quotes for-
!define LONGAPP "${APP}"
Should i type "$(mozilla_firefox)" or "$(APP)mozilla_firefox"
Man who stand on hill with mouth open will wait long time for roast duck to drop in.
Confucius (Some Chinese guy known for his philosophies and proverbs) [Distracting smilies removed]
I know that that is easier but what's the fun in it if it is done automatically.
I want to do it manually.
Man who stand on hill with mouth open will wait long time for roast duck to drop in.
Confucius (Some Chinese guy known for his philosophies and proverbs) [Distracting smilies removed]
It's Still better to know. Please give me a sample of how it works.
Please...please...please with a cherry on top...
But any way i will try the PortableApps Software
Man who stand on hill with mouth open will wait long time for roast duck to drop in.
Confucius (Some Chinese guy known for his philosophies and proverbs) [Distracting smilies removed]
That's exactly the attitude a developer should have
Even though PAL is taking over the custom-coded apps, I think it's still useful to learn how NSIS works.
Learning NSIS is pretty easy with enough time and patience. I recommend looking at the manual bundled with NSIS Portable. If you're not getting something, feel free to drop into the PortableApps.com IRC chat room for some help.
PAL basically gives you quick, easy access to commonly used NSIS commands, with very little debugging required. It ruins the fun, but it gets the job done fast and easily.
I disagree with you on the "quick, easy access to commonly used NSIS commands". Initially (at the very start) it could have been put as similar to a whole set of macros reordered. But it's not at all like that now. There are various other bits of magic automatically done, like coping with crash recovery, dealing with environment variables, arranging the general order of things and lots more. You don't need to worry about the structure of the launcher, or the order in which things get done (unless you use custom code). You don't even need to worry about something doing something at both the start and the end (as you would if it were just exposing macros to NSIS - pre and post for registry keys, for example). It works on less than that.
It reduces the load on the developer, saves time reinventing the wheel, reduces bugs enormously (there are almost no cases where a developer has had to revise an app because of a bug in the code - it's always a missing key or directory or a new feature or something external to the launcher) and the time to fix any even more. When a registry key has been missed, it's just a matter of adding one line (or if you haven't got any other registry keys, three extra), rather than having to put in more NSIS code for which the probability of making mistakes is fairly high. And as for bugs in PAL itself, those few identified in 2.0 so far are, with one exception (the timing of when DefaultData was copied), all corner-case, or obscure bugs which would affect NSIS launchers just as much.
Quite seriously, unless you intend to help with the PortableApps.com Launcher or some other utility of ours which is in NSIS, I would recommend that you not learn NSIS but rather use the PortableApps.com Launcher - then use the time and effort you've saved to learn another language which will be of great benefit elsewhere as well, such as Python.
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
I could, but personally, I think it would be a waste of time because the NSIS used in the Portable Application Template is more complicated than the NSIS you'll ever need to know to create a portable app.
I studied the template for hours and eventually gave up, looked at the Mozilla Firefox, Portable Edition launcher and got a better idea of making a portable app.
I still got lost (note that I had zero experience making portable apps), so I bothered my good 'ole pal Chris here, as well as numerous other developers over IRC, asking them to help me. I learned NSIS (about a month or two before PAL came out) and my knowledge grew with every app.
I wrote a half-assed tutorial about how to make a portable app, then PAL came out. I read it, and realized that the tutorial was better than mine, and I switched my apps to PAL (at least updates).
While I did really enjoy writing in NSIS, I think that PAL is better because as mentioned above, its faster and updates to existing apps will appear sooner and (b) because it does a few things I didn't even think of (I peaked at the source code) and that does help with more complicated apps and (c) because (I think) John is more likely to make an official release of PAL apps, rather than custom-coded apps (you hear that John? )
But by go ahead and learn NSIS. I certainly won't discourage it. But DON'T (read: DON'T) look at the Portable Application Template as you will seriously struggle studying it. Here is an example though, if you want, just to answer your question.
I have been using 2.6.5 for quite a while now without encountering any problems. After noticing that the script has meanwhile been updated to 2.7.3 I wanted to adapt my portables to the new version. The problem is that regardless which app I test (I just copied the settings from the old version to the new one, and I tried to force the include of the registry.nsh) the registry settings are imported from the .reg file but they don't get written back into the .reg file and additionally to that the .reg file disappears after closing the app.
Any hints ?
@2. tell me how to do and i'll do it
@3. simply set INSTALLSOURCES and INSTALLDEFAULTS to FALSE and no files will be created.
generally the created exe should be located in the root dir of that app. See also directory structure in help at the end of the file...
https://portableapps.com/node/17703
i can't compile this..
Replace {registry::Unload} with ${registry::Unload}
(this is mentioned in this thread above.)
Do you have a file named {APP}.ini in the Source folder?
It should have a section named [APP]
and a entry "DataDirectory=Data"
https://portableapps.com/node/10491#comment-94019
I wonder why my Portable.reg and ProtableBackup.reg won't save in the Data Directory. It goes right into the root of the drive.
I got it...>.> I renamed the "ProgramDirectory" to "${APP}Directory", for the INI file, which causes the prob.
Just FYI, this script dosen't work well with massive registry values. I'm tring to portabalize a game that has a value thats 5273 lines long with 79 chars in each line, or around 416000 characters (yes, 416000 chars long; pick your jaw up off the floor). It drops the key with no warning causing the game not to run.
Also, this does seem kinda old. Is this script still good?
this is really a lot of stuff 416000 characters. It will definitely need some time.
Each key is stored in stack before it is checked.
First try USEREGKEYSFILE setting FALSE which will prevent loading all keys into stack. Instead enter the registry key parent intop REGKEYS. This should speed up a bit.
Then with change in 2.6.5 using regedit instead of registry function of NSIS/Plugin this might also work (if regedit allows importing such huge registry files.)
Maybe this works.
I haven't used this script for a long time now, so I'm not sure whether it still complies to the latest PAF format.
You're welcome to modify it to your needs.
is released and contains some bugfixes and cleanups. BTW works perfectly with actual NSIS portable.
hello everyone, this is my first comment,
i´m using the apt 2.6.5 and it works perfect, but when i´m trying to compile the 2.7 template
the log it says this:
label "ReadINIFile" not used
label "InitDataDIR" not used
And the launcher does not make datadir, regfiles, settingsdirs and settingsfiles...
And i`m using HM NSIS 2.0.3 and NSIS 2.46
what can i do?
with 2.7.1. I simply forgot something during cleanup. nevertheless besides this message the executable should compile.
Can you add support for ALLUSERSPROFILE?. I'm trying to use PAT to portalize some programs which store data files in the all users profile folder:![Smile](https://portableapps.com/sites/all/modules/smiley/packs/kolobok/smile.gif)
C:\Documents and Settings\All Users\Application Data (WINXP)
C:\ProgramData (Vista / Windows 7)
Thanks for this great and simple to use template.
The PortableApps.com Launcher supports ALLUSERSPROFILE, so you can use that.
Sometimes, the impossible can become possible, if you're awesome!
John,
Thanks for your quick response. I will test the PortableApps.com Launcher with Hostsman (http://www.abelhadigital.com/hostsman) and report back my findings.
Yeah, i know this is a stupid question, but could you give me a example of your template.
It is great but people like me who are making portable softwares for the first time will take a long time to understand the way/place you should type data, for example: i don't know what to type in the quotes for-
!define LONGAPP "${APP}"
Should i type "$(mozilla_firefox)" or "$(APP)mozilla_firefox"
Man who stand on hill with mouth open will wait long time for roast duck to drop in.
Confucius (Some Chinese guy known for his philosophies and proverbs)
[Distracting smilies removed]
This isn't supported; you should use the PortableApps.com Launcher which is supported, easier to use and more powerful.
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
I know that that is easier but what's the fun in it if it is done automatically.
I want to do it manually.
Man who stand on hill with mouth open will wait long time for roast duck to drop in.
Confucius (Some Chinese guy known for his philosophies and proverbs)
[Distracting smilies removed]
It's not done automatically - it still requires configuration, just like PAT does, but it's easier and more powerful.
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
It's Still better to know. Please give me a sample of how it works.
Please...please...please with a cherry on top...
But any way i will try the PortableApps Software
Man who stand on hill with mouth open will wait long time for roast duck to drop in.
Confucius (Some Chinese guy known for his philosophies and proverbs)
[Distracting smilies removed]
There are a number of apps officially released using the PortableApps.com Launcher; here's a list with what they use: Apps using the PortableApps.com Launcher.
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
That's exactly the attitude a developer should have![Smile](https://portableapps.com/sites/all/modules/smiley/packs/kolobok/smile.gif)
Even though PAL is taking over the custom-coded apps, I think it's still useful to learn how NSIS works.
Learning NSIS is pretty easy with enough time and patience. I recommend looking at the manual bundled with NSIS Portable. If you're not getting something, feel free to drop into the PortableApps.com IRC chat room for some help.![Smile](https://portableapps.com/sites/all/modules/smiley/packs/kolobok/smile.gif)
PAL basically gives you quick, easy access to commonly used NSIS commands, with very little debugging required. It ruins the fun, but it gets the job done fast and easily.
I disagree with you on the "quick, easy access to commonly used NSIS commands". Initially (at the very start) it could have been put as similar to a whole set of macros reordered. But it's not at all like that now. There are various other bits of magic automatically done, like coping with crash recovery, dealing with environment variables, arranging the general order of things and lots more. You don't need to worry about the structure of the launcher, or the order in which things get done (unless you use custom code). You don't even need to worry about something doing something at both the start and the end (as you would if it were just exposing macros to NSIS - pre and post for registry keys, for example). It works on less than that.
It reduces the load on the developer, saves time reinventing the wheel, reduces bugs enormously (there are almost no cases where a developer has had to revise an app because of a bug in the code - it's always a missing key or directory or a new feature or something external to the launcher) and the time to fix any even more. When a registry key has been missed, it's just a matter of adding one line (or if you haven't got any other registry keys, three extra), rather than having to put in more NSIS code for which the probability of making mistakes is fairly high. And as for bugs in PAL itself, those few identified in 2.0 so far are, with one exception (the timing of when DefaultData was copied), all corner-case, or obscure bugs which would affect NSIS launchers just as much.
Quite seriously, unless you intend to help with the PortableApps.com Launcher or some other utility of ours which is in NSIS, I would recommend that you not learn NSIS but rather use the PortableApps.com Launcher - then use the time and effort you've saved to learn another language which will be of great benefit elsewhere as well, such as Python.
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
(on the record)
I could, but personally, I think it would be a waste of time
because the NSIS used in the Portable Application Template is more complicated than the NSIS you'll ever need to know to create a portable app.
I studied the template for hours and eventually gave up, looked at the Mozilla Firefox, Portable Edition launcher and got a better idea of making a portable app.
I still got lost (note that I had zero experience making portable apps), so I bothered my good 'ole pal Chris here, as well as numerous other developers over IRC, asking them to help me. I learned NSIS (about a month or two before PAL came out) and my knowledge grew with every app.
I wrote a half-assed tutorial about how to make a portable app, then PAL came out. I read it, and realized that the tutorial was better than mine, and I switched my apps to PAL (at least updates).
While I did really enjoy writing in NSIS, I think that PAL is better
because as mentioned above, its faster and updates to existing apps will appear sooner and (b) because it does a few things I didn't even think of (I peaked at the source code) and that does help with more complicated apps and (c) because (I think) John is more likely to make an official release of PAL apps, rather than custom-coded apps (you hear that John?
)
But by go ahead and learn NSIS. I certainly won't discourage it. But DON'T (read: DON'T) look at the Portable Application Template as you will seriously struggle studying it. Here is an example though, if you want, just to answer your question.
(off the record)
I miss NSIS.
I have been using 2.6.5 for quite a while now without encountering any problems. After noticing that the script has meanwhile been updated to 2.7.3 I wanted to adapt my portables to the new version. The problem is that regardless which app I test (I just copied the settings from the old version to the new one, and I tried to force the include of the registry.nsh) the registry settings are imported from the .reg file but they don't get written back into the .reg file and additionally to that the .reg file disappears after closing the app.
Any hints ?
Pages