Skip to content

Commit

Permalink
Now using Cargo Workspaces
Browse files Browse the repository at this point in the history
  • Loading branch information
OSA413 committed Sep 1, 2024
1 parent 052f2fe commit d80f041
Show file tree
Hide file tree
Showing 12 changed files with 44 additions and 31 deletions.
7 changes: 6 additions & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

33 changes: 6 additions & 27 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,27 +1,6 @@
[package]
name = "Sonic4-ModLoader"
description = "A mod loader for Sonic 4 Episode 1 & 2"
version = "1.0.0"
edition = "2021"
authors = ["Oleg \"OSA413\" Sokolov"]
repository = "https://github.com/OSA413/Sonic4_ModLoader"
homepage = "https://github.com/OSA413/Sonic4_ModLoader"
license = "MIT"

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

[dependencies]
adw = { version = "0.7", package = "libadwaita", features = ["v1_5"] }
gtk = { version = "0.9", package = "gtk4", features = ["v4_12"] }

[build-dependencies]
glib-build-tools = "0.20"
winresource = "0.1.17"

[lib]
name="common"
path="src/common/lib.rs"

[[bin]]
name="ManagerLauncher"
path="src/ManagerLauncher/main.rs"
[workspace]
members = [
"rust/common",
"rust/ManagerLauncher"
]
resolver = "2"
20 changes: 20 additions & 0 deletions rust/ManagerLauncher/Cargo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
[package]
name = "ManagerLauncher"
description = "Launches the Manager into Space"
version = "1.0.0"
edition = "2021"
authors = ["Oleg \"OSA413\" Sokolov"]
repository = "https://github.com/OSA413/Sonic4_ModLoader"
homepage = "https://github.com/OSA413/Sonic4_ModLoader"
license = "MIT"

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

[dependencies]
adw = { version = "0.7", package = "libadwaita", features = ["v1_5"] }
gtk = { version = "0.9", package = "gtk4", features = ["v4_12"] }
common = { path = "../common" }

[build-dependencies]
glib-build-tools = "0.20"
winresource = "0.1.17"
6 changes: 3 additions & 3 deletions build.rs → rust/ManagerLauncher/build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,15 @@ use winresource::WindowsResource;

fn main() {
glib_build_tools::compile_resources(
&["src/ManagerLauncher/resources"],
"src/ManagerLauncher/resources/resources.gresource.xml",
&["src/resources"],
"src/resources/resources.gresource.xml",
"ManagerLauncher.gresource",
);

// TODO: make sure to include the icon only to specified bins
if env::var_os("CARGO_CFG_WINDOWS").is_some() {
WindowsResource::new()
.set_icon("icon.ico")
.set_icon("../../icon.ico")
.compile()
.unwrap();
}
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
9 changes: 9 additions & 0 deletions rust/common/Cargo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
[package]
name = "common"
description = "A mod loader for Sonic 4 Episode 1 & 2"
version = "1.0.0"
edition = "2021"
authors = ["Oleg \"OSA413\" Sokolov"]
repository = "https://github.com/OSA413/Sonic4_ModLoader"
homepage = "https://github.com/OSA413/Sonic4_ModLoader"
license = "MIT"
File renamed without changes.
File renamed without changes.

0 comments on commit d80f041

Please sign in to comment.