Skip to content

Commit f4d2cce

Browse files
authored
Hotfixes for 4.2.0 (#630)
* Fix mac env variables not getting skip activation * Fix image tag for linux il2cpp. Force tests to use il2cpp * Scripting backend is always il2cpp
1 parent 4ae184c commit f4d2cce

File tree

8 files changed

+35
-931
lines changed

8 files changed

+35
-931
lines changed

.github/workflows/build-tests-mac.yml

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -45,13 +45,6 @@ jobs:
4545
Library-${{ matrix.projectPath }}-macos-
4646
Library-
4747
48-
###########################
49-
# Set Scripting Backend #
50-
###########################
51-
- name: Set Scripting Backend To il2cpp
52-
run: |
53-
mv -f "./test-project/ProjectSettings/ProjectSettingsIl2cpp.asset" "./test-project/ProjectSettings/ProjectSettings.asset"
54-
5548
###########################
5649
# Build #
5750
###########################

.github/workflows/build-tests-windows.yml

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -47,13 +47,6 @@ jobs:
4747
Library-${{ matrix.projectPath }}-windows-
4848
Library-
4949
50-
###########################
51-
# Set Scripting Backend #
52-
###########################
53-
- name: Set Scripting Backend To il2cpp
54-
run: |
55-
Move-Item -Path "./test-project/ProjectSettings/ProjectSettingsIl2cpp.asset" -Destination "./test-project/ProjectSettings/ProjectSettings.asset" -Force
56-
5750
###########################
5851
# Build #
5952
###########################

dist/index.js

Lines changed: 11 additions & 5 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/index.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/model/image-tag.ts

Lines changed: 17 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ class ImageTag {
1717
buildPlatform,
1818
containerRegistryRepository,
1919
containerRegistryImageVersion,
20+
providerStrategy,
2021
} = imageProperties;
2122

2223
if (!ImageTag.versionPattern.test(editorVersion)) {
@@ -31,7 +32,11 @@ class ImageTag {
3132
this.repository = containerRegistryRepository;
3233
this.editorVersion = editorVersion;
3334
this.targetPlatform = targetPlatform;
34-
this.builderPlatform = ImageTag.getTargetPlatformToTargetPlatformSuffixMap(targetPlatform, editorVersion);
35+
this.builderPlatform = ImageTag.getTargetPlatformToTargetPlatformSuffixMap(
36+
targetPlatform,
37+
editorVersion,
38+
providerStrategy,
39+
);
3540
this.imagePlatformPrefix = ImageTag.getImagePlatformPrefixes(buildPlatform);
3641
this.imageRollingVersion = Number(containerRegistryImageVersion); // Will automatically roll to the latest non-breaking version.
3742
}
@@ -72,7 +77,11 @@ class ImageTag {
7277
}
7378
}
7479

75-
static getTargetPlatformToTargetPlatformSuffixMap(platform: string, version: string): string {
80+
static getTargetPlatformToTargetPlatformSuffixMap(
81+
platform: string,
82+
version: string,
83+
providerStrategy: string,
84+
): string {
7685
const { generic, webgl, mac, windows, windowsIl2cpp, wsaPlayer, linux, linuxIl2cpp, android, ios, tvos, facebook } =
7786
ImageTag.targetPlatformSuffixes;
7887

@@ -100,8 +109,12 @@ class ImageTag {
100109
return windows;
101110
case Platform.types.StandaloneLinux64: {
102111
// Unity versions before 2019.3 do not support il2cpp
103-
if (process.env.USE_IL2CPP === 'true' && (major >= 2020 || (major === 2019 && minor >= 3))) {
104-
return linuxIl2cpp;
112+
if (major >= 2020 || (major === 2019 && minor >= 3)) {
113+
if (providerStrategy === 'local') {
114+
return linuxIl2cpp;
115+
} else {
116+
return process.env.USE_IL2CPP === 'true' ? linuxIl2cpp : linux;
117+
}
105118
}
106119

107120
return linux;

src/model/platform-setup/setup-mac.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -168,6 +168,7 @@ class SetupMac {
168168
process.env.UNITY_VERSION = buildParameters.editorVersion;
169169
process.env.UNITY_SERIAL = buildParameters.unitySerial;
170170
process.env.UNITY_LICENSING_SERVER = buildParameters.unityLicensingServer;
171+
process.env.SKIP_ACTIVATION = buildParameters.skipActivation;
171172
process.env.PROJECT_PATH = buildParameters.projectPath;
172173
process.env.BUILD_TARGET = buildParameters.targetPlatform;
173174
process.env.BUILD_NAME = buildParameters.buildName;

test-project/ProjectSettings/ProjectSettings.asset

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -806,6 +806,8 @@ PlayerSettings:
806806
platformArchitecture: {}
807807
scriptingBackend:
808808
Android: 1
809+
Server: 1
810+
Standalone: 1
809811
il2cppCompilerConfiguration: {}
810812
managedStrippingLevel: {}
811813
incrementalIl2cppBuild: {}
@@ -821,16 +823,16 @@ PlayerSettings:
821823
apiCompatibilityLevelPerPlatform: {}
822824
m_RenderingPath: 1
823825
m_MobileRenderingPath: 1
824-
metroPackageName: Template_3D
825-
metroPackageVersion:
826+
metroPackageName: Template3D
827+
metroPackageVersion: 1.0.0.0
826828
metroCertificatePath:
827829
metroCertificatePassword:
828830
metroCertificateSubject:
829831
metroCertificateIssuer:
830832
metroCertificateNotAfter: 0000000000000000
831833
metroApplicationDescription: Template_3D
832834
wsaImages: {}
833-
metroTileShortName:
835+
metroTileShortName: TestProject
834836
metroTileShowName: 0
835837
metroMediumTileShowName: 0
836838
metroLargeTileShowName: 0

0 commit comments

Comments
 (0)