From 93725a2a00ed9806991ef3a52952f95f11d85bc5 Mon Sep 17 00:00:00 2001 From: Kenny McClive Date: Wed, 21 Aug 2019 16:23:26 -0600 Subject: [PATCH] Added dmg creation to release build. --- .gitignore | 1 + Tricycle.UI.macOS/Tricycle.UI.macOS.csproj | 19 +++++++++++++++++++ Tricycle.UI.macOS/dmg/background.png | 3 +++ Tricycle.UI.macOS/dmg/background@2x.png | 3 +++ Tricycle.UI.macOS/dmg/config.json | 14 ++++++++++++++ Tricycle.UI.macOS/package.json | 16 ++++++++++++++++ 6 files changed, 56 insertions(+) create mode 100755 Tricycle.UI.macOS/dmg/background.png create mode 100755 Tricycle.UI.macOS/dmg/background@2x.png create mode 100755 Tricycle.UI.macOS/dmg/config.json create mode 100644 Tricycle.UI.macOS/package.json diff --git a/.gitignore b/.gitignore index ed9dbcb..6b5863f 100644 --- a/.gitignore +++ b/.gitignore @@ -334,6 +334,7 @@ FakesAssemblies/ # Node.js Tools for Visual Studio .ntvs_analysis.dat node_modules/ +package-lock.json # Visual Studio 6 build log *.plg diff --git a/Tricycle.UI.macOS/Tricycle.UI.macOS.csproj b/Tricycle.UI.macOS/Tricycle.UI.macOS.csproj index 93dd096..3755ed3 100644 --- a/Tricycle.UI.macOS/Tricycle.UI.macOS.csproj +++ b/Tricycle.UI.macOS/Tricycle.UI.macOS.csproj @@ -51,6 +51,25 @@ HttpClientHandler None + + + + AfterBuild + npm i + ${ProjectDir} + + + AfterBuild + rm -f Tricycle.dmg + ${TargetDir} + + + AfterBuild + npm run appdmg dmg/config.json bin/Release/Tricycle.dmg + ${ProjectDir} + + + diff --git a/Tricycle.UI.macOS/dmg/background.png b/Tricycle.UI.macOS/dmg/background.png new file mode 100755 index 0000000..11a9487 --- /dev/null +++ b/Tricycle.UI.macOS/dmg/background.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:76d7b7e29d0a9bd65d87f57c5db5f5251d7a8e3a0f0f87c82ec59d44ff8876e7 +size 24680 diff --git a/Tricycle.UI.macOS/dmg/background@2x.png b/Tricycle.UI.macOS/dmg/background@2x.png new file mode 100755 index 0000000..ea06b72 --- /dev/null +++ b/Tricycle.UI.macOS/dmg/background@2x.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:cc716e354a1241005a7359d55f0e33764e6e2689749fc005276e90e0dd9fae24 +size 49802 diff --git a/Tricycle.UI.macOS/dmg/config.json b/Tricycle.UI.macOS/dmg/config.json new file mode 100755 index 0000000..f327017 --- /dev/null +++ b/Tricycle.UI.macOS/dmg/config.json @@ -0,0 +1,14 @@ +{ + "title": "Tricycle", + "background": "background.png", + "contents": [ + { "x": 410, "y": 344, "type": "link", "path": "/Applications" }, + { "x": 155, "y": 344, "type": "file", "path": "../bin/Release/Tricycle.app" } + ], + "window": { + "size": { + "width": 570, + "height": 480 + } + } +} diff --git a/Tricycle.UI.macOS/package.json b/Tricycle.UI.macOS/package.json new file mode 100644 index 0000000..a05f2c9 --- /dev/null +++ b/Tricycle.UI.macOS/package.json @@ -0,0 +1,16 @@ +{ + "name": "tricycle.ui.macos", + "version": "1.0.0", + "description": "", + "main": "index.js", + "dependencies": {}, + "devDependencies": { + "appdmg": "^0.6.0" + }, + "scripts": { + "appdmg": "node_modules/.bin/appdmg", + "test": "echo \"Error: no test specified\" && exit 1" + }, + "author": "", + "license": "ISC" +}