diff --git a/.gitlab-ci-local/.gitignore b/.gitlab-ci-local/.gitignore new file mode 100644 index 0000000..d6b7ef3 --- /dev/null +++ b/.gitlab-ci-local/.gitignore @@ -0,0 +1,2 @@ +* +!.gitignore diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml new file mode 100644 index 0000000..e53ed5f --- /dev/null +++ b/.gitlab-ci.yml @@ -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" diff --git a/src-tauri/Cargo.lock b/src-tauri/Cargo.lock index 474c913..1192b43 100644 --- a/src-tauri/Cargo.lock +++ b/src-tauri/Cargo.lock @@ -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" diff --git a/src-tauri/Cargo.toml b/src-tauri/Cargo.toml index 1e2d353..c7591c3 100644 --- a/src-tauri/Cargo.toml +++ b/src-tauri/Cargo.toml @@ -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" diff --git a/src-tauri/src/unpacker.rs b/src-tauri/src/unpacker.rs index a85bb89..58676e1 100644 --- a/src-tauri/src/unpacker.rs +++ b/src-tauri/src/unpacker.rs @@ -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 { diff --git a/src-tauri/tauri.conf.json b/src-tauri/tauri.conf.json index f6cd689..c7c4954 100644 --- a/src-tauri/tauri.conf.json +++ b/src-tauri/tauri.conf.json @@ -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",