0
我想學習NSIS爲項目創建一個安裝程序和一個卸載程序,我試圖按照教程部分中的示例。我想下面的腳本: -NSIS錯誤:無效的腳本:從來沒有OutFile命令
# define the name of the installer
outfile "installer.exe"
# define the directory to install to, the desktop in this case as specified
# by the predefined $DESKTOP variable
installDir $DESKTOP\Harshit\NSIS\Scripts
# default section
section
# define the output path for this file
setOutPath $DESKTOP\Harshit\NSIS\Files
# define what to install and place it in the output path
File test1.txt
# define uninstaller name
writeUninstaller $DESKTOP\Harshit\NSIS\Scripts\uninstaller.exe
sectionEnd
# create a section to define what the uninstaller does.
# the section will always be named "Uninstall"
section "Uninstall"
# Always delete uninstaller first
delete $DESKTOP\Harshit\NSIS\Scripts\uninstaller.exe
# now delete installed file
delete $DESKTOP\Harshit\NSIS\Scripts\Files\test1.txt
sectionEnd
但是,我得到一個錯誤,指出:
invalid script: never had OutFile command.
我可以在上面看到OUTFILE命令,但我想不出爲什麼它是不工作。有什麼建議嗎?
不,我再次檢查。我將正確的文件傳遞給編譯器。但是,在添加顯示的行後!error filename然後顯示相同的錯誤。我還更改了文件夾的權限以允許所有用戶寫入文件夾。 – user1439090 2013-03-18 09:09:03