new mac dmg build flow

This commit is contained in:
Dagen Brock 2020-05-17 20:45:20 -05:00
parent 78653464a1
commit bf9f383068
3 changed files with 31 additions and 71 deletions

View File

@ -38,13 +38,8 @@ jobs:
if: matrix.os == 'macos-latest' if: matrix.os == 'macos-latest'
run: | run: |
./package_mac.sh ./package_mac.sh
# echo "----1" pip3 install dmgbuild
# ls -al dmgbuild -s dmg-settings.json "buckshot" buckshot.dmg
# echo "----2"
# ls -al ..
# echo "----3"
# ls -al buckshot
# macdeployqt buckshot/buckshot.app
# EVERYTHING BELOW IS ONLY WHEN VERSION TAGS PUSHED (i.e. tag like "v0.1") # EVERYTHING BELOW IS ONLY WHEN VERSION TAGS PUSHED (i.e. tag like "v0.1")
- name: Create Release - name: Create Release

15
dmg-settings.json Normal file
View File

@ -0,0 +1,15 @@
{
"title": "Buckshot",
"background": "assets/buckshot_dmg_bg_600x500.png",
"format": "UDZO",
"compression-level": 9,
"icon": "assets/icons.icns",
"window": { "position": { "x": 200, "y": 120 },
"size": { "width": 600, "height": 500 } },
"contents": [
{ "x": 410, "y": 130, "type": "link", "path": "/Applications" },
{ "x": 184, "y": 130, "type": "file", "path": "buckshot-package-osx/buckshot.app" },
{ "x": 184, "y": 330, "type": "file", "path": "buckshot-package-osx/README.txt" },
{ "x": 410, "y": 330, "type": "file", "path": "buckshot-package-osx/LICENSE.txt" }
]
}

View File

@ -6,9 +6,12 @@ ASSETDIR=assets
ID=${0##*/} ID=${0##*/}
# SET PATH # SET PATH
echo "${ID}: SET QT ENV" #echo "${ID}: SET QT ENV"
. qt-env.sh #. qt-env.sh
echo "${ID}: RUN macdeployqt"
macdeployqt $APPBUILDDIR
cp -r $APPBUILDDIR $PACKAGEDIR
echo "${ID}: COPY EXTRA FILES" echo "${ID}: COPY EXTRA FILES"
mkdir -p $CONTENTDIR/MacOS mkdir -p $CONTENTDIR/MacOS
@ -18,67 +21,14 @@ cp $ASSETDIR/icons.icns $CONTENTDIR/Resources
cp README.md $PACKAGEDIR/README.txt cp README.md $PACKAGEDIR/README.txt
cp LICENSE.txt $PACKAGEDIR cp LICENSE.txt $PACKAGEDIR
echo "${ID}: RUN macdeployqt"
macdeployqt $APPBUILDDIR
cp -r $APPBUILDDIR $PACKAGEDIR
echo "${ID}: DOWNLOAD UTILITY BINARIES" echo "${ID}: DOWNLOAD UTILITY BINARIES"
curl -L -o cadius.zip https://github.com/digarok/cadius/releases/download/0.0.0/cadius-macos-latest-0.0.0.zip curl -L -o cadius.zip https://github.com/digarok/cadius/releases/download/0.0.0/cadius-macos-latest-0.0.0.zip
curl -L -o b2d.zip https://github.com/digarok/b2d/releases/download/v1.3/b2d-macos-latest-v1.3.zip curl -L -o b2d.zip https://github.com/digarok/b2d/releases/download/v1.3/b2d-macos-latest-v1.3.zip
unzip cadius.zip -d cadius unzip -o cadius.zip -d cadius
unzip b2d.zip -d b2d unzip -o b2d.zip -d b2d
chmod +x b2d/b2d # @TODO: Fix me chmod +x b2d/b2d # @TODO: Fix me
cp b2d/b2d $CONTENTDIR/MacOS cp b2d/b2d $CONTENTDIR/MacOS
cp cadius/cadius $CONTENTDIR/MacOS cp cadius/cadius $CONTENTDIR/MacOS
echo "${ID}: CREATE DMG"
git clone https://github.com/andreyvit/yoursway-create-dmg.git
cd yoursway-create-dmg
test -f buckshot.dmg && rm buckshot.dmg
./create-dmg \
--volname "buckshot" \
--volicon "../assets/icons.icns" \
--background "../assets/buckshot_dmg_bg_600x500.png" \
--window-pos 200 120 \
--window-size 600 500 \
--icon-size 100 \
--icon buckshot.app 180 130 \
--hide-extension buckshot.app \
--icon README.txt 200 330 \
--icon LICENSE.txt 410 330 \
--app-drop-link 410 130 \
--skip-jenkins \
buckshot.dmg \
../${PACKAGEDIR}/
cp buckshot.dmg ..
exit 0
#############################################
### NONE SHALLL OPPAAPSADFAPAPSFPSAPPGFPED
#############################################
SDIR=build-buckshot-Desktop_Qt_5_12_0_clang_64bit-Release/buckshot.app
DEXTRAS=buckshot-osx/
DDIR=buckshot-osx/buckshot.app
mkdir -p $DDIR
# make app bundle with qt frameworks using macdeployqt
~/Qt/5.12.0/clang_64/bin/macdeployqt $SDIR
# copy to dmg staging dir
cp -R $SDIR $DEXTRAS
# not needed?
#dylibbundler -od -b -x $DDIR/Contents/MacOS/buckshot -d $DDIR/Contents/libs/
# files to include in dmg
#cp doc/gsplusmanual.pdf $DEXTRAS
#cp doc/gsplusmanual.txt $DEXTRAS
# COPY BINARIES FROM EXTERNAL PROJECTS