Skip to content

Commit

Permalink
stuff
Browse files Browse the repository at this point in the history
  • Loading branch information
Tricked-dev committed Jan 3, 2022
1 parent 023fb9e commit 9d76aff
Show file tree
Hide file tree
Showing 4 changed files with 53 additions and 6 deletions.
16 changes: 11 additions & 5 deletions .github/workflows/release-desktop.yml
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,7 @@ jobs:
command: build
args: --release --target ${{ matrix.target }} --manifest-path ./apps/desktop/Cargo.toml
- run: mv ./apps/desktop/target .

- name: Strip release binary (linux and macos)
if: matrix.build == 'x86_64-linux' || matrix.build == 'x86_64-macos'
run: strip "target/${{ matrix.target }}/release/$BIN_NAME"
Expand All @@ -106,6 +107,8 @@ jobs:
aarch64-linux-gnu-strip \
/target/${{ matrix.target }}/release/$BIN_NAME
- run: mv target/ ./apps/desktop/target

- name: Install Wix
if: matrix.build == 'x86_64-windows'
uses: actions/checkout@v2
Expand All @@ -117,15 +120,16 @@ jobs:
uses: actions/setup-dotnet@v1
with:
dotnet-version: 3.1.101

- name: install cargo wix
if: matrix.build == 'x86_64-windows'
run: cargo install cargo-wix
- name: run wix command
if: matrix.build == 'x86_64-windows'
run: cargo wix init
- name: run wix command
if: matrix.build == 'x86_64-windows'
run: cargo wix
run: |
cd apps/desktop
cargo wix init
cargo wix
- name: make dist
run: mkdir dist
Expand All @@ -139,7 +143,9 @@ jobs:

- name: Create deb file
if: matrix.build == 'x86_64-linux'
run: cargo deb
run: cargo deb --manifest-path ./apps/desktop/Cargo.toml
- run: rm -rf target/
- run: mv ./apps/desktop/target .

- name: cp deb file
if: matrix.build == 'x86_64-linux'
Expand Down
13 changes: 13 additions & 0 deletions apps/desktop/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

28 changes: 28 additions & 0 deletions apps/desktop/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -26,3 +26,31 @@ features = ["windows_dpi_awareness", "windows_visual_styles"]

[build-dependencies]
embed-resource = "1.3"

[target.'cfg(unix)'.dependencies]
openssl = { version = "0.10.38", features = ["vendored"] }
libc = "0.2.107"

[target.'cfg(windows)'.build-dependencies]
winapi = "0.3.9"

[package.metadata.deb]
maintainer = "Tricked-dev"
copyright = "2022, Tricked-dev"
license-file = ["LICENSE", "4"]
extended-description = """https://github.com/Tricked-dev/diplo"""
depends = "$auto"
section = "utility"
priority = "optional"
assets = [
[
"target/release/ascella",
"usr/bin/",
"755",
],
[
"README.md",
"usr/share/doc/ascella/README",
"644",
],
]
2 changes: 1 addition & 1 deletion apps/desktop/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ fn session_type() -> SessionKind {
fn session_type() -> SessionKind {
SessionKind::Macos
}

#[cfg(not(any(target_os = "macos", target_os = "windows")))]
fn session_type() -> SessionKind {
return match env::var("XDG_SESSION_TYPE") {
Ok(ok) => match ok.to_lowercase().as_ref() {
Expand Down

0 comments on commit 9d76aff

Please sign in to comment.