-
Notifications
You must be signed in to change notification settings - Fork 105
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add script to build all release IPA/app files
- Loading branch information
Showing
4 changed files
with
105 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,3 +5,4 @@ libmame-dist/* | |
xcuserdata | ||
obj | ||
.vscode/* | ||
xcode/dist |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
// | ||
// MAME4iOS.xcconfig | ||
// MAME4iOS | ||
// | ||
// Created by Todd Laney on 10/10/20. | ||
// Copyright © 2020 Seleuco. All rights reserved. | ||
// | ||
// Configuration settings file format documentation can be found at: | ||
// https://help.apple.com/xcode/#/dev745c5c974 | ||
// http://codeworkshop.net/posts/xcode-build-setting-transformations | ||
// https://nshipster.com/xcconfig/ | ||
|
||
|
||
// 1. change ORG_IDENTIFIER and DEVELOPMENT_TEAM | ||
// the `ORG_IDENTIFIER` is a reverse DNS string that uniquely identifies your organization. | ||
// you can also set the Development Team via the drop down in the Xcode project editor, for each Target. | ||
// you can find your TeamID [here](https://developer.apple.com/account/#/membership) | ||
|
||
ORG_IDENTIFIER = com.example // CHANGE this to your Organization Identifier. | ||
DEVELOPMENT_TEAM = R72X3BF4KE // CHANGE this to your Team ID. (or select in Xcode project editor) | ||
CURRENT_PROJECT_VERSION = 2021.8 | ||
MARKETING_VERSION = 2021.8 | ||
|
||
// 2. enable or disable entitlements | ||
// tvOS TopShelf and iCloud import/export require special app entitlements | ||
|
||
ENTITLEMENTS_TYPE = -Base | ||
// UN-COMMENT NEXT LINE if you want a build with full entitlements | ||
// ENTITLEMENTS_TYPE = -Full | ||
// UN-COMMENT PREV LINE if you want a build with full entitlements | ||
|
||
// 3. Select the MAME binary to link to. | ||
// 139u1 or latest MAME version | ||
|
||
// USE THIS LINE for a local build of 139u1 MAME. (via make-ios.sh, make-tvos.sh, or make-mac.sh) | ||
// MAMELIB = libmame-139u1 | ||
// USE THIS LINE for a build of current latest MAME (via get-libmame.sh) | ||
MAMELIB = libmame | ||
|
||
// these should not be changed. | ||
PRODUCT_BUNDLE_IDENTIFIER = $(ORG_IDENTIFIER).$(PROJECT_NAME:lower) | ||
APP_GROUP_IDENTIFIER = group.$(ORG_IDENTIFIER).$(PROJECT_NAME:lower) | ||
ICLOUD_CONTAINER_IDENTIFIER = iCloud.$(ORG_IDENTIFIER).$(PROJECT_NAME:lower) | ||
CODE_SIGN_ENTITLEMENTS = $(TARGET_NAME)/$(TARGET_NAME)$(ENTITLEMENTS_TYPE).entitlements | ||
|
||
MAMELIB_IOS = $(MAMELIB)-ios.a | ||
MAMELIB_TVOS = $(MAMELIB)-tvos.a | ||
MAMELIB_MACOS = $(MAMELIB)-mac.a | ||
|
||
MAMELIB_IOS[sdk=iphonesimulator*] = $(MAMELIB)-ios-simulator.a | ||
MAMELIB_TVOS[sdk=appletvsimulator*] = $(MAMELIB)-tvos-simulator.a | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
#!/bin/sh | ||
|
||
C_RED="\033[0;31m" | ||
C_BLUE="\033[0;34m" | ||
C_RESET="\033[0m" | ||
|
||
echo "${C_RED}Before running, edit the TEAM identifier in the .xcconfig files so that code signing works.${C_RESET}\n\n" | ||
|
||
declare -a SCHEMES=("MAME4iOS Release" "MAME tvOS Release" "MAME4mac Release") | ||
declare -a SCHEME_NAMES=("MAME4iOS" "MAME4tvOS" "MAME4mac") | ||
declare -a CONFIGS=("MAME4iOS.xcconfig" "MAME4iOS-latest.xcconfig") | ||
declare -a CONFIG_NAMES=("139" "latest") | ||
|
||
for i in "${!SCHEMES[@]}" | ||
do | ||
SCHEME="${SCHEMES[$i]}" | ||
NAME="${SCHEME_NAMES[$i]}" | ||
echo "${C_BLUE}Scheme: ${SCHEME}${C_RESET}" | ||
for j in "${!CONFIGS[@]}" | ||
do | ||
CONFIG="${CONFIGS[$j]}" | ||
ARCHIVE_NAME="${NAME}-${CONFIG_NAMES[$j]}" | ||
echo "${C_BLUE}Config: ${CONFIG} Archive: ${ARCHIVE_NAME}${C_RESET}" | ||
xcodebuild -project MAME4iOS.xcodeproj \ | ||
-config Release -scheme "${SCHEME}" \ | ||
-archivePath "../dist/${ARCHIVE_NAME}" \ | ||
-xcconfig ${CONFIG} \ | ||
-allowProvisioningUpdates \ | ||
archive | ||
|
||
xcodebuild -exportArchive \ | ||
-archivePath "../dist/${ARCHIVE_NAME}.xcarchive" \ | ||
-exportOptionsPlist exportOptions.plist \ | ||
-exportPath ../dist \ | ||
-allowProvisioningUpdates | ||
|
||
# exportArchive will create an IPA file named: ${PRODUCT_NAME}.ipa (you can't specify the filename of the IPA) | ||
mv ../dist/${NAME}.ipa ../dist/${ARCHIVE_NAME}.ipa | ||
# do the mac app too | ||
mv ../dist/${NAME}.app ../dist/${ARCHIVE_NAME}.app | ||
done | ||
done |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> | ||
<plist version="1.0"> | ||
<dict> | ||
<key>method</key> | ||
<string>development</string> | ||
<key>teamID</key> | ||
<string>R72X3BF4KE</string> | ||
</dict> | ||
</plist> |