Skip to content

Commit fb4b583

Browse files
authored
Fixing windows build (#831)
1 parent 7796b16 commit fb4b583

File tree

27 files changed

+125
-94
lines changed

27 files changed

+125
-94
lines changed

.github/workflows/build.yml

Lines changed: 59 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -70,8 +70,6 @@ jobs:
7070
xcode:
7171
- Xcode_16.4
7272
- Xcode_16.3
73-
- Xcode_16.2
74-
- Xcode_16
7573
target:
7674
- template
7775
- template-angle
@@ -132,42 +130,6 @@ jobs:
132130
name: Collected-ios-templates
133131
path: ./output
134132

135-
webtemplate:
136-
needs:
137-
- source-code
138-
runs-on: macos-15
139-
env:
140-
DEVELOPER_DIR: /Applications/Xcode_16.4.app/Contents/Developer
141-
steps:
142-
- run: CDR="$(basename "$(pwd)")" ; cd .. ; rm -rf "$CDR" ; mkdir -p "$CDR" ; cd "$CDR"
143-
- name: Set up emsdk
144-
run: |
145-
wget -q --header='Accept:application/octet-stream' https://github.com/coronalabs/emsdk/releases/download/e2.0.34/emsdk.tar.xz -O emsdk.tar.xz
146-
tar -xjf emsdk.tar.xz -C ~/
147-
xattr -r -d com.apple.quarantine ~/emsdk || true
148-
- name: Get processed code
149-
uses: actions/download-artifact@v4
150-
with:
151-
name: SourceCode
152-
path: SourceCode
153-
- name: Unpack source code
154-
run: tar -xzf SourceCode/corona.tgz
155-
- run: ./tools/GHAction/daily_env.sh
156-
- name: Build webtemplate
157-
working-directory: ./platform/emscripten/gmake
158-
run: |
159-
source ~/emsdk/emsdk_env.sh
160-
./build_template.sh
161-
- name: Copy result to output
162-
run: |
163-
mkdir -p output
164-
cp -v platform/emscripten/webtemplate.zip output
165-
- name: Upload webtemplate artifact
166-
uses: actions/upload-artifact@v4
167-
with:
168-
name: Webtemplate
169-
path: ./output
170-
171133
linux:
172134
if: false
173135
needs:
@@ -463,6 +425,43 @@ jobs:
463425
APPLE_KEY_ID: ${{ secrets.AppleKeyId }}
464426
APPLE_ISSUER: ${{ secrets.AppleIssuer }}
465427

428+
webtemplate:
429+
needs:
430+
- source-code
431+
runs-on: macos-15
432+
env:
433+
DEVELOPER_DIR: /Applications/Xcode_16.4.app/Contents/Developer
434+
steps:
435+
- run: CDR="$(basename "$(pwd)")" ; cd .. ; rm -rf "$CDR" ; mkdir -p "$CDR" ; cd "$CDR"
436+
- name: Set up emsdk
437+
run: |
438+
wget -q --header='Accept:application/octet-stream' https://github.com/coronalabs/emsdk/releases/download/e2.0.34/emsdk.tar.xz -O emsdk.tar.xz
439+
tar -xjf emsdk.tar.xz -C ~/
440+
xattr -r -d com.apple.quarantine ~/emsdk || true
441+
- name: Get processed code
442+
uses: actions/download-artifact@v4
443+
with:
444+
name: SourceCode
445+
path: SourceCode
446+
- name: Unpack source code
447+
run: tar -xzf SourceCode/corona.tgz
448+
- run: ./tools/GHAction/daily_env.sh
449+
- name: Build webtemplate
450+
working-directory: ./platform/emscripten/gmake
451+
run: |
452+
source ~/emsdk/emsdk_env.sh
453+
./build_template.sh
454+
- name: Copy result to output
455+
run: |
456+
mkdir -p output
457+
cp -v platform/emscripten/webtemplate.zip output
458+
- name: Upload webtemplate artifact
459+
uses: actions/upload-artifact@v4
460+
with:
461+
name: Webtemplate
462+
path: ./output
463+
464+
466465
Windows-Simulator:
467466
needs:
468467
- source-code
@@ -477,9 +476,11 @@ jobs:
477476
name: SourceCode
478477
path: SourceCode
479478
- name: Unpack source code
479+
shell: cmd
480480
run: |
481481
7z x -snld SourceCode/corona.tgz
482482
7z x -snld corona.tar
483+
ver > nul
483484
- run: ./tools/GHAction/daily_env.sh
484485
shell: bash
485486
- run: mkdir -f docs
@@ -550,13 +551,32 @@ jobs:
550551
choco install dotnet-8.0-runtime --no-progress
551552
nuget install Microsoft.Windows.SDK.BuildTools -Version 10.0.22621.3233 -x
552553
nuget install Microsoft.Trusted.Signing.Client -Version 1.0.53 -x
554+
- name: Missing VC Components
555+
shell: powershell
556+
run: |
557+
Set-Location "C:\Program Files (x86)\Microsoft Visual Studio\Installer\"
558+
$InstallPath = "C:\Program Files\Microsoft Visual Studio\2022\Enterprise"
559+
$componentsToAdd = @(
560+
"Microsoft.VisualStudio.Component.VC.14.29.16.11.MFC"
561+
)
562+
[string]$workloadArgs = $componentsToAdd | ForEach-Object {" --add " + $_}
563+
$Arguments = ('/c', "vs_installer.exe", 'modify', '--installPath', "`"$InstallPath`"",$workloadArgs, '--quiet', '--norestart')
564+
$process = Start-Process -FilePath cmd.exe -ArgumentList $Arguments -Wait -PassThru -WindowStyle Hidden
565+
if ($process.ExitCode -eq 0)
566+
{
567+
Write-Host "components have been successfully added"
568+
}
569+
else
570+
{
571+
Write-Host "components were not installed"
572+
exit 1
573+
}
553574
- name: Build Corona Simulator
554575
shell: cmd
555576
run: |
556577
cd platform\windows
557578
call UpdateFileVersions.bat %BUILD_NUMBER%
558579
call Build.Tools\VSVars.bat
559-
call "C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\VC\Auxiliary\Build\vcvars32.bat"
560580
devenv "Corona.SDK.sln" /rebuild "Release|x86"
561581
env:
562582
AZURE_TENANT_ID: ${{ secrets.AZURE_TENANT_ID }}

platform/windows/ALmixer.Library/ALmixer.Library.Win32.vcxproj

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
<ProjectGuid>{48C7494A-3A17-4E45-A61E-B4F143119148}</ProjectGuid>
1919
<Keyword>Win32Proj</Keyword>
2020
<RootNamespace>ALmixerLibraryWin32</RootNamespace>
21-
<WindowsTargetPlatformVersion>10.0.18362.0</WindowsTargetPlatformVersion>
21+
<WindowsTargetPlatformVersion>10.0.19041.0</WindowsTargetPlatformVersion>
2222
</PropertyGroup>
2323
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
2424
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
@@ -37,7 +37,7 @@
3737
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='PreRelease|Win32'" Label="Configuration">
3838
<ConfigurationType>DynamicLibrary</ConfigurationType>
3939
<UseDebugLibraries>false</UseDebugLibraries>
40-
<PlatformToolset>v141_xp</PlatformToolset>
40+
<PlatformToolset>v142</PlatformToolset>
4141
<WholeProgramOptimization>false</WholeProgramOptimization>
4242
<CharacterSet>Unicode</CharacterSet>
4343
</PropertyGroup>

platform/windows/Box2D.Library/Box2D.Library.Win32.vcxproj

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,7 @@
135135
<ProjectName>Box2D.Library.Win32</ProjectName>
136136
<ProjectGuid>{EB74DA6F-6EBC-422E-8B7B-88A93AD5F8D6}</ProjectGuid>
137137
<RootNamespace>box2d</RootNamespace>
138-
<WindowsTargetPlatformVersion>10.0.18362.0</WindowsTargetPlatformVersion>
138+
<WindowsTargetPlatformVersion>10.0.19041.0</WindowsTargetPlatformVersion>
139139
</PropertyGroup>
140140
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
141141
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
@@ -146,7 +146,7 @@
146146
</PropertyGroup>
147147
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='PreRelease|Win32'" Label="Configuration">
148148
<ConfigurationType>StaticLibrary</ConfigurationType>
149-
<PlatformToolset>v141_xp</PlatformToolset>
149+
<PlatformToolset>v142</PlatformToolset>
150150
<CharacterSet>MultiByte</CharacterSet>
151151
<WholeProgramOptimization>false</WholeProgramOptimization>
152152
</PropertyGroup>

platform/windows/Build.Tools/VSVars.bat

Lines changed: 20 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,27 @@
11
@echo off
22

3-
echo Setup command line
4-
for %%V in ("%VS120COMNTOOLS%vsvars32.bat"
5-
,"C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\VC\Auxiliary\Build\vcvars32.bat"
6-
,"C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Auxiliary\Build\vcvars32.bat"
7-
) do (
8-
where signtool >nul 2>nul
9-
if %errorlevel% neq 0 if exist %%V (
10-
echo Using %%V
3+
echo Setting up Visual Studio C++ CLI
4+
for %%V in (
5+
"C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Auxiliary\Build\vcvars32.bat"
6+
"C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\VC\Auxiliary\Build\vcvars32.bat"
7+
"C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Auxiliary\Build\vcvars32.bat"
8+
"C:\Program Files\Microsoft Visual Studio\2022\Professional\VC\Auxiliary\Build\vcvars32.bat"
9+
"C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Auxiliary\Build\vcvars32.bat"
10+
"%VS120COMNTOOLS%vsvars32.bat"
11+
) do (
12+
echo trying %%V
13+
if exist %%V (
14+
echo It exists
1115
call %%V
16+
where signtool >nul 2>nul
17+
if %errorlevel% == 0 (
18+
echo Using %%V
19+
goto :found
20+
)
1221
)
13-
)
22+
)
23+
24+
:found
1425

1526
where signtool >nul 2>nul
1627
if %errorlevel% neq 0 (

platform/windows/Corona.AppTemplate.Win32/Corona.AppTemplate.Win32.vcxproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
<ProjectGuid>{38B61159-5222-4784-89E7-160778C63A3B}</ProjectGuid>
1515
<Keyword>Win32Proj</Keyword>
1616
<RootNamespace>CoronaAppTemplateWin32</RootNamespace>
17-
<WindowsTargetPlatformVersion>10.0.18362.0</WindowsTargetPlatformVersion>
17+
<WindowsTargetPlatformVersion>10.0.19041.0</WindowsTargetPlatformVersion>
1818
</PropertyGroup>
1919
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
2020
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">

platform/windows/Corona.Archiver/Corona.Archiver.vcxproj

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@
5454
<ProjectName>Corona.Archiver</ProjectName>
5555
<ProjectGuid>{7D790153-1892-4007-8FA5-E3B57CF1F7E2}</ProjectGuid>
5656
<RootNamespace>car</RootNamespace>
57-
<WindowsTargetPlatformVersion>10.0.18362.0</WindowsTargetPlatformVersion>
57+
<WindowsTargetPlatformVersion>10.0.19041.0</WindowsTargetPlatformVersion>
5858
</PropertyGroup>
5959
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
6060
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
@@ -65,7 +65,7 @@
6565
</PropertyGroup>
6666
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='PreRelease|Win32'" Label="Configuration">
6767
<ConfigurationType>Application</ConfigurationType>
68-
<PlatformToolset>v141_xp</PlatformToolset>
68+
<PlatformToolset>v142</PlatformToolset>
6969
<WholeProgramOptimization>false</WholeProgramOptimization>
7070
<CharacterSet>Unicode</CharacterSet>
7171
</PropertyGroup>

platform/windows/Corona.Debugger/Corona.Debugger.vcxproj

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@
4747
<ProjectGuid>{3F8DDAA9-2A84-4CEE-BAC0-A6A17A7A78EB}</ProjectGuid>
4848
<Keyword>Win32Proj</Keyword>
4949
<RootNamespace>CoronaDebugger</RootNamespace>
50-
<WindowsTargetPlatformVersion>10.0.18362.0</WindowsTargetPlatformVersion>
50+
<WindowsTargetPlatformVersion>10.0.19041.0</WindowsTargetPlatformVersion>
5151
</PropertyGroup>
5252
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
5353
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
@@ -66,7 +66,7 @@
6666
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='PreRelease|Win32'" Label="Configuration">
6767
<ConfigurationType>Application</ConfigurationType>
6868
<UseDebugLibraries>false</UseDebugLibraries>
69-
<PlatformToolset>v141_xp</PlatformToolset>
69+
<PlatformToolset>v142</PlatformToolset>
7070
<WholeProgramOptimization>false</WholeProgramOptimization>
7171
<CharacterSet>Unicode</CharacterSet>
7272
</PropertyGroup>

platform/windows/Corona.LiveServer/Corona.LiveServer.vcxproj

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
<ProjectGuid>{5C23484C-6D13-49CB-81FF-51D6149CC151}</ProjectGuid>
1919
<RootNamespace>CoronaLiveServer</RootNamespace>
2020
<Keyword>MFCProj</Keyword>
21-
<WindowsTargetPlatformVersion>10.0.18362.0</WindowsTargetPlatformVersion>
21+
<WindowsTargetPlatformVersion>10.0.19041.0</WindowsTargetPlatformVersion>
2222
</PropertyGroup>
2323
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
2424
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
@@ -39,7 +39,7 @@
3939
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='PreRelease|Win32'" Label="Configuration">
4040
<ConfigurationType>Application</ConfigurationType>
4141
<UseDebugLibraries>false</UseDebugLibraries>
42-
<PlatformToolset>v141_xp</PlatformToolset>
42+
<PlatformToolset>v142</PlatformToolset>
4343
<WholeProgramOptimization>false</WholeProgramOptimization>
4444
<CharacterSet>Unicode</CharacterSet>
4545
<UseOfMfc>Dynamic</UseOfMfc>

platform/windows/Corona.Native.Library.Win32/Corona.Native.Library.Win32.vcxproj

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
<ProjectGuid>{F9419803-1375-4F35-B198-272C89CCA8F9}</ProjectGuid>
2727
<Keyword>Win32Proj</Keyword>
2828
<RootNamespace>CoronaNativeLibraryWin32</RootNamespace>
29-
<WindowsTargetPlatformVersion>10.0.18362.0</WindowsTargetPlatformVersion>
29+
<WindowsTargetPlatformVersion>10.0.19041.0</WindowsTargetPlatformVersion>
3030
</PropertyGroup>
3131
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
3232
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug.Simulator|Win32'" Label="Configuration">
@@ -51,7 +51,7 @@
5151
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='PreRelease|Win32'" Label="Configuration">
5252
<ConfigurationType>StaticLibrary</ConfigurationType>
5353
<UseDebugLibraries>false</UseDebugLibraries>
54-
<PlatformToolset>v141_xp</PlatformToolset>
54+
<PlatformToolset>v142</PlatformToolset>
5555
<WholeProgramOptimization>false</WholeProgramOptimization>
5656
<CharacterSet>Unicode</CharacterSet>
5757
</PropertyGroup>

platform/windows/Corona.OutputViewer/Corona.OutputViewer.vcxproj

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
<RootNamespace>CoronaOutputViewer</RootNamespace>
2020
<Keyword>MFCProj</Keyword>
2121
<ProjectName>Corona.Console</ProjectName>
22-
<WindowsTargetPlatformVersion>10.0.18362.0</WindowsTargetPlatformVersion>
22+
<WindowsTargetPlatformVersion>10.0.19041.0</WindowsTargetPlatformVersion>
2323
</PropertyGroup>
2424
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
2525
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
@@ -40,7 +40,7 @@
4040
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='PreRelease|Win32'" Label="Configuration">
4141
<ConfigurationType>Application</ConfigurationType>
4242
<UseDebugLibraries>false</UseDebugLibraries>
43-
<PlatformToolset>v141_xp</PlatformToolset>
43+
<PlatformToolset>v142</PlatformToolset>
4444
<WholeProgramOptimization>false</WholeProgramOptimization>
4545
<CharacterSet>Unicode</CharacterSet>
4646
<UseOfMfc>Dynamic</UseOfMfc>

0 commit comments

Comments
 (0)