From 44a0735b90ce070169be21a336ce0b287ee28297 Mon Sep 17 00:00:00 2001
From: linderd <19273958+linderd@users.noreply.github.com>
Date: Wed, 28 Aug 2024 15:04:32 +0200
Subject: [PATCH] fix macOS app building on github
---
.github/workflows/dotnet.yml | 47 +++++++++++++++++++++++++++++-------
.gitignore | 1 +
QuIDE/QuIDE.csproj | 9 +++++--
README.md | 17 ++++++++-----
4 files changed, 57 insertions(+), 17 deletions(-)
diff --git a/.github/workflows/dotnet.yml b/.github/workflows/dotnet.yml
index dd00a9d..be11fca 100644
--- a/.github/workflows/dotnet.yml
+++ b/.github/workflows/dotnet.yml
@@ -29,12 +29,22 @@ jobs:
- name: Build Windows-single-file-app
run: dotnet publish QuIDE/QuIDE.csproj -r win-x64 -f net8.0 -p:PublishSingleFile=true --self-contained false
-
- - name: Build macOS
+
+ - name: Build macOS software
run: dotnet publish QuIDE/QuIDE.csproj -r osx-arm64
- - name: build macOS app
- run: dotnet msbuild QuIDE/QuIDE.csproj -t:BundleApp -p:Configuration=Release -p:RuntimeIdentifier=osx-arm64
+
+ - name: build macOS single-file-app
+ run: dotnet msbuild QuIDE/QuIDE.csproj -t:BundleApp -p:Configuration=Release -p:RuntimeIdentifier=osx-arm64 -p:UseAppHost=true
+ # will later be put in .dmg
+ - name: Upload macOS App
+ uses: actions/upload-artifact@v4
+ with:
+ name: QuIDE.app
+ path: QuIDE/bin/Release/net8.0/osx-arm64/publish/QuIDE.app
+ compression-level: 0
+ retention-days: 1
+
- name: Upload Linux artifact
uses: actions/upload-artifact@v4
with:
@@ -47,8 +57,27 @@ jobs:
name: QuIDE Windows amd64
path: QuIDE/bin/Release/net8.0/win-x64/publish/QuIDE.exe
- - name: Upload macOS artifact
- uses: actions/upload-artifact@v4
- with:
- name: QuIDE macOS arm64
- path: QuIDE/bin/Release/net8.0/osx-arm64/publish/QuIDE.app
+ build-dmg:
+ # the dmg-step doesn't work on linux
+ runs-on: macos-latest
+ needs: [build]
+
+ steps:
+ - uses: actions/download-artifact@v4
+ with:
+ name: QuIDE.app
+ path: QuIDE.app
+
+ # here we could sign the app if we had a certificate
+
+ - name: create macOS dmg
+ uses: L-Super/create-dmg-actons@v1.0.3
+ with:
+ dmg_name: QuIDE
+ src_dir: QuIDE.app
+
+ - name: Upload macOS artifact
+ uses: actions/upload-artifact@v4
+ with:
+ name: QuIDE macOS arm64
+ path: QuIDE.dmg
diff --git a/.gitignore b/.gitignore
index b0da29f..b9b5eed 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,5 +1,6 @@
.vs
.vscode
+.DS_Store
bin
obj
packages
diff --git a/QuIDE/QuIDE.csproj b/QuIDE/QuIDE.csproj
index 9f36886..d4056f8 100644
--- a/QuIDE/QuIDE.csproj
+++ b/QuIDE/QuIDE.csproj
@@ -8,6 +8,8 @@
true
true
+
+ true
@@ -41,7 +43,7 @@
-
+
@@ -122,10 +124,13 @@
- QuIDE
+ QuIDE 2
2.2-dev
NSApplication
AAPL
false
+ true
+ ????
+ QuIDE
diff --git a/README.md b/README.md
index 47d4f00..2814793 100644
--- a/README.md
+++ b/README.md
@@ -1,18 +1,19 @@
# QuIDE 2
-Quantum Integrated Development Environment
+Cross Platform Quantum Circuit Simulator
[![.NET](https://github.com/mnm-team/quide/actions/workflows/dotnet.yml/badge.svg)](https://github.com/mnm-team/quide/actions/workflows/dotnet.yml)
- fork of QuIDE 1.0.0 from [quide.eu](http://quide.eu/)
- refactored with [Avalonia](https://www.avaloniaui.net/) to be cross-compilable on Linux, Windows and macOS.
+- maintained by [MNM-Team](https://www.mnm-team.org) at LMU Munich.
## Run the app
- simply download the application in the [Releases](https://github.com/mnm-team/quide/releases) section, there is a version for Windows, Linux (amd64) and macOS (arm64) precompiled.
-- to run the program on your machine, you only need the dotnet-8.0-runtime. It can be obtained by [Microsoft](https://dotnet.microsoft.com/en-us/download/dotnet/8.0) or at your local packet manager, e.g. `dotnet-runtime-8.0` on Ubuntu.
-- on Linux or macOS it can be necessary to set the file as executable for your user (`chmod +x `) after unzipping.
-- we don't have any certificate etc. for macOS, so you may need to start via [right-click](https://support.apple.com/guide/mac-help/open-a-mac-app-from-an-unidentified-developer-mh40616/mac).
+- to run the program on your machine, you need the dotnet-8.0-runtime. It can be obtained by [Microsoft](https://dotnet.microsoft.com/en-us/download/dotnet/8.0) or at your local packet manager, e.g. `dotnet-runtime-8.0` on Ubuntu.
+- on Linux it can be necessary to set the file as executable for your user (`chmod +x QuIDE`) after unzipping.
+- we don't have a developer ID for macOS, so you may need to use the following command: `xattr -cr /Applications/QuIDE.app` after installation (especially when macOS tells the app is broken).
## Compile by yourself
@@ -27,8 +28,12 @@ Quantum Integrated Development Environment
### Build single-file-app
- To build a single-file-app (Linux & Windows) you can use dotnet publish, e.g.: `dotnet publish QuIDE/QuIDE.csproj -r -x64 -p:PublishSingleFile=true --self-contained false -o out/`, then the App is at `out/QuIDE<.exe>` and all shared libraries (except dotnet-runtime) are included.
-- To build a .app on macOS you need two commands: `dotnet publish QuIDE/QuIDE.csproj -r osx-arm64` and `dotnet msbuild QuIDE/QuIDE.csproj -t:BundleApp -p:RuntimeIdentifier=osx-arm64`.
+- To build a .app on macOS you need two commands: `dotnet publish QuIDE/QuIDE.csproj -r osx-arm64` and `dotnet msbuild QuIDE/QuIDE.csproj -t:BundleApp -p:RuntimeIdentifier=osx-arm64 -property:Configuration=Release -p:UseAppHost=true`. Then you find it at `QuIDE/bin/Release/net8.0/osx-arm64/publish/QuIDE.app`.
## Documentation
-- User Documentation of version 1.0.0 can be found [here](https://bitbucket.org/quide/quide/downloads/UserManual_EN.pdf), until now there are no features in QuIDE 2 which would extend the described functionality.
\ No newline at end of file
+- User Documentation of version 1.0.0 can be found [here](https://bitbucket.org/quide/quide/downloads/UserManual_EN.pdf), until now there are no features in QuIDE 2 which would extend the described functionality.
+
+## Contributing
+
+Feel free to open PRs, open issues and more. We are happy about everbody who helps to make this tool better.
\ No newline at end of file