|
|
#1 |
|
Debian user
(Forum King) Join Date: Jan 2003
Location: Arch land
Posts: 4,898
|
Create a File
Is it possible to create a file during installation?
For example: Create in the $INSTDIR the dummy file "dummy.txt" With the text "Hi, I'm a dummy" ![]() Thanks
* PC: Intel Core 2 DUO E6550 @ 2.33 GHz with 2 GB RAM: Archlinux w/ xfce4. * Laptop: Intel Core 2 DUO T6600 @ 2.20 GHz with 4 GB RAM: Debian unstable w/ xfce4. |
|
|
|
|
|
#2 |
|
M.I.A.
[NSIS Dev, Mod] Join Date: Oct 2001
Location: Israel
Posts: 11,338
|
Use FileOpen, FileWrite and FileClose to do this. Just open a file using FileOpen, write your string into it using FileWrite and close it using FileClose.
NSIS FAQ | NSIS Home Page | Donate $ "I hear and I forget. I see and I remember. I do and I understand." -- Confucius |
|
|
|
|
|
#3 |
|
Debian user
(Forum King) Join Date: Jan 2003
Location: Arch land
Posts: 4,898
|
OK.
But the files isn't in the compiled source files. I'm going to create a new one. Does FileOpen creates new ones? * PC: Intel Core 2 DUO E6550 @ 2.33 GHz with 2 GB RAM: Archlinux w/ xfce4. * Laptop: Intel Core 2 DUO T6600 @ 2.20 GHz with 4 GB RAM: Debian unstable w/ xfce4. |
|
|
|
|
|
#4 |
|
M.I.A.
[NSIS Dev, Mod] Join Date: Oct 2001
Location: Israel
Posts: 11,338
|
Yes, FileOpen creates the file if it isn't there already.
NSIS FAQ | NSIS Home Page | Donate $ "I hear and I forget. I see and I remember. I do and I understand." -- Confucius |
|
|
|
|
|
#5 |
|
Debian user
(Forum King) Join Date: Jan 2003
Location: Arch land
Posts: 4,898
|
thanks dude
* PC: Intel Core 2 DUO E6550 @ 2.33 GHz with 2 GB RAM: Archlinux w/ xfce4. * Laptop: Intel Core 2 DUO T6600 @ 2.20 GHz with 4 GB RAM: Debian unstable w/ xfce4. |
|
|
|
|
|
#6 |
|
M.I.A.
[NSIS Dev, Mod] Join Date: Oct 2001
Location: Israel
Posts: 11,338
|
Just saw the page you've created on the archive using this code. There is an easier way as can be seen in makensis.nsi:
WriteINIStr "$SMPROGRAMS\NSIS\NSIS Development Site.url" "InternetShortcut" "URL" "http://nsis.sourceforge.net/" NSIS FAQ | NSIS Home Page | Donate $ "I hear and I forget. I see and I remember. I do and I understand." -- Confucius |
|
|
|
|
|
#7 |
|
Moderator
Join Date: Nov 2002
Location: Birmingham, England
Posts: 8,216
|
I have a create batch function in my app.
It extracts the base file (compile.bat) which I have already crated here on my pc. That batch has keys in it like so: <bsp_area> <bsp_compile_area> <vis_compile_area> <rad_compile_area> <copy_files_area> I use a modified version of the replacetext function to replace these keys with the right executables (e.g. I replace <bsp_compile_area> with "$INSTDIR\quake2\compilers\qbsp3.exe $8.map" which is all set ready for an ms-dos environment. I also use a slightly modified replacetext function which allows me to use it like so: Push "[Text to replace]" Push "[Replace text with this]" Call replacetext -Stu Need an installer? http://www.afrowsoft.co.uk |
|
|
|
|
|
#8 |
|
Debian user
(Forum King) Join Date: Jan 2003
Location: Arch land
Posts: 4,898
|
Will do, KichiK
* PC: Intel Core 2 DUO E6550 @ 2.33 GHz with 2 GB RAM: Archlinux w/ xfce4. * Laptop: Intel Core 2 DUO T6600 @ 2.20 GHz with 4 GB RAM: Debian unstable w/ xfce4. |
|
|
|
![]() |
|
|||||||
| Thread Tools | Search this Thread |
| Display Modes | |
|
|