From 3140f52ee8ad4a0e3b553da55a1904582ab4407f Mon Sep 17 00:00:00 2001 From: Alexandre Gobbo Date: Fri, 15 Aug 2025 14:27:11 +0200 Subject: [PATCH] Raname core and workbench to pshell-core and pshell-workbench. --- build.gradle | 10 ++++------ screenpanel-sf/build.gradle | 11 ++++++----- screenpanel-sf/scripts/app_startup | 7 +++++++ screenpanel-sls/build.gradle | 12 ++++++------ 4 files changed, 23 insertions(+), 17 deletions(-) create mode 100644 screenpanel-sf/scripts/app_startup diff --git a/build.gradle b/build.gradle index ac7cef7..4250480 100644 --- a/build.gradle +++ b/build.gradle @@ -9,7 +9,7 @@ allprojects { group = 'ch.psi' ext.release = '1' ext.jar_suffix = 'fat' - + ext.ex_options= '' repositories { mavenLocal() @@ -74,7 +74,7 @@ subprojects { debug = (taskName == 'debug') executable = project.java_exec_jdk jvmArgs = project.run_jvargs - environment 'PSHELL_EX_OPTIONS', project.exOptions + environment 'PSHELL_EX_OPTIONS', project.ex_options } } @@ -84,7 +84,7 @@ subprojects { def app_description = project.ext.desc.toString() def app_release = project.ext.release.toString() def jar_suffix = project.ext.jar_suffix.toString() - def ex_options = project.exOptions + def ex_options = project.ext.ex_options def package_name = project.name def app_path = '/opt/' + package_name + "/" + app_version def jar_file_name = app_name + "-" + app_version + "-" + jar_suffix + ".jar"; @@ -155,9 +155,7 @@ subprojects { } link(sys_bin + bin_file_name, app_path + '/bin/' + bin_file_name) link(sys_bin + app_name, sys_bin + bin_file_name) - } - - + } } } diff --git a/screenpanel-sf/build.gradle b/screenpanel-sf/build.gradle index eac08d5..dbbd104 100644 --- a/screenpanel-sf/build.gradle +++ b/screenpanel-sf/build.gradle @@ -1,11 +1,12 @@ description = 'screenpanel-sf' -ext.mainClass = hasProperty('mainClass') ? mainClass : 'ScreenPanelSF' +ext.mainClass = hasProperty('mainClass') ? mainClass : 'ch.psi.pshell.workbench.App' ext.title = 'ScreenPanel' ext.desc = 'ScreenPanel customization for SwissFEL cameras' +ext.ex_options = 'ch.psi.pshell.screenpanel.Options' dependencies { - implementation 'ch.psi:workbench:' + version + implementation 'ch.psi:pshell-workbench:' + version implementation 'ch.psi:screenpanel:' + version - - createDefaultTasks(project) -} \ No newline at end of file + } + +createDefaultTasks(project) \ No newline at end of file diff --git a/screenpanel-sf/scripts/app_startup b/screenpanel-sf/scripts/app_startup new file mode 100644 index 0000000..0bbdf06 --- /dev/null +++ b/screenpanel-sf/scripts/app_startup @@ -0,0 +1,7 @@ +#!/bin/sh +export PSHELL_EX_OPTIONS=${ex_options} +APP_ARGS_NAME=\$(echo "APP_${app_name}" | tr '[:lower:]' '[:upper:]')_ARGS +APP_ARGS_NAME=\${APP_ARGS_NAME//-/_} + +# Run the JAR with all passed arguments +exec pshell-workbench -b -d -l -k -n -q -console_log=SEVERE -buffer_size=10 -size=1000x800 -p ${java_file} \${!APP_ARGS_NAME} "\$@" diff --git a/screenpanel-sls/build.gradle b/screenpanel-sls/build.gradle index 66f976f..ea9306e 100644 --- a/screenpanel-sls/build.gradle +++ b/screenpanel-sls/build.gradle @@ -1,12 +1,12 @@ description = 'screenpanel-sls' -ext.mainClass = hasProperty('mainClass') ? mainClass : 'ch.psi.pshell.workbench.App' //ScreenPanelSLS' +ext.mainClass = hasProperty('mainClass') ? mainClass : 'ch.psi.pshell.workbench.App' ext.title = 'ScreenPanel' ext.desc = 'ScreenPanel customization for SLS cameras' -ext.exOptions = 'ch.psi.pshell.screenpanel.Options' +ext.ex_options = 'ch.psi.pshell.screenpanel.Options' dependencies { - implementation 'ch.psi:workbench:' + version + implementation 'ch.psi:pshell-workbench:' + version implementation 'ch.psi:screenpanel:' + version - - createDefaultTasks(project) -} \ No newline at end of file + } + +createDefaultTasks(project) \ No newline at end of file