- NSIS Discussion
- newbi nsis questions
Archive: newbi nsis questions
mc^^^^
29th September 2001 04:40 UTC
newbi nsis questions
ok here we go:
1. Is there a way to be able to give the icon for the setup file created a higher colour count, eg 256 or 16M?
2. Is there a way to just get the installer to read all the files in the one folder instead of typing in every file?
3. Is there a way to have only one .exe file that is like a shortcut to dragging the mysetupscript.nsi file into "makeNSIS"?
4. Are there any cool little tips i can add to my script to spruce it up a bit, (like the splash screen)?
mc^^^^
29th September 2001 13:41 UTC
5. How do i get it to install a link in my start menu with the string of: C:\SIERRA\Half-Life\hl.exe -console -game cstrike
?
jarsonic
29th September 2001 15:15 UTC
This should work.
Section "Counter Strike Start Menu Shortcuts"
CreateDirectory "$SMPROGRAMS\Counter Strike"
CreateShortCut "$SMPROGRAMS\Counter Strike\CounterStrike.lnk" "C:\SIERRA\Half-Life\hl.exe -console -game cstrike"
SectionEnd
- Jarsonic
jarsonic
29th September 2001 15:17 UTC
Splash Screen Stuff:
; ==============Command line instructions:============================
Function .onInit ; Makes splashscreen: adds ~130k, though.
SetOutPath $TEMP
File /oname=spltmp.dat "C:\program files\nsis\jarsonic_splash.bmp"
File /oname=spltmp.exe "C:\program files\nsis\splash.exe"
ExecWait '"$TEMP\spltmp.exe" 1000 $HWNDPARENT spltmp.dat'
Delete $TEMP\spltmp.exe
Delete $TEMP\spltmp.dat
FunctionEnd
; ============End command line instructions.==========================
Also, read "splash.txt" in your NSIS directory.
- Jarsonic
jarsonic
29th September 2001 15:21 UTC
Sorry, I'm reading the questions from the bottom up. ;^)
As far as color count in icons, I beleive you can have high color icons... I leeched the pimp hat icon from PiMP using Microangelo, and I use it as the icon when I'm using NSIS to make plugin / AVS preset packages. It's in 256 color, I believe. As long as you make an icon in 256 colors, etc. (w/ Microangelo or some other program), I'm pretty sure you can use it in NSIS.
--peace--
- Jarsonic
P.S. - for the question about including all files in a directory: use wildcards (*.html, etc.).
ex:
File "C:\program files\winamp\plugins\avs\Jarsonic\*.avs"
P.P.S. - As far as compiling using Makensis, you can right click the .nsi file, click "compile," and it will compile the .nsi script automatically.
mc^^^^
30th September 2001 06:10 UTC
Originally posted by jarsonic
As far as color count in icons, I beleive you can have high color icons... I leeched the pimp hat icon from PiMP using Microangelo, and I use it as the icon when I'm using NSIS to make plugin / AVS preset packages. It's in 256 color, I believe. As long as you make an icon in 256 colors, etc. (w/ Microangelo or some other program), I'm pretty sure you can use it in NSIS.
* using microangelo 5.02 and nsis 1.44 i get error when compiling script:
no 32x32x16 icon -- failing!
did this happen to you? i think that hat icon is only 16 colours though, check it.
* also how do i execute two files (to open together) at the end of the installer?
* and the command line for the start menu shortcut was:
"C:\SIERRA\Half-Life\hl.exe" -console -game cstrike
not
"C:\SIERRA\Half-Life\hl.exe -console -game cstrike"
note the quotation marks.
jarsonic
30th September 2001 07:30 UTC
Sorry about the icon stuff... not sure about that. Might want to shoot Justin off an e-mail. As far as the Counter Strike thing.... did you try:
"'C:\SIERRA\Half-Life\hl.exe' -console -game cstrike"
?
and for the execute 2 files @ end of the installer:
Function .onInstSuccess
MessageBox MB_YESNO|MB_ICONQUESTION \
"Setup has completed. View first file?" \
IDNO NoFile
ExecShell open "$INSTDIR\first_file.exe"
NoFile
FunctionEnd
Function .onInstSuccess
ExecShell open '$INSTDIR\second_file.exe"
FunctionEnd
Did you try that? If that doesn't work, try to include both of them in one .onInstSucess function.
Sorry if that wasn't completely clear. I'm slightly inebriated right now. :D
- Jarsonic
mc^^^^
30th September 2001 08:25 UTC
got the shortcut thing, it goes like this:
CreateShortCut "$SMPROGRAMS\Sierra\CounterStrike.lnk" "C:\SIERRA\Half-Life\hl.exe" "-console -game cstrike" "C:\Program Files\Custom Counter-Strike Installer\cstrike.ico"
3rd""'s are paramaters
4th""'s is icon file
but with the exec 2 files i meant within each other, what i want to do is have the installer compile another nsi file at the end.
Koen van de Sande
30th September 2001 12:23 UTC
You can only have 32x32x16 icons - it's the way NSIS was designed and it's coded directly somewhere - you can't change it.
The compile NSIS thing:
If you Exec the MAKENSIS program, with the name of you script as a parameter, it will compile. eg MAKENSIS MyScript.NSI
mc^^^^
1st October 2001 14:03 UTC
another question
why do i get "installation faild" (msg) both times in this function no matter what file is newer?
Function .onInit
CompareFileTimes "C:\Program Files\Custom Counter-Strike\Custom CS Installer.exe" "C:\Program Files\Custom Counter-Strike\source\Custom CS Installer.exe" "bad" "goodi"
bad:
MessageBox MB_OK|MB_ICONSTOP "Installation failed"
Abort
goodi:
FunctionEnd