ci/cd and patches for windows builds

This commit is contained in:
DecDuck
2024-10-09 03:39:05 +11:00
parent 8f6f184739
commit ac1c3b609a
6 changed files with 46 additions and 45 deletions

2
.gitlab-ci-local/.gitignore vendored Normal file
View File

@ -0,0 +1,2 @@
*
!.gitignore

28
.gitlab-ci.yml Normal file
View File

@ -0,0 +1,28 @@
stages:
- build
build-linux:
stage: build
image: ${CI_DEPENDENCY_PROXY_GROUP_IMAGE_PREFIX}/rust:1.81.0-bookworm
script:
- apt-get update -y
- apt-get install yarnpkg libsoup-3.0-0 libsoup-3.0-dev libatk-adaptor libgtk-3-dev libjavascriptcoregtk-4.1-dev libwebkit2gtk-4.1-dev -y
- yarnpkg
- yarnpkg tauri build
- cp src-tauri/target/release/bundle/deb/*.deb .
- cp src-tauri/target/release/bundle/rpm/*.rpm .
artifacts:
paths:
- "*.{deb,rpm}"
build-windows:
stage: build
tags:
- windows
script:
- yarn
- yarn tauri build
- cp src-tauri/target/release/bundle/nsis/*.exe .
artifacts:
paths:
- "*.exe"

40
src-tauri/Cargo.lock generated
View File

@ -455,8 +455,6 @@ version = "1.1.25"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "e8d9e0b4957f635b8d3da819d0db5603620467ecf1f692d22a8c2717ce27e6d8"
dependencies = [
"jobserver",
"libc",
"shlex",
]
@ -949,7 +947,6 @@ dependencies = [
"url",
"uuid",
"webbrowser",
"zstd",
]
[[package]]
@ -1962,15 +1959,6 @@ version = "0.3.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "8eaf4bc02d17cbdd7ff4c7438cafcdf7fb9a4613313ad11b4f8fefe7d3fa0130"
[[package]]
name = "jobserver"
version = "0.1.32"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "48d1dbcbbeb6a7fec7e059840aa538bd62aaccf972c7346c4d9d2059312853d0"
dependencies = [
"libc",
]
[[package]]
name = "js-sys"
version = "0.3.70"
@ -5478,34 +5466,6 @@ version = "1.8.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "ced3678a2879b30306d323f4542626697a464a97c0a07c9aebf7ebca65cd4dde"
[[package]]
name = "zstd"
version = "0.13.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "fcf2b778a664581e31e389454a7072dab1647606d44f7feea22cd5abb9c9f3f9"
dependencies = [
"zstd-safe",
]
[[package]]
name = "zstd-safe"
version = "7.2.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "54a3ab4db68cea366acc5c897c7b4d4d1b8994a9cd6e6f841f8964566a419059"
dependencies = [
"zstd-sys",
]
[[package]]
name = "zstd-sys"
version = "2.0.13+zstd.1.5.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "38ff0f21cfee8f97d94cef41359e0c89aa6113028ab0291aa8ca0038995a95aa"
dependencies = [
"cc",
"pkg-config",
]
[[package]]
name = "zvariant"
version = "4.0.0"

View File

@ -26,7 +26,6 @@ tauri-plugin-shell = "2.0.0"
serde = { version = "1", features = ["derive"] }
serde_json = "1"
ciborium = "0.2.2"
zstd = "0.13.2"
rayon = "1.10.0"
directories = "5.0.1"
webbrowser = "1.0.2"

View File

@ -5,10 +5,11 @@ use std::{
collections::HashMap,
fs::{create_dir_all, File},
io::{self, BufReader, Error, Seek, Write},
os::unix::fs::PermissionsExt,
path::Path,
};
use tauri::Runtime;
#[cfg(unix)]
use std::os::unix::fs::PermissionsExt;
#[derive(Deserialize)]
struct ManifestChunk {

View File

@ -2,7 +2,7 @@
"$schema": "https://schema.tauri.app/config/2.0.0",
"productName": "drop",
"version": "0.1.0",
"identifier": "dev.drop.drop",
"identifier": "dev.drop.app",
"build": {
"beforeDevCommand": "yarn dev --port 1432",
"devUrl": "http://localhost:1432",
@ -12,7 +12,7 @@
"app": {
"windows": [
{
"title": "drop-app",
"title": "Drop",
"width": 1536,
"height": 864,
"minWidth": 820,
@ -33,6 +33,17 @@
},
"bundle": {
"active": true,
"targets": ["nsis", "deb", "rpm", "dmg"],
"windows": {
"nsis": {
"installMode": "both"
},
"webviewInstallMode": {
"silent": true,
"type": "embedBootstrapper"
},
"wix": null
},
"icon": [
"icons/32x32.png",
"icons/128x128.png",