Merge pull request #673 from andreasb242/mac-build

Mac build
presentation
andreasb242 7 years ago committed by GitHub
commit 455f8fb8fd
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 3
      mac-setup/.gitignore
  2. 95
      mac-setup/Info.plist
  3. 38
      mac-setup/build-app.sh
  4. BIN
      mac-setup/icon/Icon1024.png
  5. 15
      mac-setup/icon/create-icns.sh
  6. BIN
      mac-setup/icon/xournalpp.icns
  7. 2
      src/CMakeLists.txt

@ -0,0 +1,3 @@
macdylibbundler
Xournal++.app

@ -0,0 +1,95 @@
<?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>CFBundleDevelopmentRegion</key>
<string>English</string>
<key>CFBundleDocumentTypes</key>
<array>
<dict>
<key>CFBundleTypeExtensions</key>
<array>
<string>xopp</string>
<string>XOPP</string>
<string>xopt</string>
<string>XOPT</string>
<string>xoj</string>
<string>XOJ</string>
</array>
<key>CFBundleTypeIconFile</key>
<string>xournalpp.icns</string>
<key>CFBundleTypeMIMETypes</key>
<array>
<string>application/xopp</string>
</array>
<key>CFBundleTypeName</key>
<string>Xournal++ Document</string>
<key>CFBundleTypeOSTypes</key>
<array>
<string>XOPP </string>
</array>
<key>CFBundleTypeRole</key>
<string>Editor</string>
<key>LSIsAppleDefaultForType</key>
<true/>
<key>LSItemContentTypes</key>
<array>
<string>com.github.xournalpp.xcf</string>
</array>
</dict>
<dict>
<key>CFBundleTypeExtensions</key>
<array>
<string>pdf</string>
<string>PDF</string>
</array>
<key>CFBundleTypeMIMETypes</key>
<array>
<string>application/pdf</string>
</array>
<key>CFBundleTypeName</key>
<string>NSPDFPboardType</string>
<key>CFBundleTypeOSTypes</key>
<array>
<string>PDF </string>
</array>
<key>CFBundleTypeRole</key>
<string>Editor</string>
<key>LSIsAppleDefaultForType</key>
<true/>
<key>LSItemContentTypes</key>
<array>
<string>com.adobe.pdf</string>
</array>
<key>NSDocumentClass</key>
<string>PVPDFDocument</string>
</dict>
</array>
<key>CFBundleExecutable</key>
<string>xournalpp</string>
<key>CFBundleGetInfoString</key>
<string>Tablet Notetaking Application</string>
<key>CFBundleIconFile</key>
<string>xournalpp.icns</string>
<key>CFBundleIdentifier</key>
<string>com.github.xournalpp</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundleName</key>
<string>Xournal++ 1.0.6</string>
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleShortVersionString</key>
<string>1.0.6-alpha</string>
<key>CFBundleSignature</key>
<string>Xournal++</string>
<key>CFBundleVersion</key>
<string>1.0.6-alpha</string>
<key>NSHumanReadableCopyright</key>
<string>© 2010-2019 Xournal++ Team</string>
<key>NSHighResolutionCapable</key>
<true/>
<key>NSRequiresAquaSystemAppearance</key>
<true/>
</dict>
</plist>

@ -0,0 +1,38 @@
#!/bin/bash
## Mac Setup script
## 1. do the build, will not be called from this script
## 2. call this script
## 3. an .app will be packed
# go to script directory
cd "${0%/*}"
# delete old app, if there
echo "clean old app"
rm -rf ./Xournal++.app
echo "prepare macdylibbundler"
if [ ! -d "macdylibbundler" ]; then
git clone https://github.com/auriamg/macdylibbundler.git macdylibbundler
cd macdylibbundler
else
cd macdylibbundler
git pull
fi
make -j 2
cd ..
echo "prepare package"
mkdir -p Xournal++.app/Contents/MacOS
cp ../build/src/xournalpp ./Xournal++.app/Contents/MacOS/xournalpp
./macdylibbundler/dylibbundler -od -b -x ./Xournal++.app/Contents/MacOS/xournalpp -d ./Xournal++.app/Contents/libs/
cp icon/xournalpp.icns ./Xournal++.app/Contents/Resources/xournalpp.icns
cp Info.plist ./Xournal++.app/Contents/Info.plist
echo "finished"

Binary file not shown.

After

Width:  |  Height:  |  Size: 112 KiB

@ -0,0 +1,15 @@
#!/usr/bin/env bash
# https://stackoverflow.com/questions/12306223/how-to-manually-create-icns-files-using-iconutil
mkdir MyIcon.iconset
sips -z 16 16 Icon1024.png --out MyIcon.iconset/icon_16x16.png
sips -z 32 32 Icon1024.png --out MyIcon.iconset/icon_16x16@2x.png
sips -z 32 32 Icon1024.png --out MyIcon.iconset/icon_32x32.png
sips -z 64 64 Icon1024.png --out MyIcon.iconset/icon_32x32@2x.png
sips -z 128 128 Icon1024.png --out MyIcon.iconset/icon_128x128.png
sips -z 256 256 Icon1024.png --out MyIcon.iconset/icon_128x128@2x.png
sips -z 256 256 Icon1024.png --out MyIcon.iconset/icon_256x256.png
sips -z 512 512 Icon1024.png --out MyIcon.iconset/icon_256x256@2x.png
sips -z 512 512 Icon1024.png --out MyIcon.iconset/icon_512x512.png
cp Icon1024.png MyIcon.iconset/icon_512x512@2x.png
iconutil -c icns MyIcon.iconset
rm -R MyIcon.iconset

Binary file not shown.

@ -19,6 +19,8 @@ add_definitions (-g -Wreturn-type -Wuninitialized -Wunused-value -Wunused-variab
if (WIN32)
# optimize for size (the Windows .exe is really big)
set (xournalpp_LDFLAGS ${xournalpp_LDFLAGS} "-Os -s")
elseif (APPLE)
# Nothing to do for APPLE
else ()
add_definitions (-rdynamic)
endif ()

Loading…
Cancel
Save