From 66732474f83e4407da9387308135dea28a9dd557 Mon Sep 17 00:00:00 2001 From: Rie Takahashi Date: Fri, 29 Nov 2024 02:34:13 +0000 Subject: [PATCH] workflow stuff --- .cargo/config.toml | 2 +- .github/workflows/build.yml | 21 ++-- Cargo.lock | 225 +----------------------------------- Cargo.toml | 1 - src/main.rs | 2 +- 5 files changed, 19 insertions(+), 232 deletions(-) diff --git a/.cargo/config.toml b/.cargo/config.toml index ae5c274..f72826d 100644 --- a/.cargo/config.toml +++ b/.cargo/config.toml @@ -1,2 +1,2 @@ [alias] -release = "packager --release -f all" +release = "packager --release -f all -v" diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index d2e4837..4b9a177 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -1,12 +1,9 @@ -name: Package examples +name: Publish on: - pull_request: - branches: - - main - paths: - - ".github/workflows/build.yml" - - "./**" + push: + tags: + - "v*" concurrency: group: ${{ github.workflow }}-${{ github.ref }} @@ -27,3 +24,13 @@ jobs: - uses: dtolnay/rust-toolchain@nightly - run: cargo +nightly install cargo-packager --locked - run: cargo +nightly release + - name: release + uses: svenstaro/upload-release-action@2.9.0 + with: + repo_token: ${{ secrets.RELEASE_TOKEN }} + file: dist/discord-modloader_* + tag: ${{ github.ref }} + overwrite: true + file_glob: true + draft: true + prerelease: ${{ contains(github.ref, 'beta') }} diff --git a/Cargo.lock b/Cargo.lock index aaef579..1590a3d 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -195,7 +195,7 @@ dependencies = [ "ndk", "ndk-context", "ndk-sys", - "num_enum 0.7.3", + "num_enum", "thiserror", ] @@ -580,15 +580,6 @@ version = "0.22.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "72b3254f16251a8381aa12e40e3c4d2f0199f8c6508fbecb9d91f575e0fbb8c6" -[[package]] -name = "bincode" -version = "1.3.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b1f45e9417d87227c7a56d22e471c6206462cba514c7590c09aff4cf6d1ddcad" -dependencies = [ - "serde", -] - [[package]] name = "bindgen" version = "0.70.1" @@ -986,12 +977,6 @@ dependencies = [ "unicode-xid", ] -[[package]] -name = "const_panic" -version = "0.2.10" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "013b6c2c3a14d678f38cd23994b02da3a1a1b6a5d1eedddfe63a5a5f11b13a81" - [[package]] name = "constcat" version = "0.3.1" @@ -1129,16 +1114,6 @@ dependencies = [ "typenum", ] -[[package]] -name = "cstr" -version = "0.2.12" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "68523903c8ae5aacfa32a0d9ae60cadeb764e1da14ee0d26b1f3089f13a54636" -dependencies = [ - "proc-macro2", - "quote", -] - [[package]] name = "cursor-icon" version = "1.1.0" @@ -1467,7 +1442,6 @@ dependencies = [ "detours-sys", "dioxus", "dirs", - "dll-syringe", "freya", "libc", "retour", @@ -1503,29 +1477,6 @@ dependencies = [ "libloading", ] -[[package]] -name = "dll-syringe" -version = "0.15.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bdc807201d54de75e9bd7ad199d0031048625059f84acfc94506bdb13c0b4f59" -dependencies = [ - "bincode", - "cstr", - "goblin", - "iced-x86", - "konst", - "num_enum 0.6.1", - "path-absolutize", - "same-file", - "serde", - "shrinkwraprs", - "stopwatch2", - "sysinfo", - "thiserror", - "widestring", - "winapi", -] - [[package]] name = "downcast-rs" version = "1.2.1" @@ -2290,17 +2241,6 @@ dependencies = [ "gl_generator", ] -[[package]] -name = "goblin" -version = "0.6.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0d6b4de4a8eb6c46a8c77e1d3be942cb9a8bf073c22374578e5ba4b08ed0ff68" -dependencies = [ - "log", - "plain", - "scroll", -] - [[package]] name = "h2" version = "0.4.7" @@ -2514,15 +2454,6 @@ dependencies = [ "cc", ] -[[package]] -name = "iced-x86" -version = "1.21.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7c447cff8c7f384a7d4f741cfcff32f75f3ad02b406432e8d6c878d56b1edf6b" -dependencies = [ - "lazy_static", -] - [[package]] name = "icu_collections" version = "1.5.0" @@ -2867,15 +2798,6 @@ version = "1.70.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7943c866cc5cd64cbc25b2e01621d07fa8eb2a1a23160ee81ce38704e97b8ecf" -[[package]] -name = "itertools" -version = "0.8.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f56a2d0bc861f9165be4eb3442afd3c236d8a98afd426f65d92324ae1091a484" -dependencies = [ - "either", -] - [[package]] name = "itertools" version = "0.11.0" @@ -2972,26 +2894,6 @@ version = "3.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e2db585e1d738fc771bf08a151420d3ed193d9d895a36df7f6f8a9456b911ddc" -[[package]] -name = "konst" -version = "0.3.14" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b65f00fb3910881e52bf0850ae2a82aea411488a557e1c02820ceaa60963dce3" -dependencies = [ - "const_panic", - "konst_kernel", - "typewit", -] - -[[package]] -name = "konst_kernel" -version = "0.3.12" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "599c1232f55c72c7fc378335a3efe1c878c92720838c8e6a4fd87784ef7764de" -dependencies = [ - "typewit", -] - [[package]] name = "kqueue" version = "1.0.8" @@ -3277,7 +3179,7 @@ dependencies = [ "jni-sys", "log", "ndk-sys", - "num_enum 0.7.3", + "num_enum", "raw-window-handle", "thiserror", ] @@ -3350,15 +3252,6 @@ dependencies = [ "windows-sys 0.45.0", ] -[[package]] -name = "ntapi" -version = "0.4.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e8a3895c6391c39d7fe7ebc444a87eb2991b2a0bc718fdabd071eec617fc68e4" -dependencies = [ - "winapi", -] - [[package]] name = "nu-ansi-term" version = "0.46.0" @@ -3425,33 +3318,13 @@ dependencies = [ "autocfg", ] -[[package]] -name = "num_enum" -version = "0.6.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7a015b430d3c108a207fd776d2e2196aaf8b1cf8cf93253e3a097ff3085076a1" -dependencies = [ - "num_enum_derive 0.6.1", -] - [[package]] name = "num_enum" version = "0.7.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4e613fc340b2220f734a8595782c551f1250e969d87d3be1ae0579e8d4065179" dependencies = [ - "num_enum_derive 0.7.3", -] - -[[package]] -name = "num_enum_derive" -version = "0.6.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "96667db765a921f7b295ffee8b60472b686a51d4f21c2ee4ffdb94c7013b65a6" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.89", + "num_enum_derive", ] [[package]] @@ -3858,24 +3731,6 @@ version = "1.0.15" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "57c0d7b74b563b49d38dae00a0c37d4d6de9b432382b2892f0574ddcae73fd0a" -[[package]] -name = "path-absolutize" -version = "3.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e4af381fe79fa195b4909485d99f73a80792331df0625188e707854f0b3383f5" -dependencies = [ - "path-dedot", -] - -[[package]] -name = "path-dedot" -version = "3.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "07ba0ad7e047712414213ff67533e6dd477af0a4e1d14fb52343e53d30ea9397" -dependencies = [ - "once_cell", -] - [[package]] name = "pathdiff" version = "0.2.3" @@ -3947,12 +3802,6 @@ version = "0.3.31" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "953ec861398dccce10c670dfeaf3ec4911ca479e9c02154b3a215178c5f566f2" -[[package]] -name = "plain" -version = "0.2.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b4596b6d070b27117e987119b4dac604f3c58cfb0b191112e24771b2faeac1a6" - [[package]] name = "png" version = "0.17.14" @@ -4476,26 +4325,6 @@ version = "1.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "94143f37725109f92c262ed2cf5e59bce7498c01bcc1502d7b9afe439a4e9f49" -[[package]] -name = "scroll" -version = "0.11.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "04c565b551bafbef4157586fa379538366e4385d42082f255bfd96e4fe8519da" -dependencies = [ - "scroll_derive", -] - -[[package]] -name = "scroll_derive" -version = "0.11.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1db149f81d46d2deba7cd3c50772474707729550221e69588478ebf9ada425ae" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.89", -] - [[package]] name = "sctk-adwaita" version = "0.10.1" @@ -4705,19 +4534,6 @@ version = "1.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0fda2ff0d084019ba4d7c6f371c95d8fd75ce3524c3cb8fb653a3023f6323e64" -[[package]] -name = "shrinkwraprs" -version = "0.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e63e6744142336dfb606fe2b068afa2e1cca1ee6a5d8377277a92945d81fa331" -dependencies = [ - "bitflags 1.3.2", - "itertools 0.8.2", - "proc-macro2", - "quote", - "syn 1.0.109", -] - [[package]] name = "signal-hook-registry" version = "1.4.2" @@ -4897,12 +4713,6 @@ version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a2eb9349b6444b326872e140eb1cf5e7c522154d69e7a0ffb0fb81c06b37543f" -[[package]] -name = "stopwatch2" -version = "2.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "911ece10388afa48417f99e01df038460b6249a3ee0255f6446a6881b702fbb4" - [[package]] name = "str_indices" version = "0.4.4" @@ -4969,20 +4779,6 @@ dependencies = [ "syn 2.0.89", ] -[[package]] -name = "sysinfo" -version = "0.29.11" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cd727fc423c2060f6c92d9534cef765c65a6ed3f428a03d7def74a8c4348e666" -dependencies = [ - "cfg-if", - "core-foundation-sys", - "libc", - "ntapi", - "once_cell", - "winapi", -] - [[package]] name = "system-configuration" version = "0.6.1" @@ -5357,21 +5153,6 @@ version = "1.17.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "42ff0bf0c66b8238c6f3b578df37d0b7848e55df8577b3f74f92a69acceeb825" -[[package]] -name = "typewit" -version = "1.10.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d51dbd25812f740f45e2a9769f84711982e000483b13b73a8a1852e092abac8c" -dependencies = [ - "typewit_proc_macros", -] - -[[package]] -name = "typewit_proc_macros" -version = "1.8.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e36a83ea2b3c704935a01b4642946aadd445cea40b10935e3f8bd8052b8193d6" - [[package]] name = "uds_windows" version = "1.1.0" diff --git a/Cargo.toml b/Cargo.toml index 9aab164..2e8b615 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -30,7 +30,6 @@ winapi = { version = "0.3.9", features = [ "memoryapi", "namedpipeapi", ] } -dll-syringe = "0.15.2" detours-sys = { version = "0.1.2" } widestring = "1.1.0" diff --git a/src/main.rs b/src/main.rs index 6663f53..206ffda 100644 --- a/src/main.rs +++ b/src/main.rs @@ -29,7 +29,7 @@ fn main() { } #[cfg(target_os = "linux")] -fn load_profile(config: &config::Config, instance: &config::Instance) { +unsafe fn load_profile(config: &config::Config, instance: &config::Instance) { println!("Loading Instance: {}", instance.name); if let Some(ref profile_path) = instance.profile_path { println!("On profile: {}", profile_path)