Skip to content

Commit

Permalink
modern project structure
Browse files Browse the repository at this point in the history
  • Loading branch information
barsoosayque committed Oct 19, 2020
1 parent 7c85a4b commit 8cbb89a
Show file tree
Hide file tree
Showing 16 changed files with 58 additions and 406 deletions.
3 changes: 1 addition & 2 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
Cargo.lock
*/target
/target
.vscode/
**/*.rs.bk
*.glade~

1 change: 0 additions & 1 deletion .nvimrc

This file was deleted.

37 changes: 6 additions & 31 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,31 +1,6 @@
[package]
name = "opensi"
version = "0.1.0"
authors = ["barsoosayque <[email protected]>", "snpefk <[email protected]>"]
edition = "2018"

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

[[bin]]
name = "editor"
path = "src/editor/main.rs"

[[bin]]
name = "client"
path = "src/client/main.rs"


[dependencies]
serde = { version = "1.0", features = [ "derive" ] }
quick-xml = { version = "0.17", features = [ "serialize" ] }
zip = "0.5.4"

gtk = "^0.8.0"
relm = "^0.19.0"
relm-derive = "^0.19.0"
gdk = "^0.12.0"
gdk-pixbuf = "^0.8.0"

percent-encoding = "2.1.0"
[workspace]
members = [
"opensi",
"opensi-client",
"opensi-editor"
]
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,8 @@ $ sudo yum install gtk3-devel glib2-devel

```shell
# Клиент
$ cargo run --bin client
$ cargo run --bin opensi-client

# Редактор
$ cargo run --bin editor
$ cargo run --bin opensi-editor
```
10 changes: 10 additions & 0 deletions opensi-client/Cargo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
[package]
name = "opensi-client"
version = "0.1.0"
authors = ["barsoosayque <[email protected]>"]
edition = "2018"

[dependencies]
opensi = { version = "*", path = "../opensi" }

druid = "0.6.0"
12 changes: 12 additions & 0 deletions opensi-client/src/main.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
use druid::{AppLauncher, WindowDesc, Widget, PlatformError};
use druid::widget::Label;

fn build_ui() -> impl Widget<()> {
Label::new("Hello world")
}

fn main() -> Result<(), PlatformError> {
AppLauncher::with_window(WindowDesc::new(build_ui)).launch(())?;
Ok(())
}

15 changes: 15 additions & 0 deletions opensi-editor/Cargo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
[package]
name = "opensi-editor"
version = "0.1.0"
authors = ["snpefk <[email protected]>"]
edition = "2018"

[dependencies]
opensi = { version = "*", path = "../opensi" }

gtk = "^0.8.0"
relm = "^0.19.0"
relm-derive = "^0.19.0"
gdk = "^0.12.0"
gdk-pixbuf = "^0.8.0"
zip = "0.5.4"
File renamed without changes.
5 changes: 1 addition & 4 deletions src/editor/main.rs → opensi-editor/src/main.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
#[path = "../core/lib.rs"]
mod opensi;

use gtk::prelude::*;
use relm::{connect, Relm, Update, Widget};
use relm_derive::Msg;
Expand Down Expand Up @@ -327,4 +324,4 @@ pub enum Chunk {

fn main() {
Win::run(()).expect("Window failed to run");
}
}
11 changes: 11 additions & 0 deletions opensi/Cargo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
[package]
name = "opensi"
version = "0.1.0"
authors = ["barsoosayque <[email protected]>", "snpefk <[email protected]>"]
edition = "2018"

[dependencies]
serde = { version = "1.0", features = [ "derive" ] }
quick-xml = { version = "0.17", features = [ "serialize" ] }
zip = "0.5.4"
percent-encoding = "2.1.0"
File renamed without changes.
42 changes: 0 additions & 42 deletions resource/client.css

This file was deleted.

Binary file removed resource/default-user.png
Binary file not shown.
Binary file removed resource/main-menu.png
Binary file not shown.
225 changes: 0 additions & 225 deletions src/client/main.glade

This file was deleted.

Loading

0 comments on commit 8cbb89a

Please sign in to comment.