Skip to content

Commit

Permalink
Packaging
Browse files Browse the repository at this point in the history
  • Loading branch information
Desbeers committed Dec 29, 2024
1 parent 399f6c9 commit 0e70912
Show file tree
Hide file tree
Showing 15 changed files with 736 additions and 37 deletions.
35 changes: 21 additions & 14 deletions Chord Provider.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -1771,6 +1771,8 @@
isa = XCBuildConfiguration;
buildSettings = {
CODE_SIGN_ENTITLEMENTS = "Chord Provider/QuickLook/QLthumbnail/QLthumbnail.entitlements";
CODE_SIGN_IDENTITY = "-";
"CODE_SIGN_IDENTITY[sdk=macosx*]" = "-";
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 260;
DEVELOPMENT_TEAM = FHPCJ7396C;
Expand All @@ -1794,16 +1796,17 @@
PRODUCT_NAME = "$(TARGET_NAME)";
SDKROOT = macosx;
SKIP_INSTALL = YES;
SWIFT_ACTIVE_COMPILATION_CONDITIONS = "DEBUG $(inherited)";
SWIFT_ACTIVE_COMPILATION_CONDITIONS = "$(inherited)";
SWIFT_EMIT_LOC_STRINGS = YES;
SWIFT_VERSION = 5.0;
SWIFT_VERSION = 6.0;
};
name = Debug;
};
D74072992BA20D9000DD52F0 /* Release */ = {
isa = XCBuildConfiguration;
buildSettings = {
CODE_SIGN_ENTITLEMENTS = "Chord Provider/QuickLook/QLthumbnail/QLthumbnail.entitlements";
CODE_SIGN_IDENTITY = "-";
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 260;
DEVELOPMENT_TEAM = FHPCJ7396C;
Expand All @@ -1828,7 +1831,7 @@
SDKROOT = macosx;
SKIP_INSTALL = YES;
SWIFT_EMIT_LOC_STRINGS = YES;
SWIFT_VERSION = 5.0;
SWIFT_VERSION = 6.0;
};
name = Release;
};
Expand Down Expand Up @@ -1955,8 +1958,8 @@
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor;
CODE_SIGN_ENTITLEMENTS = "Chord Provider/General/ChordProvider.entitlements";
CODE_SIGN_IDENTITY = "Apple Development";
"CODE_SIGN_IDENTITY[sdk=macosx*]" = "Apple Development";
CODE_SIGN_IDENTITY = "-";
"CODE_SIGN_IDENTITY[sdk=macosx*]" = "-";
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 260;
DEAD_CODE_STRIPPING = YES;
Expand All @@ -1966,7 +1969,7 @@
GENERATE_INFOPLIST_FILE = YES;
INFOPLIST_FILE = "Chord Provider/General/Info.plist";
INFOPLIST_KEY_LSApplicationCategoryType = "public.app-category.music";
INFOPLIST_KEY_NSHumanReadableCopyright = "© 2024 Nick Berendsen";
INFOPLIST_KEY_NSHumanReadableCopyright = "© 2025 Nick Berendsen";
"INFOPLIST_KEY_UIApplicationSceneManifest_Generation[sdk=iphoneos*]" = YES;
"INFOPLIST_KEY_UIApplicationSceneManifest_Generation[sdk=iphonesimulator*]" = YES;
"INFOPLIST_KEY_UIApplicationSupportsIndirectInputEvents[sdk=iphoneos*]" = YES;
Expand All @@ -1980,11 +1983,12 @@
INFOPLIST_KEY_UISupportedInterfaceOrientations_iPhone = "UIInterfaceOrientationPortrait UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight";
"INFOPLIST_KEY_UISupportsDocumentBrowser[sdk=iphoneos*]" = YES;
"INFOPLIST_KEY_UISupportsDocumentBrowser[sdk=iphonesimulator*]" = YES;
IPHONEOS_DEPLOYMENT_TARGET = 17.5;
IPHONEOS_DEPLOYMENT_TARGET = 18.0;
LD_RUNPATH_SEARCH_PATHS = "@executable_path/Frameworks";
"LD_RUNPATH_SEARCH_PATHS[sdk=macosx*]" = "@executable_path/../Frameworks";
MACOSX_DEPLOYMENT_TARGET = 15.0;
MARKETING_VERSION = 6.0;
ONLY_ACTIVE_ARCH = YES;
PRODUCT_BUNDLE_IDENTIFIER = nl.desbeers.chordprovider;
PRODUCT_NAME = "$(TARGET_NAME)";
PROVISIONING_PROFILE_SPECIFIER = "";
Expand All @@ -2005,7 +2009,7 @@
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor;
CODE_SIGN_ENTITLEMENTS = "Chord Provider/General/ChordProvider.entitlements";
CODE_SIGN_IDENTITY = "Apple Development";
CODE_SIGN_IDENTITY = "-";
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 260;
DEAD_CODE_STRIPPING = YES;
Expand All @@ -2015,7 +2019,7 @@
GENERATE_INFOPLIST_FILE = YES;
INFOPLIST_FILE = "Chord Provider/General/Info.plist";
INFOPLIST_KEY_LSApplicationCategoryType = "public.app-category.music";
INFOPLIST_KEY_NSHumanReadableCopyright = "© 2024 Nick Berendsen";
INFOPLIST_KEY_NSHumanReadableCopyright = "© 2025 Nick Berendsen";
"INFOPLIST_KEY_UIApplicationSceneManifest_Generation[sdk=iphoneos*]" = YES;
"INFOPLIST_KEY_UIApplicationSceneManifest_Generation[sdk=iphonesimulator*]" = YES;
"INFOPLIST_KEY_UIApplicationSupportsIndirectInputEvents[sdk=iphoneos*]" = YES;
Expand All @@ -2029,11 +2033,12 @@
INFOPLIST_KEY_UISupportedInterfaceOrientations_iPhone = "UIInterfaceOrientationPortrait UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight";
"INFOPLIST_KEY_UISupportsDocumentBrowser[sdk=iphoneos*]" = YES;
"INFOPLIST_KEY_UISupportsDocumentBrowser[sdk=iphonesimulator*]" = YES;
IPHONEOS_DEPLOYMENT_TARGET = 17.5;
IPHONEOS_DEPLOYMENT_TARGET = 18.0;
LD_RUNPATH_SEARCH_PATHS = "@executable_path/Frameworks";
"LD_RUNPATH_SEARCH_PATHS[sdk=macosx*]" = "@executable_path/../Frameworks";
MACOSX_DEPLOYMENT_TARGET = 15.0;
MARKETING_VERSION = 6.0;
ONLY_ACTIVE_ARCH = NO;
PRODUCT_BUNDLE_IDENTIFIER = nl.desbeers.chordprovider;
PRODUCT_NAME = "$(TARGET_NAME)";
PROVISIONING_PROFILE_SPECIFIER = "";
Expand All @@ -2052,7 +2057,8 @@
isa = XCBuildConfiguration;
buildSettings = {
CODE_SIGN_ENTITLEMENTS = "Chord Provider/QuickLook/QLpreview/QLpreview.entitlements";
"CODE_SIGN_IDENTITY[sdk=macosx*]" = "Apple Development";
CODE_SIGN_IDENTITY = "-";
"CODE_SIGN_IDENTITY[sdk=macosx*]" = "-";
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 260;
DEAD_CODE_STRIPPING = YES;
Expand All @@ -2074,15 +2080,16 @@
SDKROOT = macosx;
SKIP_INSTALL = YES;
SWIFT_EMIT_LOC_STRINGS = YES;
SWIFT_VERSION = 5.0;
SWIFT_VERSION = 6.0;
};
name = Debug;
};
D7F140092A646356002D875D /* Release */ = {
isa = XCBuildConfiguration;
buildSettings = {
CODE_SIGN_ENTITLEMENTS = "Chord Provider/QuickLook/QLpreview/QLpreview.entitlements";
"CODE_SIGN_IDENTITY[sdk=macosx*]" = "Apple Development";
CODE_SIGN_IDENTITY = "-";
"CODE_SIGN_IDENTITY[sdk=macosx*]" = "-";
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 260;
DEAD_CODE_STRIPPING = YES;
Expand All @@ -2104,7 +2111,7 @@
SDKROOT = macosx;
SKIP_INSTALL = YES;
SWIFT_EMIT_LOC_STRINGS = YES;
SWIFT_VERSION = 5.0;
SWIFT_VERSION = 6.0;
};
name = Release;
};
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
{
"images" : [
{
"filename" : "DiskIcon-16.png",
"idiom" : "mac",
"scale" : "1x",
"size" : "16x16"
},
{
"filename" : "DiskIcon-32.png",
"idiom" : "mac",
"scale" : "2x",
"size" : "16x16"
},
{
"filename" : "DiskIcon-32.png",
"idiom" : "mac",
"scale" : "1x",
"size" : "32x32"
},
{
"filename" : "DiskIcon-64.png",
"idiom" : "mac",
"scale" : "2x",
"size" : "32x32"
},
{
"filename" : "DiskIcon-128.png",
"idiom" : "mac",
"scale" : "1x",
"size" : "128x128"
},
{
"filename" : "DiskIcon-256.png",
"idiom" : "mac",
"scale" : "2x",
"size" : "128x128"
},
{
"filename" : "DiskIcon-256.png",
"idiom" : "mac",
"scale" : "1x",
"size" : "256x256"
},
{
"filename" : "DiskIcon-512.png",
"idiom" : "mac",
"scale" : "2x",
"size" : "256x256"
},
{
"filename" : "DiskIcon-512.png",
"idiom" : "mac",
"scale" : "1x",
"size" : "512x512"
},
{
"filename" : "DiskIcon-1024.png",
"idiom" : "mac",
"scale" : "2x",
"size" : "512x512"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
46 changes: 23 additions & 23 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,30 +1,30 @@
CURRDATE := $(shell date "+%Y-%m-%d")
TESTBUILDDIR := TestBuild
DMGNAME := Chord Provider macOS ${CURRDATE}.dmg
VERSION = $(shell xcodebuild -showBuildSettings | grep MARKETING_VERSION | tr -d 'MARKETING_VERSION =')
DMGNAME := Chord Provider ${VERSION}.dmg
MKDIR := mkdir

DEST := build
DEST := Build

all: archive
APPDIR := "${DEST}/Chord Provider.app"

xcodebuild:
@echo "Building Chord Provider"
rm -fr "${DEST}"
$(MKDIR) -p "${DEST}"
xcodebuild \
-scheme "Chord Provider" \
-configuration Release \
-arch x86_64 \
CODE_SIGN_IDENTITY="-" \
CODE_SIGNING_REQUIRED=YES \
-derivedDataPath "${DEST}"

archive: xcodebuild
@echo "Archive Chord Provider"
$(MKDIR) -p "${DEST}/Chord Provider"
cp -r "${DEST}/Build/Products/Release/Chord Provider.app" "${DEST}/Chord Provider"
rm -f "${DEST}/${DMGNAME}"
hdiutil create -format UDZO -srcfolder "${DEST}/Chord Provider" "${DEST}/${DMGNAME}"
all: package

clean:
rm -fr ${DEST}
rm -fr ${DEST}

package:
rm -f "Build/${DMGNAME}"
bash ./Resources/create-dmg \
--volname "Chord Provider" \
--volicon "Resources/DiskIcon.icns" \
--window-pos 200 120 \
--window-size 680 440 \
--icon-size 64 \
--icon "Chord Provider.app" 540 75 \
--hide-extension "Chord Provider.app" \
--add-file "Read me First.html" "Resources/README.html" 540 175 \
--hide-extension "Read me First.html" \
--add-file "Install.zsh" "Resources/Install.zsh" 540 275 \
--hide-extension "Install.zsh" \
--background "Resources/DiskBackground.png" \
"Build/${DMGNAME}" ${APPDIR}
Binary file added Resources/DiskBackground.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Resources/DiskIcon.icns
Binary file not shown.
50 changes: 50 additions & 0 deletions Resources/Install.zsh
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
#!/bin/zsh

#######################################################
# #
# Install Chord Provider on macOS #
# #
# For security reasons; this script is not executable #
# by double-clicking on it. #
# #
# To run it, you have to drop it into a Terminal #
# window or drop it onto its icon. #
# #
#######################################################

## Nice colours

GREEN="\e[38;5;35m"

BLUE="\e[1m\e[38;5;27m"

RESET="\e[0m"

APPLICATION="\e[1m$GREEN""Chord Provider""$RESET"

# We need administration access to run this script
if [ $(id -u) != 0 ]; then
echo "\n$BLUE""This install script requires administration permission to install $APPLICATION$RESET"
echo "
It will do the following:
- Copy $APPLICATION to your applications folder
- Move $APPLICATION out of quarantine
"
echo "\e[1m""Use it at your own risk...$RESET\n"
sudo "$0" "$@"
exit
fi

echo "\nCopy $APPLICATION to your Applications folder..."

rm -fr "/Applications/Chord Provider.app"

cp -R "${0:a:h}/ChordPro.app" /Applications/

echo "Remove the quarantine flag..."

xattr -rd com.apple.quarantine /Applications/ChordPro.app

echo "\n$BLUE""Done!$RESET\n\nEnjoy $APPLICATION on your Mac!\n"

Loading

0 comments on commit 0e70912

Please sign in to comment.