@@ -27,50 +27,20 @@ jobs:
2727
2828 - name : Build project
2929 run : |
30- $outDir = "build/bin/${{ matrix.configuration }}/${{ matrix.platform }}"
31- msbuild build/VisualStudio/Notepad4.sln /p:Configuration=${{ matrix.configuration }} /p:Platform=${{ matrix.platform }} /p:OutDir=$outDir\ /verbosity:minimal
32- msbuild locale/Locale.sln /p:Configuration=${{ matrix.configuration }} /p:Platform=${{ matrix.platform }} /p:OutDir=$outDir\ /verbosity:minimal
30+ msbuild build/VisualStudio/Notepad4.sln /p:Configuration=${{ matrix.configuration }} /p:Platform=${{ matrix.platform }} /verbosity:minimal
31+ msbuild locale/Locale.sln /p:Configuration=${{ matrix.configuration }} /p:Platform=${{ matrix.platform }} /verbosity:minimal
3332
3433 - name : Debug - List directory structure after build
3534 run : |
36- Get-ChildItem -Path "." -Recurse -File | Where-Object { $_.Name -match "\.exe$" } | Select-Object FullName
37-
38- - name : Create output directory
39- run : |
40- New-Item -ItemType Directory -Path "output/${{ matrix.platform }}" -Force
41-
42- - name : Copy built files
43- run : |
44- # Use the exact output directory we specified in msbuild
45- $srcDir = "build/bin/${{ matrix.configuration }}/${{ matrix.platform }}"
46- $destDir = "output/${{ matrix.platform }}"
47-
48- if (Test-Path "$srcDir\Notepad4.exe") {
49- Write-Host "Found Notepad4.exe in: $srcDir"
50- Copy-Item -Path "$srcDir\Notepad4.exe" -Destination "$destDir"
51- Copy-Item -Path "$srcDir\matepath.exe" -Destination "$destDir"
52- # Also copy locale folder if it exists
53- if (Test-Path "$srcDir\locale") {
54- Copy-Item -Path "$srcDir\locale" -Destination "$destDir" -Recurse
55- }
56- } else {
57- Write-Error "Could not find Notepad4.exe in $srcDir"
58- # List directory structure for debugging
59- Get-ChildItem -Path "." -Recurse -File | Where-Object { $_.Name -match "\.exe$" } | Select-Object FullName
60- exit 1
61- }
62-
63- - name : Debug - List output directory contents
64- run : |
65- Get-ChildItem -Path "output/${{ matrix.platform }}" -Recurse -File | Select-Object FullName
35+ Get-ChildItem -Path "./build" -Recurse -File | Where-Object { $_.Name -match "\.exe$" } | Select-Object FullName
6636
6737 - name : Build NSIS installer
6838 run : |
6939 $platform = "${{ matrix.platform }}"
70- $arch = if ( $platform -eq "Win32") { "x86" } elseif ($platform -eq "x64") { "x64" } else { "arm64" }
40+ $arch = $platform
7141 $version = if ("${{ github.ref }}" -like "refs/tags/*") { "${{ github.ref_name }}" } else { "dev" }
72- $outputFile = "output\ Notepad4-${version}-${arch}.exe"
73- $sourceDir = "output \${platform}"
42+ $outputFile = "Notepad4-${version}-${arch}.exe"
43+ $sourceDir = "build\bin\Release \${platform}"
7444
7545 makensis /DVERSION="$version" /DARCH="$arch" /DOUTPUT_FILE="$outputFile" /DSOURCE_DIR="$sourceDir" build\Notepad4.nsi
7646
0 commit comments