From cf4b786a01dbe1a7e1063d692de1177ba13b4f57 Mon Sep 17 00:00:00 2001 From: Sindre Sorhus Date: Tue, 28 Mar 2017 01:01:09 +0700 Subject: [PATCH] Add build script --- .gitignore | 1 + build | 22 ++++++++++++++++++++++ export-options.plist | 10 ++++++++++ readme.md | 7 +++++++ 4 files changed, 40 insertions(+) create mode 100755 build create mode 100644 export-options.plist diff --git a/.gitignore b/.gitignore index 0a4613f..911fef7 100644 --- a/.gitignore +++ b/.gitignore @@ -2,3 +2,4 @@ xcuserdata project.xcworkspace Carthage/Checkouts Carthage/Build +Release diff --git a/build b/build new file mode 100755 index 0000000..e2d3381 --- /dev/null +++ b/build @@ -0,0 +1,22 @@ +#!/bin/bash + +NAME='Touch Bar Simulator' + + +rm -r Release 2>/dev/null + +xcodebuild archive \ + -scheme "$NAME" \ + -archivePath Release/App.xcarchive + +xcodebuild \ + -exportArchive \ + -archivePath Release/App.xcarchive \ + -exportOptionsPlist export-options.plist \ + -exportPath Release + +cd Release +rm -r App.xcarchive + +# Prerequisite: npm i -g create-dmg +create-dmg "${NAME}.app" diff --git a/export-options.plist b/export-options.plist new file mode 100644 index 0000000..6fa6122 --- /dev/null +++ b/export-options.plist @@ -0,0 +1,10 @@ + + + + + teamID + YG56YK5RN5 + method + developer-id + + diff --git a/readme.md b/readme.md index 85eadbf..37c2c8e 100644 --- a/readme.md +++ b/readme.md @@ -49,6 +49,13 @@ Apple would never allow it as it uses private APIs. In short, it exposes the Touch Bar simulator from inside Xcode as a standalone app with added features. I [class-dumped](https://github.com/nygard/class-dump) a private Xcode framework and used that to expose a private class to get a reference to the Touch Bar window controller. I then launch that window and add a screenshot button to it. I've bundled the required private frameworks to make it work without Xcode. That's why the binary is so big. +## Build + +``` +./build +``` + + ## License MIT © [Sindre Sorhus](https://sindresorhus.com)