Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -27,3 +27,4 @@
bin-debug/
bin-release/
keystore/
dist/
10 changes: 10 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
74 changes: 74 additions & 0 deletions docs/linux-wine.md
Original file line number Diff line number Diff line change
@@ -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.
7 changes: 7 additions & 0 deletions packaging/linux/bootmapper-wine.desktop
Original file line number Diff line number Diff line change
@@ -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;
18 changes: 18 additions & 0 deletions scripts/package-wine-bundle.sh
Original file line number Diff line number Diff line change
@@ -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"
15 changes: 15 additions & 0 deletions scripts/run-bootmapper-wine.sh
Original file line number Diff line number Diff line change
@@ -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 "$@"
98 changes: 97 additions & 1 deletion src/json/keyindex.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"
}
],
[
Expand Down Expand Up @@ -1604,4 +1700,4 @@
"label": "Dual Act24"
}
]
]
]
102 changes: 101 additions & 1 deletion src/json/keyindexmacro.json
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -1224,4 +1324,4 @@
}
]
]