Skip to content

Commit

Permalink
Merge branch 'phyver:master' into devcontainer
Browse files Browse the repository at this point in the history
  • Loading branch information
er2 authored Nov 24, 2024
2 parents 7b4218d + d345dbe commit c313654
Show file tree
Hide file tree
Showing 96 changed files with 1,600 additions and 249 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/latest_game_archive.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,12 @@ on:
push:
branches:
- "master"
tags-ignore:
- "*"

jobs:
pre-release:
name: "latest release"
runs-on: "ubuntu-latest"

steps:
- name: "Checkout source code"
uses: "actions/checkout@v4"
Expand Down
7 changes: 3 additions & 4 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
Images/gsh-*-orig.gif
tmp
TODO
.bin
Expand All @@ -8,8 +9,6 @@ TODO
World
locale/
*~
gameshell.sh
gameshell-save.sh
gameshell.tgz
boxes-data.awk
gameshell*
game shell*
boxes-data.awk
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ RUN apt install --no-install-recommends --assume-yes \
procps \
nano \
tree \
bsdmainutils \
ncal \
x11-apps
RUN apt clean
RUN rm -rf /var/lib/apt/lists/*
Expand Down
8 changes: 4 additions & 4 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -37,22 +37,22 @@ new: i18n/template.pot
## check that the auto.sh scripts work as expected
check: clean
./utils/archive.sh -at -N "game shell (1)"
./"game shell (1).sh" -q -c 'gsh systemconfig; for _ in $$(seq 42); do gsh auto --abort < <(echo gsh); done; gsh stat'
./"game shell (1).sh" -q -c 'gsh systemconfig; for _ in $$(seq 50); do gsh auto --abort < <(echo gsh); done; gsh stat'

## check that the auto.sh scripts work as expected, in verbose mode
check-verbose: clean
./utils/archive.sh -at -N "game shell (1)"
./"game shell (1).sh" -Dq -c 'gsh systemconfig; for _ in $$(seq 42); do gsh auto --abort; done; gsh stat'
./"game shell (1).sh" -Dq -c 'gsh systemconfig; for _ in $$(seq 50); do gsh auto --abort; done; gsh stat'

## run all the test.sh and auto.sh scripts
tests-bash: clean
./utils/archive.sh -at -N "game shell (1)"
./"game shell (1).sh" -Bdq -c 'gsh systemconfig; for _ in $$(seq 42); do gsh goal|cat; gsh test --abort; gsh auto --abort; done; gsh stat'
./"game shell (1).sh" -Bdq -c 'gsh systemconfig; for _ in $$(seq 50); do gsh goal|cat; gsh test --abort; gsh auto --abort; done; gsh stat'

## run all the test.sh and auto.sh scripts
tests-zsh: clean
./utils/archive.sh -at -N "game shell (1)"
./"game shell (1).sh" -Zdq -c 'gsh systemconfig; for _ in $$(seq 42); do gsh goal|cat; gsh test --abort; gsh auto --abort; done; gsh stat'
./"game shell (1).sh" -Zdq -c 'gsh systemconfig; for _ in $$(seq 50); do gsh goal|cat; gsh test --abort; gsh auto --abort; done; gsh stat'

clean:
rm -rf i18n/*~ locale gameshell gameshell.tar gameshell.tgz gameshell.sh gameshell-save*.sh scripts/boxes-data.awk
Expand Down
2 changes: 1 addition & 1 deletion README-fr.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ missions ont des dépendances additionnelles : elles seront annulées si leurs
dépendances ne sont pas satisfaites. Sur Debian ou Ubuntu, lancez la commande
suivante pour installer toutes les dépendances pour le jeu et les missions.
```sh
$ sudo apt install gettext-base man-db psmisc nano tree bsdmainutils x11-apps
$ sudo apt install gettext-base man-db psmisc nano tree ncal x11-apps
```
Consultez le [manuel utilisateur](doc/user_manual.md) (en anglais) pour voir
comment installer les dépendances sur d'autres systèmes (macOS, BSD, ...).
Expand Down
2 changes: 1 addition & 1 deletion README-it.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ Come cominciare
GameShell dovrebbe funzionare in qualunque sistema Linux standard, e anche su macOS e BSD (ma abbiamo eseguito pochi test su questi). Su Debian e Ubuntu, le uniche dipendenze (oltre `bash`) sono i pacchetti `gettext-base` e `awk`(questo di solito presente di default). Alcune missioni hanno dipendenze addizionali: queste missioni verranno saltate se le dipendenze non sono state risolte.
Su Debian o Ubuntu, esegui i comandi seguenti per installare tutte le dipendenze del gioco e delle missioni.
```sh
$ sudo apt install gettext man-db procps psmisc nano tree bsdmainutils x11-apps wget
$ sudo apt install gettext man-db procps psmisc nano tree ncal x11-apps wget
```
Controlla il [manuale utente](doc/user_manual.md) per vedere come installare le dipendenze su altri sistemi (macOS, BSD, ...).

Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ dependencies: these missions will be skipped if the dependencies are not met.
On Debian or Ubuntu, run the following command to install all game and mission
dependencies.
```sh
$ sudo apt install gettext man-db procps psmisc nano tree bsdmainutils x11-apps wget
$ sudo apt install gettext man-db procps psmisc nano tree ncal x11-apps wget
```
Check the [user manual](doc/user_manual.md) to see how to install the game
dependencies on other systems (macOS, BSD, ...).
Expand Down
4 changes: 2 additions & 2 deletions doc/deps.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,14 +20,14 @@ the following
- `pstree` (`psmisc` package in Debian/Ubuntu)
- `nano` (`nano` package in Debian/Ubuntu)
- `tree` (`tree` package in Debian/Ubuntu)
- `cal` (`bsdmainutils` package in Debian/Ubuntu)
- `cal` (`ncal` package in Debian/Ubuntu)
- `xeyes` (`x11-apps` package in Debian/Ubuntu)

On a Debian / Ubuntu system, the following ensures you have everything you
need to run GameShell without problems.

```sh
$ sudo apt install gettext-base man-db procps psmisc nano tree bsdmainutils x11-apps
$ sudo apt install gettext-base man-db procps psmisc nano tree ncal x11-apps
```


Expand Down
13 changes: 6 additions & 7 deletions doc/gameshell.md
Original file line number Diff line number Diff line change
Expand Up @@ -139,14 +139,13 @@ You can customize the archive with the following options
GameShell will ask for the player's name and email. This is useful in the
classroom as it makes it easier to link a game to the corresponding student.
(The player can run the archive in anonymous mode with the `-A` option.)
* `--password PASSWORD`: you can choose the admin password for the archive.
* `-p PASSWORD`: you can choose the admin password for the archive.
This is also useful in the classroom as we might not want the students to
learn of this password. :)
* `-a`: keep the automatic scripts. Some missions come with a script that
automagically completes the missions. By default, those scripts are **not**
included in the archive. Use `-a` if you want to keep them.
* `-N NAME`: if you want the archive and its directory to be called something
other than "GameShell", you can set the name with this option.
* `-k`: keep the GameShell archive. The compressed `tar` archive is appended
to a shell script to create the executable archive. With this option, you
can keep the "standard" `tar` archive as well as the executable one.

More options are available and listed in the output of
```sh
$ ./utils/archive.sh -h
```
12 changes: 6 additions & 6 deletions doc/mission.md
Original file line number Diff line number Diff line change
Expand Up @@ -442,13 +442,13 @@ which make testing easier.
Those files are not included in GameShell archives.


Adding the mission to the `index.txt` file
----------------------------------------
Adding the mission to the `default.idx` file
------------------------------------------

When run without arguments GameShell will get the list of mission from the
file `$GSH_ROOT/missions/index.txt`.
file `$GSH_ROOT/missions/default.idx`.

You can give a list of `index.txt` files and mission directories as arguments
You can give a list of `default.idx` files and mission directories as arguments
of GameShell if you want to customize the list / order of missions. This is
particularly useful when testing a new mission:
```sh
Expand All @@ -464,7 +464,7 @@ Dummy missions

"Dummy" missions are used to share data between missions. A mission is "dummy"
* either when it doesn't contain a `check.sh` script,
* or it is listed with a "`!`" in front of its name in the `index.txt` file.
* or it is listed with a "`!`" in front of its name in the `default.idx` file.

A dummy mission is used during the initialisation phase, so that it can
contain a `static.sh` file. It can for example be used to share executable
Expand All @@ -483,7 +483,7 @@ cp "$MISSION_DIR/../00_shared/ascii-art/elephant.txt" "$GSH_HOME/Jungle/"
```

_Note:_ don't forget to include dummy missions in the corresponding
`index.txt` file, or it won't be included in GameShell executable archives by
`default.idx` file, or it won't be included in GameShell executable archives by
default.


Expand Down
22 changes: 20 additions & 2 deletions i18n/en.po
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# AUTOMATICALLY GENERATED -- DO NOT EDIT
#, sh-format
msgid "$GSH_ROOT/i18n/gameshell-HELP/en.txt"
msgstr "$GSH_ROOT/i18n/gameshell-HELP/en.txt"
msgid "$GSH_ROOT/i18n/gameshell-full-help/en.txt"
msgstr "$GSH_ROOT/i18n/gameshell-full-help/en.txt"

#, sh-format
msgid "$GSH_ROOT/i18n/gameshell-help/en.txt"
Expand All @@ -19,6 +19,10 @@ msgstr "$GSH_ROOT/i18n/gameshell-init-msg/en.txt"
msgid "$GSH_ROOT/i18n/gameshell-welcome/en.txt"
msgstr "$GSH_ROOT/i18n/gameshell-welcome/en.txt"

#, sh-format
msgid "$GSH_ROOT/i18n/start-full-help/en.txt"
msgstr "$GSH_ROOT/i18n/start-full-help/en.txt"

#, sh-format
msgid "$GSH_ROOT/i18n/start-help/en.txt"
msgstr "$GSH_ROOT/i18n/start-help/en.txt"
Expand Down Expand Up @@ -76,6 +80,9 @@ msgstr[1] "%d missions skipped:"
msgid "AUTOMATICALLY GENERATED ON STARTUP -- DO NOT MODIFY"
msgstr "AUTOMATICALLY GENERATED ON STARTUP -- DO NOT MODIFY"

msgid "Available index files: "
msgstr "Available index files: "

#, sh-format
msgid "Congratulations, mission $MISSION_NB has been successfully completed!"
msgstr "Congratulations, mission $MISSION_NB has been successfully completed!"
Expand Down Expand Up @@ -200,6 +207,14 @@ msgstr "There are stopped jobs in your session.\n"
" $ jobs\n"
"Do you still want to quit? [y/n]"

#, sh-format
msgid "Warning: command line arguments are ignored when continuing a game ($args)"
msgstr "Warning: command line arguments are ignored when continuing a game ($args)"

#, sh-format
msgid "Warning: language is ignored when continuing a game ($args)"
msgstr "Warning: language is ignored when continuing a game ($args)"

msgid "Warning: the file 'treasure.sh' was sourced from a subshell.\n"
"You should use the command\n"
" $ gsh reset"
Expand Down Expand Up @@ -283,6 +298,9 @@ msgstr[1] "game time: %s in %d sessions"
msgid "n"
msgstr "n"

msgid "optional"
msgstr "optional"

msgid "password:"
msgstr "password:"

Expand Down
22 changes: 20 additions & 2 deletions i18n/fr.po
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ msgstr "Content-Type: text/plain; charset=UTF-8\n"
"Plural-Forms: nplurals=2; plural=n>1;\n"

#, sh-format
msgid "$GSH_ROOT/i18n/gameshell-HELP/en.txt"
msgstr "$GSH_ROOT/i18n/gameshell-HELP/fr.txt"
msgid "$GSH_ROOT/i18n/gameshell-full-help/en.txt"
msgstr "$GSH_ROOT/i18n/gameshell-full-help/fr.txt"

#, sh-format
msgid "$GSH_ROOT/i18n/gameshell-help/en.txt"
Expand All @@ -23,6 +23,10 @@ msgstr "$GSH_ROOT/i18n/gameshell-init-msg/fr.txt"
msgid "$GSH_ROOT/i18n/gameshell-welcome/en.txt"
msgstr "$GSH_ROOT/i18n/gameshell-welcome/fr.txt"

#, sh-format
msgid "$GSH_ROOT/i18n/start-full-help/en.txt"
msgstr "$GSH_ROOT/i18n/start-full-help/fr.txt"

#, sh-format
msgid "$GSH_ROOT/i18n/start-help/en.txt"
msgstr "$GSH_ROOT/i18n/start-help/fr.txt"
Expand Down Expand Up @@ -80,6 +84,9 @@ msgstr[1] "%d missions sautées :"
msgid "AUTOMATICALLY GENERATED ON STARTUP -- DO NOT MODIFY"
msgstr "AUTOMATIQUEMENT GÉNÉRÉ AU DÉMARRAGE -- NE PAS MODIFIER"

msgid "Available index files: "
msgstr "Fichiers index disponibles: "

#, sh-format
msgid "Congratulations, mission $MISSION_NB has been successfully completed!"
msgstr "Bravo, vous avez réussi la mission $MISSION_NB !"
Expand Down Expand Up @@ -205,6 +212,14 @@ msgstr "Il y a des processus stoppés dans votre session.\n"
" $ jobs\n"
"Êtes vous sûr de vouloir quitter ? [o/N]"

#, sh-format
msgid "Warning: command line arguments are ignored when continuing a game ($args)"
msgstr "Warning: les arguments sur la ligne de commande sont ignorés lorsqu'on reprend une partie ($args)"

#, sh-format
msgid "Warning: language is ignored when continuing a game ($args)"
msgstr "Warning: la langue est ignorée lorsqu'on reprend une partie ($args)"

msgid "Warning: the file 'treasure.sh' was sourced from a subshell.\n"
"You should use the command\n"
" $ gsh reset"
Expand Down Expand Up @@ -290,6 +305,9 @@ msgstr[1] "temps de jeu : %s en %d sessions"
msgid "n"
msgstr "n"

msgid "optional"
msgstr "facultatif"

msgid "password:"
msgstr "mot de passe :"

Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
22 changes: 20 additions & 2 deletions i18n/it.po
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@ msgstr "Project-Id-Version: \n"
"X-Generator: Lokalize 22.04.1\n"

#, sh-format
msgid "$GSH_ROOT/i18n/gameshell-HELP/en.txt"
msgstr "$GSH_ROOT/i18n/gameshell-HELP/it.txt"
msgid "$GSH_ROOT/i18n/gameshell-full-help/en.txt"
msgstr "$GSH_ROOT/i18n/gameshell-full-help/it.txt"

#, sh-format
msgid "$GSH_ROOT/i18n/gameshell-help/en.txt"
Expand All @@ -33,6 +33,10 @@ msgstr "$GSH_ROOT/i18n/gameshell-init-msg/it.txt"
msgid "$GSH_ROOT/i18n/gameshell-welcome/en.txt"
msgstr "$GSH_ROOT/i18n/gameshell-welcome/it.txt"

#, sh-format
msgid "$GSH_ROOT/i18n/start-full-help/en.txt"
msgstr "$GSH_ROOT/i18n/start-full-help/it.txt"

#, sh-format
msgid "$GSH_ROOT/i18n/start-help/en.txt"
msgstr "$GSH_ROOT/i18n/start-help/it.txt"
Expand Down Expand Up @@ -90,6 +94,9 @@ msgstr[1] "%d missioni saltate:"
msgid "AUTOMATICALLY GENERATED ON STARTUP -- DO NOT MODIFY"
msgstr "GENERATO ALL'AVVIO AUTOMATICAMENTE -- NON MODIFICARE"

msgid "Available index files: "
msgstr ""

#, sh-format
msgid "Congratulations, mission $MISSION_NB has been successfully completed!"
msgstr "Congratulazioni, la missione $MISSION_NB é stata completata con successo!"
Expand Down Expand Up @@ -215,6 +222,14 @@ msgstr "Ci sono dei processi fermati nella tua sessione.\n"
"Vuoi uscire lo stesso? [s/n\n"
"]"

#, sh-format
msgid "Warning: command line arguments are ignored when continuing a game ($args)"
msgstr ""

#, sh-format
msgid "Warning: language is ignored when continuing a game ($args)"
msgstr ""

msgid "Warning: the file 'treasure.sh' was sourced from a subshell.\n"
"You should use the command\n"
" $ gsh reset"
Expand Down Expand Up @@ -298,6 +313,9 @@ msgstr[1] "tempo di gioco: %s in %d sessioni"
msgid "n"
msgstr "n"

msgid "optional"
msgstr "facoltativo"

msgid "password:"
msgstr "password:"

Expand Down
50 changes: 50 additions & 0 deletions i18n/start-full-help/en.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
usage:
$GSH_EXEC_FILE [OPTIONS] [INDEX_FILE1 INDEX_FILE2 ...]

Possible values for INDEX_FILE<n> are: $GSH_INDEX_FILES.

If no INDEX_FILE is given, defaults to default.idx.

Index files are ignored when continuing from a save file.


options:
-h simple help message
-H this message
-V display version
-I show list of available index files

-P passport mode: ask for name / emails of player
-A anonymous mode
-d debug mode
-D verbose debug mode

-C continue current game (if relevant)
-R reset game
-F do not check for more recent savefiles, force using the given archive

-G do not use gettext for translation (everything will be in English)
-L ... set LANGUAGE variable (ex: -L fr:it:en)
On non GNU systems, set the variable LC_MESSAGES to a valid locale.
This flag is ignored when continuing from a save file.

-S simple
the savefile is obtained by adding a "-save" suffix,
each savefile overwrites the previous one
-S index
savefiles are numbered so that all savefiles are kept
-S overwrite
the savefile overwrite the initial GameShell file
(you can use option -R to start a new game from the start)

-B use bash
-Z use zsh

-q quiet: don't show information messages
-n black and white: don't use ANSI escape codes for color
-c ... give that command to GameShell (for testing)

-U download last version of GameShell (requires network access)
-X only extract tgz archive
-K do not remove GameShell temporary directory on exit

Loading

0 comments on commit c313654

Please sign in to comment.