Skip to content

Commit

Permalink
Build *.dmg
Browse files Browse the repository at this point in the history
  • Loading branch information
james7132 committed Mar 9, 2018
1 parent e939ae2 commit 18bbcbe
Show file tree
Hide file tree
Showing 3 changed files with 42 additions and 0 deletions.
2 changes: 2 additions & 0 deletions .travis.yml
Expand Up @@ -24,6 +24,8 @@ matrix:
- source venv/bin/activate
- which pip
- pip install six wheel nose
before_deploy:
- ./pkg/macOS/build_app.sh
env:
global:
- PYTHONPATH="$TRAVIS_BUILD_DIR/src;$TRAVIS_BUILD_DIR/test"
Expand Down
19 changes: 19 additions & 0 deletions pkg/macOS/Info.plist
@@ -0,0 +1,19 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>CFBundleName</key><string>Fantasy Crescendo</string>
<key>CFBundleDisplayName</key><string>Fantasy Crescendo</string>
<key>CFBundleIdentifier</key><string>com.HouraiTeahouse.FantasyCrescendoLauncher</string>
<key>CFBundlePackageType</key><string>APPL</string>
<key>CFBundleSignature</key><string>????</string>
<key>CFBundleVersion</key><string>%%VERSION%%</string>
<key>CFBundleShortVersionString</key><string>%%VERSION%%</string>
<key>CFBundleExecutable</key><string>%%EXECUTABLE%%</string>
<key>CFBundleDevelopmentRegion</key><string>en</string>
<key>CFBundleGetInfoString</key><string>Copyright © 2018 Hourai Teahouse</string>
<key>NSHumanReadableCopyright</key><string>Copyright © 2018 Hourai Teahouse</string>
<key>CFBundleInfoDictionaryVersion</key><string>6.0</string>
<key>NSHighResolutionCapable</key><true/>
</dict>
</plist>
21 changes: 21 additions & 0 deletions pkg/macOS/build_app.sh
@@ -0,0 +1,21 @@
# Build *.app
BUILDDIR="build"
APP="Fantasy_Crescendo"
EXE="dist/launcher"
APP_DIR="$BUILDDIR/$APP.app"
mkdir -p $APP_DIR/Contents
mkdir -p $APP_DIR/Contents/MacOS
mkdir -p $APP_DIR/Contents/Frameworks
mkdir -p $APP_DIR/Contents/Resources

cp pkg/macOS/Info.plist $BUILDDIR/$APP.app/Contents

APPEXE="$APP_DIR/Contents/MacOS/$APP"
cp $EXE $APPEXE

# Build *.dmg file
git clone https://github.com/andreyvit/yoursway-create-dmg.git ./create-dmg
./create-dmg/create-dmg \
--volname "Fantasy Crescendo Installer" \
dist/fc_installer.dmg \
$APP_DIR/

0 comments on commit 18bbcbe

Please sign in to comment.