Skip to content

Commit

Permalink
MacOS: Try dylib with different paths
Browse files Browse the repository at this point in the history
  • Loading branch information
Refragg committed Sep 9, 2023
1 parent 1d344de commit 4551681
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 109 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/rust.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,23 +27,23 @@ jobs:
include:
- label: macOS aarch64
target: aarch64-apple-darwin
rust_flags: -L ~/Applications/OBS.app/Contents/MacOS -L /Applications/OBS.app/Contents/MacOS -L /Applications/OBS.app/Contents/Frameworks
rust_flags: -L /Applications/OBS.app/Contents/MacOS -L /Applications/OBS.app/Contents/Frameworks -L /Applications/OBS.app/Contents/Frameworks/libobs.framework/Versions/A/libobs -L /Applications/OBS.app/Contents/Frameworks/libobs.framework/
os: macOS-latest
features: auto-splitting
cross: skip
install_target: true

- label: macOS x86_64
target: x86_64-apple-darwin
rust_flags: -L ~/Applications/OBS.app/Contents/MacOS -L /Applications/OBS.app/Contents/MacOS -L /Applications/OBS.app/Contents/Frameworks
rust_flags: -L /Applications/OBS.app/Contents/MacOS -L /Applications/OBS.app/Contents/Frameworks -L /Applications/OBS.app/Contents/Frameworks/libobs.framework/Versions/A/libobs -L /Applications/OBS.app/Contents/Frameworks/libobs.framework/
os: macOS-latest
features: auto-splitting
cross: skip

- label: macOS x86_64-v3
target: x86_64-apple-darwin
target_rename: x86_64_v3-apple-darwin
rust_flags: -C target-cpu=x86-64-v3 -L ~/Applications/OBS.app/Contents/MacOS -L /Applications/OBS.app/Contents/MacOS -L /Applications/OBS.app/Contents/Frameworks
rust_flags: -C target-cpu=x86-64-v3 -L /Applications/OBS.app/Contents/MacOS -L /Applications/OBS.app/Contents/Frameworks -L /Applications/OBS.app/Contents/Frameworks/libobs.framework/Versions/A/libobs -L /Applications/OBS.app/Contents/Frameworks/libobs.framework/
os: macOS-latest
features: auto-splitting
cross: skip
Expand Down
106 changes: 0 additions & 106 deletions src/ffi.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,112 +15,6 @@ use std::{

pub use crate::ffi_types::*;

#[cfg(target_os = "macos")]
#[link(name = "libobs", kind = "framework")]
extern "C" {
pub fn obs_register_source_s(info: *const obs_source_info, size: size_t);
pub fn gs_texture_create(
width: u32,
height: u32,
color_format: gs_color_format,
levels: u32,
data: *mut *const u8,
flags: u32,
) -> *mut gs_texture_t;
pub fn obs_enter_graphics();
pub fn obs_leave_graphics();
pub fn gs_texture_set_image(
tex: *mut gs_texture_t,
data: *const u8,
linesize: u32,
invert: bool,
);
pub fn obs_hotkey_register_source(
source: *mut obs_source_t,
name: *const c_char,
description: *const c_char,
func: obs_hotkey_func,
data: *mut c_void,
) -> obs_hotkey_id;
pub fn obs_properties_create() -> *mut obs_properties_t;
pub fn obs_properties_add_path(
props: *mut obs_properties_t,
name: *const c_char,
description: *const c_char,
type_: obs_path_type,
filter: *const c_char,
default_path: *const c_char,
) -> *mut obs_property_t;
pub fn obs_data_get_string(data: *mut obs_data_t, name: *const c_char) -> *const c_char;
pub fn blog(log_level: c_int, format: *const c_char, ...);
pub fn obs_properties_add_bool(
props: *mut obs_properties_t,
name: *const c_char,
description: *const c_char,
) -> *mut obs_property_t;
pub fn obs_data_get_bool(data: *mut obs_data_t, name: *const c_char) -> bool;
#[cfg(feature = "auto-splitting")]
pub fn obs_properties_add_text(
props: *mut obs_properties_t,
name: *const c_char,
description: *const c_char,
text_type: obs_text_type,
) -> *mut obs_property_t;
pub fn obs_properties_add_int(
props: *mut obs_properties_t,
name: *const c_char,
description: *const c_char,
min: c_int,
max: c_int,
step: c_int,
) -> *mut obs_property_t;
pub fn obs_data_get_int(data: *mut obs_data_t, name: *const c_char) -> c_longlong;
pub fn gs_texture_destroy(tex: *mut gs_texture_t);
pub fn gs_draw_sprite(tex: *mut gs_texture_t, flip: u32, width: u32, height: u32);
pub fn gs_effect_get_param_by_name(
effect: *const gs_effect_t,
name: *const c_char,
) -> *mut gs_eparam_t;
pub fn gs_effect_get_technique(
effect: *const gs_effect_t,
name: *const c_char,
) -> *mut gs_technique_t;
pub fn gs_effect_set_texture(param: *mut gs_eparam_t, val: *mut gs_texture_t);
pub fn gs_technique_begin(technique: *mut gs_technique_t) -> size_t;
pub fn gs_technique_begin_pass(technique: *mut gs_technique_t, pass: size_t) -> bool;
pub fn gs_technique_end(technique: *mut gs_technique_t);
pub fn gs_technique_end_pass(technique: *mut gs_technique_t);
pub fn obs_get_base_effect(effect: obs_base_effect) -> *mut gs_effect_t;
pub fn obs_data_set_default_bool(data: *mut obs_data_t, name: *const c_char, val: bool);
pub fn obs_data_set_default_int(data: *mut obs_data_t, name: *const c_char, val: c_longlong);
pub fn obs_properties_add_button(
props: *mut obs_properties_t,
name: *const c_char,
text: *const c_char,
callback: obs_property_clicked_t,
) -> *mut obs_property_t;
pub fn obs_property_set_modified_callback2(
prop: *mut obs_property_t,
modified2_callback: obs_property_modified2_t,
private: *mut c_void,
);
#[cfg(feature = "auto-splitting")]
pub fn obs_property_set_description(prop: *mut obs_property_t, description: *const c_char);
#[cfg(feature = "auto-splitting")]
pub fn obs_property_set_enabled(prop: *mut obs_property_t, enabled: bool);
#[cfg(feature = "auto-splitting")]
pub fn obs_property_set_visible(prop: *mut obs_property_t, visible: bool);
#[cfg(feature = "auto-splitting")]
pub fn obs_properties_get(
props: *mut obs_properties_t,
prop: *const c_char,
) -> *mut obs_property_t;
pub fn obs_module_get_config_path(
module: *mut obs_module_t,
file: *const c_char,
) -> *const c_char;
}
#[cfg(not(target_os = "macos"))]
#[link(name = "obs", kind = "dylib")]
extern "C" {
pub fn obs_register_source_s(info: *const obs_source_info, size: size_t);
Expand Down

0 comments on commit 4551681

Please sign in to comment.