WIP: feat(workflows): add new build workflows for Windows, Linux, and macOS, and remove obsolete build scripts #17
@ -33,29 +33,43 @@ jobs:
|
|||||||
echo "Environment setup complete"
|
echo "Environment setup complete"
|
||||||
shell: bash
|
shell: bash
|
||||||
|
|
||||||
# Set correct bundle identifier before build
|
# Verify bundle identifier is correctly set
|
||||||
- name: Set bundle identifier
|
- name: Verify bundle identifier
|
||||||
run: |
|
run: |
|
||||||
# Set the correct bundle identifier in DefaultGame.ini if it exists
|
|
||||||
CONFIG_FILE="Config/DefaultGame.ini"
|
|
||||||
if [ -f "$CONFIG_FILE" ]; then
|
|
||||||
# Check if section exists or add it
|
|
||||||
if grep -q "\[/Script/MacTargetPlatform\.MacTargetSettings\]" "$CONFIG_FILE"; then
|
|
||||||
# Section exists, update the setting
|
|
||||||
sed -i '' 's/BundleIdentifier=.*/BundleIdentifier=com.luckyrobots.luckyworld/g' "$CONFIG_FILE"
|
|
||||||
else
|
|
||||||
# Section doesn't exist, add it
|
|
||||||
echo "" >> "$CONFIG_FILE"
|
|
||||||
echo "[/Script/MacTargetPlatform.MacTargetSettings]" >> "$CONFIG_FILE"
|
|
||||||
echo "BundleIdentifier=com.luckyrobots.luckyworld" >> "$CONFIG_FILE"
|
|
||||||
fi
|
|
||||||
echo "Updated bundle ID in project config"
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Set the constant bundle ID for the workflow
|
# Set the constant bundle ID for the workflow
|
||||||
echo "BUNDLE_ID=com.luckyrobots.luckyworld" >> "$GITHUB_ENV"
|
echo "BUNDLE_ID=com.luckyrobots.luckyworld" >> "$GITHUB_ENV"
|
||||||
|
|
||||||
|
# Verify the bundle ID is correctly set in DefaultGame.ini
|
||||||
|
CONFIG_FILE="Config/DefaultGame.ini"
|
||||||
|
if [ -f "$CONFIG_FILE" ]; then
|
||||||
|
if grep -q "\[/Script/MacTargetPlatform\.MacTargetSettings\]" "$CONFIG_FILE" && grep -q "BundleIdentifier=com.luckyrobots.luckyworld" "$CONFIG_FILE"; then
|
||||||
|
echo "✅ Bundle ID correctly set in DefaultGame.ini"
|
||||||
|
else
|
||||||
|
echo "⚠️ Warning: Bundle ID may not be correctly set in DefaultGame.ini"
|
||||||
|
echo "Please make sure the following section exists:"
|
||||||
|
echo "[/Script/MacTargetPlatform.MacTargetSettings]"
|
||||||
|
echo "BundleIdentifier=com.luckyrobots.luckyworld"
|
||||||
|
fi
|
||||||
|
else
|
||||||
|
echo "⚠️ DefaultGame.ini not found!"
|
||||||
|
fi
|
||||||
shell: bash
|
shell: bash
|
||||||
|
|
||||||
|
# Check Unreal Engine Project settings
|
||||||
|
- name: Inspect Unreal Settings
|
||||||
|
run: |
|
||||||
|
# Check for any potential issues in UE project settings
|
||||||
|
if [ -f "Config/DefaultEngine.ini" ]; then
|
||||||
|
echo "Checking DefaultEngine.ini for settings that might affect bundle ID..."
|
||||||
|
grep -i "bundle\|identifier\|package" Config/DefaultEngine.ini || echo "No relevant settings found"
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ -f "Config/DefaultGame.ini" ]; then
|
||||||
|
echo "Checking DefaultGame.ini for settings that might affect bundle ID..."
|
||||||
|
grep -i "bundle\|identifier\|package" Config/DefaultGame.ini || echo "No relevant settings found"
|
||||||
|
fi
|
||||||
|
shell: bash
|
||||||
|
|
||||||
# Build for macOS - use your own build script or create a test app if needed
|
# Build for macOS - use your own build script or create a test app if needed
|
||||||
- name: Build for macOS
|
- name: Build for macOS
|
||||||
run: |
|
run: |
|
||||||
@ -116,9 +130,18 @@ jobs:
|
|||||||
|
|
||||||
# Fix bundle ID in Info.plist before signing
|
# Fix bundle ID in Info.plist before signing
|
||||||
if [ -f "$MAIN_APP_PATH/Contents/Info.plist" ]; then
|
if [ -f "$MAIN_APP_PATH/Contents/Info.plist" ]; then
|
||||||
echo "Setting bundle identifier to $BUNDLE_ID"
|
echo "Checking current bundle identifier..."
|
||||||
/usr/libexec/PlistBuddy -c "Set :CFBundleIdentifier $BUNDLE_ID" "$MAIN_APP_PATH/Contents/Info.plist"
|
CURRENT_BUNDLE_ID=$(/usr/libexec/PlistBuddy -c "Print :CFBundleIdentifier" "$MAIN_APP_PATH/Contents/Info.plist")
|
||||||
echo "Updated bundle ID in Info.plist: $(/usr/libexec/PlistBuddy -c "Print :CFBundleIdentifier" "$MAIN_APP_PATH/Contents/Info.plist")"
|
echo "Current bundle ID: $CURRENT_BUNDLE_ID"
|
||||||
|
|
||||||
|
if [ "$CURRENT_BUNDLE_ID" != "$BUNDLE_ID" ]; then
|
||||||
|
echo "Bundle ID mismatch - fixing it!"
|
||||||
|
echo "Setting bundle identifier to $BUNDLE_ID"
|
||||||
|
/usr/libexec/PlistBuddy -c "Set :CFBundleIdentifier $BUNDLE_ID" "$MAIN_APP_PATH/Contents/Info.plist"
|
||||||
|
echo "Updated bundle ID in Info.plist: $(/usr/libexec/PlistBuddy -c "Print :CFBundleIdentifier" "$MAIN_APP_PATH/Contents/Info.plist")"
|
||||||
|
else
|
||||||
|
echo "Bundle ID is already correct: $BUNDLE_ID"
|
||||||
|
fi
|
||||||
else
|
else
|
||||||
echo "WARNING: Could not find Info.plist in app bundle."
|
echo "WARNING: Could not find Info.plist in app bundle."
|
||||||
fi
|
fi
|
||||||
@ -133,6 +156,10 @@ jobs:
|
|||||||
NESTED_BUNDLE_ID="$BUNDLE_ID.$NESTED_NAME"
|
NESTED_BUNDLE_ID="$BUNDLE_ID.$NESTED_NAME"
|
||||||
echo "Setting nested bundle ID to $NESTED_BUNDLE_ID for $NESTED_APP"
|
echo "Setting nested bundle ID to $NESTED_BUNDLE_ID for $NESTED_APP"
|
||||||
/usr/libexec/PlistBuddy -c "Set :CFBundleIdentifier $NESTED_BUNDLE_ID" "$NESTED_APP/Contents/Info.plist"
|
/usr/libexec/PlistBuddy -c "Set :CFBundleIdentifier $NESTED_BUNDLE_ID" "$NESTED_APP/Contents/Info.plist"
|
||||||
|
|
||||||
|
# Verify the change
|
||||||
|
UPDATED_ID=$(/usr/libexec/PlistBuddy -c "Print :CFBundleIdentifier" "$NESTED_APP/Contents/Info.plist")
|
||||||
|
echo "Updated nested app bundle ID: $UPDATED_ID"
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
fi
|
fi
|
||||||
|
@ -7,6 +7,9 @@ ProjectVersion=0.1
|
|||||||
;bAddPacks=True
|
;bAddPacks=True
|
||||||
;InsertPack=(PackSource="StarterContent.upack",PackName="StarterContent")
|
;InsertPack=(PackSource="StarterContent.upack",PackName="StarterContent")
|
||||||
|
|
||||||
|
[/Script/MacTargetPlatform.MacTargetSettings]
|
||||||
|
BundleIdentifier=com.luckyrobots.luckyworld
|
||||||
|
|
||||||
[/Script/UnrealEd.ProjectPackagingSettings]
|
[/Script/UnrealEd.ProjectPackagingSettings]
|
||||||
Build=IfProjectHasCode
|
Build=IfProjectHasCode
|
||||||
BuildConfiguration=PPBC_Shipping
|
BuildConfiguration=PPBC_Shipping
|
||||||
|
@ -97,20 +97,15 @@ fi
|
|||||||
|
|
||||||
# Update bundle ID in project settings
|
# Update bundle ID in project settings
|
||||||
echo ""
|
echo ""
|
||||||
echo "🔧 Updating bundle ID in UE config..."
|
echo "🔧 Checking for bundle ID in UE config..."
|
||||||
CONFIG_FILE="$PROJECT_ROOT/Config/DefaultGame.ini"
|
CONFIG_FILE="$PROJECT_ROOT/Config/DefaultGame.ini"
|
||||||
if [ -f "$CONFIG_FILE" ]; then
|
if [ -f "$CONFIG_FILE" ]; then
|
||||||
# Check if section exists or add it
|
if grep -q "\[/Script/MacTargetPlatform\.MacTargetSettings\]" "$CONFIG_FILE" && grep -q "BundleIdentifier=com.luckyrobots.luckyworld" "$CONFIG_FILE"; then
|
||||||
if grep -q "\[/Script/MacTargetPlatform\.MacTargetSettings\]" "$CONFIG_FILE"; then
|
echo "Bundle ID already correctly set in project config ✅"
|
||||||
# Section exists, update the setting
|
|
||||||
sed -i '' 's/BundleIdentifier=.*/BundleIdentifier=com.luckyrobots.luckyworld/g' "$CONFIG_FILE"
|
|
||||||
else
|
else
|
||||||
# Section doesn't exist, add it
|
echo "⚠️ Warning: Bundle ID may not be correctly set in DefaultGame.ini"
|
||||||
echo "" >> "$CONFIG_FILE"
|
echo "Please ensure [/Script/MacTargetPlatform.MacTargetSettings] section exists with BundleIdentifier=com.luckyrobots.luckyworld"
|
||||||
echo "[/Script/MacTargetPlatform.MacTargetSettings]" >> "$CONFIG_FILE"
|
|
||||||
echo "BundleIdentifier=com.luckyrobots.luckyworld" >> "$CONFIG_FILE"
|
|
||||||
fi
|
fi
|
||||||
echo "Updated bundle ID in project config"
|
|
||||||
else
|
else
|
||||||
echo "⚠️ Config file not found at $CONFIG_FILE"
|
echo "⚠️ Config file not found at $CONFIG_FILE"
|
||||||
fi
|
fi
|
||||||
|
Loading…
x
Reference in New Issue
Block a user