Skip to content

Commit b9f5213

Browse files
committed
Updated the DMG build process
1 parent 4b54e1c commit b9f5213

File tree

2 files changed

+11
-8
lines changed

2 files changed

+11
-8
lines changed

Xcode/SDL_net.xcodeproj/project.pbxproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -320,7 +320,7 @@
320320
);
321321
runOnlyForDeploymentPostprocessing = 0;
322322
shellPath = /bin/sh;
323-
shellScript = "PRODUCT_NAME=SDL2_net\n\n# Sign framework\nif [ \"$SDL_CODESIGN_IDENTITY\" != \"\" ]; then\n codesign --force --deep --sign \"$SDL_CODESIGN_IDENTITY\" $TARGET_BUILD_DIR/$PRODUCT_NAME.framework/Versions/A || exit $?\nfi\n\n# clean up the framework, remove headers, extra files\nmkdir -p build/dmg-tmp\ncp -a $TARGET_BUILD_DIR/$PRODUCT_NAME.framework build/dmg-tmp/\ncp pkg-support/resources/ReadMe.txt build/dmg-tmp\n\n# remove the .DS_Store files if any (we may want to provide one in the future for fancy .dmgs)\nrm -rf build/dmg-tmp/.DS_Store\n\n# create the dmg\nhdiutil create -ov -fs HFS+ -volname $PRODUCT_NAME -srcfolder build/dmg-tmp build/$PRODUCT_NAME.dmg\n\n# clean up\nrm -rf build/dmg-tmp\n";
323+
shellScript = "PRODUCT_NAME=SDL2_net\n\n# Sign framework\nif [ \"$SDL_CODESIGN_IDENTITY\" != \"\" ]; then\n codesign --force --deep --sign \"$SDL_CODESIGN_IDENTITY\" --preserve-metadata\\=identifier,entitlements,flags --generate-entitlement-der $TARGET_BUILD_DIR/$PRODUCT_NAME.framework/Versions/A || exit $?\nfi\n\n# clean up the framework, remove headers, extra files\nmkdir -p build/dmg-tmp\ncp -a $TARGET_BUILD_DIR/$PRODUCT_NAME.framework build/dmg-tmp/\ncp pkg-support/resources/ReadMe.txt build/dmg-tmp\n\n# remove the .DS_Store files if any (we may want to provide one in the future for fancy .dmgs)\nrm -rf build/dmg-tmp/.DS_Store\n\n# create the dmg\nhdiutil create -ov -fs HFS+ -volname $PRODUCT_NAME -srcfolder build/dmg-tmp build/$PRODUCT_NAME.dmg\n\n# clean up\nrm -rf build/dmg-tmp\n";
324324
};
325325
/* End PBXShellScriptBuildPhase section */
326326

Xcode/pkg-support/resources/ReadMe.txt

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,13 @@ Copy the SDL2_net.framework to /Library/Frameworks
1414

1515
You may alternatively install it in <your home directory>/Library/Frameworks if your access privileges are not high enough. (Be aware that the Xcode templates we provide in the SDL Developer Extras package may require some adjustment for your system if you do this.)
1616

17-
18-
(Partial) History of PB/Xcode projects:
19-
2009-09-21 - Updated for 64-bit (Snow Leopard) Universal Binaries.
20-
Switched to 10.4 minimum requirement.
21-
22-
2006-01-31 - First entry in history. Updated for Universal Binaries.
23-
17+
Use in CMake projects:
18+
SDL2_net.framework can be used in CMake projects using the following pattern:
19+
```
20+
find_package(SDL2_net REQUIRED)
21+
add_executable(my_game ${MY_SOURCES})
22+
target_link_libraries(my_game PRIVATE SDL2_net::SDL2_net)
23+
```
24+
If SDL2_net.framework is installed in a non-standard location,
25+
please refer to the following link for ways to configure CMake:
26+
https://cmake.org/cmake/help/latest/command/find_package.html#config-mode-search-procedure

0 commit comments

Comments
 (0)