Skip to content

Commit 29499c0

Browse files
authored
macOS Xcode fixes - Archiving / osx app bin (#8280)
* Editor Config for sh to spaces * Fix Arching - SKIP_INSTALL = NO * Xcode project copy binary depth fix / app within app folder Fix for archiving copying link
1 parent 826f066 commit 29499c0

File tree

6 files changed

+20
-7
lines changed

6 files changed

+20
-7
lines changed

.editorconfig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ trim_trailing_whitespace = true
1313
charset = utf-8
1414

1515
[*.sh]
16-
indent_style = tab
16+
indent_style = space
1717
indent_size = 4
1818
tab_width = 4
1919
insert_final_newline = true

libs/openFrameworksCompiled/project/ios/CoreOF.xcconfig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ DEAD_CODE_STRIPPING = YES
101101
ENABLE_BITCODE = NO
102102
ENABLE_STRICT_OBJC_MSGSEND = YES
103103

104-
SKIP_INSTALL = YES
104+
SKIP_INSTALL = NO
105105

106106
CC = $(OF_PATH)/scripts/osx/cc.sh
107107
CXX = $(OF_PATH)/scripts/osx/cxx.sh

libs/openFrameworksCompiled/project/macos/CoreOF.xcconfig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,7 @@ INSTALL_PATH = /Applications
118118
//SDKROOT = macosx
119119
//WRAPPER_EXTENSION = app
120120

121-
SKIP_INSTALL = YES
121+
SKIP_INSTALL = NO
122122

123123
CC = $(OF_PATH)/scripts/osx/cc.sh
124124
CXX = $(OF_PATH)/scripts/osx/cxx.sh

libs/openFrameworksCompiled/project/osx/CoreOF.xcconfig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@ INSTALL_PATH = /Applications
113113
SDKROOT = macosx
114114
WRAPPER_EXTENSION = app
115115

116-
SKIP_INSTALL = YES
116+
SKIP_INSTALL = NO
117117

118118
CC = $(OF_PATH)/scripts/osx/cc.sh
119119
CXX = $(OF_PATH)/scripts/osx/cxx.sh

libs/openFrameworksCompiled/project/tvOS/CoreOF.xcconfig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ GCC_WARN_ABOUT_INVALID_OFFSETOF_MACRO = NO
6666
GCC_WARN_ABOUT_RETURN_TYPE = YES
6767
GLES_SILENCE_DEPRECATION = YES
6868

69-
CONFIGURATION_BUILD_DIR = $(SRCROOT)/bin/
69+
SKIP_INSTALL = NO
7070

7171
CC = $(OF_PATH)/scripts/osx/cc.sh
7272
CXX = $(OF_PATH)/scripts/osx/cxx.sh

scripts/osx/xcode_project.sh

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -190,7 +190,7 @@ copy_binary() {
190190
msg "Copy Binary to bin/ ";
191191
APP_NAME="${PRODUCT_NAME}.app"
192192
APP_SOURCE="${CONFIGURATION_BUILD_DIR}/${APP_NAME}"
193-
APP_DEST="${SRCROOT}/bin/${APP_NAME}"
193+
APP_DEST="${SRCROOT}/bin/"
194194
echo "------------------------------------------"
195195
echo "🔍 Debugging copy_binary function"
196196
echo "Configuration Build Dir: ${CONFIGURATION_BUILD_DIR}"
@@ -203,13 +203,26 @@ copy_binary() {
203203
exit 1
204204
fi
205205

206+
207+
206208
# Check if the .app file exists
207209
if [ ! -d "${APP_SOURCE}" ]; then
208210
echo "ERROR: Application bundle not found: ${APP_SOURCE}"
209211
ls -l "${CONFIGURATION_BUILD_DIR}" # List files in the build directory for debugging
210212
exit 1
211213
fi
212-
mkdir -p "${SRCROOT}/bin/"
214+
mkdir -p "${SRCROOT}/bin/"
215+
if [ "${ACTION}" = "archive" ]; then
216+
echo "Skipping copy to bin/ during Archive action."
217+
return 0
218+
fi
219+
220+
if [ -L "${APP_SOURCE}" ] || file "${APP_SOURCE}" | grep -q "alias"; then
221+
echo "WARNING: App source ${APP_SOURCE} is an alias or symlink. Skipping copy to prevent corruption."
222+
return 0
223+
fi
224+
225+
213226
rsync -avz --delete "$APP_SOURCE" "$APP_DEST"
214227
if [ $? -eq 0 ]; then
215228
echo "App successfully $APP_DEST"

0 commit comments

Comments
 (0)