Skip to content

Commit

Permalink
refactor: split rnote UI and engine into separate crates
Browse files Browse the repository at this point in the history
  • Loading branch information
flxzt committed Mar 12, 2022
1 parent ff162e4 commit 7d6bc99
Show file tree
Hide file tree
Showing 224 changed files with 2,609 additions and 3,234 deletions.
191 changes: 104 additions & 87 deletions Cargo.lock

Large diffs are not rendered by default.

51 changes: 4 additions & 47 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,51 +1,8 @@
[package]
name = "rnote"
version = "0.3.5"
edition = "2021"

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

[workspace]
members = [
"notetakingfileformats",
]

[dependencies]
notetakingfileformats = {path = "./notetakingfileformats", version="0.1"}

num-derive = "0.3.3"
num-traits = "0.2.14"
flate2 = "1.0"
rand = "0.8.4"
rand_pcg = "0.3.1"
rand_distr = "0.4.3"
log = "0.4.14"
pretty_env_logger = "0.4.0"
anyhow = "1.0"
serde = {version = "1.0", features = ["derive", "rc"]}
serde_json = { version="1.0" }
chrono = {version ="0.4.19", features = ["serde"] }
regex = "1.5"
futures = "0.3.21"
rayon = "1.5"
once_cell = "1.8"
base64 = "0.13.0"
tuple-conv = "1.0"
image = "0.23.14"
slotmap = { version = "1.0", features = ["serde"] }
nalgebra = { version = "0.30.1", features = ["serde-serialize"] }
parry2d-f64 = { version = "0.8.0", features = ["serde-serialize"] }
geo = "0.18.0"
gtk4 = {version = "0.4.6", features = ["v4_4"]}
gstreamer = "0.18.3"
adw = {version = "0.1.0", package="libadwaita"}
cairo-rs = {version = "0.15.1", features = ["png", "svg", "pdf"]}
librsvg = { git="https://gitlab.gnome.org/GNOME/librsvg" }
svg = "0.10.0"
resvg = "0.20"
usvg = "0.20"
tiny-skia = "0.6.3"
xmlwriter = "0.1.0"
roxmltree = "0.14.1"
poppler-rs = "0.19.0"
gettext-rs = { version = "0.7.0", features = ["gettext-system"] }
"rnote-engine",
"rnote-ui",
"rnote-fileformats",
]
2 changes: 1 addition & 1 deletion build-aux/com.github.flxzt.rnote.Devel.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
"--filesystem=xdg-run/gvfs",
"--filesystem=xdg-run/gvfsd",
"--env=RUST_BACKTRACE=full",
"--env=RUST_LOG=rnote=trace",
"--env=RUST_LOG=rnote=debug",
"--env=G_MESSAGES_DEBUG=all",
"--env=GTK_PATH=/app/lib/gtk-4.0",
"--env=GST_DEBUG=3"
Expand Down
38 changes: 30 additions & 8 deletions meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -58,21 +58,43 @@ desktop_file_validate = find_program('desktop-file-validate', required: false)
appstream_util = find_program('appstream-util', required: false)
update_mime_database = find_program('update-mime-database', required: false)

cargo_sources= files(
meson.project_source_root() + '/' + 'Cargo.toml',
)

meson.add_dist_script(
'build-aux/dist-vendor.sh',
meson.project_build_root() / 'meson-dist' / app_name + '-' + version,
meson.project_source_root()
)

# local crates
subdir('notetakingfileformats')
cargo_sources= files(
meson.project_source_root() + '/' + 'Cargo.toml',
meson.project_source_root() + '/' + 'rnote-engine' + '/' + 'Cargo.toml',
meson.project_source_root() + '/' + 'rnote-ui' + '/' + 'Cargo.toml',
meson.project_source_root() + '/' + 'rnote-fileformats' + '/' + 'Cargo.toml',
)

subdir('rnote-engine')
subdir('rnote-ui')
subdir('rnote-fileformats')

subdir('resources')
subdir('src')
subdir('po')
sources = [rnote_fileformats_sources, rnote_ui_sources, cargo_sources]

custom_target(
'cargo-build',
build_by_default: true,
input: sources,
output: app_name,
console: true,
install: true,
install_dir: bindir,
depends: resources,
command: [
cargo_script,
meson.project_build_root(),
meson.project_source_root(),
'@OUTPUT@',
profile,
app_name,
]
)

meson.add_install_script('build-aux/meson_post_install.py')
150 changes: 0 additions & 150 deletions resources/icons/scalable/actions/pen-marker-symbolic.svg

This file was deleted.

44 changes: 0 additions & 44 deletions resources/ui/penssidebar/markerpage.ui

This file was deleted.

42 changes: 42 additions & 0 deletions rnote-engine/Cargo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
[package]
name = "rnote-engine"
version = "0.1.0"
edition = "2021"

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

[dependencies]
rnote-fileformats = {path = "../rnote-fileformats", version="0.1"}

log = "0.4.14"
pretty_env_logger = "0.4.0"
anyhow = "1.0"
serde = {version = "1.0", features = ["derive"]}
serde_json = { version="1.0" }
rand = "0.8.4"
rand_pcg = "0.3.1"
rand_distr = "0.4.3"
regex = "1.5"
rayon = "1.5"
futures = "0.3.21"
chrono = {version ="0.4.19", features = ["serde"] }
slotmap = { version = "1.0", features = ["serde"] }
nalgebra = { version = "0.30.1", features = ["serde-serialize"] }
parry2d-f64 = { version = "0.8.0", features = ["serde-serialize"] }
gtk4 = {version = "0.4.6", features = ["v4_4"]}
cairo-rs = {version = "0.15.1", features = ["png", "svg", "pdf"]}
librsvg = { git="https://gitlab.gnome.org/GNOME/librsvg" }
gstreamer = "0.18.3"
base64 = "0.13.0"
flate2 = "1.0"
image = "0.23.14"
svg = "0.10.0"
geo = "0.18.0"
xmlwriter = "0.1.0"
resvg = "0.20"
usvg = "0.20"
tiny-skia = "0.6.3"
poppler-rs = "0.19.0"

[dev-dependencies]
rayon = "1.5"
11 changes: 11 additions & 0 deletions rnote-engine/data/meson.build
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@

# images
#images_files = files(
# 'images/brush-up-cursor.svg',
# 'images/brush-down-cursor.svg',
#)

#install_data(
# images_files,
# install_dir: pkgdatadir / 'images'
#)
2 changes: 2 additions & 0 deletions rnote-engine/meson.build
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
subdir('src')
subdir('data')
2 changes: 1 addition & 1 deletion src/compose/color.rs → rnote-engine/src/compose/color.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
use notetakingfileformats::xoppformat;
use rnote_fileformats::xoppformat;

use gtk4::gdk;
use serde::{Deserialize, Serialize};
Expand Down
Loading

0 comments on commit 7d6bc99

Please sign in to comment.