mirror of
https://github.com/ioquake/ioq3.git
synced 2024-11-10 07:11:46 +00:00
Added arm64 to the post-build symlinking step
This commit is contained in:
parent
c00f7c1710
commit
5fb7186116
1 changed files with 1 additions and 1 deletions
|
@ -844,7 +844,7 @@
|
|||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
shellPath = /bin/sh;
|
||||
shellScript = "#\n# copy the renderer & game dynamic libraries to their appropriate locations within the application bundle\n# symlink appropriate architecture names for universal (fat) binary support\n #\nBUILD=\"${BUILT_PRODUCTS_DIR}\"\nMACOS=\"${BUILT_PRODUCTS_DIR}/${EXECUTABLE_FOLDER_PATH}\"\nCGAME=\"cgame\"\nGAME=\"game\"\nQAGAME=\"qagame\"\nQ3UI=\"q3_ui\"\nUI=\"ui\"\nBASEQ3=\"baseq3\"\nMISSIONPACK=\"missionpack\"\nRENDERER_OPENGL1=\"renderer_opengl1\"\nRENDERER_OPENGL2=\"renderer_opengl2\"\n\nfunction symlinkArch()\n{\n EXT=\"dylib\"\n SEP=\"${3}\"\n SRCFILE=\"${1}\"\n DSTFILE=\"${2}${SEP}\"\n DSTPATH=\"${4}\"\n\n if [ ! -e \"${DSTPATH}/${SRCFILE}.${EXT}\" ]; then\n echo \"**** ERROR: missing ${SRCFILE}.${EXT} from ${MACOS}\"\n exit 1\n fi\n\n if [ ! -d \"${DSTPATH}\" ]; then\n echo \"**** ERROR: path not found ${DSTPATH}\"\n exit 1\n fi\n\n pushd \"${DSTPATH}\" > /dev/null\n\n IS32=`file \"${SRCFILE}.${EXT}\" | grep \"i386\" | awk '{print $NF}'`\n IS64=`file \"${SRCFILE}.${EXT}\" | grep \"x86_64\" | awk '{print $NF}'`\n\n if [ \"${IS32}\" == \"i386\" ]; then\n if [ ! -L \"${DSTFILE}x86.${EXT}\" ]; then\n ln -s \"${SRCFILE}.${EXT}\" \"${DSTFILE}x86.${EXT}\"\n fi\n elif [ -L \"${DSTFILE}x86.${EXT}\" ]; then\n rm \"${DSTFILE}x86.${EXT}\"\n fi\n\n if [ \"${IS64}\" == \"x86_64\" ]; then\n if [ ! -L \"${DSTFILE}x86_64.${EXT}\" ]; then\n ln -s \"${SRCFILE}.${EXT}\" \"${DSTFILE}x86_64.${EXT}\"\n fi\n elif [ -L \"${DSTFILE}x86_64.${EXT}\" ]; then\n rm \"${DSTFILE}x86_64.${EXT}\"\n fi\n\n popd > /dev/null\n}\n\nfunction checkBuildFile()\n{\n if [ ! -e \"${BUILD}/${1}\" ]; then\n echo \"**** ERROR: file not found '${BUILD}/${1}'\"\n exit 1\n fi\n}\n\nfunction checkMacOS()\n{\n if [ ! -d \"${MACOS}\" ]; then\n echo \"**** ERROR: missing executable folder path '${EXECUTABLE_FOLDER_PATH}'\"\n exit 1\n fi\n}\n\nfunction safeCopyBuildFileToFolder\n{\n if [ ! -e \"${BUILD}/${1}\" ]; then\n echo \"**** ERROR: file not found '${1}' in build folder '${BUILD}'\"\n exit 1\n fi\n\n if [ ! -d \"${2}\" ]; then\n echo \"**** ERROR: destination folder not found '${2}'\"\n exit 1\n fi\n\n cp -pr \"${BUILD}/${1}\" \"${2}\"\n}\n\nfunction copyToMacOS()\n{\n checkBuildFile \"${1}\"\n checkMacOS\n\n safeCopyBuildFileToFolder \"${1}\" \"${MACOS}\"\n}\n\nfunction copyToBaseQ3()\n{\n checkBuildFile \"${1}\"\n checkMacOS\n\n if [ ! -d \"${MACOS}/${BASEQ3}\" ]; then\n mkdir \"${MACOS}/${BASEQ3}\"\n fi\n\n safeCopyBuildFileToFolder \"${1}\" \"${MACOS}/${BASEQ3}\"\n}\n\nfunction copyToMissionPack()\n{\n checkBuildFile \"${1}\"\n checkMacOS\n\n if [ ! -d \"${MACOS}/${MISSIONPACK}\" ]; then\n mkdir \"${MACOS}/${MISSIONPACK}\"\n fi\n\n safeCopyBuildFileToFolder \"${1}\" \"${MACOS}/${MISSIONPACK}\"\n}\n\ncopyToMacOS \"${RENDERER_OPENGL1}.dylib\"\ncopyToMacOS \"${RENDERER_OPENGL2}.dylib\"\n\nsymlinkArch \"${RENDERER_OPENGL1}\" \"${RENDERER_OPENGL1}\" \"_\" \"${MACOS}\"\nsymlinkArch \"${RENDERER_OPENGL2}\" \"${RENDERER_OPENGL2}\" \"_\" \"${MACOS}\" \n\ncopyToBaseQ3 \"${BASEQ3}/${CGAME}.dylib\"\nsymlinkArch \"${CGAME}\" \"${CGAME}\" \"\" \"${MACOS}/${BASEQ3}\"\n\ncopyToBaseQ3 \"${BASEQ3}/${QAGAME}.dylib\"\nsymlinkArch \"${QAGAME}\" \"${QAGAME}\" \"\" \"${MACOS}/${BASEQ3}\"\n\ncopyToBaseQ3 \"${BASEQ3}/${UI}.dylib\"\nsymlinkArch \"${UI}\" \"${UI}\" \"\" \"${MACOS}/${BASEQ3}\"\n\ncopyToMissionPack \"${MISSIONPACK}/${CGAME}.dylib\"\nsymlinkArch \"${CGAME}\" \"${CGAME}\" \"\" \"${MACOS}/${MISSIONPACK}\"\n\ncopyToMissionPack \"${MISSIONPACK}/${QAGAME}.dylib\"\nsymlinkArch \"${QAGAME}\" \"${QAGAME}\" \"\" \"${MACOS}/${MISSIONPACK}\"\n\ncopyToMissionPack \"${MISSIONPACK}/${UI}.dylib\"\nsymlinkArch \"${UI}\" \"${UI}\" \"\" \"${MACOS}/${MISSIONPACK}\"\n";
|
||||
shellScript = "#\n# copy the renderer & game dynamic libraries to their appropriate locations within the application bundle\n# symlink appropriate architecture names for universal (fat) binary support\n #\nBUILD=\"${BUILT_PRODUCTS_DIR}\"\nMACOS=\"${BUILT_PRODUCTS_DIR}/${EXECUTABLE_FOLDER_PATH}\"\nCGAME=\"cgame\"\nGAME=\"game\"\nQAGAME=\"qagame\"\nQ3UI=\"q3_ui\"\nUI=\"ui\"\nBASEQ3=\"baseq3\"\nMISSIONPACK=\"missionpack\"\nRENDERER_OPENGL1=\"renderer_opengl1\"\nRENDERER_OPENGL2=\"renderer_opengl2\"\n\nfunction symlinkArch()\n{\n EXT=\"dylib\"\n SEP=\"${3}\"\n SRCFILE=\"${1}\"\n DSTFILE=\"${2}${SEP}\"\n DSTPATH=\"${4}\"\n\n if [ ! -e \"${DSTPATH}/${SRCFILE}.${EXT}\" ]; then\n echo \"**** ERROR: missing ${SRCFILE}.${EXT} from ${MACOS}\"\n exit 1\n fi\n\n if [ ! -d \"${DSTPATH}\" ]; then\n echo \"**** ERROR: path not found ${DSTPATH}\"\n exit 1\n fi\n\n pushd \"${DSTPATH}\" > /dev/null\n\n IS32=`file \"${SRCFILE}.${EXT}\" | grep \"i386\" | awk '{print $NF}'`\n IS64=`file \"${SRCFILE}.${EXT}\" | grep \"x86_64\" | awk '{print $NF}'`\n ISARM=`file \"${SRCFILE}.${EXT}\" | grep \"arm64\" | awk '{print $NF}'`\n \n if [ \"${IS32}\" == \"i386\" ]; then\n if [ ! -L \"${DSTFILE}x86.${EXT}\" ]; then\n ln -s \"${SRCFILE}.${EXT}\" \"${DSTFILE}x86.${EXT}\"\n fi\n elif [ -L \"${DSTFILE}x86.${EXT}\" ]; then\n rm \"${DSTFILE}x86.${EXT}\"\n fi\n\n if [ \"${IS64}\" == \"x86_64\" ]; then\n if [ ! -L \"${DSTFILE}x86_64.${EXT}\" ]; then\n ln -s \"${SRCFILE}.${EXT}\" \"${DSTFILE}x86_64.${EXT}\"\n fi\n elif [ -L \"${DSTFILE}x86_64.${EXT}\" ]; then\n rm \"${DSTFILE}x86_64.${EXT}\"\n fi\n\n if [ \"${ISARM}\" == \"arm64\" ]; then\n if [ ! -L \"${DSTFILE}arm64.${EXT}\" ]; then\n ln -s \"${SRCFILE}.${EXT}\" \"${DSTFILE}arm64.${EXT}\"\n fi\n elif [ -L \"${DSTFILE}arm64.${EXT}\" ]; then\n rm \"${DSTFILE}arm64.${EXT}\"\n fi\n\n popd > /dev/null\n}\n\nfunction checkBuildFile()\n{\n if [ ! -e \"${BUILD}/${1}\" ]; then\n echo \"**** ERROR: file not found '${BUILD}/${1}'\"\n exit 1\n fi\n}\n\nfunction checkMacOS()\n{\n if [ ! -d \"${MACOS}\" ]; then\n echo \"**** ERROR: missing executable folder path '${EXECUTABLE_FOLDER_PATH}'\"\n exit 1\n fi\n}\n\nfunction safeCopyBuildFileToFolder\n{\n if [ ! -e \"${BUILD}/${1}\" ]; then\n echo \"**** ERROR: file not found '${1}' in build folder '${BUILD}'\"\n exit 1\n fi\n\n if [ ! -d \"${2}\" ]; then\n echo \"**** ERROR: destination folder not found '${2}'\"\n exit 1\n fi\n\n cp -pr \"${BUILD}/${1}\" \"${2}\"\n}\n\nfunction copyToMacOS()\n{\n checkBuildFile \"${1}\"\n checkMacOS\n\n safeCopyBuildFileToFolder \"${1}\" \"${MACOS}\"\n}\n\nfunction copyToBaseQ3()\n{\n checkBuildFile \"${1}\"\n checkMacOS\n\n if [ ! -d \"${MACOS}/${BASEQ3}\" ]; then\n mkdir \"${MACOS}/${BASEQ3}\"\n fi\n\n safeCopyBuildFileToFolder \"${1}\" \"${MACOS}/${BASEQ3}\"\n}\n\nfunction copyToMissionPack()\n{\n checkBuildFile \"${1}\"\n checkMacOS\n\n if [ ! -d \"${MACOS}/${MISSIONPACK}\" ]; then\n mkdir \"${MACOS}/${MISSIONPACK}\"\n fi\n\n safeCopyBuildFileToFolder \"${1}\" \"${MACOS}/${MISSIONPACK}\"\n}\n\ncopyToMacOS \"${RENDERER_OPENGL1}.dylib\"\ncopyToMacOS \"${RENDERER_OPENGL2}.dylib\"\n\nsymlinkArch \"${RENDERER_OPENGL1}\" \"${RENDERER_OPENGL1}\" \"_\" \"${MACOS}\"\nsymlinkArch \"${RENDERER_OPENGL2}\" \"${RENDERER_OPENGL2}\" \"_\" \"${MACOS}\" \n\ncopyToBaseQ3 \"${BASEQ3}/${CGAME}.dylib\"\nsymlinkArch \"${CGAME}\" \"${CGAME}\" \"\" \"${MACOS}/${BASEQ3}\"\n\ncopyToBaseQ3 \"${BASEQ3}/${QAGAME}.dylib\"\nsymlinkArch \"${QAGAME}\" \"${QAGAME}\" \"\" \"${MACOS}/${BASEQ3}\"\n\ncopyToBaseQ3 \"${BASEQ3}/${UI}.dylib\"\nsymlinkArch \"${UI}\" \"${UI}\" \"\" \"${MACOS}/${BASEQ3}\"\n\ncopyToMissionPack \"${MISSIONPACK}/${CGAME}.dylib\"\nsymlinkArch \"${CGAME}\" \"${CGAME}\" \"\" \"${MACOS}/${MISSIONPACK}\"\n\ncopyToMissionPack \"${MISSIONPACK}/${QAGAME}.dylib\"\nsymlinkArch \"${QAGAME}\" \"${QAGAME}\" \"\" \"${MACOS}/${MISSIONPACK}\"\n\ncopyToMissionPack \"${MISSIONPACK}/${UI}.dylib\"\nsymlinkArch \"${UI}\" \"${UI}\" \"\" \"${MACOS}/${MISSIONPACK}\"\n \n";
|
||||
};
|
||||
/* End PBXShellScriptBuildPhase section */
|
||||
|
||||
|
|
Loading…
Reference in a new issue