From e721dd6e2cce569ae80d08d137534d32e7c1ff40 Mon Sep 17 00:00:00 2001 From: Bill Hollings Date: Fri, 7 Sep 2018 11:46:58 -0400 Subject: [PATCH] Update build process. Allow building and packaging MoltenVK for of only iOS or only macOS. Move packaging scripts out of Xcode projects and into script files. --- MoltenVK/MoltenVK.xcodeproj/project.pbxproj | 4 +- MoltenVK/scripts/create_dylib_ios.sh | 33 +++ MoltenVK/scripts/create_dylib_macos.sh | 24 ++ MoltenVKPackaging.xcodeproj/project.pbxproj | 238 +++++++++++++++--- ...heme => MoltenVK Package (Debug).xcscheme} | 0 ...me => MoltenVK Package (Release).xcscheme} | 0 ...ltenVK Package (iOS only) (Debug).xcscheme | 80 ++++++ ...enVK Package (iOS only) (Release).xcscheme | 80 ++++++ ...enVK Package (macOS only) (Debug).xcscheme | 80 ++++++ ...VK Package (macOS only) (Release).xcscheme | 80 ++++++ Scripts/package_all.sh | 7 + Scripts/package_docs.sh | 12 + Scripts/package_moltenvk.sh | 43 ++++ Scripts/package_shader_converter.sh | 73 ++++++ Scripts/update_latest.sh | 14 ++ 15 files changed, 729 insertions(+), 39 deletions(-) create mode 100755 MoltenVK/scripts/create_dylib_ios.sh create mode 100755 MoltenVK/scripts/create_dylib_macos.sh rename MoltenVKPackaging.xcodeproj/xcshareddata/xcschemes/{MoltenVK (Debug).xcscheme => MoltenVK Package (Debug).xcscheme} (100%) rename MoltenVKPackaging.xcodeproj/xcshareddata/xcschemes/{MoltenVK (Release).xcscheme => MoltenVK Package (Release).xcscheme} (100%) create mode 100644 MoltenVKPackaging.xcodeproj/xcshareddata/xcschemes/MoltenVK Package (iOS only) (Debug).xcscheme create mode 100644 MoltenVKPackaging.xcodeproj/xcshareddata/xcschemes/MoltenVK Package (iOS only) (Release).xcscheme create mode 100644 MoltenVKPackaging.xcodeproj/xcshareddata/xcschemes/MoltenVK Package (macOS only) (Debug).xcscheme create mode 100644 MoltenVKPackaging.xcodeproj/xcshareddata/xcschemes/MoltenVK Package (macOS only) (Release).xcscheme create mode 100755 Scripts/package_all.sh create mode 100755 Scripts/package_docs.sh create mode 100755 Scripts/package_moltenvk.sh create mode 100755 Scripts/package_shader_converter.sh create mode 100755 Scripts/update_latest.sh diff --git a/MoltenVK/MoltenVK.xcodeproj/project.pbxproj b/MoltenVK/MoltenVK.xcodeproj/project.pbxproj index 2f87edd4..49c83e5e 100644 --- a/MoltenVK/MoltenVK.xcodeproj/project.pbxproj +++ b/MoltenVK/MoltenVK.xcodeproj/project.pbxproj @@ -831,7 +831,7 @@ ); runOnlyForDeploymentPostprocessing = 0; shellPath = /bin/sh; - shellScript = "set -e\n\nexport MVK_PROD_NAME=\"MoltenVK\"\nexport MVK_DYLIB_NAME=\"lib${MVK_PROD_NAME}.dylib\"\nexport MVK_BUILT_PROD_PATH=\"${BUILT_PRODUCTS_DIR}\"\nexport MVK_SYS_FWK_DIR=\"${SDK_DIR}/System/Library/Frameworks\"\nexport MVK_USR_LIB_DIR=\"${SDK_DIR}/usr/lib\"\n\nclang \\\n-dynamiclib \\\n-arch x86_64 \\\n-mmacosx-version-min=${MACOSX_DEPLOYMENT_TARGET} \\\n-compatibility_version 1.0.0 -current_version 1.0.0 \\\n-install_name \"@rpath/${MVK_DYLIB_NAME}\" \\\n-Wno-incompatible-sysroot \\\n-isysroot ${SDK_DIR} \\\n-iframework ${MVK_SYS_FWK_DIR} \\\n-framework Metal -framework IOSurface -framework IOKit -framework QuartzCore -framework Foundation \\\n--library-directory ${MVK_USR_LIB_DIR} \\\n-lSystem -lc++ \\\n-o \"${MVK_BUILT_PROD_PATH}/${MVK_DYLIB_NAME}\" \\\n-force_load \"${MVK_BUILT_PROD_PATH}/${MVK_PROD_NAME}.framework/${MVK_PROD_NAME}\"\n"; + shellScript = "${SRCROOT}/scripts/create_dylib_macos.sh"; }; A9731FAD1EDDAE39006B7298 /* Create Dynamic Library */ = { isa = PBXShellScriptBuildPhase; @@ -845,7 +845,7 @@ ); runOnlyForDeploymentPostprocessing = 0; shellPath = /bin/sh; - shellScript = "set -e\n\nexport MVK_PROD_NAME=\"MoltenVK\"\nexport MVK_DYLIB_NAME=\"lib${MVK_PROD_NAME}.dylib\"\nexport MVK_BUILT_PROD_PATH=\"${BUILT_PRODUCTS_DIR}\"\nexport MVK_SYS_FWK_DIR=\"${SDK_DIR}/System/Library/Frameworks\"\nexport MVK_USR_LIB_DIR=\"${SDK_DIR}/usr/lib\"\n\n# Do not link to IOSurface if deploying to iOS versions below 11.0, doing so will\n# link IOSurface as a private framework, which will trigger App Store rejection.\nif [ $(echo \"${IPHONEOS_DEPLOYMENT_TARGET} >= 11.0\" | bc) -eq 1 ]\nthen\n export MVK_IOSURFACE_FWK=\"-framework IOSurface\"\nelse\n export MVK_IOSURFACE_FWK=\"\"\nfi\n\nclang \\\n-dynamiclib \\\n-arch arm64 \\\n-mios-version-min=${IPHONEOS_DEPLOYMENT_TARGET} \\\n-compatibility_version 1.0.0 -current_version 1.0.0 \\\n-install_name \"@rpath/${MVK_DYLIB_NAME}\" \\\n-Wno-incompatible-sysroot \\\n-isysroot ${SDK_DIR} \\\n-iframework ${MVK_SYS_FWK_DIR} \\\n-framework Metal ${MVK_IOSURFACE_FWK} -framework UIKit -framework QuartzCore -framework Foundation \\\n--library-directory ${MVK_USR_LIB_DIR} \\\n-lSystem -lc++ \\\n-o \"${MVK_BUILT_PROD_PATH}/${MVK_DYLIB_NAME}\" \\\n-force_load \"${MVK_BUILT_PROD_PATH}/${MVK_PROD_NAME}.framework/${MVK_PROD_NAME}\"\n"; + shellScript = "${SRCROOT}/scripts/create_dylib_ios.sh"; }; /* End PBXShellScriptBuildPhase section */ diff --git a/MoltenVK/scripts/create_dylib_ios.sh b/MoltenVK/scripts/create_dylib_ios.sh new file mode 100755 index 00000000..544ea793 --- /dev/null +++ b/MoltenVK/scripts/create_dylib_ios.sh @@ -0,0 +1,33 @@ +#!/bin/bash + +set -e + +export MVK_PROD_NAME="MoltenVK" +export MVK_DYLIB_NAME="lib${MVK_PROD_NAME}.dylib" +export MVK_BUILT_PROD_PATH="${BUILT_PRODUCTS_DIR}" +export MVK_SYS_FWK_DIR="${SDK_DIR}/System/Library/Frameworks" +export MVK_USR_LIB_DIR="${SDK_DIR}/usr/lib" + +# Do not link to IOSurface if deploying to iOS versions below 11.0, doing so will +# link IOSurface as a private framework, which will trigger App Store rejection. +if [ $(echo "${IPHONEOS_DEPLOYMENT_TARGET} >= 11.0" | bc) -eq 1 ] +then + export MVK_IOSURFACE_FWK="-framework IOSurface" +else + export MVK_IOSURFACE_FWK="" +fi + +clang \ +-dynamiclib \ +-arch arm64 \ +-mios-version-min=${IPHONEOS_DEPLOYMENT_TARGET} \ +-compatibility_version 1.0.0 -current_version 1.0.0 \ +-install_name "@rpath/${MVK_DYLIB_NAME}" \ +-Wno-incompatible-sysroot \ +-isysroot ${SDK_DIR} \ +-iframework ${MVK_SYS_FWK_DIR} \ +-framework Metal ${MVK_IOSURFACE_FWK} -framework UIKit -framework QuartzCore -framework Foundation \ +--library-directory ${MVK_USR_LIB_DIR} \ +-lSystem -lc++ \ +-o "${MVK_BUILT_PROD_PATH}/${MVK_DYLIB_NAME}" \ +-force_load "${MVK_BUILT_PROD_PATH}/${MVK_PROD_NAME}.framework/${MVK_PROD_NAME}" diff --git a/MoltenVK/scripts/create_dylib_macos.sh b/MoltenVK/scripts/create_dylib_macos.sh new file mode 100755 index 00000000..3e6b33bf --- /dev/null +++ b/MoltenVK/scripts/create_dylib_macos.sh @@ -0,0 +1,24 @@ +#!/bin/bash + +set -e + +export MVK_PROD_NAME="MoltenVK" +export MVK_DYLIB_NAME="lib${MVK_PROD_NAME}.dylib" +export MVK_BUILT_PROD_PATH="${BUILT_PRODUCTS_DIR}" +export MVK_SYS_FWK_DIR="${SDK_DIR}/System/Library/Frameworks" +export MVK_USR_LIB_DIR="${SDK_DIR}/usr/lib" + +clang \ +-dynamiclib \ +-arch x86_64 \ +-mmacosx-version-min=${MACOSX_DEPLOYMENT_TARGET} \ +-compatibility_version 1.0.0 -current_version 1.0.0 \ +-install_name "@rpath/${MVK_DYLIB_NAME}" \ +-Wno-incompatible-sysroot \ +-isysroot ${SDK_DIR} \ +-iframework ${MVK_SYS_FWK_DIR} \ +-framework Metal -framework IOSurface -framework IOKit -framework QuartzCore -framework Foundation \ +--library-directory ${MVK_USR_LIB_DIR} \ +-lSystem -lc++ \ +-o "${MVK_BUILT_PROD_PATH}/${MVK_DYLIB_NAME}" \ +-force_load "${MVK_BUILT_PROD_PATH}/${MVK_PROD_NAME}.framework/${MVK_PROD_NAME}" diff --git a/MoltenVKPackaging.xcodeproj/project.pbxproj b/MoltenVKPackaging.xcodeproj/project.pbxproj index 3fea58c5..e5d0feae 100644 --- a/MoltenVKPackaging.xcodeproj/project.pbxproj +++ b/MoltenVKPackaging.xcodeproj/project.pbxproj @@ -7,14 +7,40 @@ objects = { /* Begin PBXAggregateTarget section */ + A975D5782140585200D4834F /* MoltenVK-iOS */ = { + isa = PBXAggregateTarget; + buildConfigurationList = A975D5882140585200D4834F /* Build configuration list for PBXAggregateTarget "MoltenVK-iOS" */; + buildPhases = ( + A975D5872140585200D4834F /* Package MoltenVK */, + ); + dependencies = ( + A975D5792140585200D4834F /* PBXTargetDependency */, + A975D57D2140585200D4834F /* PBXTargetDependency */, + A975D5812140585200D4834F /* PBXTargetDependency */, + ); + name = "MoltenVK-iOS"; + productName = Package; + }; + A975D58B2140586700D4834F /* MoltenVK-macOS */ = { + isa = PBXAggregateTarget; + buildConfigurationList = A975D59B2140586700D4834F /* Build configuration list for PBXAggregateTarget "MoltenVK-macOS" */; + buildPhases = ( + A975D59A2140586700D4834F /* Package MoltenVK */, + ); + dependencies = ( + A975D58E2140586700D4834F /* PBXTargetDependency */, + A975D5922140586700D4834F /* PBXTargetDependency */, + A975D5962140586700D4834F /* PBXTargetDependency */, + A975D5982140586700D4834F /* PBXTargetDependency */, + ); + name = "MoltenVK-macOS"; + productName = Package; + }; A9FEADBC1F3517480010240E /* MoltenVK */ = { isa = PBXAggregateTarget; buildConfigurationList = A9FEADDC1F3517480010240E /* Build configuration list for PBXAggregateTarget "MoltenVK" */; buildPhases = ( A9FEADD61F3517480010240E /* Package MoltenVK */, - A9FEADD71F3517480010240E /* Package MoltenVKShaderConverter */, - A9A5D8A61FB3AABA00F20475 /* Package Docs */, - A9FEADDB1F3517480010240E /* Update Latest */, ); dependencies = ( A9FEADBD1F3517480010240E /* PBXTargetDependency */, @@ -45,6 +71,55 @@ remoteGlobalIDString = A9CBEE011B6299D800E45FDC; remoteInfo = "MoltenVK-macOS"; }; + A975D57A2140585200D4834F /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = A92DB3EE1CE0F72500FBC835 /* MoltenVK.xcodeproj */; + proxyType = 1; + remoteGlobalIDString = A9B8EE091A98D796009C5A02; + remoteInfo = "MoltenVK-iOS"; + }; + A975D57E2140585200D4834F /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = A92DB40E1CE0F89600FBC835 /* MoltenVKShaderConverter.xcodeproj */; + proxyType = 1; + remoteGlobalIDString = A93903B81C57E9D700FE90DC; + remoteInfo = "MoltenVKSPIRVToMSLConverter-iOS"; + }; + A975D5822140585200D4834F /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = A92DB40E1CE0F89600FBC835 /* MoltenVKShaderConverter.xcodeproj */; + proxyType = 1; + remoteGlobalIDString = A937472B1A9A8B2900F29B34; + remoteInfo = "MoltenVKGLSLToSPIRVConverter-iOS"; + }; + A975D58F2140586700D4834F /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = A92DB3EE1CE0F72500FBC835 /* MoltenVK.xcodeproj */; + proxyType = 1; + remoteGlobalIDString = A9CBED861B6299D800E45FDC; + remoteInfo = "MoltenVK-macOS"; + }; + A975D5932140586700D4834F /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = A92DB40E1CE0F89600FBC835 /* MoltenVKShaderConverter.xcodeproj */; + proxyType = 1; + remoteGlobalIDString = A93903C01C57E9ED00FE90DC; + remoteInfo = "MoltenVKSPIRVToMSLConverter-macOS"; + }; + A975D5972140586700D4834F /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = A92DB40E1CE0F89600FBC835 /* MoltenVKShaderConverter.xcodeproj */; + proxyType = 1; + remoteGlobalIDString = A93747701A9A98D000F29B34; + remoteInfo = "MoltenVKGLSLToSPIRVConverter-macOS"; + }; + A975D5992140586700D4834F /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = A92DB40E1CE0F89600FBC835 /* MoltenVKShaderConverter.xcodeproj */; + proxyType = 1; + remoteGlobalIDString = A9092A8C1A81717B00051823; + remoteInfo = MoltenVKShaderConverter; + }; A981498A1FB6B566005F00B4 /* PBXContainerItemProxy */ = { isa = PBXContainerItemProxy; containerPortal = A92DB40E1CE0F89600FBC835 /* MoltenVKShaderConverter.xcodeproj */; @@ -138,6 +213,13 @@ A92DB3EE1CE0F72500FBC835 /* MoltenVK.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = MoltenVK.xcodeproj; path = MoltenVK/MoltenVK.xcodeproj; sourceTree = ""; }; A92DB40E1CE0F89600FBC835 /* MoltenVKShaderConverter.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = MoltenVKShaderConverter.xcodeproj; path = MoltenVKShaderConverter/MoltenVKShaderConverter.xcodeproj; sourceTree = ""; }; A943100220546CDD00F5CF87 /* fetchDependencies */ = {isa = PBXFileReference; lastKnownFileType = text; name = fetchDependencies; path = ../fetchDependencies; sourceTree = ""; }; + A975D55C213F25D700D4834F /* create_dylib_ios.sh */ = {isa = PBXFileReference; lastKnownFileType = text.script.sh; name = create_dylib_ios.sh; path = MoltenVK/scripts/create_dylib_ios.sh; sourceTree = SOURCE_ROOT; }; + A975D55D213F266000D4834F /* create_dylib_macos.sh */ = {isa = PBXFileReference; lastKnownFileType = text.script.sh; name = create_dylib_macos.sh; path = MoltenVK/scripts/create_dylib_macos.sh; sourceTree = SOURCE_ROOT; }; + A975D561213F299500D4834F /* update_latest.sh */ = {isa = PBXFileReference; lastKnownFileType = text.script.sh; path = update_latest.sh; sourceTree = ""; }; + A975D562213F2B7700D4834F /* package_docs.sh */ = {isa = PBXFileReference; lastKnownFileType = text.script.sh; path = package_docs.sh; sourceTree = ""; }; + A975D566213F2DAA00D4834F /* package_shader_converter.sh */ = {isa = PBXFileReference; lastKnownFileType = text.script.sh; path = package_shader_converter.sh; sourceTree = ""; }; + A975D573214050AB00D4834F /* package_moltenvk.sh */ = {isa = PBXFileReference; lastKnownFileType = text.script.sh; path = package_moltenvk.sh; sourceTree = ""; }; + A975D5742140567B00D4834F /* package_all.sh */ = {isa = PBXFileReference; lastKnownFileType = text.script.sh; path = package_all.sh; sourceTree = ""; }; A98149E51FB78829005F00B4 /* MoltenVK_Runtime_UserGuide.md */ = {isa = PBXFileReference; lastKnownFileType = net.daringfireball.markdown; name = MoltenVK_Runtime_UserGuide.md; path = Docs/MoltenVK_Runtime_UserGuide.md; sourceTree = ""; }; A9AD67D12054E2D700ED3C08 /* VulkanSamples_repo_revision */ = {isa = PBXFileReference; lastKnownFileType = text; path = VulkanSamples_repo_revision; sourceTree = ""; }; A9AD67D32054E2D700ED3C08 /* SPIRV-Cross_repo_revision */ = {isa = PBXFileReference; lastKnownFileType = text; path = "SPIRV-Cross_repo_revision"; sourceTree = ""; }; @@ -154,6 +236,7 @@ children = ( A92DB3EE1CE0F72500FBC835 /* MoltenVK.xcodeproj */, A92DB40E1CE0F89600FBC835 /* MoltenVKShaderConverter.xcodeproj */, + A975D55B213F25AD00D4834F /* Scripts */, A92DB3E11CE0F34500FBC835 /* Docs */, A939A6FB1F5479D0006ACA0C /* External */, ); @@ -195,6 +278,20 @@ path = ExternalRevisions; sourceTree = ""; }; + A975D55B213F25AD00D4834F /* Scripts */ = { + isa = PBXGroup; + children = ( + A975D55C213F25D700D4834F /* create_dylib_ios.sh */, + A975D55D213F266000D4834F /* create_dylib_macos.sh */, + A975D5742140567B00D4834F /* package_all.sh */, + A975D562213F2B7700D4834F /* package_docs.sh */, + A975D573214050AB00D4834F /* package_moltenvk.sh */, + A975D566213F2DAA00D4834F /* package_shader_converter.sh */, + A975D561213F299500D4834F /* update_latest.sh */, + ); + path = Scripts; + sourceTree = ""; + }; A98149741FB6B565005F00B4 /* Products */ = { isa = PBXGroup; children = ( @@ -242,6 +339,8 @@ projectRoot = ""; targets = ( A9FEADBC1F3517480010240E /* MoltenVK */, + A975D5782140585200D4834F /* MoltenVK-iOS */, + A975D58B2140586700D4834F /* MoltenVK-macOS */, ); }; /* End PBXProject section */ @@ -299,19 +398,33 @@ /* End PBXReferenceProxy section */ /* Begin PBXShellScriptBuildPhase section */ - A9A5D8A61FB3AABA00F20475 /* Package Docs */ = { + A975D5872140585200D4834F /* Package MoltenVK */ = { isa = PBXShellScriptBuildPhase; buildActionMask = 2147483647; files = ( ); inputPaths = ( ); - name = "Package Docs"; + name = "Package MoltenVK"; outputPaths = ( ); runOnlyForDeploymentPostprocessing = 0; shellPath = /bin/sh; - shellScript = "set -e\n\n# Package folder\nexport MVK_WKSPC_PATH=\"${PROJECT_DIR}\"\nexport MVK_PKG_LOCN=\"${MVK_WKSPC_PATH}/Package\"\nexport MVK_PKG_CONFIG_PATH=\"${MVK_PKG_LOCN}/${CONFIGURATION}\"\n\n# Copy the docs. Allow silent fail if a symlinked doc is not built.\ncp -a \"${MVK_WKSPC_PATH}/LICENSE\" \"${MVK_PKG_CONFIG_PATH}\"\ncp -pRLf \"${MVK_WKSPC_PATH}/Docs\" \"${MVK_PKG_CONFIG_PATH}\" 2> /dev/null || true\n"; + shellScript = "${SRCROOT}/Scripts/package_all.sh"; + }; + A975D59A2140586700D4834F /* Package MoltenVK */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputPaths = ( + ); + name = "Package MoltenVK"; + outputPaths = ( + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "${SRCROOT}/Scripts/package_all.sh"; }; A9FEADD61F3517480010240E /* Package MoltenVK */ = { isa = PBXShellScriptBuildPhase; @@ -325,39 +438,46 @@ ); runOnlyForDeploymentPostprocessing = 0; shellPath = /bin/sh; - shellScript = "set -e\n\n# Package folder\nexport MVK_PROD_NAME=\"MoltenVK\"\nexport MVK_DYLIB_NAME=\"lib${MVK_PROD_NAME}.dylib\"\nexport MVK_ICD_NAME=\"${MVK_PROD_NAME}_icd.json\"\nexport MVK_WKSPC_PATH=\"${PROJECT_DIR}\"\nexport MVK_PROD_PROJ_PATH=\"${MVK_WKSPC_PATH}/${MVK_PROD_NAME}\"\nexport MVK_PKG_LOCN=\"${MVK_WKSPC_PATH}/Package\"\nexport MVK_PKG_CONFIG_PATH=\"${MVK_PKG_LOCN}/${CONFIGURATION}\"\nexport MVK_PKG_PROD_PATH=\"${MVK_PKG_CONFIG_PATH}/${MVK_PROD_NAME}\"\n\n# Remove the product folder\nrm -rf \"${MVK_PKG_PROD_PATH}\"\n\n# Remove and replace the existing macOS framework folder and copy framework into it\nexport MVK_OS_PROD_PATH=\"${MVK_PKG_PROD_PATH}/macOS\"\nexport MVK_BUILT_PROD_PATH=\"${BUILT_PRODUCTS_DIR}\"\nrm -rf \"${MVK_OS_PROD_PATH}\"\nmkdir -p \"${MVK_OS_PROD_PATH}\"\ncp -a \"${MVK_BUILT_PROD_PATH}/${MVK_PROD_NAME}.framework\" \"${MVK_OS_PROD_PATH}\"\ncp -a \"${MVK_BUILT_PROD_PATH}/${MVK_DYLIB_NAME}\" \"${MVK_OS_PROD_PATH}\"\ncp -a \"${MVK_PROD_PROJ_PATH}/icd/${MVK_ICD_NAME}\" \"${MVK_OS_PROD_PATH}\"\n\n# Remove and replace the existing iOS framework folder and copy framework into it\nexport MVK_OS_PROD_PATH=\"${MVK_PKG_PROD_PATH}/iOS\"\nexport MVK_BUILT_PROD_PATH=\"${BUILT_PRODUCTS_DIR}/../${CONFIGURATION}-iphoneos\"\nrm -rf \"${MVK_BUILT_PROD_PATH}/${MVK_PROD_NAME}.framework/_CodeSignature\"\nrm -rf \"${MVK_OS_PROD_PATH}\"\nmkdir -p \"${MVK_OS_PROD_PATH}\"\ncp -a \"${MVK_BUILT_PROD_PATH}/${MVK_PROD_NAME}.framework\" \"${MVK_OS_PROD_PATH}\"\ncp -a \"${MVK_BUILT_PROD_PATH}/${MVK_DYLIB_NAME}\" \"${MVK_OS_PROD_PATH}\"\ncp -a \"${MVK_PROD_PROJ_PATH}/icd/${MVK_ICD_NAME}\" \"${MVK_OS_PROD_PATH}\"\n\n# Remove and replace header include folder\nrm -rf \"${MVK_PKG_PROD_PATH}/include\"\ncp -pRL \"${MVK_PROD_PROJ_PATH}/include\" \"${MVK_PKG_PROD_PATH}\""; - }; - A9FEADD71F3517480010240E /* Package MoltenVKShaderConverter */ = { - isa = PBXShellScriptBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - inputPaths = ( - ); - name = "Package MoltenVKShaderConverter"; - outputPaths = ( - ); - runOnlyForDeploymentPostprocessing = 0; - shellPath = /bin/sh; - shellScript = "set -e\n\n# Package folder\nexport MVK_PROD_BASE_NAME=\"MoltenVKShaderConverter\"\nexport MVK_WKSPC_PATH=\"${PROJECT_DIR}\"\nexport MVK_PKG_LOCN=\"${MVK_WKSPC_PATH}/Package\"\n\n# Remove the base product folder\nrm -rf \"${MVK_PKG_LOCN}/${CONFIGURATION}/${MVK_PROD_BASE_NAME}\"\n\n#-----------------------------------\n# MoltenVKGLSLToSPIRVConverter\nexport MVK_PROD_NAME=\"MoltenVKGLSLToSPIRVConverter\"\nexport MVK_PKG_CONFIG_PATH=\"${MVK_PKG_LOCN}/${CONFIGURATION}/${MVK_PROD_BASE_NAME}/${MVK_PROD_NAME}\"\n\n# Remove and replace the existing macOS framework folder and copy framework into it\nexport MVK_OS_PROD_PATH=\"${MVK_PKG_CONFIG_PATH}/macOS\"\nexport MVK_BUILT_PROD_PATH=\"${BUILT_PRODUCTS_DIR}\"\nrm -rf \"${MVK_OS_PROD_PATH}\"\nmkdir -p \"${MVK_OS_PROD_PATH}\"\ncp -a \"${MVK_BUILT_PROD_PATH}/${MVK_PROD_NAME}.framework\" \"${MVK_OS_PROD_PATH}\"\n\n# Remove and replace the existing iOS framework folder and copy framework into it\nexport MVK_OS_PROD_PATH=\"${MVK_PKG_CONFIG_PATH}/iOS\"\nexport MVK_BUILT_PROD_PATH=\"${BUILT_PRODUCTS_DIR}/../${CONFIGURATION}-iphoneos\"\nrm -rf \"${MVK_BUILT_PROD_PATH}/${MVK_PROD_NAME}.framework/_CodeSignature\"\nrm -rf \"${MVK_OS_PROD_PATH}\"\nmkdir -p \"${MVK_OS_PROD_PATH}\"\ncp -a \"${MVK_BUILT_PROD_PATH}/${MVK_PROD_NAME}.framework\" \"${MVK_OS_PROD_PATH}\"\n\n#-----------------------------------\n# MoltenVKSPIRVToMSLConverter\nexport MVK_PROD_NAME=\"MoltenVKSPIRVToMSLConverter\"\nexport MVK_PKG_CONFIG_PATH=\"${MVK_PKG_LOCN}/${CONFIGURATION}/${MVK_PROD_BASE_NAME}/${MVK_PROD_NAME}\"\n\n# Remove and replace the existing macOS framework folder and copy framework into it\nexport MVK_OS_PROD_PATH=\"${MVK_PKG_CONFIG_PATH}/macOS\"\nexport MVK_BUILT_PROD_PATH=\"${BUILT_PRODUCTS_DIR}\"\nrm -rf \"${MVK_OS_PROD_PATH}\"\nmkdir -p \"${MVK_OS_PROD_PATH}\"\ncp -a \"${MVK_BUILT_PROD_PATH}/${MVK_PROD_NAME}.framework\" \"${MVK_OS_PROD_PATH}\"\n\n# Remove and replace the existing iOS framework folder and copy framework into it\nexport MVK_OS_PROD_PATH=\"${MVK_PKG_CONFIG_PATH}/iOS\"\nexport MVK_BUILT_PROD_PATH=\"${BUILT_PRODUCTS_DIR}/../${CONFIGURATION}-iphoneos\"\nrm -rf \"${MVK_BUILT_PROD_PATH}/${MVK_PROD_NAME}.framework/_CodeSignature\"\nrm -rf \"${MVK_OS_PROD_PATH}\"\nmkdir -p \"${MVK_OS_PROD_PATH}\"\ncp -a \"${MVK_BUILT_PROD_PATH}/${MVK_PROD_NAME}.framework\" \"${MVK_OS_PROD_PATH}\"\n\n#-----------------------------------\n# MoltenVKShaderConverter Tool\nexport MVK_PROD_NAME=\"MoltenVKShaderConverter\"\nexport MVK_PKG_CONFIG_PATH=\"${MVK_PKG_LOCN}/${CONFIGURATION}/${MVK_PROD_BASE_NAME}\"\n\n# Remove and replace the existing macOS framework folder and copy framework into it\nexport MVK_OS_PROD_PATH=\"${MVK_PKG_CONFIG_PATH}/Tools\"\nexport MVK_BUILT_PROD_PATH=\"${BUILT_PRODUCTS_DIR}\"\nrm -rf \"${MVK_OS_PROD_PATH}\"\nmkdir -p \"${MVK_OS_PROD_PATH}\"\ncp -a \"${MVK_BUILT_PROD_PATH}/${MVK_PROD_NAME}\" \"${MVK_OS_PROD_PATH}\"\n"; - }; - A9FEADDB1F3517480010240E /* Update Latest */ = { - isa = PBXShellScriptBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - inputPaths = ( - ); - name = "Update Latest"; - outputPaths = ( - ); - runOnlyForDeploymentPostprocessing = 0; - shellPath = /bin/sh; - shellScript = "set -e\n\n# Package folder\nexport MVK_WKSPC_LOCN=\"${PROJECT_DIR}\"\nexport MVK_PKG_LOCN=\"${MVK_WKSPC_LOCN}/Package\"\n\n# Configuration package folder location\nexport MVK_PKG_CONFIG_LOCN=\"${CONFIGURATION}\"\nexport MVK_PKG_LATEST_LOCN=\"Latest\"\n\n# Assign symlink from Latest\nln -sfn \"${MVK_PKG_LOCN}/${MVK_PKG_CONFIG_LOCN}\" \"${MVK_PKG_LOCN}/${MVK_PKG_LATEST_LOCN}\""; + shellScript = "${SRCROOT}/Scripts/package_all.sh"; }; /* End PBXShellScriptBuildPhase section */ /* Begin PBXTargetDependency section */ + A975D5792140585200D4834F /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + name = "MoltenVK-iOS"; + targetProxy = A975D57A2140585200D4834F /* PBXContainerItemProxy */; + }; + A975D57D2140585200D4834F /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + name = "MoltenVKSPIRVToMSLConverter-iOS"; + targetProxy = A975D57E2140585200D4834F /* PBXContainerItemProxy */; + }; + A975D5812140585200D4834F /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + name = "MoltenVKGLSLToSPIRVConverter-iOS"; + targetProxy = A975D5822140585200D4834F /* PBXContainerItemProxy */; + }; + A975D58E2140586700D4834F /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + name = "MoltenVK-macOS"; + targetProxy = A975D58F2140586700D4834F /* PBXContainerItemProxy */; + }; + A975D5922140586700D4834F /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + name = "MoltenVKSPIRVToMSLConverter-macOS"; + targetProxy = A975D5932140586700D4834F /* PBXContainerItemProxy */; + }; + A975D5962140586700D4834F /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + name = "MoltenVKGLSLToSPIRVConverter-macOS"; + targetProxy = A975D5972140586700D4834F /* PBXContainerItemProxy */; + }; + A975D5982140586700D4834F /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + name = MoltenVKShaderConverter; + targetProxy = A975D5992140586700D4834F /* PBXContainerItemProxy */; + }; A98149CB1FB7689D005F00B4 /* PBXTargetDependency */ = { isa = PBXTargetDependency; name = MoltenVKShaderConverter; @@ -408,10 +528,37 @@ }; name = Release; }; + A975D5892140585200D4834F /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + PRODUCT_NAME = "$(TARGET_NAME)"; + }; + name = Debug; + }; + A975D58A2140585200D4834F /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + PRODUCT_NAME = "$(TARGET_NAME)"; + }; + name = Release; + }; + A975D59C2140586700D4834F /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + PRODUCT_NAME = "$(TARGET_NAME)"; + }; + name = Debug; + }; + A975D59D2140586700D4834F /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + PRODUCT_NAME = "$(TARGET_NAME)"; + }; + name = Release; + }; A9FEADDD1F3517480010240E /* Debug */ = { isa = XCBuildConfiguration; buildSettings = { - GCC_PREPROCESSOR_DEFINITIONS = "$(GCC_PREPROCESSOR_DEFINITIONS)"; PRODUCT_NAME = "$(TARGET_NAME)"; }; name = Debug; @@ -419,7 +566,6 @@ A9FEADDE1F3517480010240E /* Release */ = { isa = XCBuildConfiguration; buildSettings = { - GCC_PREPROCESSOR_DEFINITIONS = "$(GCC_PREPROCESSOR_DEFINITIONS)"; PRODUCT_NAME = "$(TARGET_NAME)"; }; name = Release; @@ -436,6 +582,24 @@ defaultConfigurationIsVisible = 0; defaultConfigurationName = Release; }; + A975D5882140585200D4834F /* Build configuration list for PBXAggregateTarget "MoltenVK-iOS" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + A975D5892140585200D4834F /* Debug */, + A975D58A2140585200D4834F /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + A975D59B2140586700D4834F /* Build configuration list for PBXAggregateTarget "MoltenVK-macOS" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + A975D59C2140586700D4834F /* Debug */, + A975D59D2140586700D4834F /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; A9FEADDC1F3517480010240E /* Build configuration list for PBXAggregateTarget "MoltenVK" */ = { isa = XCConfigurationList; buildConfigurations = ( diff --git a/MoltenVKPackaging.xcodeproj/xcshareddata/xcschemes/MoltenVK (Debug).xcscheme b/MoltenVKPackaging.xcodeproj/xcshareddata/xcschemes/MoltenVK Package (Debug).xcscheme similarity index 100% rename from MoltenVKPackaging.xcodeproj/xcshareddata/xcschemes/MoltenVK (Debug).xcscheme rename to MoltenVKPackaging.xcodeproj/xcshareddata/xcschemes/MoltenVK Package (Debug).xcscheme diff --git a/MoltenVKPackaging.xcodeproj/xcshareddata/xcschemes/MoltenVK (Release).xcscheme b/MoltenVKPackaging.xcodeproj/xcshareddata/xcschemes/MoltenVK Package (Release).xcscheme similarity index 100% rename from MoltenVKPackaging.xcodeproj/xcshareddata/xcschemes/MoltenVK (Release).xcscheme rename to MoltenVKPackaging.xcodeproj/xcshareddata/xcschemes/MoltenVK Package (Release).xcscheme diff --git a/MoltenVKPackaging.xcodeproj/xcshareddata/xcschemes/MoltenVK Package (iOS only) (Debug).xcscheme b/MoltenVKPackaging.xcodeproj/xcshareddata/xcschemes/MoltenVK Package (iOS only) (Debug).xcscheme new file mode 100644 index 00000000..eb545a4a --- /dev/null +++ b/MoltenVKPackaging.xcodeproj/xcshareddata/xcschemes/MoltenVK Package (iOS only) (Debug).xcscheme @@ -0,0 +1,80 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/MoltenVKPackaging.xcodeproj/xcshareddata/xcschemes/MoltenVK Package (iOS only) (Release).xcscheme b/MoltenVKPackaging.xcodeproj/xcshareddata/xcschemes/MoltenVK Package (iOS only) (Release).xcscheme new file mode 100644 index 00000000..418cdcc0 --- /dev/null +++ b/MoltenVKPackaging.xcodeproj/xcshareddata/xcschemes/MoltenVK Package (iOS only) (Release).xcscheme @@ -0,0 +1,80 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/MoltenVKPackaging.xcodeproj/xcshareddata/xcschemes/MoltenVK Package (macOS only) (Debug).xcscheme b/MoltenVKPackaging.xcodeproj/xcshareddata/xcschemes/MoltenVK Package (macOS only) (Debug).xcscheme new file mode 100644 index 00000000..5396b003 --- /dev/null +++ b/MoltenVKPackaging.xcodeproj/xcshareddata/xcschemes/MoltenVK Package (macOS only) (Debug).xcscheme @@ -0,0 +1,80 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/MoltenVKPackaging.xcodeproj/xcshareddata/xcschemes/MoltenVK Package (macOS only) (Release).xcscheme b/MoltenVKPackaging.xcodeproj/xcshareddata/xcschemes/MoltenVK Package (macOS only) (Release).xcscheme new file mode 100644 index 00000000..9b180e90 --- /dev/null +++ b/MoltenVKPackaging.xcodeproj/xcshareddata/xcschemes/MoltenVK Package (macOS only) (Release).xcscheme @@ -0,0 +1,80 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Scripts/package_all.sh b/Scripts/package_all.sh new file mode 100755 index 00000000..82f4b6d6 --- /dev/null +++ b/Scripts/package_all.sh @@ -0,0 +1,7 @@ +#!/bin/bash + +${SRCROOT}/Scripts/package_moltenvk.sh +${SRCROOT}/Scripts/package_shader_converter.sh +${SRCROOT}/Scripts/package_docs.sh +${SRCROOT}/Scripts/update_latest.sh + diff --git a/Scripts/package_docs.sh b/Scripts/package_docs.sh new file mode 100755 index 00000000..2d634d4e --- /dev/null +++ b/Scripts/package_docs.sh @@ -0,0 +1,12 @@ +#!/bin/bash + +set -e + +# Package folder +export MVK_WKSPC_PATH="${PROJECT_DIR}" +export MVK_PKG_LOCN="${MVK_WKSPC_PATH}/Package" +export MVK_PKG_CONFIG_PATH="${MVK_PKG_LOCN}/${CONFIGURATION}" + +# Copy the docs. Allow silent fail if a symlinked doc is not built. +cp -a "${MVK_WKSPC_PATH}/LICENSE" "${MVK_PKG_CONFIG_PATH}" +cp -pRLf "${MVK_WKSPC_PATH}/Docs" "${MVK_PKG_CONFIG_PATH}" 2> /dev/null || true diff --git a/Scripts/package_moltenvk.sh b/Scripts/package_moltenvk.sh new file mode 100755 index 00000000..c22562ef --- /dev/null +++ b/Scripts/package_moltenvk.sh @@ -0,0 +1,43 @@ +#!/bin/bash + +set -e + +# Package folder +export MVK_PROD_NAME="MoltenVK" +export MVK_DYLIB_NAME="lib${MVK_PROD_NAME}.dylib" +export MVK_ICD_NAME="${MVK_PROD_NAME}_icd.json" +export MVK_WKSPC_PATH="${PROJECT_DIR}" +export MVK_PROD_PROJ_PATH="${MVK_WKSPC_PATH}/${MVK_PROD_NAME}" +export MVK_PKG_LOCN="${MVK_WKSPC_PATH}/Package" +export MVK_PKG_CONFIG_PATH="${MVK_PKG_LOCN}/${CONFIGURATION}" +export MVK_PKG_PROD_PATH="${MVK_PKG_CONFIG_PATH}/${MVK_PROD_NAME}" + +# Remove the product folder +rm -rf "${MVK_PKG_PROD_PATH}" + +# Remove and replace the existing macOS framework folder and copy framework into it +export MVK_OS_PROD_PATH="${MVK_PKG_PROD_PATH}/macOS" +export MVK_BUILT_PROD_PATH="${BUILT_PRODUCTS_DIR}" +rm -rf "${MVK_OS_PROD_PATH}" +if [ -e "${MVK_BUILT_PROD_PATH}" ]; then + mkdir -p "${MVK_OS_PROD_PATH}" + cp -a "${MVK_BUILT_PROD_PATH}/${MVK_PROD_NAME}.framework" "${MVK_OS_PROD_PATH}" + cp -a "${MVK_BUILT_PROD_PATH}/${MVK_DYLIB_NAME}" "${MVK_OS_PROD_PATH}" + cp -a "${MVK_PROD_PROJ_PATH}/icd/${MVK_ICD_NAME}" "${MVK_OS_PROD_PATH}" +fi + +# Remove and replace the existing iOS framework folder and copy framework into it +export MVK_OS_PROD_PATH="${MVK_PKG_PROD_PATH}/iOS" +export MVK_BUILT_PROD_PATH="${BUILT_PRODUCTS_DIR}-iphoneos" +rm -rf "${MVK_OS_PROD_PATH}" +echo MVK_BUILT_PROD_PATH = "${MVK_BUILT_PROD_PATH}" +if [ -e "${MVK_BUILT_PROD_PATH}" ]; then + rm -rf "${MVK_BUILT_PROD_PATH}/${MVK_PROD_NAME}.framework/_CodeSignature" + mkdir -p "${MVK_OS_PROD_PATH}" + cp -a "${MVK_BUILT_PROD_PATH}/${MVK_PROD_NAME}.framework" "${MVK_OS_PROD_PATH}" + cp -a "${MVK_BUILT_PROD_PATH}/${MVK_DYLIB_NAME}" "${MVK_OS_PROD_PATH}" + cp -a "${MVK_PROD_PROJ_PATH}/icd/${MVK_ICD_NAME}" "${MVK_OS_PROD_PATH}" +fi +# Remove and replace header include folder +rm -rf "${MVK_PKG_PROD_PATH}/include" +cp -pRL "${MVK_PROD_PROJ_PATH}/include" "${MVK_PKG_PROD_PATH}" diff --git a/Scripts/package_shader_converter.sh b/Scripts/package_shader_converter.sh new file mode 100755 index 00000000..fc001a41 --- /dev/null +++ b/Scripts/package_shader_converter.sh @@ -0,0 +1,73 @@ +#!/bin/bash + +set -e + +# Package folder +export MVK_PROD_BASE_NAME="MoltenVKShaderConverter" +export MVK_WKSPC_PATH="${PROJECT_DIR}" +export MVK_PKG_LOCN="${MVK_WKSPC_PATH}/Package" + +# Remove the base product folder +rm -rf "${MVK_PKG_LOCN}/${CONFIGURATION}/${MVK_PROD_BASE_NAME}" + +#----------------------------------- +# MoltenVKGLSLToSPIRVConverter +export MVK_PROD_NAME="MoltenVKGLSLToSPIRVConverter" +export MVK_PKG_CONFIG_PATH="${MVK_PKG_LOCN}/${CONFIGURATION}/${MVK_PROD_BASE_NAME}/${MVK_PROD_NAME}" + +# Remove and replace the existing macOS framework folder and copy framework into it +export MVK_OS_PROD_PATH="${MVK_PKG_CONFIG_PATH}/macOS" +export MVK_BUILT_PROD_PATH="${BUILT_PRODUCTS_DIR}" +rm -rf "${MVK_OS_PROD_PATH}" +if [ -e "${MVK_BUILT_PROD_PATH}" ]; then + mkdir -p "${MVK_OS_PROD_PATH}" + cp -a "${MVK_BUILT_PROD_PATH}/${MVK_PROD_NAME}.framework" "${MVK_OS_PROD_PATH}" +fi + +# Remove and replace the existing iOS framework folder and copy framework into it +export MVK_OS_PROD_PATH="${MVK_PKG_CONFIG_PATH}/iOS" +export MVK_BUILT_PROD_PATH="${BUILT_PRODUCTS_DIR}-iphoneos" +rm -rf "${MVK_OS_PROD_PATH}" +if [ -e "${MVK_BUILT_PROD_PATH}" ]; then + rm -rf "${MVK_BUILT_PROD_PATH}/${MVK_PROD_NAME}.framework/_CodeSignature" + mkdir -p "${MVK_OS_PROD_PATH}" + cp -a "${MVK_BUILT_PROD_PATH}/${MVK_PROD_NAME}.framework" "${MVK_OS_PROD_PATH}" +fi + +#----------------------------------- +# MoltenVKSPIRVToMSLConverter +export MVK_PROD_NAME="MoltenVKSPIRVToMSLConverter" +export MVK_PKG_CONFIG_PATH="${MVK_PKG_LOCN}/${CONFIGURATION}/${MVK_PROD_BASE_NAME}/${MVK_PROD_NAME}" + +# Remove and replace the existing macOS framework folder and copy framework into it +export MVK_OS_PROD_PATH="${MVK_PKG_CONFIG_PATH}/macOS" +export MVK_BUILT_PROD_PATH="${BUILT_PRODUCTS_DIR}" +rm -rf "${MVK_OS_PROD_PATH}" +if [ -e "${MVK_BUILT_PROD_PATH}" ]; then + mkdir -p "${MVK_OS_PROD_PATH}" + cp -a "${MVK_BUILT_PROD_PATH}/${MVK_PROD_NAME}.framework" "${MVK_OS_PROD_PATH}" +fi + +# Remove and replace the existing iOS framework folder and copy framework into it +export MVK_OS_PROD_PATH="${MVK_PKG_CONFIG_PATH}/iOS" +export MVK_BUILT_PROD_PATH="${BUILT_PRODUCTS_DIR}-iphoneos" +rm -rf "${MVK_OS_PROD_PATH}" +if [ -e "${MVK_BUILT_PROD_PATH}" ]; then + rm -rf "${MVK_BUILT_PROD_PATH}/${MVK_PROD_NAME}.framework/_CodeSignature" + mkdir -p "${MVK_OS_PROD_PATH}" + cp -a "${MVK_BUILT_PROD_PATH}/${MVK_PROD_NAME}.framework" "${MVK_OS_PROD_PATH}" +fi + +#----------------------------------- +# MoltenVKShaderConverter Tool +export MVK_PROD_NAME="MoltenVKShaderConverter" +export MVK_PKG_CONFIG_PATH="${MVK_PKG_LOCN}/${CONFIGURATION}/${MVK_PROD_BASE_NAME}" + +# Remove and replace the existing macOS framework folder and copy framework into it +export MVK_OS_PROD_PATH="${MVK_PKG_CONFIG_PATH}/Tools" +export MVK_BUILT_PROD_PATH="${BUILT_PRODUCTS_DIR}" +rm -rf "${MVK_OS_PROD_PATH}" +if [ -e "${MVK_BUILT_PROD_PATH}" ]; then + mkdir -p "${MVK_OS_PROD_PATH}" + cp -a "${MVK_BUILT_PROD_PATH}/${MVK_PROD_NAME}" "${MVK_OS_PROD_PATH}" +fi diff --git a/Scripts/update_latest.sh b/Scripts/update_latest.sh new file mode 100755 index 00000000..8abc75c1 --- /dev/null +++ b/Scripts/update_latest.sh @@ -0,0 +1,14 @@ +#!/bin/bash + +set -e + +# Package folder +export MVK_WKSPC_LOCN="${PROJECT_DIR}" +export MVK_PKG_LOCN="${MVK_WKSPC_LOCN}/Package" + +# Configuration package folder location +export MVK_PKG_CONFIG_LOCN="${CONFIGURATION}" +export MVK_PKG_LATEST_LOCN="Latest" + +# Assign symlink from Latest +ln -sfn "${MVK_PKG_LOCN}/${MVK_PKG_CONFIG_LOCN}" "${MVK_PKG_LOCN}/${MVK_PKG_LATEST_LOCN}"