From e19a72a20d5cb35d6f3873f308a3a98d7046d762 Mon Sep 17 00:00:00 2001 From: Mason Reed Date: Sat, 25 Jan 2025 15:41:29 -0500 Subject: Fix statically linking PDB import plugin for demo builds --- rust/src/collaboration/remote.rs | 2 +- rust/src/lib.rs | 6 ++++++ 2 files changed, 7 insertions(+), 1 deletion(-) (limited to 'rust/src') diff --git a/rust/src/collaboration/remote.rs b/rust/src/collaboration/remote.rs index baf2ce80..382d1ca2 100644 --- a/rust/src/collaboration/remote.rs +++ b/rust/src/collaboration/remote.rs @@ -910,7 +910,7 @@ pub struct ConnectionOptions { pub password: Option, /// Provide this if you want to authenticate with a token. /// - /// If you do not have a token you can use [ConnectionOptions::self]. + /// If you do not have a token you can use [ConnectionOptions::with_password]. pub token: Option, } diff --git a/rust/src/lib.rs b/rust/src/lib.rs index 08e31c00..159a7ec5 100644 --- a/rust/src/lib.rs +++ b/rust/src/lib.rs @@ -476,12 +476,18 @@ pub fn license_count() -> i32 { /// If not set the normal license retrieval will occur: /// 1. Check the BN_LICENSE environment variable /// 2. Check the Binary Ninja user directory for license.dat +#[cfg(not(feature = "demo"))] pub fn set_license(license: Option) { let license = license.unwrap_or_default().into_bytes_with_nul(); let license_slice = license.as_ref(); unsafe { BNSetLicense(license_slice.as_ptr() as *const c_char) } } +#[cfg(feature = "demo")] +pub fn set_license(_license: Option) { + panic!("Cannot set license in demo mode!"); +} + pub fn product() -> BnString { unsafe { BnString::from_raw(BNGetProduct()) } } -- cgit v1.3.1