When I compiled the installer by PortableApps.com_Installer_0.13.3, it can only include the App directory, but not the Data directory's files.
What should I do?
New: Run-Command (Dec 2, 2024), Platform 29.5.3 (Jun 27, 2024)
1,100+ portable packages, 1.1 billion downloads
No Ads Nov/Dec!, Please donate today
[01:32] that should be handled by the launcher, not the installer
[01:33] place settings.ini in App\DefaultData, and then have the launcher (at first run) copy it to data\settings
[01:43] Thanks!
If you are building an installer, the Data directory is always empty. That's so already existing user files ion that folder aren't overwritten.
If you want files to appear inside the data folder, use a DefaultData folder inside the App folder and copy them on first launch.
"What about Love?" - "Overrated. Biochemically no different than eating large quantities of chocolate." - Al Pacino in The Devils Advocate
I've code such as:
IfFileExists $EXEDIR\Data\settings\Settings.ini ""
CopyFiles /SILENT $EXEDIR\App\DefaultData\*.* $EXEDIR\Data\
But, the launcher copy the settings.ini each time.
How can I make it only the first time?
I've read the NSIS help about IfFileExists, but couldn't find what is wrong.
You should probably use HM NIS Edit to help if you don't understand the params of certain functions, not only is the interface intuitive and helpful, so is there help.
On to your question:
The parameters of IfFileExists are as such:
IfFileExists
So in your case, you'd want so use this:
With SettingsExist being the next function that the launcher should go to, if the settings do in fact exist.
-Gizmokid2005
I type too slow
"What about Love?" - "Overrated. Biochemically no different than eating large quantities of chocolate." - Al Pacino in The Devils Advocate
You use the code the wrong way:
If the file exists, it jumps to the place specified after the file. In your case that is "" which is the next line so the file gets copied no matter what.
Use something like:
"What about Love?" - "Overrated. Biochemically no different than eating large quantities of chocolate." - Al Pacino in The Devils Advocate
Yes, as Simeon said...I reversed my code, his is correct.
Thanks very much! It's so brevity.
I try again and again, and found my another error: there must be a blank line before lable.......
You can actually do this, its smaller and cleaner:
And having
NoSettings:
would cause the compiler to complain. Not deadly, but in good standards it is.Too many lonely hearts in the real world
Too many bridges you can burn
Too many tables you can't turn
Don't wanna live my life in the real world
Cool! Thanks!!