From d7852d5db9c5f3dfb97e6656d84b3f349f4ac580 Mon Sep 17 00:00:00 2001 From: Eric Warmenhoven Date: Tue, 9 Jan 2024 03:18:05 -0500 Subject: [PATCH] Fix incremental macos/ios/tvos builds, and pull correct git version (#16089) --- pkg/apple/RetroArch_Metal.xcodeproj/project.pbxproj | 7 ++++--- pkg/apple/RetroArch_iOS13.xcodeproj/project.pbxproj | 10 ++++++---- 2 files changed, 10 insertions(+), 7 deletions(-) diff --git a/pkg/apple/RetroArch_Metal.xcodeproj/project.pbxproj b/pkg/apple/RetroArch_Metal.xcodeproj/project.pbxproj index 819f2a5010..a2a23c737e 100644 --- a/pkg/apple/RetroArch_Metal.xcodeproj/project.pbxproj +++ b/pkg/apple/RetroArch_Metal.xcodeproj/project.pbxproj @@ -1644,7 +1644,7 @@ ); runOnlyForDeploymentPostprocessing = 0; shellPath = /bin/sh; - shellScript = "if [ -d \"$MIST_PATH\" -a -f \"$MIST_PATH\"/libmist.dylib ]; then\n install_name_tool -id @rpath/libmist.dylib \"$MIST_PATH\"/libmist.dylib\nfi\n\necho '#define GIT_VERSION ' $(git rev-parse --short HEAD) > ${DERIVED_FILE_DIR}/git_version.h\n"; + shellScript = "if [ -d \"$MIST_PATH\" -a -f \"$MIST_PATH\"/libmist.dylib ]; then\n install_name_tool -id @rpath/libmist.dylib \"$MIST_PATH\"/libmist.dylib\nfi\n\ncd \"$SRCROOT\"\necho '#define GIT_VERSION ' $(git rev-parse --short HEAD) > ${DERIVED_FILE_DIR}/git_version.h\n"; showEnvVarsInLog = 0; }; 0720995C29B1258C001642BB /* ShellScript */ = { @@ -1667,21 +1667,22 @@ }; 07340E8B2B4750520076B75D /* ShellScript */ = { isa = PBXShellScriptBuildPhase; - alwaysOutOfDate = 1; buildActionMask = 2147483647; files = ( ); inputFileListPaths = ( ); inputPaths = ( + "$(SRCROOT)/.git/**", ); outputFileListPaths = ( ); outputPaths = ( + "$(DERIVED_FILE_DIR)/git_version.h", ); runOnlyForDeploymentPostprocessing = 0; shellPath = /bin/sh; - shellScript = "echo '#define GIT_VERSION ' $(git rev-parse --short HEAD) > ${DERIVED_FILE_DIR}/git_version.h\n"; + shellScript = "cd \"$SRCROOT\"\necho '#define GIT_VERSION ' $(git rev-parse --short HEAD) > ${DERIVED_FILE_DIR}/git_version.h\n"; showEnvVarsInLog = 0; }; 07B7872F29EA3B7D0088B74F /* ShellScript */ = { diff --git a/pkg/apple/RetroArch_iOS13.xcodeproj/project.pbxproj b/pkg/apple/RetroArch_iOS13.xcodeproj/project.pbxproj index da33d2682f..5ee5a88a43 100644 --- a/pkg/apple/RetroArch_iOS13.xcodeproj/project.pbxproj +++ b/pkg/apple/RetroArch_iOS13.xcodeproj/project.pbxproj @@ -1401,40 +1401,42 @@ /* Begin PBXShellScriptBuildPhase section */ 07340E8C2B47A4290076B75D /* ShellScript */ = { isa = PBXShellScriptBuildPhase; - alwaysOutOfDate = 1; buildActionMask = 2147483647; files = ( ); inputFileListPaths = ( ); inputPaths = ( + "$(SRCROOT)/.git/**", ); outputFileListPaths = ( ); outputPaths = ( + "$(DERIVED_FILE_DIR)/git_version.h", ); runOnlyForDeploymentPostprocessing = 0; shellPath = /bin/sh; - shellScript = "echo '#define GIT_VERSION ' $(git rev-parse --short HEAD) > ${DERIVED_FILE_DIR}/git_version.h\n"; + shellScript = "cd \"$SRCROOT\"\necho '#define GIT_VERSION ' $(git rev-parse --short HEAD) > ${DERIVED_FILE_DIR}/git_version.h\n"; showEnvVarsInLog = 0; }; 07340E8D2B47A4910076B75D /* ShellScript */ = { isa = PBXShellScriptBuildPhase; - alwaysOutOfDate = 1; buildActionMask = 2147483647; files = ( ); inputFileListPaths = ( ); inputPaths = ( + "$(SRCROOT)/.git/**", ); outputFileListPaths = ( ); outputPaths = ( + "$(DERIVED_FILE_DIR)/git_version.h", ); runOnlyForDeploymentPostprocessing = 0; shellPath = /bin/sh; - shellScript = "echo '#define GIT_VERSION ' $(git rev-parse --short HEAD) > ${DERIVED_FILE_DIR}/git_version.h\n"; + shellScript = "cd \"$SRCROOT\"\necho '#define GIT_VERSION ' $(git rev-parse --short HEAD) > ${DERIVED_FILE_DIR}/git_version.h\n"; showEnvVarsInLog = 0; }; 9204BE271D319EF300BD49DB /* ShellScript */ = {