diff --git a/build-aux/cargo.py b/build-aux/cargo.py index 4ead864..9983cf9 100755 --- a/build-aux/cargo.py +++ b/build-aux/cargo.py @@ -7,26 +7,39 @@ import shutil env = os.environ -MESON_BUILD_ROOT=sys.argv[1] -MESON_SOURCE_ROOT=sys.argv[2] -CARGO_TARGET_DIR = os.path.join (MESON_BUILD_ROOT, "target") +MESON_BUILD_ROOT = sys.argv[1] +MESON_SOURCE_ROOT = sys.argv[2] +CARGO_TARGET_DIR = os.path.join(MESON_BUILD_ROOT, "target") env["CARGO_TARGET_DIR"] = CARGO_TARGET_DIR -env["CARGO_HOME"] = os.path.join (CARGO_TARGET_DIR, "cargo-home") -OUTPUT=sys.argv[3] -BUILDTYPE=sys.argv[4] -APP_BIN=sys.argv[5] -env["PKG_CONFIG_PATH"] = os.path.join(MESON_BUILD_ROOT, "meson-uninstalled") + os.pathsep + env.get("PKG_CONFIG_PATH",'') +env["CARGO_HOME"] = os.path.join(CARGO_TARGET_DIR, "cargo-home") +OUTPUT = sys.argv[3] +BUILDTYPE = sys.argv[4] +APP_BIN = sys.argv[5] +env["PKG_CONFIG_PATH"] = ( + os.path.join(MESON_BUILD_ROOT, "meson-uninstalled") + + os.pathsep + + env.get("PKG_CONFIG_PATH", "") +) -if BUILDTYPE == "release": +if BUILDTYPE == "release": print("RELEASE MODE") - CMD = ['cargo', 'build', '--manifest-path', os.path.join(MESON_SOURCE_ROOT, 'Cargo.toml'), '--release'] + CMD = [ + "cargo", + "build", + "--manifest-path", + os.path.join(MESON_SOURCE_ROOT, "Cargo.toml"), + "--release", + ] subprocess.run(CMD, env=env) shutil.copy2(os.path.join(CARGO_TARGET_DIR, "release", APP_BIN), OUTPUT) else: print("DEBUG MODE") - CMD = ['cargo', 'build', '--manifest-path', os.path.join(MESON_SOURCE_ROOT, 'Cargo.toml')] + CMD = [ + "cargo", + "build", + "--manifest-path", + os.path.join(MESON_SOURCE_ROOT, "Cargo.toml"), + ] subprocess.run(CMD, env=env) shutil.copy2(os.path.join(CARGO_TARGET_DIR, "debug", APP_BIN), OUTPUT) - - diff --git a/build-aux/meson/postinstall.py b/build-aux/meson/postinstall.py index 6a3ea97..8df8881 100644 --- a/build-aux/meson/postinstall.py +++ b/build-aux/meson/postinstall.py @@ -3,19 +3,17 @@ from os import environ, path from subprocess import call -prefix = environ.get('MESON_INSTALL_PREFIX', '/usr/local') -datadir = path.join(prefix, 'share') -destdir = environ.get('DESTDIR', '') +prefix = environ.get("MESON_INSTALL_PREFIX", "/usr/local") +datadir = path.join(prefix, "share") +destdir = environ.get("DESTDIR", "") # Package managers set this so we don't need to run if not destdir: - print('Updating icon cache...') - call(['gtk-update-icon-cache', '-qtf', path.join(datadir, 'icons', 'hicolor')]) - - print('Updating desktop database...') - call(['update-desktop-database', '-q', path.join(datadir, 'applications')]) - - print('Compiling GSettings schemas...') - call(['glib-compile-schemas', path.join(datadir, 'glib-2.0', 'schemas')]) + print("Updating icon cache...") + call(["gtk-update-icon-cache", "-qtf", path.join(datadir, "icons", "hicolor")]) + print("Updating desktop database...") + call(["update-desktop-database", "-q", path.join(datadir, "applications")]) + print("Compiling GSettings schemas...") + call(["glib-compile-schemas", path.join(datadir, "glib-2.0", "schemas")]) diff --git a/data/css/style.css b/data/css/style.css index 962ac3b..b755edc 100644 --- a/data/css/style.css +++ b/data/css/style.css @@ -3,7 +3,7 @@ GstPipelineStudio Website ==================== - shamelessy stolen CSS from Pipewire + shamelessly stolen CSS from Pipewire */ diff --git a/installer/macos/deploy_macos.sh b/installer/macos/deploy_macos.sh index bfc11b9..cd7e59e 100755 --- a/installer/macos/deploy_macos.sh +++ b/installer/macos/deploy_macos.sh @@ -9,7 +9,7 @@ test_ok() { } -# depenency library: +# dependency library: # Make a .app file: https://gist.github.com/oubiwann/453744744da1141ccc542ff75b47e0cf # Make a .dmg file: https://github.com/LinusU/node-appdmg # Can't find library: https://www.jianshu.com/p/441a7553700f @@ -65,7 +65,7 @@ function lib_dependency_copy if [[ '@loader_path' == ${lib:0:12} ]]; then cp -n "${lib/@loader_path/$lib_dir}" $folder else - echo "Unsupport path: $lib" + echo "Unsupported path: $lib" fi else if [[ $lib != $target ]]; then diff --git a/installer/macos/mac_app_path.sh b/installer/macos/mac_app_path.sh index 64405a9..b7a1da3 100755 --- a/installer/macos/mac_app_path.sh +++ b/installer/macos/mac_app_path.sh @@ -31,7 +31,7 @@ function lib_change_path # This is a simple wrapper around install_name_tool to reduce the # number of arguments (like $source does not have to be provided # here as it can be deducted from $target). - # Also, the requested change can be applied to multipe binaries + # Also, the requested change can be applied to multiple binaries # at once since 2-n arguments can be supplied. local target=$1 # new path to dynamically linked library @@ -99,7 +99,7 @@ function lib_change_siblings lib_change_path $target/$(basename $linked_lib) $lib fi done - done + done fi } diff --git a/installer/wix/LICENSE.rtf b/installer/wix/LICENSE.rtf index 54ab83d..65bcc7c 100644 --- a/installer/wix/LICENSE.rtf +++ b/installer/wix/LICENSE.rtf @@ -78,7 +78,7 @@ This is a tricky question. We believe software patents should not exist, so that \par \pard\plain \s0\nowidctlpar{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\cf0\kerning1\hich\af7\langfe2052\dbch\af8\afs24\alang1081\loch\f3\fs24\lang1031\sl276\slmult1\sb0\sa200{\b0\rtlch \ltrch\loch\fs24\lang255\loch\f6 Software patents are widely available in the USA. Despite they are formally prohibited in the European Union, they indeed are granted by the thousand by the European Patent Office, and also some national patent offices follow the same path. In other countries they are not available.} \par \pard\plain \s0\nowidctlpar{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\cf0\kerning1\hich\af7\langfe2052\dbch\af8\afs24\alang1081\loch\f3\fs24\lang1031\sl276\slmult1\sb0\sa200{\b0\rtlch \ltrch\loch\fs24\lang255\loch\f6 -Since patent protection is a national state-granted monopoly, distributing software that violates patents in a given country could be entirely safe if done in another country. Fair use exceptions also exist. So we cannot advice you whether the software we provide would be considered violating patents in your country or in any other country, but that can be said for virtually all kinds of sofware. Only, since we deal with audio-video standards, and these standards are by and large designed to use certain patented technologies, it is common wisdom that the pieces of software that implement these standards are sensitive in this respect.} +Since patent protection is a national state-granted monopoly, distributing software that violates patents in a given country could be entirely safe if done in another country. Fair use exceptions also exist. So we cannot advice you whether the software we provide would be considered violating patents in your country or in any other country, but that can be said for virtually all kinds of software. Only, since we deal with audio-video standards, and these standards are by and large designed to use certain patented technologies, it is common wisdom that the pieces of software that implement these standards are sensitive in this respect.} \par \pard\plain \s0\nowidctlpar{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\cf0\kerning1\hich\af7\langfe2052\dbch\af8\afs24\alang1081\loch\f3\fs24\lang1031\sl276\slmult1\sb0\sa200{\b0\rtlch \ltrch\loch\fs24\lang255\loch\f6 This is why GStreamer has taken a modular approach, so that you can use a Free plugins or a proprietary, patent royalty bearing, plugin for a given standard.} \par \pard\plain \s0\nowidctlpar{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\cf0\kerning1\hich\af7\langfe2052\dbch\af8\afs24\alang1081\loch\f3\fs24\lang1031\sl276\slmult1\sb0\sa200{\b\rtlch \ltrch\loch\fs36\lang255\loch\f6 diff --git a/src/gps/element.rs b/src/gps/element.rs index 1018b48..f335ca4 100644 --- a/src/gps/element.rs +++ b/src/gps/element.rs @@ -276,7 +276,7 @@ impl ElementInfo { None } - pub fn search_fo_element(bin: &gst::Bin, element_name: &str) -> Vec { + pub fn search_for_element(bin: &gst::Bin, element_name: &str) -> Vec { let mut iter = bin.iterate_elements(); let mut elements: Vec = Vec::new(); elements = loop { @@ -284,7 +284,7 @@ impl ElementInfo { Ok(Some(element)) => { if element.is::() { let bin = element.dynamic_cast::().unwrap(); - let mut bin_elements = ElementInfo::search_fo_element(&bin, element_name); + let mut bin_elements = ElementInfo::search_for_element(&bin, element_name); elements.append(&mut bin_elements); } else { GPS_INFO!("Found factory: {}", element.factory().unwrap().name()); diff --git a/src/gps/player.rs b/src/gps/player.rs index 0973c4b..c728f9d 100644 --- a/src/gps/player.rs +++ b/src/gps/player.rs @@ -173,7 +173,7 @@ impl Player { pub fn check_for_gtk4sink(&self, pipeline: &gst::Pipeline) { let bin = pipeline.clone().dynamic_cast::().unwrap(); - let gtksinks = ElementInfo::search_fo_element(&bin, "gtk4paintablesink"); + let gtksinks = ElementInfo::search_for_element(&bin, "gtk4paintablesink"); for (first_sink, gtksink) in gtksinks.into_iter().enumerate() { let paintable = gtksink.property::("paintable"); @@ -345,7 +345,7 @@ impl Player { .unwrap() .dynamic_cast::() .unwrap(); - let elements_name: Vec = ElementInfo::search_fo_element(&bin, "") + let elements_name: Vec = ElementInfo::search_for_element(&bin, "") .iter() .map(|e| e.factory().unwrap().name().to_string()) .collect(); diff --git a/src/logger.rs b/src/logger.rs index bcdc2f7..fc95cf6 100644 --- a/src/logger.rs +++ b/src/logger.rs @@ -95,7 +95,7 @@ macro_rules! GPS_DEBUG ( macro_rules! GPS_MSG_LOG ( () => ($crate::print!("\n")); ($($arg:tt)*) => ({ - logger::pring_msg_logger(logger::LogType::Message, format_args!($($arg)*).to_string()); + logger::print_msg_logger(logger::LogType::Message, format_args!($($arg)*).to_string()); }) ); @@ -103,7 +103,7 @@ macro_rules! GPS_MSG_LOG ( macro_rules! GPS_GST_LOG ( () => ($crate::print!("\n")); ($($arg:tt)*) => ({ - logger::pring_msg_logger(logger::LogType::Gst, format_args!($($arg)*).to_string()); + logger::print_msg_logger(logger::LogType::Gst, format_args!($($arg)*).to_string()); }) ); @@ -226,7 +226,7 @@ pub fn init_msg_logger(sender: Sender<(LogType, String)>) { } } -pub fn pring_msg_logger(log_type: LogType, msg: String) { +pub fn print_msg_logger(log_type: LogType, msg: String) { let msg_logger = MSG_LOGGER.lock().unwrap(); if let Some(logger) = msg_logger.as_ref() { logger.print_log(log_type, msg);