Skip to content

Commit

Permalink
Hotfixes for 4.2.0 (#630)
Browse files Browse the repository at this point in the history
* Fix mac env variables not getting skip activation

* Fix image tag for linux il2cpp. Force tests to use il2cpp

* Scripting backend is always il2cpp
  • Loading branch information
AndrewKahr authored Feb 19, 2024
1 parent 4ae184c commit f4d2cce
Show file tree
Hide file tree
Showing 8 changed files with 35 additions and 931 deletions.
7 changes: 0 additions & 7 deletions .github/workflows/build-tests-mac.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,13 +45,6 @@ jobs:
Library-${{ matrix.projectPath }}-macos-
Library-
###########################
# Set Scripting Backend #
###########################
- name: Set Scripting Backend To il2cpp
run: |
mv -f "./test-project/ProjectSettings/ProjectSettingsIl2cpp.asset" "./test-project/ProjectSettings/ProjectSettings.asset"
###########################
# Build #
###########################
Expand Down
7 changes: 0 additions & 7 deletions .github/workflows/build-tests-windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,13 +47,6 @@ jobs:
Library-${{ matrix.projectPath }}-windows-
Library-
###########################
# Set Scripting Backend #
###########################
- name: Set Scripting Backend To il2cpp
run: |
Move-Item -Path "./test-project/ProjectSettings/ProjectSettingsIl2cpp.asset" -Destination "./test-project/ProjectSettings/ProjectSettings.asset" -Force
###########################
# Build #
###########################
Expand Down
16 changes: 11 additions & 5 deletions dist/index.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion dist/index.js.map

Large diffs are not rendered by default.

21 changes: 17 additions & 4 deletions src/model/image-tag.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ class ImageTag {
buildPlatform,
containerRegistryRepository,
containerRegistryImageVersion,
providerStrategy,
} = imageProperties;

if (!ImageTag.versionPattern.test(editorVersion)) {
Expand All @@ -31,7 +32,11 @@ class ImageTag {
this.repository = containerRegistryRepository;
this.editorVersion = editorVersion;
this.targetPlatform = targetPlatform;
this.builderPlatform = ImageTag.getTargetPlatformToTargetPlatformSuffixMap(targetPlatform, editorVersion);
this.builderPlatform = ImageTag.getTargetPlatformToTargetPlatformSuffixMap(
targetPlatform,
editorVersion,
providerStrategy,
);
this.imagePlatformPrefix = ImageTag.getImagePlatformPrefixes(buildPlatform);
this.imageRollingVersion = Number(containerRegistryImageVersion); // Will automatically roll to the latest non-breaking version.
}
Expand Down Expand Up @@ -72,7 +77,11 @@ class ImageTag {
}
}

static getTargetPlatformToTargetPlatformSuffixMap(platform: string, version: string): string {
static getTargetPlatformToTargetPlatformSuffixMap(
platform: string,
version: string,
providerStrategy: string,
): string {
const { generic, webgl, mac, windows, windowsIl2cpp, wsaPlayer, linux, linuxIl2cpp, android, ios, tvos, facebook } =
ImageTag.targetPlatformSuffixes;

Expand Down Expand Up @@ -100,8 +109,12 @@ class ImageTag {
return windows;
case Platform.types.StandaloneLinux64: {
// Unity versions before 2019.3 do not support il2cpp
if (process.env.USE_IL2CPP === 'true' && (major >= 2020 || (major === 2019 && minor >= 3))) {
return linuxIl2cpp;
if (major >= 2020 || (major === 2019 && minor >= 3)) {
if (providerStrategy === 'local') {
return linuxIl2cpp;
} else {
return process.env.USE_IL2CPP === 'true' ? linuxIl2cpp : linux;
}
}

return linux;
Expand Down
1 change: 1 addition & 0 deletions src/model/platform-setup/setup-mac.ts
Original file line number Diff line number Diff line change
Expand Up @@ -168,6 +168,7 @@ class SetupMac {
process.env.UNITY_VERSION = buildParameters.editorVersion;
process.env.UNITY_SERIAL = buildParameters.unitySerial;
process.env.UNITY_LICENSING_SERVER = buildParameters.unityLicensingServer;
process.env.SKIP_ACTIVATION = buildParameters.skipActivation;
process.env.PROJECT_PATH = buildParameters.projectPath;
process.env.BUILD_TARGET = buildParameters.targetPlatform;
process.env.BUILD_NAME = buildParameters.buildName;
Expand Down
8 changes: 5 additions & 3 deletions test-project/ProjectSettings/ProjectSettings.asset
Original file line number Diff line number Diff line change
Expand Up @@ -806,6 +806,8 @@ PlayerSettings:
platformArchitecture: {}
scriptingBackend:
Android: 1
Server: 1
Standalone: 1
il2cppCompilerConfiguration: {}
managedStrippingLevel: {}
incrementalIl2cppBuild: {}
Expand All @@ -821,16 +823,16 @@ PlayerSettings:
apiCompatibilityLevelPerPlatform: {}
m_RenderingPath: 1
m_MobileRenderingPath: 1
metroPackageName: Template_3D
metroPackageVersion:
metroPackageName: Template3D
metroPackageVersion: 1.0.0.0
metroCertificatePath:
metroCertificatePassword:
metroCertificateSubject:
metroCertificateIssuer:
metroCertificateNotAfter: 0000000000000000
metroApplicationDescription: Template_3D
wsaImages: {}
metroTileShortName:
metroTileShortName: TestProject
metroTileShowName: 0
metroMediumTileShowName: 0
metroLargeTileShowName: 0
Expand Down
Loading

0 comments on commit f4d2cce

Please sign in to comment.