Skip to content

Commit

Permalink
🔧 Fix: Fixed fetch.ps1 so that you can run it on any platform
Browse files Browse the repository at this point in the history
  • Loading branch information
Dynesshely committed Sep 29, 2023
1 parent 4d5577c commit a213899
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 6 deletions.
5 changes: 4 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
## Ignore Visual Studio temporary files, build results, and
## Ignoe IDEA
.idea/

## Ignore Visual Studio temporary files, build results, and
## files generated by popular Visual Studio add-ons.
##
## Get latest from https://github.com/github/gitignore/blob/master/VisualStudio.gitignore
Expand Down
6 changes: 5 additions & 1 deletion KitX_Installer_Egui/assets/7z/fetch.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,11 @@ foreach ($link in $links) {
}

foreach ($target in $targets) {
& .\7zr.exe e $target
if ($IsWindows) {
& .\7zr.exe e $target
} else {
7za e $target
}
if ($target.EndsWith(".tar.xz")) {
$target_2 = $target.Substring(0, $target.LastIndexOf('.'))
$exe = ""
Expand Down
10 changes: 6 additions & 4 deletions KitX_Installer_Egui/src/platforms/windows/reg_helper.rs
Original file line number Diff line number Diff line change
Expand Up @@ -181,9 +181,11 @@ pub fn update_program_registry(
}

#[cfg(not(windows))]
pub fn update_program_registry() -> Result<(), Box<dyn Error>> {
Err(())
}
pub fn update_program_registry(
exe_path: String,
dll_path: String,
dir_path: String,
) -> Result<(), Box<dyn Error>> { Ok(()) }

#[cfg(windows)]
pub fn delete_program_registry() -> Result<String, Box<dyn Error>> {
Expand Down Expand Up @@ -237,7 +239,7 @@ pub fn delete_program_registry() -> Result<String, Box<dyn Error>> {

#[cfg(not(windows))]
pub fn delete_program_registry() -> Result<(), Box<dyn Error>> {
Err(())
Ok(())
}

#[cfg(windows)]
Expand Down

0 comments on commit a213899

Please sign in to comment.