Skip to content

Commit de6fc4c

Browse files
committed
Improve Windows compatibility
Windows still isn't supported though. The UI is far too laggy.
1 parent 3f9df46 commit de6fc4c

File tree

5 files changed

+47
-3
lines changed

5 files changed

+47
-3
lines changed

Cargo.lock

Lines changed: 22 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,11 @@ exclude = [
1111
description = "Upload your files to anywhere"
1212
license = "GPL-3.0-or-later"
1313

14+
[package.metadata.winres]
15+
ProductName = "Rclone Shuttle"
16+
FileDescription = "File browser for Rclone"
17+
OriginalFilename = "rclone-shuttle.exe"
18+
1419
[package.metadata.generate-rpm]
1520
assets = [
1621
{ source = "target/release/rclone-shuttle", dest = "/usr/bin/rclone-shuttle", mode = "0755" },
@@ -24,6 +29,9 @@ rclone = ">= 1.66"
2429

2530
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
2631

32+
[target.'cfg(windows)'.build-dependencies]
33+
winres = "0.1.12"
34+
2735
[dependencies]
2836
chrono = "0.4.34"
2937
inquire = "0.6.2"

build.rs

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
#[cfg(windows)]
2+
extern crate winres;
3+
4+
#[cfg(windows)]
5+
fn main() {
6+
winres::WindowsResource::new()
7+
.set_icon("meta/io.github.pieterdd.RcloneShuttle.ico")
8+
.compile()
9+
.unwrap();
10+
}
11+
12+
#[cfg(not(windows))]
13+
fn main() {}
28.3 KB
Binary file not shown.

src/main.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
#![cfg_attr(
2+
all(not(debug_assertions), target_os = "windows"),
3+
windows_subsystem = "windows"
4+
)]
15
use crate::client::MkdirError;
26
use crate::components::file_listing_view::FileListingView;
37
use crate::components::remote_view::RemoteView;

0 commit comments

Comments
 (0)