fix(actions): update comment for disabling local automatic code signing in LuckyWorld.Target.cs
Some checks failed
Test macOS Build Action / test-macos-build (push) Failing after 14m8s

This commit is contained in:
Ozgur 2025-04-15 21:22:23 +02:00
parent 4a71488bea
commit cdc8f67953
No known key found for this signature in database
GPG Key ID: 66CDF27505A35546
3 changed files with 45 additions and 30 deletions

View File

@ -9,8 +9,15 @@ public class LuckyWorldTarget : TargetRules
{
Type = TargetType.Game;
DefaultBuildSettings = BuildSettingsVersion.V5;
// Fix for "Targets with a unique build environment cannot be built with an installed engine"
bOverrideBuildEnvironment = true;
BuildEnvironment = TargetBuildEnvironment.Shared;
// Ensure proper build configuration
bUseLoggingInShipping = true;
bShouldCompileAsDLL = false;
ExtraModuleNames.AddRange( new string[] { "LuckyWorld" } );
IncludeOrderVersion = EngineIncludeOrderVersion.Latest;
@ -28,8 +35,8 @@ public class LuckyWorldTarget : TargetRules
GlobalDefinitions.Add("APP_BUNDLE_NAME=LuckyWorld");
GlobalDefinitions.Add("APP_BUNDLE_DISPLAY_NAME=LuckyWorld");
// Disable automatic code signing
bDisableAutomaticCodeSigning = true;
// Don't use local automatic code signing for builds
// bDisableAutomaticCodeSigning property is not available in UE 5.5
}
}
}

View File

@ -9,7 +9,13 @@ public class LuckyWorldEditorTarget : TargetRules
{
Type = TargetType.Editor;
DefaultBuildSettings = BuildSettingsVersion.V5;
// Fix for "Targets with a unique build environment cannot be built with an installed engine"
bOverrideBuildEnvironment = true;
BuildEnvironment = TargetBuildEnvironment.Shared;
// Ensure proper build configuration
bShouldCompileAsDLL = false;
ExtraModuleNames.AddRange( new string[] { "LuckyWorld" } );

View File

@ -1,4 +1,5 @@
#!/bin/bash
set -e # Exit on any error
# Get the user's home directory
USER_HOME="$HOME"
@ -27,44 +28,43 @@ echo "Project root: $PROJECT_ROOT"
echo "Project file: $PROJECT_FILE"
echo "Archive directory: $ARCHIVE_DIR"
# Clean up previous build artifacts
rm -rf DerivedDataCache Intermediate Binaries Saved
# More selective cleanup - don't remove DerivedDataCache
echo "🧹 Cleaning build artifacts..."
rm -rf Intermediate/Build/Mac Saved/Cooked
mkdir -p "$ARCHIVE_DIR"
# Generate project files
echo "📝 Generating project files..."
"$UE_ROOT/Engine/Build/BatchFiles/Mac/GenerateProjectFiles.sh" -project="$PROJECT_FILE" -game -engine
# Run the build command
# Run the build command with simplified parameters and more diagnostics
echo "🔨 Starting build process..."
"$UE_UAT" -ScriptsForProject="$PROJECT_FILE" Turnkey \
-command=VerifySdk \
"$UE_UAT" -ScriptsForProject="$PROJECT_FILE" BuildCookRun \
-project="$PROJECT_FILE" \
-platform=Mac \
-UpdateIfNeeded \
-EditorIO \
-EditorIOPort=59484 \
-project="$PROJECT_FILE" \
BuildCookRun \
-nop4 \
-utf8output \
-cook \
-project="$PROJECT_FILE" \
-clientconfig=Shipping \
-target=LuckyWorld \
-unrealexe="$UE_EDITOR" \
-platform=Mac \
-installed \
-build \
-cook -iterate -CookOnTheFly -CookMapsOnly \
-stage \
-skipStage=SignExecutables \
-archive \
-package \
-build \
-iterativecooking \
-pak \
-iostore \
-compressed \
-prereqs \
-iostore \
-package \
-archive \
-archivedirectory="$ARCHIVE_DIR" \
-CrashReporter \
-clientconfig=Shipping
-verbose \
-ddc=DerivedDataBackendGraph \
-CrashReporter
# Check for errors in the build process
BUILD_STATUS=$?
if [ $BUILD_STATUS -ne 0 ]; then
echo "❌ ERROR: Build command failed with exit code $BUILD_STATUS"
exit $BUILD_STATUS
fi
echo ""
echo "🔍 Looking for built application..."
@ -74,9 +74,11 @@ APP_PATH=$(find "$ARCHIVE_DIR" -name "*.app" -type d | head -n 1)
if [ -z "$APP_PATH" ] || [ ! -d "$APP_PATH" ]; then
echo "❌ ERROR: Build failed or did not produce an app bundle!"
echo "Check the logs above for build errors."
echo "Common issues:"
echo " - 'Targets with a unique build environment cannot be built with an installed engine'"
echo " Fix: Use bOverrideBuildEnvironment = true instead of BuildEnvironment = TargetBuildEnvironment.Unique"
# List all files in the archive directory to help debug
echo "Contents of archive directory:"
find "$ARCHIVE_DIR" -type f -o -type d | sort
exit 1
fi