diff --git a/.gitignore b/.gitignore index 8927220..28eb4b7 100644 --- a/.gitignore +++ b/.gitignore @@ -27,3 +27,4 @@ bin-debug/ bin-release/ keystore/ +dist/ diff --git a/README.md b/README.md index 04151af..775dcd3 100644 --- a/README.md +++ b/README.md @@ -10,3 +10,13 @@ - https://as3mxml.com/ - https://marketplace.visualstudio.com/items?itemName=lonewolf.vscode-astools - https://marketplace.visualstudio.com/items?itemName=neminovno.vscode-as-fx-ide + +## Linux notes + +The original Adobe AIR Linux runtime is no longer a practical target on modern +Linux systems, and newer HARMAN AIR Linux runtimes require commercial licensing. +One working option is to build or package the Windows AIR application and run it +with Wine. + +See [docs/linux-wine.md](docs/linux-wine.md) for the Wine launch command, +udev rule for ps2avrGB hidraw access, and FAUGUS Launcher setup notes. diff --git a/docs/linux-wine.md b/docs/linux-wine.md new file mode 100644 index 0000000..3512bff --- /dev/null +++ b/docs/linux-wine.md @@ -0,0 +1,74 @@ +# Running Bootmapper On Linux With Wine + +Bootmapper is an Adobe AIR/Flex application. On modern Linux, the native Linux +AIR runtime path is awkward because current HARMAN AIR Linux runtimes are +commercially licensed. Running the Windows build with Wine avoids that Linux AIR +runtime gate. + +This repository does not vendor Wine, Proton, Adobe AIR, or HARMAN AIR runtime +binaries. Install those separately and build/package Bootmapper locally. + +## Launch + +If you have a Windows bundle at `bin-release/Bootmapper-win64-manual`, launch it +from the repository root with: + +```sh +scripts/run-bootmapper-wine.sh +``` + +The script uses `wine` from `PATH` by default. To use a specific Wine build: + +```sh +WINE=/opt/wine-staging/bin/wine scripts/run-bootmapper-wine.sh +``` + +The direct command is: + +```sh +cd bin-release/Bootmapper-win64-manual +wine Bootmapper.exe +``` + +## Device Permissions + +Bootmapper talks to ps2avrGB through hidraw. If the app opens but cannot find the +keyboard, add a udev rule like this: + +```sh +sudo tee /etc/udev/rules.d/70-ps2avrgb.rules >/dev/null <<'EOF' +SUBSYSTEM=="hidraw", ATTRS{idVendor}=="20a0", ATTRS{idProduct}=="422d", MODE="0666" +SUBSYSTEM=="usb", ATTR{idVendor}=="20a0", ATTR{idProduct}=="422d", MODE="0666" +EOF +sudo udevadm control --reload-rules +sudo udevadm trigger +``` + +Unplug and replug the keyboard after applying the rule. + +## FAUGUS Launcher + +FAUGUS Launcher can provide a convenient click-to-run entry. Use the Windows +bundle executable: + +```text +/path/to/Bootmapper/bin-release/Bootmapper-win64-manual/Bootmapper.exe +``` + +Recommended settings: + +- Runner: your preferred Wine or Proton-GE runner +- Prefix: a dedicated prefix, for example `~/Faugus/bootmapper` +- Launch arguments: blank unless your runner needs environment settings +- HIDRAW disabling: off + +## Packaging A Local Bundle + +After producing `bin-release/Bootmapper-win64-manual`, create a tarball with: + +```sh +scripts/package-wine-bundle.sh +``` + +The archive is written to `dist/`. Check the runtime licenses before publishing +an archive that contains Adobe/HARMAN AIR runtime files. diff --git a/packaging/linux/bootmapper-wine.desktop b/packaging/linux/bootmapper-wine.desktop new file mode 100644 index 0000000..0a9a373 --- /dev/null +++ b/packaging/linux/bootmapper-wine.desktop @@ -0,0 +1,7 @@ +[Desktop Entry] +Type=Application +Name=Bootmapper +Comment=Configure ps2avrGB keyboards with Bootmapper through Wine +Exec=env WINE=wine BOOTMAPPER_BUNDLE_DIR=/path/to/Bootmapper/bin-release/Bootmapper-win64-manual /path/to/Bootmapper/scripts/run-bootmapper-wine.sh +Terminal=false +Categories=Utility;Settings; diff --git a/scripts/package-wine-bundle.sh b/scripts/package-wine-bundle.sh new file mode 100755 index 0000000..37f1dcd --- /dev/null +++ b/scripts/package-wine-bundle.sh @@ -0,0 +1,18 @@ +#!/usr/bin/env sh +set -eu + +ROOT_DIR=$(CDPATH= cd -- "$(dirname -- "$0")/.." && pwd) +BUNDLE_DIR=${BOOTMAPPER_BUNDLE_DIR:-"$ROOT_DIR/bin-release/Bootmapper-win64-manual"} +DIST_DIR=${BOOTMAPPER_DIST_DIR:-"$ROOT_DIR/dist"} +VERSION=${BOOTMAPPER_PACKAGE_VERSION:-local} +ARCHIVE="$DIST_DIR/bootmapper-wine-$VERSION.tar.gz" + +if [ ! -f "$BUNDLE_DIR/Bootmapper.exe" ]; then + echo "Bootmapper.exe was not found in: $BUNDLE_DIR" >&2 + echo "Set BOOTMAPPER_BUNDLE_DIR to the Windows bundle directory." >&2 + exit 1 +fi + +mkdir -p "$DIST_DIR" +tar -C "$(dirname "$BUNDLE_DIR")" -czf "$ARCHIVE" "$(basename "$BUNDLE_DIR")" +echo "$ARCHIVE" diff --git a/scripts/run-bootmapper-wine.sh b/scripts/run-bootmapper-wine.sh new file mode 100755 index 0000000..24bff2f --- /dev/null +++ b/scripts/run-bootmapper-wine.sh @@ -0,0 +1,15 @@ +#!/usr/bin/env sh +set -eu + +ROOT_DIR=$(CDPATH= cd -- "$(dirname -- "$0")/.." && pwd) +BUNDLE_DIR=${BOOTMAPPER_BUNDLE_DIR:-"$ROOT_DIR/bin-release/Bootmapper-win64-manual"} +WINE_BIN=${WINE:-wine} + +if [ ! -f "$BUNDLE_DIR/Bootmapper.exe" ]; then + echo "Bootmapper.exe was not found in: $BUNDLE_DIR" >&2 + echo "Set BOOTMAPPER_BUNDLE_DIR to the Windows bundle directory." >&2 + exit 1 +fi + +cd "$BUNDLE_DIR" +exec "$WINE_BIN" Bootmapper.exe "$@" diff --git a/src/json/keyindex.json b/src/json/keyindex.json index 1e8fce8..d59adb6 100644 --- a/src/json/keyindex.json +++ b/src/json/keyindex.json @@ -1068,6 +1068,102 @@ "height": 1, "marginRight": 0, "label": "Qck Macro" + }, + { + "keyIndex": 145, + "marginBottom": 0, + "width": 1, + "height": 1, + "marginRight": 0, + "label": "F13" + }, + { + "keyIndex": 146, + "marginBottom": 0, + "width": 1, + "height": 1, + "marginRight": 0, + "label": "F14" + }, + { + "keyIndex": 147, + "marginBottom": 0, + "width": 1, + "height": 1, + "marginRight": 0, + "label": "F15" + }, + { + "keyIndex": 148, + "marginBottom": 0, + "width": 1, + "height": 1, + "marginRight": 0, + "label": "F16" + }, + { + "keyIndex": 149, + "marginBottom": 0, + "width": 1, + "height": 1, + "marginRight": 0, + "label": "F17" + }, + { + "keyIndex": 150, + "marginBottom": 0, + "width": 1, + "height": 1, + "marginRight": 0, + "label": "F18" + }, + { + "keyIndex": 151, + "marginBottom": 0, + "width": 1, + "height": 1, + "marginRight": 0, + "label": "F19" + }, + { + "keyIndex": 152, + "marginBottom": 0, + "width": 1, + "height": 1, + "marginRight": 0, + "label": "F20" + }, + { + "keyIndex": 153, + "marginBottom": 0, + "width": 1, + "height": 1, + "marginRight": 0, + "label": "F21" + }, + { + "keyIndex": 154, + "marginBottom": 0, + "width": 1, + "height": 1, + "marginRight": 0, + "label": "F22" + }, + { + "keyIndex": 155, + "marginBottom": 0, + "width": 1, + "height": 1, + "marginRight": 0, + "label": "F23" + }, + { + "keyIndex": 156, + "marginBottom": 0, + "width": 1, + "height": 1, + "marginRight": 0, + "label": "F24" } ], [ @@ -1604,4 +1700,4 @@ "label": "Dual Act24" } ] -] \ No newline at end of file +] diff --git a/src/json/keyindexmacro.json b/src/json/keyindexmacro.json index 642df5b..3edbc65 100644 --- a/src/json/keyindexmacro.json +++ b/src/json/keyindexmacro.json @@ -1027,7 +1027,107 @@ "height": 1, "marginRight": 0.5, "label": "vol dn" + } + ], + [ + { + "keyIndex": 145, + "marginBottom": 0, + "width": 1, + "height": 1, + "marginRight": 0, + "label": "F13" + }, + { + "keyIndex": 146, + "marginBottom": 0, + "width": 1, + "height": 1, + "marginRight": 0, + "label": "F14" + }, + { + "keyIndex": 147, + "marginBottom": 0, + "width": 1, + "height": 1, + "marginRight": 0, + "label": "F15" + }, + { + "keyIndex": 148, + "marginBottom": 0, + "width": 1, + "height": 1, + "marginRight": 0, + "label": "F16" + }, + { + "keyIndex": 149, + "marginBottom": 0, + "width": 1, + "height": 1, + "marginRight": 0, + "label": "F17" + }, + { + "keyIndex": 150, + "marginBottom": 0, + "width": 1, + "height": 1, + "marginRight": 0, + "label": "F18" }, + { + "keyIndex": 151, + "marginBottom": 0, + "width": 1, + "height": 1, + "marginRight": 0, + "label": "F19" + }, + { + "keyIndex": 152, + "marginBottom": 0, + "width": 1, + "height": 1, + "marginRight": 0, + "label": "F20" + }, + { + "keyIndex": 153, + "marginBottom": 0, + "width": 1, + "height": 1, + "marginRight": 0, + "label": "F21" + }, + { + "keyIndex": 154, + "marginBottom": 0, + "width": 1, + "height": 1, + "marginRight": 0, + "label": "F22" + }, + { + "keyIndex": 155, + "marginBottom": 0, + "width": 1, + "height": 1, + "marginRight": 0, + "label": "F23" + }, + { + "keyIndex": 156, + "marginBottom": 0, + "width": 1, + "height": 1, + "marginRight": 0.5, + "label": "F24" + } + ], + [ { "keyIndex": 189, "marginBottom": 0, @@ -1224,4 +1324,4 @@ } ] ] - \ No newline at end of file +