From c065a902bd0489d279cf2cf49165d418843b88a1 Mon Sep 17 00:00:00 2001 From: gobbo_a Date: Mon, 16 Mar 2026 10:12:20 +0100 Subject: [PATCH] Fix command-line Options in correlation (package-type projects) --- build.gradle | 9 ++++++++- correlation/build.gradle | 4 +++- correlation/scripts/app_editor | 2 ++ correlation/scripts/app_startup | 2 ++ 4 files changed, 15 insertions(+), 2 deletions(-) diff --git a/build.gradle b/build.gradle index 6a19b4c..1898657 100644 --- a/build.gradle +++ b/build.gradle @@ -6,7 +6,7 @@ plugins { import org.redline_rpm.header.Flags allprojects { - version = '2.1.0' + version = '2.1.1' group = 'ch.psi' ext.release = '1' ext.jar_suffix = 'fat' @@ -173,6 +173,13 @@ subprojects { //createDirectoryEntry = true //dirMode dir_mode } + if (ex_options){ + from ('build/libs') { + include jar_file_name + into 'lib' + fileMode file_mode + } + } } from('scripts') { diff --git a/correlation/build.gradle b/correlation/build.gradle index 7794ec3..b62c1e0 100644 --- a/correlation/build.gradle +++ b/correlation/build.gradle @@ -3,6 +3,7 @@ ext.plugin = 'Correlation' ext.mainClass = hasProperty('mainClass') ? mainClass : 'ch.psi.pshell.workbench.App' ext.title = 'Correlation' ext.desc = 'Correlation' +ext.ex_options = 'CorrelationOptions' ext.readonly = true ext.deploy_type= 'pkg' @@ -10,7 +11,8 @@ dependencies { implementation 'ch.psi:pshell-workbench:' + version } -//Jar contains only command line options, the panel is compiled dinamically +//Jar contains only command line options, the panel is compiled dinamically. +//Add to jar just the command-line options. tasks.jar { include 'CorrelationOptions.class' } diff --git a/correlation/scripts/app_editor b/correlation/scripts/app_editor index c24cb4f..4f4c622 100644 --- a/correlation/scripts/app_editor +++ b/correlation/scripts/app_editor @@ -1,4 +1,6 @@ #!/bin/sh +export PSHELL_EX_OPTIONS=${ex_options} +export PSHELL_CLASS_PATH=${jar_file} # Run the workbench configured with the package paths, loading the plugin. exec pshell-workbench -b -l -g \$${app_args_var} \ diff --git a/correlation/scripts/app_startup b/correlation/scripts/app_startup index 3ae5d0a..297a9d1 100644 --- a/correlation/scripts/app_startup +++ b/correlation/scripts/app_startup @@ -1,4 +1,6 @@ #!/bin/sh +export PSHELL_EX_OPTIONS=${ex_options} +export PSHELL_CLASS_PATH=${jar_file} # Run the package with application specific arguments, and all command-line passed arguments exec pshell-workbench -b -d -l -k -g -q -statusbar -size=1000x700 -console_log=SEVERE -m ${pkg_folder} \$${app_args_var} "\$@"