File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 4444 "$local_root$rest "
4545/ ge ;
4646
47+ # Remove the /a flag from File directives — it sets Windows file attributes
48+ # and is silently skipped on non-Windows, causing files to not be included.
49+ my $fa_count = 0;
50+ $fa_count ++ while $content =~ / \b File\s +\/ a\b /g ;
51+ $content =~ s /\b File\s +\/ a\b / File/ g ;
52+ print " Removed $fa_count 'File /a' flags (unsupported on non-Windows)\n " if $fa_count ;
53+
4754open my $out , ' >' , $nsi_file or die " Cannot write $nsi_file : $! " ;
4855print $out $content ;
4956close $out ;
Original file line number Diff line number Diff line change @@ -204,12 +204,15 @@ rebuild_windows_installer() {
204204 log " Rebuilding NSIS installer: $installer_name "
205205 (
206206 cd " $script_dir "
207- makensis -NOCD -X " OutFile $installer_name " " $( basename " $script_path " ) "
207+ makensis -NOCD " $( basename " $script_path " ) "
208208 )
209209
210- local output_path=" $script_dir /$installer_name "
211- [[ -f " $output_path " ]] || error " NSIS rebuild did not produce $installer_name "
212- mv " $output_path " " $installer_path "
210+ # makensis outputs whatever filename the .nsi defines; find it
211+ local output_exe
212+ output_exe=$( find " $script_dir " -maxdepth 1 -name " *.exe" -newer " $script_path " | head -1)
213+ [[ -n " $output_exe " ]] || error " NSIS rebuild did not produce an installer"
214+ log " NSIS produced: $( basename " $output_exe " ) "
215+ mv " $output_exe " " $installer_path "
213216}
214217
215218resolve_tag_sha () {
@@ -259,7 +262,7 @@ download_artifacts_from_run() {
259262 if gh run download " $run_id " \
260263 --repo " $GITHUB_REPO " \
261264 --name " $name " \
262- --dir " $DOWNLOAD_DIR " ; then
265+ --dir " $DOWNLOAD_DIR / $name " ; then
263266 touch " $DOWNLOAD_DIR /.downloaded-$name "
264267 log " $name : done"
265268 else
You can’t perform that action at this time.
0 commit comments