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