Go Back   Winamp & Shoutcast Forums > Developer Center > NSIS Discussion

Reply
Thread Tools Search this Thread Display Modes
Old 17th February 2019, 14:37   #1
Anand
Junior Member
 
Join Date: Feb 2019
Posts: 2
NSIS Installer to include zip files and edit properties file

Hello all,

I am new to NSIS, so please forgive me for my ignorance. I have a requirement where a NSIS installer needs to extract a ZIP file which should be contained in the NSIS installer .exe and then update a properties files whose values are input in the NSIS installer wizard post installation.

Couple of questions:
1. How do include the zip in the exe installer generated from an NSIS script ? Such that during installation it gets extracted to a user input folder.

2. Is there anyway to update a properties files (basically a text file) after the installation is complete ?. The values of which are entered in the NSIS installer wizard.
Anand is offline   Reply With Quote
Old 17th February 2019, 14:42   #2
Anders
Moderator
 
Anders's Avatar
 
Join Date: Jun 2002
Location: ${NSISDIR}
Posts: 5,013
1) It makes no sense to include a .ZIP file inside the installer if you are just going to extract the files anyway. You might as well just include the unzipped contents normally in NSIS with "File /R".

2) What is the format of this file? .INI? Just a .TXT where you can append data to the end?

IntOp $PostCount $PostCount + 1
Anders is offline   Reply With Quote
Old 18th February 2019, 01:51   #3
Anand
Junior Member
 
Join Date: Feb 2019
Posts: 2
Thanks for the update
Quote:
Originally Posted by Anders View Post
2) What is the format of this file? .INI? Just a .TXT where you can append data to the end?
-Yes I can append the data at the end.
-The file is basically a text file, with the extension of .properties
Anand is offline   Reply With Quote
Old 18th February 2019, 10:19   #4
Anders
Moderator
 
Anders's Avatar
 
Join Date: Jun 2002
Location: ${NSISDIR}
Posts: 5,013
Appending is simple

Quote:
FileOpen $0 "$InstDir\my.properties" a
FileWrite $0 "Appending a new line$\r$\n"
FileClose $0

IntOp $PostCount $PostCount + 1
Anders is offline   Reply With Quote
Reply
Go Back   Winamp & Shoutcast Forums > Developer Center > NSIS Discussion

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump