|
|
#1 |
|
Junior Member
Join Date: Jun 2014
Posts: 30
|
This is my first post.
I am on windows 7 and I am trying to create an install to the document directory and sub directory but it chokes on space. Here is what I have... ;-------------------------------- ; The default installation directory InstallDir $Documents\Laughingbird Documents\Logo Elements\Tonys Work ; Request application privileges for Windows Vista RequestExecutionLevel user ;-------------------------------- from the default install that came with it. How do I get around it to install? I looked |
|
|
|
|
|
#2 |
|
Moderator
Join Date: Jun 2002
Location: ${NSISDIR}
Posts: 5,449
|
You need to quote (") strings with spaces...
IntOp $PostCount $PostCount + 1 |
|
|
|
|
|
#3 |
|
Junior Member
Join Date: Jun 2014
Posts: 30
|
still did not work.
|
|
|
|
|
|
#4 |
|
Junior Member
Join Date: Jun 2014
Posts: 30
|
;--------------------------------
; The default installation directory InstallDir $Documents\Laughingbird" "Documents\Logo" "Elements\AptA ; Request application privileges for Windows Vista RequestExecutionLevel user ;-------------------------------- Processing script file: "C:\Users\Tony\Desktop\lb_install.nsi" Name: "apta a icon element installer" OutFile: "install.exe" Error: unterminated string parsing line at C:\Users\Tony\Desktop\lb_install.nsi:19 Error in script "C:\Users\Tony\Desktop\lb_install.nsi" on line 19 -- aborting creation process This is using the example.nsi and changing it to install files. |
|
|
|
|
|
#5 |
|
Junior Member
Join Date: Jun 2014
Posts: 30
|
I even use the splash.nsi and it wont work. dont see nothing. I have the .bmp file there.
|
|
|
|
|
|
#6 |
|
Junior Member
Join Date: Jun 2014
Posts: 30
|
Ok I got the splash to screen to work but it still wont work if I put
InstallDir $Documents\Laughingbird" "Documents\Logo" "Elements\AptA if I go InstallDir $Documents\Laughingbird""Documents\Logo""Elements\AptA it will compile but then the user would have to add the spaces and I know people will just install. so how can I fix this? IM gonna post my whole script |
|
|
|
|
|
#7 |
|
Junior Member
Join Date: Jun 2014
Posts: 30
|
; Installs my graphics pack for Laughingbird Software The Logo Creator.
;-------------------------------- ; The name of the installer Name "Apartment A Productions Installer" ; The file to write OutFile "install.exe" Function .onInit SetOutPath $TEMP File /oname=spltmp.bmp "apta.bmp" ; optional ; File /oname=spltmp.wav "my_splashshit.wav" splash::show 5000 $TEMP\spltmp Pop $0 ; $0 has '1' if the user closed the splash screen early, ; '0' if everything closed normally, and '-1' if some error occurred. Delete $TEMP\spltmp.bmp ; Delete $TEMP\spltmp.wav FunctionEnd ;-------------------------------- ; The default installation directory InstallDir $Documents\Laughingbird""Documents\Logo""Elements\AptA ; Request application privileges for Windows Vista RequestExecutionLevel user ;-------------------------------- ; Pages Page directory Page instfiles ;-------------------------------- ; The stuff to install Section "" ;No components page, name is not important ; Set output path to the installation directory. SetOutPath $INSTDIR ; Put file there File club33fancy.png SectionEnd ; end the section |
|
|
|
|
|
#8 |
|
Major Dude
Join Date: Feb 2007
Posts: 672
|
You have to quote the whole string, not just the spaces...
code: |
|
|
|
|
|
#9 |
|
Moderator
Join Date: Nov 2002
Location: Surrey, England
Posts: 8,434
|
The script parser uses whitespace as a token delimiter. If your argument/parameter contains spaces then you need to surround the entire string with quotes (", ' or `) to make it parse as a single token.
Stu |
|
|
|
|
|
#10 | |
|
Junior Member
Join Date: Jun 2014
Posts: 30
|
Quote:
InstallDir "$Documents\Laughingbird Documents\Logo Elements\AptA" ??? What if I wanted to install files in that directory and another directory in the Laughingbird Documents directory and I did not need the users input? Would I have to do two sections to achieve it? |
|
|
|
|
|
|
#11 | ||
|
Major Dude
Join Date: May 2005
Location: New Zealand
Posts: 916
|
Quote:
Quote:
"Only a MouseHelmet will save you from a MouseTrap" -Jason Ross (Me) NSIS 3 POSIX Ninja Wiki Profile |
||
|
|
|
|
|
#12 |
|
Junior Member
Join Date: Jun 2014
Posts: 30
|
So still use file to put them there and the file again after to put in another directory?
InstallDir "$Documents\Laughingbird Documents" Section ; SetOutPath creates directories if they don't exist. SetOutPath "$INSTDIR\Logo Elements\AptA" ; files go here file thisfile.jpg file yourfile.jpg SetOutPath "$INSTDIR\some other dir" ; other files go here file afilehere.png file card.jpg SectionEnd Now will this show it installing with a gui with out users input? I am reading up on silent install but I want them to see an automated install. Last edited by atfpodcast; 2nd July 2014 at 23:03. |
|
|
|
|
|
#13 | |||
|
Major Dude
Join Date: May 2005
Location: New Zealand
Posts: 916
|
Quote:
Quote:
File extracts files to the current directory, which is set using SetOutPath. So you use SetOutPath to set the directory, and File to extract a file to that directory. Quote:
"Only a MouseHelmet will save you from a MouseTrap" -Jason Ross (Me) NSIS 3 POSIX Ninja Wiki Profile |
|||
|
|
|
|
|
#14 |
|
Junior Member
Join Date: Jun 2014
Posts: 30
|
I got it to work now. I commented out the directory page and it all works. Added license info too..
|
|
|
|
|
|
#15 |
|
Junior Member
Join Date: Jun 2014
Posts: 30
|
Here are the changes...
; Installs my graphics pack for Laughingbird Software The Logo Creator. ;-------------------------------- ; !define Version "v1.0" ; installer name Name " Characters Elements" ; The file to write OutFile "setup.exe" !define MUI_ICON "apta_icon.ico" icon apta_icon.ico ; Show install details ShowInstDetails show Function .onInit SetOutPath $TEMP File /oname=spltmp.bmp "splash.bmp" splash::show 4000 $TEMP\spltmp Pop $0 ; $0 has '1' if the user closed the splash screen early, ; '0' if everything closed normally, and '-1' if some error occurred. Delete $TEMP\spltmp.bmp FunctionEnd ;-------------------------------- ; The default installation directory InstallDir "$Documents\Laughingbird Documents\Logo Elements\Vector Characters" ; InstallDir "$Documents\Laughingbird Documents\Logo Logo Libraries\" ; Request application privileges for Windows Vista RequestExecutionLevel user ;-------------------------------- ; Pages Page license LicenseData license.txt ;Page directory Page instfiles ;-------------------------------- ; The stuff to install Section "" ;No components page, name is not important ; Set output path to the installation directory. SetOutPath $INSTDIR ; Put file there File C:\Users\Tony\Desktop\stuff\ai\vector\png\biz_man.png File C:\Users\Tony\Desktop\stuff\ai\vector\png\biz_woman.png File C:\Users\Tony\Desktop\stuff\ai\vector\png\casual_girl.png File C:\Users\Tony\Desktop\stuff\ai\vector\png\chef.png File C:\Users\Tony\Desktop\stuff\ai\vector\png\female_doc.png File C:\Users\Tony\Desktop\stuff\ai\vector\png\girl_megaphone.png File C:\Users\Tony\Desktop\stuff\ai\vector\png\santa.png File C:\Users\Tony\Desktop\stuff\ai\vector\png\superhero.png File C:\Users\Tony\Desktop\stuff\ai\vector\png\woodboy.png File C:\Users\Tony\Desktop\stuff\ai\vector\png\woodgirl.png File C:\Users\Tony\Desktop\stuff\ai\vector\png\xmas_girl1.png File C:\Users\Tony\Desktop\stuff\ai\vector\png\xmas_girl2.png File C:\Users\Tony\Desktop\stuff\ai\vector\png\xmas_girl3.png SectionEnd ; end the section |
|
|
|
![]() |
|
|||||||
| Thread Tools | Search this Thread |
| Display Modes | |
|
|