Skip to content

Commit

Permalink
improve debugger run scripts
Browse files Browse the repository at this point in the history
Mostly unify with the ones in the release, including adding trace capabilities
and stronger warnings, and fix running on Mac. Explain the differences with the
released scripts.
  • Loading branch information
garfieldnate committed Aug 14, 2024
1 parent f3b672e commit 80c804c
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 10 deletions.
8 changes: 4 additions & 4 deletions scripts/SoarJavaDebugger.bat
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
@echo off
set SOAR_HOME=%~dp0
set PATH=%SOAR_HOME%;%PATH%
start javaw -Djava.library.path=%SOAR_HOME% -jar SoarJavaDebugger.jar %1 %2 %3 %4 %5
@echo off
set SOAR_HOME=%~dp0
set PATH=%SOAR_HOME%;%PATH%
start javaw -Djava.library.path="%SOAR_HOME%" -jar "%SOAR_HOME%"\SoarJavaDebugger.jar %1 %2 %3 %4 %5
24 changes: 20 additions & 4 deletions scripts/SoarJavaDebugger.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,20 @@
#!/bin/bash
export SOAR_HOME="$(pwd)"
export LD_LIBRARY_PATH="$SOAR_HOME"
java -Djava.library.path="$SOAR_HOME" -jar "$SOAR_HOME/SoarJavaDebugger.jar" $1 $2 $3 $4 $5 &
#!/usr/bin/env bash

set -o errexit
set -o nounset
set -o pipefail
if [[ "${TRACE-0}" == "1" ]]; then
set -o xtrace
fi

THISDIR=$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )
export SOAR_HOME="$THISDIR"
export DYLD_LIBRARY_PATH="$SOAR_HOME"

FLAG=""
# SWT requirement: display must be created on main thread due to Cocoa restrictions
if [[ $(uname) == 'Darwin' ]]; then
FLAG="-XstartOnFirstThread"
fi

java $FLAG -Djava.library.path="$SOAR_HOME" -jar "$SOAR_HOME/SoarJavaDebugger.jar" "$@" &
4 changes: 2 additions & 2 deletions scripts/readme.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
Note that the scripts here are not the same ones that are distributed with the Soar release; those are in Release-Support/scripts.
# Scripts

TODO: it would be nice to use the same scripts for both. There's some logic that's different, though, so we can't just copy them over.
Note that the scripts here are not the same ones that are distributed with the Soar release; those are in Release-Support/scripts. They are almost the same; the release ones add `/bin` to SOAR_HOME and run the soar setup script.

0 comments on commit 80c804c

Please sign in to comment.