#!/bin/bash ######################################################################### # (c) 2015 Copyright, Real-Time Innovations. All rights reserved. # # No duplications, whole or partial, manual or electronic, may be made # # without express written permission. Any such copies, or # # revisions thereof, must display this notice unaltered. # # This code contains trade secrets of Real-Time Innovations, Inc. # ######################################################################### filename=$0 script_dir_location=`cd "\`dirname "$filename"\`"; pwd` app_name=launcher needs_platform_name=false # Checking if RTI_LICENSE_FILE has a valid value or not if [ "x$RTI_LICENSE_FILE" = "x" ]; then empty_env_variable=true fi # On the Mac, the script dir is located farther down in the # directory strucure if [ -x "$script_dir_location/../MacOS" ] then script_dir=$script_dir_location/../../../bin else script_dir=$script_dir_location fi # Call the common script to set up variables rticommon_script_dir="$script_dir/../resource/scripts" rticommon_script_name=rticommon.sh if [ -f "$script_dir/../../ndds.4.1/resource/scripts" ] then rticommon_script_dir="$script_dir/../../ndds.4.1/resource/scripts" fi . "$rticommon_script_dir/$rticommon_script_name" # If RTI_LICENSE_FILE didn't have a value before calling the common script we # need to remove its value if [ "$empty_env_variable" = true ]; then RTI_LICENSE_FILE= fi # Elements that need to be added to the classpath rti_launcher_jar=$app_lib_java_dir/rtilauncher.jar rti_launcher_extra=$app_lib_java_dir/rtiusagemetrics-api.jar:$app_lib_java_dir/gson-2.9.1.jar:$app_support_dir/$app_name/java/* main_class=com.rti.tools.launcher.main.LauncherApp commons_exec_jar=$app_lib_java_dir/commons-exec-1.3.jar commons_io_jar=$app_lib_java_dir/commons-io-2.17.0.jar commons_lang3_jar=$app_lib_java_dir/commons-lang3-3.13.0.jar eclipse_commands_jar=$app_lib_java_dir/org.eclipse.core.commands-3.12.400.jar eclipse_equinox_jar=$app_lib_java_dir/org.eclipse.equinox.common-3.20.100.jar eclipse_jface_jar=$app_lib_java_dir/org.eclipse.jface-3.37.0.jar eclipse_osgi_jar=$app_lib_java_dir/org.eclipse.osgi-3.23.100.jar eclipse_ui_jar=$app_lib_java_dir/org.eclipse.ui.forms-3.13.500.jar eclipse_core_runtime_jar=$app_lib_java_dir/org.eclipse.core.runtime-3.33.100.jar java_classpath=$commons_exec_jar:$commons_io_jar:$commons_lang3_jar:$eclipse_commands_jar:$eclipse_equinox_jar:$eclipse_jface_jar:$eclipse_osgi_jar:$eclipse_ui_jar:$eclipse_core_runtime_jar # Validate the JRE version to use when running Launcher . "$script_dir/../resource/app/app_support/scripts/validate_jre_version.sh" java_classpath=$app_lib_java_dir/swt-linux64-4.35.RTI_THIRDPARTY-318.jar:$java_classpath # If the architecture is Darwin we have to run with the XstartOnFirstThread option if [ "$os" = "Darwin" ]; then if [ "$#" -ne 1 ]; then "$JREHOME/bin/java" -Dosgi.os=macosx -XstartOnFirstThread \ $connext_version_system_property $connext_platform_system_property $connext_workspace_system_property \ -cp "$rti_launcher_jar:$java_classpath:$rti_launcher_extra" $main_class else "$JREHOME/bin/java" -Dosgi.os=macosx -DrtipkgFile="$1" -XstartOnFirstThread \ $connext_version_system_property $connext_platform_system_property $connext_workspace_system_property \ -cp "$rti_launcher_jar:$java_classpath:$rti_launcher_extra" $main_class fi else # EDDY-238: there is a bug in SWT 4.4 when integrating with GTK3. It's # affecting our views (no icons). Turning off the integration with GTK3 # until we know that's stable again (the bug says fixed in 4.4 M7) SWT_GTK3=0; export SWT_GTK3 if [ "$#" -ne 1 ]; then "$JREHOME/bin/java" -Dosgi.os=linux \ $connext_version_system_property $connext_platform_system_property $connext_workspace_system_property \ -cp "$rti_launcher_jar:$java_classpath:$rti_launcher_extra" \ $main_class else "$JREHOME/bin/java" -Dosgi.os=linux -DrtipkgFile="$1" \ $connext_version_system_property $connext_platform_system_property $connext_workspace_system_property \ -cp "$rti_launcher_jar:$java_classpath:$rti_launcher_extra" \ $main_class fi fi