mirror of
https://github.com/ayabusa/Rusty-slicer.git
synced 2024-12-26 00:15:56 +00:00
added windows support and maybe mac (to test)
This commit is contained in:
parent
590059f8b1
commit
af261e0880
@ -21,4 +21,4 @@ The rust slicer is a rust app powered by the tauri framework. It is currently re
|
||||
- [x] Use the file format choosen
|
||||
- [ ] Dummy proof
|
||||
- [ ] little website
|
||||
- [ ] Port to Windows
|
||||
- [x] Port to Windows
|
BIN
src-tauri/resources/ffmpeg-macos
Executable file
BIN
src-tauri/resources/ffmpeg-macos
Executable file
Binary file not shown.
BIN
src-tauri/resources/ffmpeg-windows.exe
Normal file
BIN
src-tauri/resources/ffmpeg-windows.exe
Normal file
Binary file not shown.
@ -157,9 +157,21 @@ fn choose_folder() -> String{
|
||||
}
|
||||
|
||||
fn launch_ffmpeg(app: tauri::AppHandle, args: Vec<String>) {
|
||||
let bin_name = if cfg!(target_os = "macos") {
|
||||
PathBuf::from("ffmpeg-macos")
|
||||
} else if cfg!(windows) {
|
||||
PathBuf::from("ffmpeg-windows.exe")
|
||||
} else if cfg!(unix) {
|
||||
PathBuf::from("ffmpeg-linux")
|
||||
} else {
|
||||
panic!("[RUSTY SLICER] can't find what os it is !")
|
||||
};
|
||||
let mut bin_path = PathBuf::from("resources");
|
||||
bin_path.push(bin_name);
|
||||
|
||||
// get the path from the bundled binary
|
||||
let resource_path = app.path_resolver()
|
||||
.resolve_resource("resources/ffmpeg-linux")
|
||||
.resolve_resource(bin_path)
|
||||
.expect("failed to resolve resource");
|
||||
|
||||
println!("using ffmpeg binary : {}\nwith the following argument : {:?}", resource_path.display(), args);
|
||||
|
19
src-tauri/tauri.linux.conf.json
Normal file
19
src-tauri/tauri.linux.conf.json
Normal file
@ -0,0 +1,19 @@
|
||||
{
|
||||
"tauri": {
|
||||
"bundle": {
|
||||
"active": true,
|
||||
"targets": "all",
|
||||
"identifier": "dev.ayabusa.slicer",
|
||||
"icon": [
|
||||
"icons/32x32.png",
|
||||
"icons/128x128.png",
|
||||
"icons/128x128@2x.png",
|
||||
"icons/icon.icns",
|
||||
"icons/icon.ico"
|
||||
],
|
||||
"resources": [
|
||||
"resources/ffmpeg-linux"
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
19
src-tauri/tauri.macos.conf.json
Normal file
19
src-tauri/tauri.macos.conf.json
Normal file
@ -0,0 +1,19 @@
|
||||
{
|
||||
"tauri": {
|
||||
"bundle": {
|
||||
"active": true,
|
||||
"targets": "all",
|
||||
"identifier": "dev.ayabusa.slicer",
|
||||
"icon": [
|
||||
"icons/32x32.png",
|
||||
"icons/128x128.png",
|
||||
"icons/128x128@2x.png",
|
||||
"icons/icon.icns",
|
||||
"icons/icon.ico"
|
||||
],
|
||||
"resources": [
|
||||
"resources/ffmpeg-macos"
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
19
src-tauri/tauri.windows.conf.json
Normal file
19
src-tauri/tauri.windows.conf.json
Normal file
@ -0,0 +1,19 @@
|
||||
{
|
||||
"tauri": {
|
||||
"bundle": {
|
||||
"active": true,
|
||||
"targets": "all",
|
||||
"identifier": "dev.ayabusa.slicer",
|
||||
"icon": [
|
||||
"icons/32x32.png",
|
||||
"icons/128x128.png",
|
||||
"icons/128x128@2x.png",
|
||||
"icons/icon.icns",
|
||||
"icons/icon.ico"
|
||||
],
|
||||
"resources": [
|
||||
"resources/ffmpeg-windows.exe"
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user