Skip to content

Commit 4cdb1f4

Browse files
committed
Split build steps into binaries, installers, archives
1 parent 14b1ed4 commit 4cdb1f4

6 files changed

Lines changed: 201 additions & 145 deletions

File tree

.github/workflows/build.yml

Lines changed: 34 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -53,16 +53,45 @@ jobs:
5353
"NEW_VERSION=$finalVersion" | Out-File -FilePath $env:GITHUB_OUTPUT -Append
5454
Write-Host "Building version: $finalVersion"
5555
56-
- name: Build
56+
- name: Build binaries
5757
shell: cmd
5858
env:
59-
APPVEYOR_BUILD_VERSION: ${{ steps.versioning.outputs.NEW_VERSION }}
60-
run: Src\Setup\__MakeFinal.bat
59+
CS_VERSION: ${{ steps.versioning.outputs.NEW_VERSION }}
60+
run: Src\Setup\BuildBinaries.bat
6161

62-
- name: Upload artifacts
62+
- name: Upload binaries
6363
uses: actions/upload-artifact@v7
6464
with:
65-
name: OpenShell
65+
name: Binaries
66+
path: |
67+
Src/Setup/Output/
68+
!Src/Setup/Output/*.skin
69+
!Src/Setup/Output/*.skin7
70+
!Src/Setup/Output/*.zip
71+
72+
- name: Build installers
73+
shell: cmd
74+
env:
75+
CS_VERSION: ${{ steps.versioning.outputs.NEW_VERSION }}
76+
run: Src\Setup\_BuildEnglish.bat
77+
78+
- name: Upload installers
79+
uses: actions/upload-artifact@v7
80+
with:
81+
name: MSI
82+
path: |
83+
Src/Setup/Temp/*.msi
84+
85+
- name: Build final
86+
shell: cmd
87+
env:
88+
CS_VERSION: ${{ steps.versioning.outputs.NEW_VERSION }}
89+
run: Src\Setup\BuildArchives.bat
90+
91+
- name: Upload final
92+
uses: actions/upload-artifact@v7
93+
with:
94+
name: Final
6695
path: |
6796
Src/Setup/Final/
6897
!Src/Setup/Final/OpenShellLoc.zip

Src/Setup/BuildArchives.bat

Lines changed: 142 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,145 @@
1+
@echo off
2+
set PATH=C:\Program Files\7-Zip\;%PATH%
3+
cd %~dp0
4+
5+
call _Version.bat
6+
7+
REM ********* Build MSI Checksums
8+
echo --- MSI Checksums
9+
..\..\build\bin\Release\Utility.exe crcmsi Temp
10+
@if ERRORLEVEL 1 exit /b 1
11+
12+
REM ********* Build bootstrapper
13+
echo --- Bootstrapper
14+
for /f "usebackq tokens=*" %%i in (`"%ProgramFiles(x86)%\Microsoft Visual Studio\Installer\vswhere.exe" -latest -products * -requires Microsoft.Component.MSBuild -property installationPath`) do set MSBuildDir=%%i\MSBuild\Current\Bin\
15+
16+
"%MSBuildDir%MSBuild.exe" Setup.sln /m /t:Rebuild /p:Configuration="Release" /p:Platform="Win32" /verbosity:quiet /nologo
17+
@if ERRORLEVEL 1 exit /b 1
18+
19+
20+
if exist Final rd /Q /S Final
21+
md Final
22+
23+
copy /B ..\..\build\bin\Release\Setup.exe Final\OpenShellSetup_%CS_VERSION_STR%.exe > nul
24+
25+
if defined APPVEYOR (
26+
appveyor PushArtifact Final\OpenShellSetup_%CS_VERSION_STR%.exe
27+
)
28+
129
REM ***** Collect PDBs
230

31+
REM ********* Collect debug info
32+
md Output\PDB32
33+
md Output\PDB64
34+
md Output\PDBARM64
35+
36+
REM Explorer 32
37+
copy /B ..\..\build\bin\Setup\ClassicExplorer32.pdb Output\PDB32 > nul
38+
copy /B Output\ClassicExplorer32.dll Output\PDB32 > nul
39+
copy /B ..\..\build\bin\Setup\ClassicExplorerSettings.pdb Output\PDB32 > nul
40+
copy /B Output\ClassicExplorerSettings.exe Output\PDB32 > nul
41+
42+
REM Explorer 64
43+
copy /B ..\..\build\bin\Setup64\ClassicExplorer64.pdb Output\PDB64 > nul
44+
copy /B Output\x64\ClassicExplorer64.dll Output\PDB64 > nul
45+
46+
REM Explorer ARM64
47+
copy /B ..\..\build\bin\SetupARM64\ClassicExplorer64.pdb Output\PDBARM64 > nul
48+
copy /B Output\ARM64\ClassicExplorer64.dll Output\PDBARM64 > nul
49+
50+
REM IE 32
51+
copy /B ..\..\build\bin\Setup\ClassicIEDLL_32.pdb Output\PDB32 > nul
52+
copy /B Output\ClassicIEDLL_32.dll Output\PDB32 > nul
53+
copy /B ..\..\build\bin\Setup\ClassicIE_32.pdb Output\PDB32 > nul
54+
copy /B Output\ClassicIE_32.exe Output\PDB32 > nul
55+
56+
REM IE 64
57+
copy /B ..\..\build\bin\Setup64\ClassicIEDLL_64.pdb Output\PDB64 > nul
58+
copy /B Output\x64\ClassicIEDLL_64.dll Output\PDB64 > nul
59+
copy /B ..\..\build\bin\Setup64\ClassicIE_64.pdb Output\PDB64 > nul
60+
copy /B Output\x64\ClassicIE_64.exe Output\PDB64 > nul
61+
62+
REM IE ARM64
63+
copy /B ..\..\build\bin\SetupARM64\ClassicIEDLL_64.pdb Output\PDBARM64 > nul
64+
copy /B Output\ARM64\ClassicIEDLL_64.dll Output\PDBARM64 > nul
65+
copy /B ..\..\build\bin\SetupARM64\ClassicIE_64.pdb Output\PDBARM64 > nul
66+
copy /B Output\ARM64\ClassicIE_64.exe Output\PDBARM64 > nul
67+
68+
REM Menu 32
69+
copy /B ..\..\build\bin\Setup\StartMenu.pdb Output\PDB32 > nul
70+
copy /B Output\StartMenu.exe Output\PDB32 > nul
71+
copy /B ..\..\build\bin\Setup\StartMenuDLL.pdb Output\PDB32 > nul
72+
copy /B Output\StartMenuDLL.dll Output\PDB32 > nul
73+
copy /B ..\..\build\bin\Setup\StartMenuHelper32.pdb Output\PDB32 > nul
74+
copy /B Output\StartMenuHelper32.dll Output\PDB32 > nul
75+
copy /B ..\..\build\bin\Release\Update.pdb Output\PDB32 > nul
76+
copy /B Output\Update.exe Output\PDB32 > nul
77+
copy /B ..\..\build\bin\Release\DesktopToasts.pdb Output\PDB32 > nul
78+
copy /B Output\DesktopToasts.dll Output\PDB32 > nul
79+
80+
REM Menu 64
81+
copy /B ..\..\build\bin\Setup64\StartMenu.pdb Output\PDB64 > nul
82+
copy /B Output\x64\StartMenu.exe Output\PDB64 > nul
83+
copy /B ..\..\build\bin\Setup64\StartMenuDLL.pdb Output\PDB64 > nul
84+
copy /B Output\x64\StartMenuDLL.dll Output\PDB64 > nul
85+
copy /B ..\..\build\bin\Setup64\StartMenuHelper64.pdb Output\PDB64 > nul
86+
copy /B Output\x64\StartMenuHelper64.dll Output\PDB64 > nul
87+
88+
REM Menu ARM64
89+
copy /B ..\..\build\bin\SetupARM64\StartMenu.pdb Output\PDBARM64 > nul
90+
copy /B Output\ARM64\StartMenu.exe Output\PDBARM64 > nul
91+
copy /B ..\..\build\bin\SetupARM64\StartMenuDLL.pdb Output\PDBARM64 > nul
92+
copy /B Output\ARM64\StartMenuDLL.dll Output\PDBARM64 > nul
93+
copy /B ..\..\build\bin\SetupARM64\StartMenuHelper64.pdb Output\PDBARM64 > nul
94+
copy /B Output\ARM64\StartMenuHelper64.dll Output\PDBARM64 > nul
95+
96+
REM ********* Source Index PDBs
97+
98+
set PDBSTR_PATH="C:\Program Files (x86)\Windows Kits\10\Debuggers\x86\srcsrv\pdbstr.exe"
99+
100+
if exist %PDBSTR_PATH% (
101+
echo --- Adding source index to PDBs
102+
call CreateSourceIndex.bat ..\.. > Output\pdbstr.txt
103+
104+
for %%f in (Output\PDB32\*.pdb) do (
105+
%PDBSTR_PATH% -w -p:%%f -s:srcsrv -i:Output\pdbstr.txt
106+
if not ERRORLEVEL 0 (
107+
echo Error adding source index to PDB
108+
exit /b 1
109+
)
110+
)
111+
112+
for %%f in (Output\PDB64\*.pdb) do (
113+
%PDBSTR_PATH% -w -p:%%f -s:srcsrv -i:Output\pdbstr.txt
114+
if not ERRORLEVEL 0 (
115+
echo Error adding source index to PDB
116+
exit /b 1
117+
)
118+
)
119+
120+
for %%f in (Output\PDBARM64\*.pdb) do (
121+
%PDBSTR_PATH% -w -p:%%f -s:srcsrv -i:Output\pdbstr.txt
122+
if not ERRORLEVEL 0 (
123+
echo Error adding source index to PDB
124+
exit /b 1
125+
)
126+
)
127+
)
128+
129+
REM ********* Prepare symbols
130+
131+
set SYMSTORE_PATH="C:\Program Files (x86)\Windows Kits\10\Debuggers\x64\symstore.exe"
132+
133+
%SYMSTORE_PATH% add /r /f Output\PDB32 /s Output\symbols /t OpenShell -:NOREFS > nul
134+
%SYMSTORE_PATH% add /r /f Output\PDB64 /s Output\symbols /t OpenShell -:NOREFS > nul
135+
%SYMSTORE_PATH% add /r /f Output\PDBARM64 /s Output\symbols /t OpenShell -:NOREFS > nul
136+
rd /Q /S Output\symbols\000Admin > nul
137+
del Output\symbols\pingme.txt > nul
138+
139+
rd /Q /S Output\PDB32
140+
rd /Q /S Output\PDB64
141+
rd /Q /S Output\PDBARM64
142+
3143
echo -- Creating symbols package
4144
set CS_SYMBOLS_NAME=OpenShellSymbols_%CS_VERSION_STR%.7z
5145

@@ -20,10 +160,10 @@ cd ..
20160

21161
cd Setup
22162

23-
copy /B ..\..\build\bin\Release\Utility.exe .\Final > nul
163+
copy /B Output\Utility.exe .\Final > nul
24164

25165
if defined APPVEYOR (
26-
appveyor PushArtifact ..\..\build\bin\Release\Utility.exe
166+
appveyor PushArtifact Output\Utility.exe
27167
)
28168

29169
exit /b 0

Src/Setup/BuildBinaries.bat

Lines changed: 7 additions & 114 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
@echo off
2+
cd %~dp0
3+
4+
call _Version.bat
5+
16
if exist Output rd /Q /S Output
27
md Output
38
md Output\x64
@@ -50,6 +55,7 @@ copy /B ..\..\build\bin\Setup\StartMenuHelper32.dll Output > nul
5055
copy /B ..\..\build\bin\Release\Update.exe Output > nul
5156
copy /B ..\..\build\bin\Release\DesktopToasts.dll Output > nul
5257
copy /B ..\..\build\bin\Release\SetupHelper.exe Output > nul
58+
copy /B ..\..\build\bin\Release\Utility.exe Output > nul
5359

5460
copy /B ..\..\build\bin\SetupARM64\ClassicExplorer64.dll Output\ARM64 > nul
5561
copy /B ..\..\build\bin\SetupARM64\ClassicIEDLL_64.dll Output\ARM64 > nul
@@ -82,119 +88,6 @@ copy /B "..\..\build\bin\Skins\Metallic.skin7" Output > nul
8288
copy /B "..\..\build\bin\Skins\Immersive.skin" Output > nul
8389
copy /B "..\..\build\bin\Skins\Immersive.skin7" Output > nul
8490

85-
86-
REM ********* Collect debug info
87-
md Output\PDB32
88-
md Output\PDB64
89-
md Output\PDBARM64
90-
91-
REM Explorer 32
92-
copy /B ..\..\build\bin\Setup\ClassicExplorer32.pdb Output\PDB32 > nul
93-
copy /B Output\ClassicExplorer32.dll Output\PDB32 > nul
94-
copy /B ..\..\build\bin\Setup\ClassicExplorerSettings.pdb Output\PDB32 > nul
95-
copy /B Output\ClassicExplorerSettings.exe Output\PDB32 > nul
96-
97-
REM Explorer 64
98-
copy /B ..\..\build\bin\Setup64\ClassicExplorer64.pdb Output\PDB64 > nul
99-
copy /B Output\x64\ClassicExplorer64.dll Output\PDB64 > nul
100-
101-
REM Explorer ARM64
102-
copy /B ..\..\build\bin\SetupARM64\ClassicExplorer64.pdb Output\PDBARM64 > nul
103-
copy /B Output\ARM64\ClassicExplorer64.dll Output\PDBARM64 > nul
104-
105-
REM IE 32
106-
copy /B ..\..\build\bin\Setup\ClassicIEDLL_32.pdb Output\PDB32 > nul
107-
copy /B Output\ClassicIEDLL_32.dll Output\PDB32 > nul
108-
copy /B ..\..\build\bin\Setup\ClassicIE_32.pdb Output\PDB32 > nul
109-
copy /B Output\ClassicIE_32.exe Output\PDB32 > nul
110-
111-
REM IE 64
112-
copy /B ..\..\build\bin\Setup64\ClassicIEDLL_64.pdb Output\PDB64 > nul
113-
copy /B Output\x64\ClassicIEDLL_64.dll Output\PDB64 > nul
114-
copy /B ..\..\build\bin\Setup64\ClassicIE_64.pdb Output\PDB64 > nul
115-
copy /B Output\x64\ClassicIE_64.exe Output\PDB64 > nul
116-
117-
REM IE ARM64
118-
copy /B ..\..\build\bin\SetupARM64\ClassicIEDLL_64.pdb Output\PDBARM64 > nul
119-
copy /B Output\ARM64\ClassicIEDLL_64.dll Output\PDBARM64 > nul
120-
copy /B ..\..\build\bin\SetupARM64\ClassicIE_64.pdb Output\PDBARM64 > nul
121-
copy /B Output\ARM64\ClassicIE_64.exe Output\PDBARM64 > nul
122-
123-
REM Menu 32
124-
copy /B ..\..\build\bin\Setup\StartMenu.pdb Output\PDB32 > nul
125-
copy /B Output\StartMenu.exe Output\PDB32 > nul
126-
copy /B ..\..\build\bin\Setup\StartMenuDLL.pdb Output\PDB32 > nul
127-
copy /B Output\StartMenuDLL.dll Output\PDB32 > nul
128-
copy /B ..\..\build\bin\Setup\StartMenuHelper32.pdb Output\PDB32 > nul
129-
copy /B Output\StartMenuHelper32.dll Output\PDB32 > nul
130-
copy /B ..\..\build\bin\Release\Update.pdb Output\PDB32 > nul
131-
copy /B Output\Update.exe Output\PDB32 > nul
132-
copy /B ..\..\build\bin\Release\DesktopToasts.pdb Output\PDB32 > nul
133-
copy /B Output\DesktopToasts.dll Output\PDB32 > nul
134-
135-
REM Menu 64
136-
copy /B ..\..\build\bin\Setup64\StartMenu.pdb Output\PDB64 > nul
137-
copy /B Output\x64\StartMenu.exe Output\PDB64 > nul
138-
copy /B ..\..\build\bin\Setup64\StartMenuDLL.pdb Output\PDB64 > nul
139-
copy /B Output\x64\StartMenuDLL.dll Output\PDB64 > nul
140-
copy /B ..\..\build\bin\Setup64\StartMenuHelper64.pdb Output\PDB64 > nul
141-
copy /B Output\x64\StartMenuHelper64.dll Output\PDB64 > nul
142-
143-
REM Menu ARM64
144-
copy /B ..\..\build\bin\SetupARM64\StartMenu.pdb Output\PDBARM64 > nul
145-
copy /B Output\ARM64\StartMenu.exe Output\PDBARM64 > nul
146-
copy /B ..\..\build\bin\SetupARM64\StartMenuDLL.pdb Output\PDBARM64 > nul
147-
copy /B Output\ARM64\StartMenuDLL.dll Output\PDBARM64 > nul
148-
copy /B ..\..\build\bin\SetupARM64\StartMenuHelper64.pdb Output\PDBARM64 > nul
149-
copy /B Output\ARM64\StartMenuHelper64.dll Output\PDBARM64 > nul
150-
151-
REM ********* Source Index PDBs
152-
153-
set PDBSTR_PATH="C:\Program Files (x86)\Windows Kits\10\Debuggers\x86\srcsrv\pdbstr.exe"
154-
155-
if exist %PDBSTR_PATH% (
156-
echo --- Adding source index to PDBs
157-
call CreateSourceIndex.bat ..\.. > Output\pdbstr.txt
158-
159-
for %%f in (Output\PDB32\*.pdb) do (
160-
%PDBSTR_PATH% -w -p:%%f -s:srcsrv -i:Output\pdbstr.txt
161-
if not ERRORLEVEL 0 (
162-
echo Error adding source index to PDB
163-
exit /b 1
164-
)
165-
)
166-
167-
for %%f in (Output\PDB64\*.pdb) do (
168-
%PDBSTR_PATH% -w -p:%%f -s:srcsrv -i:Output\pdbstr.txt
169-
if not ERRORLEVEL 0 (
170-
echo Error adding source index to PDB
171-
exit /b 1
172-
)
173-
)
174-
175-
for %%f in (Output\PDBARM64\*.pdb) do (
176-
%PDBSTR_PATH% -w -p:%%f -s:srcsrv -i:Output\pdbstr.txt
177-
if not ERRORLEVEL 0 (
178-
echo Error adding source index to PDB
179-
exit /b 1
180-
)
181-
)
182-
)
183-
184-
REM ********* Prepare symbols
185-
186-
set SYMSTORE_PATH="C:\Program Files (x86)\Windows Kits\10\Debuggers\x64\symstore.exe"
187-
188-
%SYMSTORE_PATH% add /r /f Output\PDB32 /s Output\symbols /t OpenShell -:NOREFS > nul
189-
%SYMSTORE_PATH% add /r /f Output\PDB64 /s Output\symbols /t OpenShell -:NOREFS > nul
190-
%SYMSTORE_PATH% add /r /f Output\PDBARM64 /s Output\symbols /t OpenShell -:NOREFS > nul
191-
rd /Q /S Output\symbols\000Admin > nul
192-
del Output\symbols\pingme.txt > nul
193-
194-
rd /Q /S Output\PDB32
195-
rd /Q /S Output\PDB64
196-
rd /Q /S Output\PDBARM64
197-
19891
REM ********* Build ADMX
19992
echo --- ADMX
20093
if exist Output\PolicyDefinitions.zip (
@@ -209,7 +102,7 @@ cd ..\Localization\English
209102
@if ERRORLEVEL 1 exit /b 1
210103
md en-US
211104
copy /B *.adml en-US > nul
212-
7z a ..\..\Setup\Output\PolicyDefinitions.zip *.admx en-US\*.adml PolicyDefinitions.rtf > nul
105+
tar -a -c -f ..\..\Setup\Output\PolicyDefinitions.zip *.admx en-US\*.adml PolicyDefinitions.rtf
213106
rd /Q /S en-US
214107
cd ..\..\Setup
215108

0 commit comments

Comments
 (0)