Skip to content

Commit

Permalink
Merge branch 'tmp'
Browse files Browse the repository at this point in the history
  • Loading branch information
m-hilgendorf committed Apr 26, 2020
2 parents 4394877 + 4f82664 commit 670f5d5
Show file tree
Hide file tree
Showing 12 changed files with 506 additions and 334 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,4 @@ Cargo.lock
.idea
.vscode
*.iml
validator
12 changes: 11 additions & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,15 @@ edition = "2018"
vst3-com = { path = "./com" }
bitflags = "1.2.0"

[dev-dependencies]
log = "0.4"
simple_logger = "1.6.0"
lazy_static = "1.4.0"
widestring = "0.4.0"

[workspace]
members = ["examples/passthru", "examples/again", "com", "com/macros", "com/macros/support"]
members = ["examples/again", "com", "com/macros", "com/macros/support"]

[[example]]
name = "passthru"
crate-type = ["cdylib"]
12 changes: 0 additions & 12 deletions LICENSE.txt

This file was deleted.

31 changes: 22 additions & 9 deletions Makefile.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,34 +2,47 @@
workspace = false
script = []

[tasks.passthru.mac]
script = [
"cargo build --example passthru",
"./osx-bundler.sh passthru target/debug/examples/libpassthru.dylib"
]

[tasks.passthru.linux]
workspace = false
script = [
"cargo build --package passthru",
"mkdir -p target/debug/plugin.vst3/Contents/x86_64-linux",
"mkdir -p target/debug/plugin.vst3/Contents/Resources",
"cp target/debug/libpassthru.so target/debug/plugin.vst3/Contents/x86_64-linux/plugin.so"
"cargo build --example passthru",
"mkdir -p target/debug/passthru.vst3/Contents/x86_64-linux",
"mkdir -p target/debug/passthru.vst3/Contents/Resources",
"cp target/debug/examples/libpassthru.so target/debug/passthru.vst3/Contents/x86_64-linux/passthru.so"
]

[tasks.passthru.windows]
workspace = false
script_runner = "@shell"
script = [
"cargo build --package passthru",
"cp target/debug/passthru.dll target/debug/passthru.vst3"
"cargo build --example passthru",
"cp target/debug/examples/passthru.dll target/debug/passthru.vst3"
]

[tasks.again]
workspace = false
script = []

[tasks.again.mac]
workspace = false
script = [
"cargo build --package again",
"./osx-bundler.sh again target/debug/libagain.dylib"
]

[tasks.again.linux]
workspace = false
script = [
"cargo build --package again",
"mkdir -p target/debug/plugin.vst3/Contents/x86_64-linux",
"mkdir -p target/debug/plugin.vst3/Contents/Resources",
"cp target/debug/libagain.so target/debug/plugin.vst3/Contents/x86_64-linux/plugin.so"
"mkdir -p target/debug/again.vst3/Contents/x86_64-linux",
"mkdir -p target/debug/again.vst3/Contents/Resources",
"cp target/debug/libagain.so target/debug/again.vst3/Contents/x86_64-linux/again.so"
]

[tasks.again.windows]
Expand Down
2 changes: 1 addition & 1 deletion com/macros/support/src/co_class/class_factory.rs
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ pub fn generate(struct_item: &ItemStruct) -> HelperTokenStream {
// Bringing trait into scope to access IUnknown methods.
use vst3_com::interfaces::iunknown::IUnknown;

if aggr != std::ptr::null_mut() {
if !aggr.is_null() {
return vst3_com::sys::CLASS_E_NOAGGREGATION;
}

Expand Down
1 change: 1 addition & 0 deletions com/macros/support/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
#![allow(clippy::ptr_arg)]
#![allow(clippy::implicit_hasher)]
extern crate proc_macro;

pub mod aggr_co_class;
Expand Down
13 changes: 13 additions & 0 deletions examples/again/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1006,6 +1006,19 @@ pub extern "system" fn ModuleExit() -> bool {
true
}

#[no_mangle]
#[allow(non_snake_case)]
pub extern "system" fn bundleEntry(_: *mut c_void) -> bool {
true
}

#[no_mangle]
#[allow(non_snake_case)]
pub extern "system" fn bundleExit() -> bool {
info!("Module exited");
true
}

static mut INIT_LOGGER: bool = false;

#[no_mangle]
Expand Down
Loading

0 comments on commit 670f5d5

Please sign in to comment.