diff --git a/.github/workflows/deployment.yml b/.github/workflows/deployment.yml new file mode 100644 index 0000000..3759c2d --- /dev/null +++ b/.github/workflows/deployment.yml @@ -0,0 +1,33 @@ +name: Deployment + +on: + workflow_dispatch: + release: + types: + - created + +env: + CARGO_TERM_COLOR: always + +jobs: + build-windows: + permissions: write-all + name: windows + runs-on: windows-2019 + steps: + - uses: actions/checkout@v3 + - name: Update Libs + run: cargo install cargo-wix + - name: Build + run: cd liquid-cad && cargo wix -p liquid-cad + - name: Compress + run: cd target/wix && ls && Compress-Archive *.msi liquid-cad.msi.zip + - name: Upload + uses: actions/upload-release-asset@v1.0.1 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + with: + upload_url: ${{ github.event.release.upload_url }} + asset_path: target/wix/liquid-cad.msi.zip + asset_name: liquid-cad-windows_x86.msi.zip + asset_content_type: binary \ No newline at end of file diff --git a/assets/icon.png b/assets/icon.png new file mode 100644 index 0000000..f32a845 Binary files /dev/null and b/assets/icon.png differ diff --git a/assets/install.png b/assets/install.png new file mode 100644 index 0000000..f32a845 Binary files /dev/null and b/assets/install.png differ diff --git a/assets/liquid_cad.ico b/assets/liquid_cad.ico new file mode 100644 index 0000000..aa0a4f3 Binary files /dev/null and b/assets/liquid_cad.ico differ diff --git a/liquid-cad/.cargo/config.toml b/liquid-cad/.cargo/config.toml index bac83fe..60e6dcd 100644 --- a/liquid-cad/.cargo/config.toml +++ b/liquid-cad/.cargo/config.toml @@ -3,4 +3,9 @@ # check status at https://developer.mozilla.org/en-US/docs/Web/API/Clipboard#browser_compatibility # we don't use `[build]` because of rust analyzer's build cache invalidation https://github.com/emilk/eframe_template/issues/93 [target.wasm32-unknown-unknown] -rustflags = ["--cfg=web_sys_unstable_apis"] \ No newline at end of file +rustflags = ["--cfg=web_sys_unstable_apis"] + +[target.x86_64-apple-darwin] +rustflags = ["-C", "link-arg=-mmacosx-version-min=10.8"] +[env] +MACOSX_DEPLOYMENT_TARGET = "10.8" \ No newline at end of file diff --git a/liquid-cad/Cargo.toml b/liquid-cad/Cargo.toml index ce55748..465ccee 100644 --- a/liquid-cad/Cargo.toml +++ b/liquid-cad/Cargo.toml @@ -39,3 +39,24 @@ opt-level = 2 # fast and small wasm # Optimize all dependencies even in debug builds: [profile.dev.package."*"] opt-level = 2 + +[package.metadata.bundle] +name = "Liquid CAD" +identifier = "com.github.twitchyliquid64.liquid-cad" +icon = ["../assets/install.png"] +version = "0.0.1" +copyright = "Copyright (c) liquid-cad 2024. All rights reserved." +category = "Developer Tool" +short_description = "A 2.5D CAD program for rapid prototyping, written in rust." +license = "MIT" +osx_minimum_system_version = "10.8" +osx_url_schemes = ["com.github.twitchyliquid64.liquid-cad"] + +[package.metadata.wix] +dbg-build = false +dbg-name = false +name = "Liquid CAD" +no-build = false +output = "../target/wix/LiquidCadInstaller.msi" +version = "0.0.1" +license = "MIT" \ No newline at end of file diff --git a/liquid-cad/wix/License.rtf b/liquid-cad/wix/License.rtf new file mode 100644 index 0000000..41040b0 --- /dev/null +++ b/liquid-cad/wix/License.rtf @@ -0,0 +1,18 @@ +{\rtf1\mac\ansicpg10000\cocoartf824\cocoasubrtf380 +{\fonttbl\f0\fswiss\fcharset77 Helvetica;} +{\colortbl;\red255\green255\blue255;} +{\info +{\*\company LiquidCAD}}\margl1440\margr1440\vieww9000\viewh8400\viewkind0 +\deftab720 +\pard\pardeftab720\sl380\ql\qnatural + +\f0\fs25\fsmilli12700 \cf0 NOTE: This is the MIT License.\ +\ +Copyright (c) 2024 Liquid CAD\ +\ +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:\ +\ +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.\ +\ +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\ +} \ No newline at end of file diff --git a/liquid-cad/wix/main.wxs b/liquid-cad/wix/main.wxs new file mode 100644 index 0000000..77834f8 --- /dev/null +++ b/liquid-cad/wix/main.wxs @@ -0,0 +1,269 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file