-
-
Notifications
You must be signed in to change notification settings - Fork 33
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge remote-tracking branch 'refs/remotes/origin/main'
- Loading branch information
Showing
4 changed files
with
127 additions
and
13 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
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,74 @@ | ||
#!/bin/sh | ||
|
||
set -e | ||
set -o pipefail | ||
|
||
if ! [ -x "$(command -v xcpretty)" ] ; then | ||
echo 'xcpretty is not found, aborting. (https://github.com/xcpretty/xcpretty)' | ||
exit -1 | ||
fi | ||
|
||
if ! [ -x "$(command -v create-dmg)" ] ; then | ||
echo 'create-dmg is not found, aborting. (https://github.com/create-dmg/create-dmg)' | ||
exit -1 | ||
fi | ||
|
||
# https://github.com/xcpretty/xcpretty/issues/48 | ||
export LC_CTYPE=en_US.UTF-8 | ||
|
||
# get current directory | ||
SCRIPTS_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )" | ||
|
||
# allocate a temp dir for build artifacts | ||
BUILD_DIR=$(mktemp -d ${SCRIPTS_DIR}/build_unsigned.tmp) | ||
|
||
# all builds paths will be relative to ROOT_DIR | ||
ROOT_DIR=$(cd "$SCRIPTS_DIR/.." && pwd) | ||
|
||
XCODEPROJ="../Source/NimbleCommander/NimbleCommander.xcodeproj" | ||
|
||
PBUDDY=/usr/libexec/PlistBuddy | ||
|
||
if type -p /usr/local/bin/ccache >/dev/null 2>&1; then | ||
echo Using ccache | ||
export CCACHE_BASEDIR="${ROOT_DIR}" | ||
export CCACHE_SLOPPINESS=time_macros,include_file_mtime,include_file_ctime,file_stat_matches | ||
export CC="${SCRIPTS_DIR}/ccache-clang" | ||
export CXX="${SCRIPTS_DIR}/ccache-clang++" | ||
fi | ||
|
||
XC="xcodebuild \ | ||
-project ${XCODEPROJ} \ | ||
-scheme NimbleCommander-NonMAS \ | ||
-configuration Release \ | ||
CODE_SIGNING_ALLOWED=NO \ | ||
CODE_SIGN_IDENTITY= \ | ||
DEVELOPMENT_TEAM= \ | ||
PROVISIONING_PROFILE_SPECIFIER= \ | ||
CODE_SIGN_ENTITLEMENTS= \ | ||
SYMROOT=${BUILD_DIR} \ | ||
OBJROOT=${BUILD_DIR} \ | ||
OTHER_CFLAGS=\"-fdebug-prefix-map=${ROOT_DIR}=.\"" | ||
|
||
APP_DIR=$($XC -showBuildSettings | grep " BUILT_PRODUCTS_DIR =" | sed -e 's/.*= *//' ) | ||
APP_NAME=$($XC -showBuildSettings | grep " FULL_PRODUCT_NAME =" | sed -e 's/.*= *//' ) | ||
APP_PATH=$APP_DIR/$APP_NAME | ||
|
||
$XC build | xcpretty | ||
|
||
cp -R "${APP_PATH}" ./ | ||
|
||
VERSION=$( $PBUDDY -c "Print CFBundleShortVersionString" "$APP_PATH/Contents/Info.plist" ) | ||
BUILD=$( $PBUDDY -c "Print CFBundleVersion" "$APP_PATH/Contents/Info.plist" ) | ||
|
||
create-dmg \ | ||
--volname "Nimble Commander Unsigned" \ | ||
--window-pos 200 200 \ | ||
--window-size 610 386 \ | ||
--background "dmg/background.png" \ | ||
--text-size 12 \ | ||
--icon-size 128 \ | ||
--icon "${APP_NAME}" 176 192 \ | ||
--app-drop-link 432 192 \ | ||
"nimble-commander-unsigned-${VERSION}(${BUILD}).dmg" \ | ||
"${APP_NAME}" |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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