diff options
Diffstat (limited to 'dist/macos')
| -rw-r--r-- | dist/macos/bundle/Barrier.app/Contents/Info.plist.in | 32 | ||||
| -rw-r--r-- | dist/macos/bundle/Barrier.app/Contents/PkgInfo | 1 | ||||
| -rw-r--r-- | dist/macos/bundle/Barrier.app/Contents/Resources/Barrier.icns | bin | 470437 -> 0 bytes | |||
| -rwxr-xr-x | dist/macos/bundle/build_installer.sh.in | 77 | ||||
| -rwxr-xr-x | dist/macos/bundle/reref_dylibs.sh | 41 |
5 files changed, 0 insertions, 151 deletions
diff --git a/dist/macos/bundle/Barrier.app/Contents/Info.plist.in b/dist/macos/bundle/Barrier.app/Contents/Info.plist.in deleted file mode 100644 index b973f5e..0000000 --- a/dist/macos/bundle/Barrier.app/Contents/Info.plist.in +++ /dev/null @@ -1,32 +0,0 @@ -<!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>CFBundleDevelopmentRegion</key> - <string>English</string> - <key>CFBundleDisplayName</key> - <string>Barrier</string> - <key>CFBundleExecutable</key> - <string>barrier.sh</string> - <key>CFBundleIconFile</key> - <string>Barrier.icns</string> - <key>CFBundleIdentifier</key> - <string>barrier</string> - <!-- TODO: Fix this in v2.0 //--> - <key>CFBundleInfoDictionaryVersion</key> - <string>6.0</string> - <key>CFBundleName</key> - <string>Barrier</string> - <key>CFBundlePackageType</key> - <string>APPL</string> - <key>CFBundleSignature</key> - <string>SYN1</string> - <key>CFBundleShortVersionString</key> - <string>@BARRIER_VERSION@</string> - <key>CFBundleVersion</key> - <string>@BARRIER_VERSION@</string> - <key>NSHumanReadableCopyright</key> - <string>© 2018 Debauchee Open Source Group</string> - <key>LSMinimumSystemVersion</key> - <string>10.9.0</string> - </dict> -</plist> diff --git a/dist/macos/bundle/Barrier.app/Contents/PkgInfo b/dist/macos/bundle/Barrier.app/Contents/PkgInfo deleted file mode 100644 index 583e36a..0000000 --- a/dist/macos/bundle/Barrier.app/Contents/PkgInfo +++ /dev/null @@ -1 +0,0 @@ -APPLSYN1
\ No newline at end of file diff --git a/dist/macos/bundle/Barrier.app/Contents/Resources/Barrier.icns b/dist/macos/bundle/Barrier.app/Contents/Resources/Barrier.icns Binary files differdeleted file mode 100644 index 9f573da..0000000 --- a/dist/macos/bundle/Barrier.app/Contents/Resources/Barrier.icns +++ /dev/null diff --git a/dist/macos/bundle/build_installer.sh.in b/dist/macos/bundle/build_installer.sh.in deleted file mode 100755 index f939b77..0000000 --- a/dist/macos/bundle/build_installer.sh.in +++ /dev/null @@ -1,77 +0,0 @@ -#!/bin/sh - -# change this to rename the installer package -B_DMG="Barrier-@BARRIER_VERSION@.dmg" - -# sanity check so we don't distribute packages full of debug symbols -if [ "@CMAKE_BUILD_TYPE@" != "Release" ]; then - echo Will only build installers for Release builds - exit 1 -fi - -cd @CMAKE_CURRENT_SOURCE_DIR@/build/bundle || exit 1 - -B_REREF_SCRIPT=@CMAKE_CURRENT_SOURCE_DIR@/build/bundle/reref_dylibs.sh -if [ ! -x $B_REREF_SCRIPT ]; then - echo Missing script: $B_REREF_SCRIPT - exit 1 -fi - -# remove any old copies so there's no confusion about whether this -# process completes successfully or not -rm -rf temp.dmg $B_DMG - -cd Barrier.app/Contents 2>/dev/null -if [ $? -ne 0 ]; then - echo Please make sure that the build completed successfully - echo before trying to create the installer. - exit 1 -fi - -# MacOS folder holds the executables, non-system libraries, -# and the startup script -rm -rf MacOS -mkdir MacOS || exit 1 -cd MacOS || exit 1 - -# copy all executables -cp @CMAKE_RUNTIME_OUTPUT_DIRECTORY@/* . || exit 1 - -# copy the qt platform plugin -# TODO: this is hacky and will probably break if there is more than one qt -# version installed. need a better way to find this library -B_COCOA=$(find /usr/local/Cellar/qt -type f -name libqcocoa.dylib | head -1) -if [ $? -ne 0 ] || [ "x$B_COCOA" = "x" ]; then - echo "Could not find cocoa platform plugin" - exit 1 -fi -mkdir platforms -cp $B_COCOA platforms/ || exit 1 - -# make sure we can r/w all these binaries -chmod -R u+rw * || exit 1 - -# only one executable (barrier) needs non-system libraries although it's -# libraries can call each other. use a recursive script to handle the -# re-referencing -$B_REREF_SCRIPT barrier || exit 1 -# the cocoa platform plugin also needs to know where to find the qt libraries. -# because it exists in a subdirectory we append ../ to the relative path of the -# libraries in its metadata -$B_REREF_SCRIPT platforms/libqcocoa.dylib ../ || exit 1 - -# create a startup script that will change to the binary directory -# before starting barrier -printf "%s\n" "#!/bin/sh" "cd \$(dirname \$0)" "exec ./barrier" > barrier.sh -chmod +x barrier.sh - -# create the DMG to be distributed in build/bundle -cd ../../.. -hdiutil create -size 64m -fs HFS+ -volname "Barrier" temp.dmg || exit 1 -hdiutil attach temp.dmg -mountpoint mnt || exit 1 -cp -r Barrier.app mnt/ || exit 1 -hdiutil detach mnt || exit 1 -hdiutil convert temp.dmg -format UDZO -o $B_DMG || exit 1 -rm temp.dmg - -echo "Installer created successfully" diff --git a/dist/macos/bundle/reref_dylibs.sh b/dist/macos/bundle/reref_dylibs.sh deleted file mode 100755 index 15191bd..0000000 --- a/dist/macos/bundle/reref_dylibs.sh +++ /dev/null @@ -1,41 +0,0 @@ -#!/bin/sh - -# $1 = binary (program or dylib) -B_TARGET=$1 -if [ "x$B_TARGET" = "x" ]; then - echo Which binary needs to be re-referenced? - exit 1 -fi - -cd $(dirname $B_TARGET) || exit 1 - -# where to find non-system libraries relative to target's directory. -# the vast majority of the time this should be empty -B_REL_PATH=$2 - -# we're in target's directory now. trim off the path -B_TARGET=$(basename $B_TARGET) - -# get a list of non-system libraries and make local copies -B_LIBS=$(otool -XL $B_TARGET | awk '{ print $1 }' | grep -Ev '^(/usr/lib|/System)') -[ $? -ne 0 ] && exit 1 -for B_LIB in $B_LIBS; do - B_LIB_NAME=$(basename $B_LIB) - - # ignore self-references - [ "$B_TARGET" = "$B_LIB_NAME" ] && continue - - B_DST=${B_REL_PATH}${B_LIB_NAME} - if [ ! -e $B_DST ]; then - cp $B_LIB $B_DST || exit 1 - chmod u+rw $B_DST || exit 1 - # recursively call this script on libraries purposefully not passing - # $B_REL_PATH so that it is only used explicitly - $0 $B_DST - fi - - # adjust the target's metadata to point to the local copy - # rather than the system-wide copy which would only exist on - # a development machine - install_name_tool -change $B_LIB @loader_path/$B_DST $B_TARGET || exit 1 -done |
