From f9a2f2b2c540a410f3b25156b1f009826daedd26 Mon Sep 17 00:00:00 2001 From: Thomas Walker Lynch Date: Sat, 7 Dec 2024 11:49:41 +0000 Subject: [PATCH] adding pencils, shell->bash, RT-incommon sharing --- "developer/tool\360\237\226\211/env" | 12 +- ...tor => "env_administrator\360\237\226\211" | 4 +- env_developer | 11 +- env_tester | 10 +- tester/{shell => bash}/.githolder | 0 tester/{shell => bash}/Test0 | 0 tester/{shell => bash}/Test_IO | 0 tester/{shell => bash}/Test_MockClass_0 | 0 tester/{shell => bash}/Test_Testbench | 0 tester/{shell => bash}/Test_Util | 0 tester/{shell => bash}/test_log.txt | 0 .../Writing a test.txt" | 0 .../build_run_transcript_v1.0.txt" | 0 .../build_run_transcript_v1.1.txt" | 0 .../javac\360\237\226\211/Test0.java" | 0 .../javac\360\237\226\211/Test_IO.java" | 0 .../Test_MockClass_0.java" | 0 .../Test_Testbench.java" | 0 .../javac\360\237\226\211/Test_Util.java" | 0 .../clean_build_directories" | 0 .../env => "tester/tool\360\237\226\211/env" | 12 +- .../tool\360\237\226\211/make" | 0 .../tool\360\237\226\211/run_jdb" | 0 .../tool\360\237\226\211/run_tests" | 0 .../tool\360\237\226\211/shell_wrapper_list" | 0 tool_shared/bespoke/bashrc | 51 ---- tool_shared/bespoke/cat_w_fn | 30 --- tool_shared/bespoke/deprecate | 20 -- tool_shared/bespoke/emacs.el | 52 ---- tool_shared/bespoke/githolder | 63 ----- tool_shared/bespoke/test_env | 24 -- tool_shared/bespoke/vl | 18 -- tool_shared/bespoke/wipe_release | 18 -- .../bespoke\360\237\226\211/env" | 6 +- .../bespoke\360\237\226\211/version" | 0 .../#install_java.txt#" | 11 - .../document\360\237\226\211/install.txt" | 9 +- .../install_Eclipse_hints.txt" | 22 ++ .../install_IntelliJ_IDEA.txt" | 252 ++++++++++++++++++ .../install_emacs.txt" | 25 +- 40 files changed, 323 insertions(+), 327 deletions(-) rename env_administrator => "env_administrator\360\237\226\211" (77%) mode change 100644 => 120000 env_developer mode change 100644 => 120000 env_tester rename tester/{shell => bash}/.githolder (100%) rename tester/{shell => bash}/Test0 (100%) rename tester/{shell => bash}/Test_IO (100%) rename tester/{shell => bash}/Test_MockClass_0 (100%) rename tester/{shell => bash}/Test_Testbench (100%) rename tester/{shell => bash}/Test_Util (100%) rename tester/{shell => bash}/test_log.txt (100%) rename tester/document/Writing a test.txt => "tester/document\360\237\226\211/Writing a test.txt" (100%) rename tester/document/build_run_transcript_v1.0.txt => "tester/document\360\237\226\211/build_run_transcript_v1.0.txt" (100%) rename tester/document/build_run_transcript_v1.1.txt => "tester/document\360\237\226\211/build_run_transcript_v1.1.txt" (100%) rename tester/javac/Test0.java => "tester/javac\360\237\226\211/Test0.java" (100%) rename tester/javac/Test_IO.java => "tester/javac\360\237\226\211/Test_IO.java" (100%) rename tester/javac/Test_MockClass_0.java => "tester/javac\360\237\226\211/Test_MockClass_0.java" (100%) rename tester/javac/Test_Testbench.java => "tester/javac\360\237\226\211/Test_Testbench.java" (100%) rename tester/javac/Test_Util.java => "tester/javac\360\237\226\211/Test_Util.java" (100%) rename tester/tool/clean_build_directories => "tester/tool\360\237\226\211/clean_build_directories" (100%) rename tester/tool/env => "tester/tool\360\237\226\211/env" (80%) rename tester/tool/make => "tester/tool\360\237\226\211/make" (100%) rename tester/tool/run_jdb => "tester/tool\360\237\226\211/run_jdb" (100%) rename tester/tool/run_tests => "tester/tool\360\237\226\211/run_tests" (100%) rename tester/tool/shell_wrapper_list => "tester/tool\360\237\226\211/shell_wrapper_list" (100%) delete mode 100644 tool_shared/bespoke/bashrc delete mode 100755 tool_shared/bespoke/cat_w_fn delete mode 100755 tool_shared/bespoke/deprecate delete mode 100644 tool_shared/bespoke/emacs.el delete mode 100755 tool_shared/bespoke/githolder delete mode 100755 tool_shared/bespoke/test_env delete mode 100755 tool_shared/bespoke/vl delete mode 100755 tool_shared/bespoke/wipe_release rename tool_shared/bespoke/env => "tool_shared/bespoke\360\237\226\211/env" (82%) rename tool_shared/bespoke/version => "tool_shared/bespoke\360\237\226\211/version" (100%) delete mode 100644 "tool_shared/document\360\237\226\211/#install_java.txt#" create mode 100644 "tool_shared/document\360\237\226\211/install_Eclipse_hints.txt" create mode 100644 "tool_shared/document\360\237\226\211/install_IntelliJ_IDEA.txt" diff --git "a/developer/tool\360\237\226\211/env" "b/developer/tool\360\237\226\211/env" index 66446d4..79434ec 100644 --- "a/developer/tool\360\237\226\211/env" +++ "b/developer/tool\360\237\226\211/env" @@ -3,17 +3,19 @@ script_afp=$(realpath "${BASH_SOURCE[0]}") # input guards - env_must_be="tool_shared/bespoke/env" - error=false + env_must_be="tool_shared/bespoke🖉/env" + error_bad_env=false + error_not_sourced=false if [ "$ENV" != "$env_must_be" ]; then echo "$(script_fp):: error: must be run in the $env_must_be environment" - error=true + error_bad_env=true fi if [[ "${BASH_SOURCE[0]}" == "$0" ]]; then echo "$script_afp:: This script must be sourced, not executed." - error=true + error_not_sourced=true fi - if $error; then exit 1; fi + if $error_not_sourced; then exit 1; fi + if $error_bad_env; then return 1; fi # so we can do the build diff --git a/env_administrator "b/env_administrator\360\237\226\211" similarity index 77% rename from env_administrator rename to "env_administrator\360\237\226\211" index bb09700..2f09f8a 100644 --- a/env_administrator +++ "b/env_administrator\360\237\226\211" @@ -5,6 +5,6 @@ if [[ "${BASH_SOURCE[0]}" == "$0" ]]; then exit 1 fi -source tool_shared/bespoke/env -source tool/env +source tool_shared/bespoke🖉/env +source tool🖉/env diff --git a/env_developer b/env_developer deleted file mode 100644 index 6240b20..0000000 --- a/env_developer +++ /dev/null @@ -1,10 +0,0 @@ -#!/usr/bin/env bash -script_afp=$(realpath "${BASH_SOURCE[0]}") -if [[ "${BASH_SOURCE[0]}" == "$0" ]]; then - echo "$script_afp:: This script must be sourced, not executed." - exit 1 -fi - -source tool_shared/bespoke/env -source developer/tool/env - diff --git a/env_developer b/env_developer new file mode 120000 index 0000000..3089081 --- /dev/null +++ b/env_developer @@ -0,0 +1 @@ +tool_shared/third_party/RT-incommon/release/bash/env_developer \ No newline at end of file diff --git a/env_tester b/env_tester deleted file mode 100644 index 44aace3..0000000 --- a/env_tester +++ /dev/null @@ -1,9 +0,0 @@ -#!/usr/bin/env bash -script_afp=$(realpath "${BASH_SOURCE[0]}") -if [[ "${BASH_SOURCE[0]}" == "$0" ]]; then - echo "$script_afp:: This script must be sourced, not executed." - exit 1 -fi - -source tool_shared/bespoke/env -source tester/tool/env diff --git a/env_tester b/env_tester new file mode 120000 index 0000000..81d9f79 --- /dev/null +++ b/env_tester @@ -0,0 +1 @@ +tool_shared/third_party/RT-incommon/release/bash/env_tester \ No newline at end of file diff --git a/tester/shell/.githolder b/tester/bash/.githolder similarity index 100% rename from tester/shell/.githolder rename to tester/bash/.githolder diff --git a/tester/shell/Test0 b/tester/bash/Test0 similarity index 100% rename from tester/shell/Test0 rename to tester/bash/Test0 diff --git a/tester/shell/Test_IO b/tester/bash/Test_IO similarity index 100% rename from tester/shell/Test_IO rename to tester/bash/Test_IO diff --git a/tester/shell/Test_MockClass_0 b/tester/bash/Test_MockClass_0 similarity index 100% rename from tester/shell/Test_MockClass_0 rename to tester/bash/Test_MockClass_0 diff --git a/tester/shell/Test_Testbench b/tester/bash/Test_Testbench similarity index 100% rename from tester/shell/Test_Testbench rename to tester/bash/Test_Testbench diff --git a/tester/shell/Test_Util b/tester/bash/Test_Util similarity index 100% rename from tester/shell/Test_Util rename to tester/bash/Test_Util diff --git a/tester/shell/test_log.txt b/tester/bash/test_log.txt similarity index 100% rename from tester/shell/test_log.txt rename to tester/bash/test_log.txt diff --git a/tester/document/Writing a test.txt "b/tester/document\360\237\226\211/Writing a test.txt" similarity index 100% rename from tester/document/Writing a test.txt rename to "tester/document\360\237\226\211/Writing a test.txt" diff --git a/tester/document/build_run_transcript_v1.0.txt "b/tester/document\360\237\226\211/build_run_transcript_v1.0.txt" similarity index 100% rename from tester/document/build_run_transcript_v1.0.txt rename to "tester/document\360\237\226\211/build_run_transcript_v1.0.txt" diff --git a/tester/document/build_run_transcript_v1.1.txt "b/tester/document\360\237\226\211/build_run_transcript_v1.1.txt" similarity index 100% rename from tester/document/build_run_transcript_v1.1.txt rename to "tester/document\360\237\226\211/build_run_transcript_v1.1.txt" diff --git a/tester/javac/Test0.java "b/tester/javac\360\237\226\211/Test0.java" similarity index 100% rename from tester/javac/Test0.java rename to "tester/javac\360\237\226\211/Test0.java" diff --git a/tester/javac/Test_IO.java "b/tester/javac\360\237\226\211/Test_IO.java" similarity index 100% rename from tester/javac/Test_IO.java rename to "tester/javac\360\237\226\211/Test_IO.java" diff --git a/tester/javac/Test_MockClass_0.java "b/tester/javac\360\237\226\211/Test_MockClass_0.java" similarity index 100% rename from tester/javac/Test_MockClass_0.java rename to "tester/javac\360\237\226\211/Test_MockClass_0.java" diff --git a/tester/javac/Test_Testbench.java "b/tester/javac\360\237\226\211/Test_Testbench.java" similarity index 100% rename from tester/javac/Test_Testbench.java rename to "tester/javac\360\237\226\211/Test_Testbench.java" diff --git a/tester/javac/Test_Util.java "b/tester/javac\360\237\226\211/Test_Util.java" similarity index 100% rename from tester/javac/Test_Util.java rename to "tester/javac\360\237\226\211/Test_Util.java" diff --git a/tester/tool/clean_build_directories "b/tester/tool\360\237\226\211/clean_build_directories" similarity index 100% rename from tester/tool/clean_build_directories rename to "tester/tool\360\237\226\211/clean_build_directories" diff --git a/tester/tool/env "b/tester/tool\360\237\226\211/env" similarity index 80% rename from tester/tool/env rename to "tester/tool\360\237\226\211/env" index e73741c..1c8ed7e 100644 --- a/tester/tool/env +++ "b/tester/tool\360\237\226\211/env" @@ -3,17 +3,19 @@ script_afp=$(realpath "${BASH_SOURCE[0]}") # input guards - env_must_be="tool_shared/bespoke/env" - error=false + env_must_be="tool_shared/bespoke🖉/env" + error_bad_env=false + error_not_sourced=false if [ "$ENV" != "$env_must_be" ]; then echo "$(script_fp):: error: must be run in the $env_must_be environment" - error=true + error_bad_env=true fi if [[ "${BASH_SOURCE[0]}" == "$0" ]]; then echo "$script_afp:: This script must be sourced, not executed." - error=true + error_not_sourced=true fi - if $error; then exit 1; fi + if $error_not_sourced; then exit 1; fi + if $error_bad_env; then return 1; fi # so we can do testing diff --git a/tester/tool/make "b/tester/tool\360\237\226\211/make" similarity index 100% rename from tester/tool/make rename to "tester/tool\360\237\226\211/make" diff --git a/tester/tool/run_jdb "b/tester/tool\360\237\226\211/run_jdb" similarity index 100% rename from tester/tool/run_jdb rename to "tester/tool\360\237\226\211/run_jdb" diff --git a/tester/tool/run_tests "b/tester/tool\360\237\226\211/run_tests" similarity index 100% rename from tester/tool/run_tests rename to "tester/tool\360\237\226\211/run_tests" diff --git a/tester/tool/shell_wrapper_list "b/tester/tool\360\237\226\211/shell_wrapper_list" similarity index 100% rename from tester/tool/shell_wrapper_list rename to "tester/tool\360\237\226\211/shell_wrapper_list" diff --git a/tool_shared/bespoke/bashrc b/tool_shared/bespoke/bashrc deleted file mode 100644 index 0914cfc..0000000 --- a/tool_shared/bespoke/bashrc +++ /dev/null @@ -1,51 +0,0 @@ -# ssh login will fail if .bashrc writes to stdout, so we write to "bash_error.txt" -# set -x -# in F37 something seems to be caching PATH, which can be annoying - -# If not running interactively, don't do anything - case $- in - *i*) ;; - *) return;; - esac - -# This should also be the default from login.defs, because gnome ignores -# .login, .profile, etc. and uses systemd to launch applications from the desktop, - umask 0077 - -# - note the variable $PROMPT_DECOR, that is how the project name ends up in the prompt. -# - without -i bash will clear PS1, just because, so we set PPS1, ,PPS2 to not lose the profit. -# - use $(pwd) instead of \w or it will prefix '~' which confuses dirtrack when the -# user is changed using su - export PPS1='\n$($iseq/Z)[$PROMPT_DECOR]\n\u@\h§$(pwd)§\n> ' - export PPS2='>> ' - export PS1="$PPS1" - export PS2="$PPS2" - -# sort the output of printenv, show newlines as environment variable values as \n - alias printenv='printenv | awk '\''{gsub(/\n/, "\\n")}1'\'' | sort' - -# iso time in ls -l, show hidden files, human readable sizes - alias ls='ls -a -h --time-style=long-iso' - -# iso time for all Linux programs, which they will all ignore, but at least we -# tried, perhaps someday ... - export TZ=UTC - export TIME_STYLE=long-iso - export LC_ALL=en_DK.UTF-8 - -# -l don't truncate long lins -# -p show pids - alias pstree='pstree -lp' - -# - make bash gp to sleep, revealing the calling shell -# - useful for job control of multiple bash shells from a controlling shell - alias zzz="kill -STOP \$\$" - -# The one true operating system. -# Proof that an OS can be as small as an editor. - export EDITOR=emacs - -# check the window size after each command and, if necessary, update the values -# of LINES and COLUMNS. - shopt -s checkwinsize - diff --git a/tool_shared/bespoke/cat_w_fn b/tool_shared/bespoke/cat_w_fn deleted file mode 100755 index 3308525..0000000 --- a/tool_shared/bespoke/cat_w_fn +++ /dev/null @@ -1,30 +0,0 @@ -#!/usr/bin/env bash -script_afp=$(realpath "${BASH_SOURCE[0]}") - -# Check if at least one file is provided -if [ $# -eq 0 ]; then - echo "Usage: $(script_fp) [filename2] ..." - exit 1 -fi - -# Loop through all the provided files -for file in "$@"; do - # Check if the file exists - if [ ! -f "$file" ]; then - echo "Error: File '$file' not found!" - continue - fi - - # Print 80 dashes - printf '%.0s-' {1..80} - echo - - # Print the filename and a colon - echo "$file:" - - # Print the contents of the file - cat "$file" - - # Print a newline for spacing between files - echo -done diff --git a/tool_shared/bespoke/deprecate b/tool_shared/bespoke/deprecate deleted file mode 100755 index 4713db5..0000000 --- a/tool_shared/bespoke/deprecate +++ /dev/null @@ -1,20 +0,0 @@ -#!/usr/bin/env bash -script_afp=$(realpath "${BASH_SOURCE[0]}") - -# cp subtree at under file path , and make all the copied -# files read-only. The intended use case is for moving files to a `deprecated` -# directory. This helps prevent subsequent accidental editing. - -if [ "$#" -lt 2 ]; then - echo "Usage: $script_afp " - exit 1 -fi -SRC="$1" -DEST="$2" - -mkdir -p "$DEST" -mv "$SRC" "$DEST" - -# make stuff readonly -cd "$DEST" || exit -chmod -R u-w,go-rwx "$DEST" diff --git a/tool_shared/bespoke/emacs.el b/tool_shared/bespoke/emacs.el deleted file mode 100644 index 5ca4331..0000000 --- a/tool_shared/bespoke/emacs.el +++ /dev/null @@ -1,52 +0,0 @@ - -; The first time Emacs encounters a link to a source file, Emacs asks if it should follow it. -; This might suppress that initial question and follow the link. -; (setq find-file-visit-truename t) - -(defun jdbx () - "Set gud-jdb-sourcepath from the environment and run jdb with the correct source path." - (interactive) - (let* - ( - (sourcepath (getenv "SOURCEPATH")) - ) - (if - sourcepath - (setq gud-jdb-sourcepath (split-string sourcepath ":" t)) - (message "Warning: SOURCEPATH is not set. `jdb` will run without source path information.") - ) - (let - ( - (class-name (read-string "Enter the class to debug: " "Test_Util")) - ) - (jdb (concat "jdb -sourcepath" - (if - sourcepath - (mapconcat 'identity gud-jdb-sourcepath ":") "" - ) - " " - class-name - ) - )))) - -(defun monitor-jdb-sourcepath (output) - "Monitor the jdb output for `sourcepath ARG` commands and update `gud-jdb-sourcepath` with each path in ARG." - (when - (string-match "sourcepath \\(.+\\)" output) - (let* - ( - (new-paths (match-string 1 output)) - (paths-list (split-string new-paths ":" t)) - ) - ;; Add each path in paths-list to gud-jdb-sourcepath if not already present - (dolist - (path paths-list) - (unless - (member path gud-jdb-sourcepath) - (setq gud-jdb-sourcepath (append gud-jdb-sourcepath (list path))) - ) - ) - (message "Updated gud-jdb-sourcepath: %s" gud-jdb-sourcepath))) - output) - -(add-hook 'gud-filter-functions 'monitor-jdb-sourcepath) diff --git a/tool_shared/bespoke/githolder b/tool_shared/bespoke/githolder deleted file mode 100755 index 49fb12b..0000000 --- a/tool_shared/bespoke/githolder +++ /dev/null @@ -1,63 +0,0 @@ -#!/bin/env /bin/bash - -# Description: Descends from $1, or pwd, looking for empty directories and adds a `.githolder` to them. -# does not descend into hidden directories. - -# examples: -# > git_holder -# > git_holder --dry-run - -set -e - -find_empty_dirs() { - local dir="$1" - local dry_run="$2" - - # Skip `.git` specifically - if [[ "$(basename "$dir")" == ".git" ]]; then - return - fi - - # Check if the directory is empty (including hidden files, excluding `.` and `..`) - if [[ -z $(find "$dir" -mindepth 1 -maxdepth 1 -print -quit) ]]; then - if [[ "$dry_run" == "true" ]]; then - echo "Dry-run: Would add .githolder in $dir" - else - echo "Adding .githolder to $dir" - touch "$dir/.githolder" - fi - else - # Recurse into subdirectories - for subdir in "$dir"/*/ "$dir"/.[!.]/; do - if [[ -d "$subdir" && "$subdir" != "$dir/.[!.]/" ]]; then - find_empty_dirs "$subdir" "$dry_run" - fi - done - fi -} - -# Default parameters -dry_run="false" -target_dir="." - -# Parse arguments -while [[ $# -gt 0 ]]; do - case "$1" in - --dry-run) - dry_run="true" - shift - ;; - *) - if [[ -d "$1" ]]; then - target_dir="$1" - shift - else - echo "Invalid argument: $1 is not a directory" - exit 1 - fi - ;; - esac -done - -# Run the function -find_empty_dirs "$target_dir" "$dry_run" diff --git a/tool_shared/bespoke/test_env b/tool_shared/bespoke/test_env deleted file mode 100755 index 18d75f9..0000000 --- a/tool_shared/bespoke/test_env +++ /dev/null @@ -1,24 +0,0 @@ -#!/bin/env bash -script_afp=$(realpath "${BASH_SOURCE[0]}") - -# try both running and sourcing this test - -echo -echo "--------------------------------------------------------------------------------" -echo "from within test_shared/bespoke/test_env:" -echo -echo "REPO_HOME:" "$REPO_HOME" -echo "PROJECT:" "$PROJECT" -echo "script_afp:" "$script_afp" -echo "script_adp:" "$(script_adp)" -echo "script_fn:" "$(script_fn)" -echo "script_fp:" "$(script_fp)" -echo "script_dp:" "$(script_dp)" -echo "ENV:" "$ENV" -echo "-----------------------" -echo "the BASH_SOURCE stack:" - - top_index=$(( ${#BASH_SOURCE[@]} - 1 )) - for (( i=0; i<=top_index; i++ )); do - echo "$i: ${BASH_SOURCE[$i]}" - done diff --git a/tool_shared/bespoke/vl b/tool_shared/bespoke/vl deleted file mode 100755 index 2c968d3..0000000 --- a/tool_shared/bespoke/vl +++ /dev/null @@ -1,18 +0,0 @@ -#!/usr/bin/env bash -script_afp=$(realpath "${BASH_SOURCE[0]}") -# vl 'vertical list' - -# Check if the command is provided -if [ -z "$1" ]; then - echo "Usage: vl [args...]" - exit 1 -fi - -# Capture the command and its arguments -cmd=$1 -shift - -# Run the command with the remaining arguments and replace colons or spaces with newlines -"$cmd" "$@" | tr ' :' '\n' - -exit 0 diff --git a/tool_shared/bespoke/wipe_release b/tool_shared/bespoke/wipe_release deleted file mode 100755 index 5bac0e7..0000000 --- a/tool_shared/bespoke/wipe_release +++ /dev/null @@ -1,18 +0,0 @@ -#!/usr/bin/env bash -script_afp=$(realpath "${BASH_SOURCE[0]}") -# remove all files in the release directory -set -e - -script_name=$(basename ${BASH_SOURCE[0]}) -if [ -z "$REPO_HOME" ]; then - echo "$script_name:: REPO_HOME is not set." - exit 1 -fi - -set -x -cd "$REPO_HOME" -rm -rf release/* -set +x - -echo "$script_name done." - diff --git a/tool_shared/bespoke/env "b/tool_shared/bespoke\360\237\226\211/env" similarity index 82% rename from tool_shared/bespoke/env rename to "tool_shared/bespoke\360\237\226\211/env" index 516d14d..6efefc2 100644 --- a/tool_shared/bespoke/env +++ "b/tool_shared/bespoke\360\237\226\211/env" @@ -29,7 +29,11 @@ fi # -------------------------------------------------------------------------------- # The project administrator sets up the following tools for all roles to use: # - export JAVA_HOME="$REPO_HOME/tool_shared/third_party/jdk-11" + export PATH="$REPO_HOME/tool_shared/third_party/RT-incommon/release/bash:$PATH" + export PATH="$REPO_HOME/tool_shared/third_party/RT-incommon/release/amd64:$PATH" + export JAVA_HOME="$REPO_HOME/tool_shared/third_party/jdk-23.0.1:$PATH" + export PATH="$REPO_HOME/tool_shared/third_party/emacs/bin:$PATH" +# export PATH="$REPO_HOME/tool_shared/third_party/idea-IC-243.21565.193/:$PATH" # -------------------------------------------------------------------------------- # the following functions are provided for other scripts to use. diff --git a/tool_shared/bespoke/version "b/tool_shared/bespoke\360\237\226\211/version" similarity index 100% rename from tool_shared/bespoke/version rename to "tool_shared/bespoke\360\237\226\211/version" diff --git "a/tool_shared/document\360\237\226\211/#install_java.txt#" "b/tool_shared/document\360\237\226\211/#install_java.txt#" deleted file mode 100644 index 0091eac..0000000 --- "a/tool_shared/document\360\237\226\211/#install_java.txt#" +++ /dev/null @@ -1,11 +0,0 @@ - -#1. downlaod - -cd "$REPO_HOME/tool/upstream" -curl -C - -o OpenJDK11U-jdk_x64_linux_hotspot_11.0.16_8.tar.gz https://github.com/adoptium/temurin11-binaries/releases/download/jdk-11.0.16+8/OpenJDK11U-jdk_x64_linux_hotspot_11.0.16_8.tar.gz - -#2. extract - -cd "$REPO_HOME/tool" -mkdir -p jdk-11 -tar -xzf "$REPO_HOME/tool/upstream/OpenJDK11U-jdk_x64_linux_hotspot_11.0.16_8.tar.gz" -C jdk-11 --strip-components 1 diff --git "a/tool_shared/document\360\237\226\211/install.txt" "b/tool_shared/document\360\237\226\211/install.txt" index 543d228..a6df14c 100644 --- "a/tool_shared/document\360\237\226\211/install.txt" +++ "b/tool_shared/document\360\237\226\211/install.txt" @@ -16,7 +16,7 @@ This pulls in documents and commonly used scripts. The project has symbolic link into RT-icommon, so this is not optional. cd "$REPO_HOME/tool_shared/third_party/" - git clone https://github.com/Thomas-Walker-Lynch/resource.git + git clone https://github.com/Thomas-Walker-Lynch/RT-incommon.git ln -s "$REPO_HOME/tool_shared/third_party/resource/document" see_also ---------------------------------------- @@ -37,7 +37,12 @@ jdk-23 ---------------------------------------- IDE -This is not strictly necessary, but a local install of an IDE will assure it is +See +$REPO_HOME/tool_shared/document/install_emacs.txt +$REPO_HOME/tool_shared/document/install_IntelliJ_IDEA.txt + + +but a local install of an IDE will assure it is sync with the rest of the project build for configuration files and tools built in to it. diff --git "a/tool_shared/document\360\237\226\211/install_Eclipse_hints.txt" "b/tool_shared/document\360\237\226\211/install_Eclipse_hints.txt" new file mode 100644 index 0000000..167d14e --- /dev/null +++ "b/tool_shared/document\360\237\226\211/install_Eclipse_hints.txt" @@ -0,0 +1,22 @@ + +The project is originally configured to be used with Emacs as an IDE. The tools +can all be run from a shell inside of emacs. Even when using an IDE what the +shell environment scripts and tools do should be understood. + +I have added a working IntelliJ IDEA configuration, so if you want a modern IDE +it is probably best to go with this. See ItelliJ_IDEA.txt in this directory. + +I've not run Eclipse on the project, if you do, perhaps you can update the notes +here. These things will probably increase your odds of making it work: + 1. open a shell + 2. cd to Ariadne, and source the env_developer + 3. run the tool 'distribute_source' + 3. run eclipse from the command line + 4. give eclipse the 'scratchpad' directory as its source + +Be sure to run `release` after development to update what the tester sees. + +Do the analogous steps if you contribute as a 'tester'. I.e. from +the shell source env_tester instead. Also, you will need to add +distribute_source to tester/tool, as it is currently not there. + diff --git "a/tool_shared/document\360\237\226\211/install_IntelliJ_IDEA.txt" "b/tool_shared/document\360\237\226\211/install_IntelliJ_IDEA.txt" new file mode 100644 index 0000000..82b21cc --- /dev/null +++ "b/tool_shared/document\360\237\226\211/install_IntelliJ_IDEA.txt" @@ -0,0 +1,252 @@ + +This file describes the local install and configuration of IntelliJ_IDEA for +the Ariadne project. + +The project was/is originally configured to be used with Emacs as an IDE. The tools +can all be run from a shell inside of emacs. Even when using an IDE what the +shell environment scripts and tools do should be understood. + +-------------------------------------------------------------------------------- +Some notes + +'project directory' - the directory with the .git file in it. Called $REPO_HOME in + RT scripts. Called $PROJECT_DIR$ (doesn't seem to be reliable) in IntelliJ + file paths. + +'module directory' - for RT projects examples include `~/Ariadne/developer' + `~/Ariadne/tester`. These are independent build environments. + + Careful, if Intellij scans directories it will not hesitate to pull things + from `tool_shared`/third_party or wherever else it finds things, and it will + make a big mess. + +IntelliJ paths on forms: + + I tried using $PROJECT_DIR$ as a variable standing for the project directory, + as this was suggested by an AI. However IntelliJ simply made a directory + with the literal variable name. + + Also tried using $REPO_HOME, as that was defined in the environment IntelliJ was run from. + It had the same effect as $PROJECT_DIR$. + + It will work with `~` for the home directory. So I have been using + `~/Ariadne/...` when typing out paths. + + There will be a browser icon at the right of a form entry boxes that take + paths. The browser tool starts from either /home or at / rather than at the + project. It inserts absolute path names. + +A GUI bug: + + There is a Gnome Linux bug where the drop down menu can stay on top no matter + what other window, application, or what virtual desktop a person is on. You + must go back to the IDEA application window and hit to make it go + away. + +The [OK] button at the bottom of dialogs: + + This closes the dialog. + + To apply changes hit [Apply]. + + [OK] will not save what is on the dialog if [Apply] would fail, but + it still closes it. + +-------------------------------------------------------------------------------- +To install ItelliJ + + Download the tar file from + `https://www.jetbrains.com/idea/download/?section=linux` + into the + `$REPO_HOME/tool_shared/third_party/upstream` + directory. + + Expand it into + `$REPO_HOME/tool_shared/third_party` + + cd into the expanded directory, into `bin`, then `chmod u+x` and run `idea_inst`. + + set the env path to include + `$REPO_HOME/tool_shared/third_party/idea-IC*/bin` + + The executable is called `idea`. + + Consider setting a desktop short cut. Consider instead installing it in your + own bin directory. Easily done, just move the directory created by the tar + file expansion there. + + I prefer a user mode install, as there is no reason this tool should need + admin privileges. + +-------------------------------------------------------------------------------- +Startup + + ./tool_shared/third_party/idea-IC-243.21565.193/bin/idea & + + Shows: Welcome screen + select "Open" as Ariadne already exists + + Shows: Open File or Project Browser + In top dialog box put full path to project directory. + + Hit [OK] at the bottom. Unlikely, but might be scrolled off the bottom of the screen. + + Shows: main window + Appears after hitting OK from the "Open File or Project" [ok]. + + Has a tool bar at the top. There is a double meat hamburger menu icon + at the left. Hitting this will replace the top bar with a vertical + menu for drop down menus. + + Careful, after the hamburger icon is pressed, the first drop down + menu instantly appears. Slide over to get the other drop downs. + Don't click, slide! + + Under tool bar: + Far left is an icon bar. Then a file browser. And then a big box + describing hot keys. + +-------------------------------------------------------------------------------- +Configuration + +If you cloned the Ariadne project, the modules will already be configured, and +also probably some of the run configuration will already be configured. + + ------------- + Setup Project + Hamburger icon > File dop-down > Project Structure > Project + + select project SDK from disk: + ~/Ariadne/tool_shared/third_party/jdk-11 + + ------------- + Setup Modules + + Hamburger icon > File dop-down > Project Structure > Modules + + Shows: "Project Structure" dialog + + Hit the '+' option that shows at the top of the second panel. + + New Module. + + Dialog pop-up + + Name: developer + + Location: (browse to the developer directory) + + alternatively enter the full path, ~/Ariadne, e.g. + + $PROJECT_DIR$ instead of, ~/Ariadne, worked when + entering the first module, but not the second. + + Dependencies: + Select the "Project SDK" from the drop down. + + Careful, the module won't be made until hitting [Create] at the bottom. + + As far as I can tell you can't get this panel again, rather delete and add + a new module if you need to change the entries. + + Shows: "Project Structure" dialog, again, now the third panel with information about the + developer module. + Third panel shows three choices: [Source] [Paths] [Dependencies] + + [Sources] is already selected. + + With Sources there are two panels. + + In second panel, on right side, the module root should show at the top. + Under if it lists any sources, use the button at the far right of the + listing to x it out. + + The first panel now shows a file browser for the module. + + Select the `javac` directory with a single click. Then, and only + after, look immediately the directory lists and click on [Sources] + + "Source Folders" will now appear in the second panel. The + javac folder will be listed. + + hit: [apply] at the bottom (or the form will reset to defaults next time) + + + Slide over to [Paths] + Copmiler Output + select [Use Module Compile Output Path] + Output Path: $PROJECT_DIR$/developer/scratchpad + Test Path: $PROJECT_DIR$/developer/test + + leave the exclude output checkbox, that means to exclude from repo + and from indexing for search + + hit: [apply] at the bottom + + ------------- + To add an external tool, for example tester/tool/make: + + This is how we integrate the local tools. + + Note, even if a shell script runs then runs a java program, that jave program + was compiled with debug flags, and run in debug mode, it can't be debugged. It + won't stop at break points, etc. For that an 'application' must be added see + the next section. + + Hamburger> Run > edit configurations + Shows Run/Debug configurations dialog + Upper left hit '+' + Shows drop down + chose [Shell Script] second from bottom + Shows dialog, for example: + Name: tester make + Script Path: ~/Ariadne/tester/tool/make (better to chose with the browser tool) + Script Options: tester make + Working Directory: ~/Ariadne (location of the env source scripts that env_run uses) + Environment variabls: (none, env_run will source env_tester) + Interpreter: /bin/bash (left to default) + + ------------- + To add a program for debugging. + + Humburger > Run > edit configurations + Shows Run/Debug configurations dialog + Upper left hit '+' + Shows drop down + chose [Application] first choice + Shows dialog, for example: + Name: Test_Graph_0 + + next line are two boxes, they are not labeled, the defaults show: + [ module not specified ] [ -cp no module ] + I selected:: + [ java 11 SDk of 'tester' module] [ -cp tester ] + This can be confusing, as the modules are 'tester' and 'developer', but + here it asks for an SDK! Then the next box says it wants a class path, + but it wants a module name! + + next line one box, not labeled + [ main class [] ] + Note icon at right, it will give a list of class names, here in the tester module, + that have main calls, select one. + + next line, again not labeled + [ Program Arguments ] + Test_Graph_0 has no arguments so I left it blank. + + Working Directory: ~/Ariadne + + Environment Variables: + Left blank because the executable itself does not make use of any. I do + know at this point if variables set in the environment IDEA ran in are + inherited. + + 'Modify Options' with a drop down menu. (At the top right of the configuration dialog) + Scan down for the `Java` section. + Check: 'Do not build before run' + (To build this example, go to the Run menu and run `tester make'. Or run make directly + from a console prompt. Be sure to source env_tester first.) + + Next go to main window file browser, click on the file you want to debug, click on the line + to set a break point. Right click to get a menu, and + diff --git "a/tool_shared/document\360\237\226\211/install_emacs.txt" "b/tool_shared/document\360\237\226\211/install_emacs.txt" index 63c8d6b..e5e0527 100644 --- "a/tool_shared/document\360\237\226\211/install_emacs.txt" +++ "b/tool_shared/document\360\237\226\211/install_emacs.txt" @@ -1,19 +1,32 @@ +System requirements: + +dnf install libX11-devel libXpm-devel libjpeg-devel libpng-devel libtiff-devel +dnf install gtk3-devel giflib-devel gnutls-devel +dnf install ncurses-devel texinfo +dnf install libacl-devel libattr-devel libgccjit libgccjit-devel + +I gather this warning is unavaoidable? +"configure: WARNING: Your version of Gtk+ will have problems with" + # install and build script: cd "$REPO_HOME"/tool_shared/third_party -mkdir -p emacs/{src build bin} +mkdir -p emacs/{src,build,bin} +# We sought stability, and now this. What can I say? It has 'visual-wrap-prefix-mode'. pushd upstream -curl -L -O https://ftp.gnu.org/gnu/emacs/emacs-29.4.tar.gz +curl -L -O https://alpha.gnu.org/gnu/emacs/pretest/emacs-30.0.92.tar.xz popd -tar -xzf upstream/emacs-29.4.tar.gz -C emacs/src --strip-components=1 +tar -xf upstream/emacs-30.0.92.tar.xz -C emacs/src --strip-components=1 pushd emacs/src -/configure --prefix=emacs/build +./configure --prefix="$REPO_HOME"/tool_shared/third_party/emacs make -j$(nproc) -make install DESTDIR=../bin +make install +make clean popd -rm -r emacs/build +rm -r emacs/{src,build} + -- 2.20.1