NSIS スクリプトをコンパイルする前に、バッチを実行したいと考えています。
execWait を見つけました。これにより、アプリケーションのインストール中にバッチファイルが開始されます。
!execute 'batch.bat' も試しましたが、コンパイル中にエラーが発生します。
これは私のバッチファイルの内容です:
@echo off
@type file.txt > destination.txt
@echo. >> destination.txt
@svnversion.exe >> destination.txt
1.アップデート
これは私が nsi ファイルに入れたものですが、動作しません。
!tempfile BAT
!appendfile "${BAT}.cmd" "@echo off$\r$\n"
!appendfile "${BAT}.cmd" "@type file.txt > destination.txt$\r$\n"
!appendfile "${BAT}.cmd" "@echo. >> destination.txt$\r$\n"
!appendfile "${BAT}.cmd" "@svnversion.exe >> destination.txt$\r$\n"
!system '"${BAT}.cmd"'
!delfile "${BAT}.cmd"
!undef BAT
エラーは「出力ファイルを開けません」「エラー - 作成プロセスを中止しています」
ソースコードに何か問題がありますか?