プロジェクトのインストーラーとアンインストーラーを作成するために NSIS を学習しようとしています。チュートリアル セクションの例に従おうとしています。次のスクリプトを試しました:-
# 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
ただし、次のようなエラーが表示されます。
無効なスクリプト: OutFile コマンドがありませんでした。
上部に outfile コマンドが表示されますが、なぜ機能しないのかわかりません。アドバイスをお願いします。