From 60464356f060d842fbbeca869216715b5ed64961 Mon Sep 17 00:00:00 2001 From: AdrianEddy Date: Fri, 5 Jul 2024 06:39:08 +0200 Subject: [PATCH] Microsoft Store package needs a special path --- Cargo.lock | 142 +++++++++++++++++++++++++++++++++--------------- Cargo.toml | 4 +- src/gyroflow.rs | 23 ++++++-- 3 files changed, 119 insertions(+), 50 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index c93bb04..97d5427 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -468,6 +468,12 @@ version = "0.6.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "349f9b6a179ed607305526ca489b34ad0a41aed5f7980fa90eb03160b69598fb" +[[package]] +name = "bit_field" +version = "0.10.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dc827186963e592360843fb5ba4b973e145841266c1357f7180c43526f2e5b61" + [[package]] name = "bitarray" version = "0.9.3" @@ -616,7 +622,7 @@ dependencies = [ "js-sys", "num-traits 0.2.19", "wasm-bindgen", - "windows-targets 0.52.5", + "windows-targets 0.52.6", ] [[package]] @@ -917,7 +923,7 @@ dependencies = [ [[package]] name = "d3d12" version = "0.20.0" -source = "git+https://github.com/gfx-rs/wgpu.git?rev=35477df#35477dff9a6ec8a7446ad1776e29ce772c298f0a" +source = "git+https://github.com/gfx-rs/wgpu.git?rev=82210e1#82210e1cdc63cbd5e53f43788f9956bb0d4a2c6a" dependencies = [ "bitflags 2.6.0", "libloading", @@ -1146,6 +1152,22 @@ dependencies = [ "pin-project-lite", ] +[[package]] +name = "exr" +version = "1.72.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "887d93f60543e9a9362ef8a21beedd0a833c5d9610e18c67abe15a5963dcb1a4" +dependencies = [ + "bit_field", + "flume", + "half", + "lebe", + "miniz_oxide", + "rayon-core", + "smallvec", + "zune-inflate", +] + [[package]] name = "fallible_collections" version = "0.4.9" @@ -1210,6 +1232,15 @@ version = "0.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8ce81f49ae8a0482e4c55ea62ebbd7e5a686af544c00b9d090bba3ff9be97b3d" +[[package]] +name = "flume" +version = "0.11.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "55ac459de2512911e4b674ce33cf20befaba382d05b62b008afc1c8b57cbf181" +dependencies = [ + "spin", +] + [[package]] name = "foreign-types" version = "0.5.0" @@ -1466,7 +1497,7 @@ dependencies = [ [[package]] name = "gyroflow-core" version = "1.5.4" -source = "git+https://github.com/gyroflow/gyroflow.git?rev=782a1cc#782a1cc47fc3f9259f4df2660d6dc1cdf21b1ad3" +source = "git+https://github.com/gyroflow/gyroflow.git?rev=e23fb5f#e23fb5f6835004b79ad9ccc61e5100fdbad44571" dependencies = [ "ahrs", "akaze", @@ -1491,6 +1522,7 @@ dependencies = [ "eight-point", "enterpolation", "enum_delegate", + "exr", "fastrand", "flate2", "futures-intrusive", @@ -1812,6 +1844,12 @@ version = "1.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "830d08ce1d1d941e6b30645f1a0eb5643013d835ce3779a5fc208261dbe10f55" +[[package]] +name = "lebe" +version = "0.5.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "03087c2bad5e1034e8cace5926dec053fb3790248370865f5117a7d0213354c8" + [[package]] name = "lexical-core" version = "0.7.6" @@ -1838,7 +1876,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e310b3a6b5907f99202fcdb4960ff45b93735d7c7d96b760fcff8db2dc0e103d" dependencies = [ "cfg-if", - "windows-targets 0.52.5", + "windows-targets 0.48.5", ] [[package]] @@ -2010,7 +2048,7 @@ dependencies = [ [[package]] name = "naga" version = "0.20.0" -source = "git+https://github.com/gfx-rs/wgpu.git?rev=35477df#35477dff9a6ec8a7446ad1776e29ce772c298f0a" +source = "git+https://github.com/gfx-rs/wgpu.git?rev=82210e1#82210e1cdc63cbd5e53f43788f9956bb0d4a2c6a" dependencies = [ "arrayvec 0.7.4", "bit-set", @@ -2447,7 +2485,7 @@ dependencies = [ "libc", "redox_syscall 0.5.2", "smallvec", - "windows-targets 0.52.5", + "windows-targets 0.52.6", ] [[package]] @@ -3078,6 +3116,12 @@ dependencies = [ "wide", ] +[[package]] +name = "simd-adler32" +version = "0.3.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d66dc143e6b11c1eddc06d5c423cfc97062865baf299914ab64caa38182078fe" + [[package]] name = "simple-easing" version = "1.0.1" @@ -3133,6 +3177,9 @@ name = "spin" version = "0.9.8" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6980e8d7511241f8acf4aebddbb1ff938df5eebe98691418c4468d0b72a96a67" +dependencies = [ + "lock_api", +] [[package]] name = "spirv" @@ -3174,7 +3221,7 @@ source = "git+https://github.com/EmbarkStudios/rust-gpu?rev=54f6978#54f6978c25b7 [[package]] name = "stabilize_spirv" version = "0.0.0" -source = "git+https://github.com/gyroflow/gyroflow.git?rev=782a1cc#782a1cc47fc3f9259f4df2660d6dc1cdf21b1ad3" +source = "git+https://github.com/gyroflow/gyroflow.git?rev=e23fb5f#e23fb5f6835004b79ad9ccc61e5100fdbad44571" dependencies = [ "spirv-std", ] @@ -3251,7 +3298,7 @@ dependencies = [ [[package]] name = "telemetry-parser" version = "0.3.0" -source = "git+https://github.com/AdrianEddy/telemetry-parser.git?rev=cf9c33c#cf9c33c9accaa3cb56832d0e9d39a507ab321a09" +source = "git+https://github.com/AdrianEddy/telemetry-parser.git?rev=5bedfb9#5bedfb977ba5be6a97b4d28964a6bc05a622f28a" dependencies = [ "argh", "byteorder", @@ -3650,7 +3697,7 @@ dependencies = [ [[package]] name = "wgpu" version = "0.20.0" -source = "git+https://github.com/gfx-rs/wgpu.git?rev=35477df#35477dff9a6ec8a7446ad1776e29ce772c298f0a" +source = "git+https://github.com/gfx-rs/wgpu.git?rev=82210e1#82210e1cdc63cbd5e53f43788f9956bb0d4a2c6a" dependencies = [ "arrayvec 0.7.4", "cfg_aliases", @@ -3674,7 +3721,7 @@ dependencies = [ [[package]] name = "wgpu-core" version = "0.20.0" -source = "git+https://github.com/gfx-rs/wgpu.git?rev=35477df#35477dff9a6ec8a7446ad1776e29ce772c298f0a" +source = "git+https://github.com/gfx-rs/wgpu.git?rev=82210e1#82210e1cdc63cbd5e53f43788f9956bb0d4a2c6a" dependencies = [ "arrayvec 0.7.4", "bit-vec", @@ -3699,7 +3746,7 @@ dependencies = [ [[package]] name = "wgpu-hal" version = "0.20.0" -source = "git+https://github.com/gfx-rs/wgpu.git?rev=35477df#35477dff9a6ec8a7446ad1776e29ce772c298f0a" +source = "git+https://github.com/gfx-rs/wgpu.git?rev=82210e1#82210e1cdc63cbd5e53f43788f9956bb0d4a2c6a" dependencies = [ "android_system_properties", "arrayvec 0.7.4", @@ -3743,7 +3790,7 @@ dependencies = [ [[package]] name = "wgpu-types" version = "0.20.0" -source = "git+https://github.com/gfx-rs/wgpu.git?rev=35477df#35477dff9a6ec8a7446ad1776e29ce772c298f0a" +source = "git+https://github.com/gfx-rs/wgpu.git?rev=82210e1#82210e1cdc63cbd5e53f43788f9956bb0d4a2c6a" dependencies = [ "bitflags 2.6.0", "js-sys", @@ -3813,7 +3860,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e48a53791691ab099e5e2ad123536d0fff50652600abaf43bbf952894110d0be" dependencies = [ "windows-core 0.52.0", - "windows-targets 0.52.5", + "windows-targets 0.52.6", ] [[package]] @@ -3823,7 +3870,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "12342cb4d8e3b046f3d80effd474a7a02447231330ef77d71daa6fbc40681143" dependencies = [ "windows-core 0.57.0", - "windows-targets 0.52.5", + "windows-targets 0.52.6", ] [[package]] @@ -3832,7 +3879,7 @@ version = "0.52.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "33ab640c8d7e35bf8ba19b884ba838ceb4fba93a4e8c65a9059d08afcfc683d9" dependencies = [ - "windows-targets 0.52.5", + "windows-targets 0.52.6", ] [[package]] @@ -3844,7 +3891,7 @@ dependencies = [ "windows-implement", "windows-interface", "windows-result", - "windows-targets 0.52.5", + "windows-targets 0.52.6", ] [[package]] @@ -3875,7 +3922,7 @@ version = "0.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5e383302e8ec8515204254685643de10811af0ed97ea37210dc26fb0032647f8" dependencies = [ - "windows-targets 0.52.5", + "windows-targets 0.52.6", ] [[package]] @@ -3902,7 +3949,7 @@ version = "0.52.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "282be5f36a8ce781fad8c8ae18fa3f9beff57ec1b52cb3de0789201425d9a33d" dependencies = [ - "windows-targets 0.52.5", + "windows-targets 0.52.6", ] [[package]] @@ -3937,18 +3984,18 @@ dependencies = [ [[package]] name = "windows-targets" -version = "0.52.5" +version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6f0713a46559409d202e70e28227288446bf7841d3211583a4b53e3f6d96e7eb" +checksum = "9b724f72796e036ab90c1021d4780d4d3d648aca59e491e6b98e725b84e99973" dependencies = [ - "windows_aarch64_gnullvm 0.52.5", - "windows_aarch64_msvc 0.52.5", - "windows_i686_gnu 0.52.5", + "windows_aarch64_gnullvm 0.52.6", + "windows_aarch64_msvc 0.52.6", + "windows_i686_gnu 0.52.6", "windows_i686_gnullvm", - "windows_i686_msvc 0.52.5", - "windows_x86_64_gnu 0.52.5", - "windows_x86_64_gnullvm 0.52.5", - "windows_x86_64_msvc 0.52.5", + "windows_i686_msvc 0.52.6", + "windows_x86_64_gnu 0.52.6", + "windows_x86_64_gnullvm 0.52.6", + "windows_x86_64_msvc 0.52.6", ] [[package]] @@ -3965,9 +4012,9 @@ checksum = "2b38e32f0abccf9987a4e3079dfb67dcd799fb61361e53e2882c3cbaf0d905d8" [[package]] name = "windows_aarch64_gnullvm" -version = "0.52.5" +version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7088eed71e8b8dda258ecc8bac5fb1153c5cffaf2578fc8ff5d61e23578d3263" +checksum = "32a4622180e7a0ec044bb555404c800bc9fd9ec262ec147edd5989ccd0c02cd3" [[package]] name = "windows_aarch64_msvc" @@ -3983,9 +4030,9 @@ checksum = "dc35310971f3b2dbbf3f0690a219f40e2d9afcf64f9ab7cc1be722937c26b4bc" [[package]] name = "windows_aarch64_msvc" -version = "0.52.5" +version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9985fd1504e250c615ca5f281c3f7a6da76213ebd5ccc9561496568a2752afb6" +checksum = "09ec2a7bb152e2252b53fa7803150007879548bc709c039df7627cabbd05d469" [[package]] name = "windows_i686_gnu" @@ -4001,15 +4048,15 @@ checksum = "a75915e7def60c94dcef72200b9a8e58e5091744960da64ec734a6c6e9b3743e" [[package]] name = "windows_i686_gnu" -version = "0.52.5" +version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "88ba073cf16d5372720ec942a8ccbf61626074c6d4dd2e745299726ce8b89670" +checksum = "8e9b5ad5ab802e97eb8e295ac6720e509ee4c243f69d781394014ebfe8bbfa0b" [[package]] name = "windows_i686_gnullvm" -version = "0.52.5" +version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "87f4261229030a858f36b459e748ae97545d6f1ec60e5e0d6a3d32e0dc232ee9" +checksum = "0eee52d38c090b3caa76c563b86c3a4bd71ef1a819287c19d586d7334ae8ed66" [[package]] name = "windows_i686_msvc" @@ -4025,9 +4072,9 @@ checksum = "8f55c233f70c4b27f66c523580f78f1004e8b5a8b659e05a4eb49d4166cca406" [[package]] name = "windows_i686_msvc" -version = "0.52.5" +version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "db3c2bf3d13d5b658be73463284eaf12830ac9a26a90c717b7f771dfe97487bf" +checksum = "240948bc05c5e7c6dabba28bf89d89ffce3e303022809e73deaefe4f6ec56c66" [[package]] name = "windows_x86_64_gnu" @@ -4043,9 +4090,9 @@ checksum = "53d40abd2583d23e4718fddf1ebec84dbff8381c07cae67ff7768bbf19c6718e" [[package]] name = "windows_x86_64_gnu" -version = "0.52.5" +version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4e4246f76bdeff09eb48875a0fd3e2af6aada79d409d33011886d3e1581517d9" +checksum = "147a5c80aabfbf0c7d901cb5895d1de30ef2907eb21fbbab29ca94c5b08b1a78" [[package]] name = "windows_x86_64_gnullvm" @@ -4061,9 +4108,9 @@ checksum = "0b7b52767868a23d5bab768e390dc5f5c55825b6d30b86c844ff2dc7414044cc" [[package]] name = "windows_x86_64_gnullvm" -version = "0.52.5" +version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "852298e482cd67c356ddd9570386e2862b5673c85bd5f88df9ab6802b334c596" +checksum = "24d5b23dc417412679681396f2b49f3de8c1473deb516bd34410872eff51ed0d" [[package]] name = "windows_x86_64_msvc" @@ -4079,9 +4126,9 @@ checksum = "ed94fce61571a4006852b7389a063ab983c02eb1bb37b47f8272ce92d06d9538" [[package]] name = "windows_x86_64_msvc" -version = "0.52.5" +version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bec47e5bfd1bff0eeaf6d8b485cc1074891a197ab4225d504cb7a1ab88b02bf0" +checksum = "589f6da84c646204747d1270a2a5661ea66ed1cced2631d546fdfb155959f9ec" [[package]] name = "winnow" @@ -4234,6 +4281,15 @@ version = "1.8.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ced3678a2879b30306d323f4542626697a464a97c0a07c9aebf7ebca65cd4dde" +[[package]] +name = "zune-inflate" +version = "0.2.54" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "73ab332fe2f6680068f3582b16a24f90ad7096d5d39b974d1c0aff0125116f02" +dependencies = [ + "simd-adler32", +] + [[package]] name = "zvariant" version = "4.1.1" diff --git a/Cargo.toml b/Cargo.toml index 9b3ccc0..92b65b1 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -16,12 +16,12 @@ ofx = "0.3" log = "0.4" itertools = "0.13" lru = "0.12" -gyroflow-core = { git = "https://github.com/gyroflow/gyroflow.git", default-features = false, rev = "782a1cc", features = ["bundle-lens-profiles"] } +gyroflow-core = { git = "https://github.com/gyroflow/gyroflow.git", default-features = false, rev = "e23fb5f", features = ["bundle-lens-profiles"] } #gyroflow-core = { path = "../gyroflow/src/core", default-features = false, features = ["bundle-lens-profiles"] } log-panics = "2.1" rfd = { version = "0.14", default-features = false, features = ["xdg-portal", "async-std"] } parking_lot = "0.12" -lazy_static = "1.4.0" +lazy_static = "1.5.0" fastrand = "2.1.0" simplelog = { git = "https://github.com/Drakulix/simplelog.rs.git", rev = "4ef071d" } diff --git a/src/gyroflow.rs b/src/gyroflow.rs index bff6a9c..960dda8 100644 --- a/src/gyroflow.rs +++ b/src/gyroflow.rs @@ -479,18 +479,31 @@ impl InstanceData { if let Some(v) = Self::get_gyroflow_location() { if !v.is_empty() { if let Ok(project) = self.param_project_path.get_value() { - if !project.is_empty() { + let result = if !project.is_empty() { if cfg!(target_os = "macos") { - let _ = std::process::Command::new("open").args(["-a", &v, "--args", "--open", &project]).spawn(); + std::process::Command::new("open").args(["-a", &v, "--args", "--open", &project]).spawn() + } else if cfg!(target_os = "windows") && v.starts_with("shell:") { + let mut cmd = std::process::Command::new("cmd.exe"); + #[cfg(target_os = "windows")] + { use std::os::windows::process::CommandExt; cmd.creation_flags(0x08000000); } // CREATE_NO_WINDOW + cmd.args(["/c", "start", "", &v, "--open", &project]).spawn() } else { - let _ = std::process::Command::new(v).args(["--open", &project]).spawn(); + std::process::Command::new(v).args(["--open", &project]).spawn() } } else { if cfg!(target_os = "macos") { - let _ = std::process::Command::new("open").args(["-a", &v]).spawn(); + std::process::Command::new("open").args(["-a", &v]).spawn() + } else if cfg!(target_os = "windows") && v.starts_with("shell:") { + let mut cmd = std::process::Command::new("cmd.exe"); + #[cfg(target_os = "windows")] + { use std::os::windows::process::CommandExt; cmd.creation_flags(0x08000000); } // CREATE_NO_WINDOW + cmd.args(["/c", "start", "", &v]).spawn() } else { - let _ = std::process::Command::new(v).spawn(); + std::process::Command::new(v).spawn() } + }; + if let Err(e) = result { + rfd::MessageDialog::new().set_description(format!("Unable to start Gyroflow: {e:?}")).show(); } } }