GXM Packager
Create GXM executable files for guideXOS with ease
What is GXM Packager?
GXM Packager is a tool for creating GXM (guideX Module) executable files for guideXOS. It packages binary code or GUI scripts into the proper GXM format with headers that guideXOS can load and execute.
• GUI Version - Windows Forms application with built-in script editor
• Console Version - Command-line tool for automation and CI/CD
GUI Version
Features
- Built-in Script Editor - Dark theme, syntax highlighting, template insertion
- File Browser Dialogs - Easy file selection for input/output
- Visual Options - Set entry point, version, and script options with GUI controls
- Real-time Log - Color-coded terminal output showing packaging progress
- Input Validation - Prevents common mistakes and errors
- Template System - Quick insert for Window, Button, Label, and more
- Keyboard Shortcuts - Ctrl+N, Ctrl+O, Ctrl+S for fast workflow
- Help System - Built-in command reference and documentation
Screenshot
???????????????????????????????????????????????????????
? GXM Packager GUI v1.0 ?
? Package binary files and GUI scripts into GXM ?
???????????????????????????????????????????????????????
? Input File: [________________________] [Browse] ?
? Output GXM: [________________________] [Browse] ?
???????????????????????????????????????????????????????
? Options: ?
? Entry Point: [0 ] Version: [1 ] ?
? ? Include GUI Script: [________] [Browse] [Edit] ?
? ?
? [?? Create New Script] ?
???????????????????????????????????????????????????????
? Log: ?
? ??????????????????????????????????????????????????? ?
? ? Starting GXM packaging... ? ?
? ? Successfully packaged! ? ?
? ??????????????????????????????????????????????????? ?
? [Help] [Clear] [Package GXM] ?
???????????????????????????????????????????????????????
Built-in Script Editor
The GUI version includes a powerful script editor:
- Dark Theme - Easy on the eyes with Consolas monospace font
- Template Insertion - Quick insert via Insert menu dropdown
- Auto-save Protection - Prompts before losing unsaved work
- Status Bar - Shows line, column, and character count
- File Operations - New, Open, Save, Save As with keyboard shortcuts
- Integrated Help - Command reference accessible from toolbar
?? GXM Script Editor ??????????????????????????????????
? [New] [Open] [Save] [Save As] [Insert ?] [Help] ?
???????????????????????????????????????????????????????
? ?
? WINDOW|My App|400|300 ?
? LABEL|Hello World!|20|50 ?
? BUTTON|1|Click Me|20|100|120|30 ?
? ONCLICK|1|NOTIFY|Hello! ?
? ?
? (Dark theme, syntax-friendly) ?
? ?
???????????????????????????????????????????????????????
? Line 4, Col 23 156 characters ?
???????????????????????????????????????????????????????
? [OK] [Cancel] ?
???????????????????????????????????????????????????????
Console Version
Usage
GXMPackager <input.bin> <output.gxm> [options]
Options:
--entry <offset> Entry point RVA (default: 0)
--version <number> Version number (default: 1)
--script <file> Add GUI script from file
Examples:
GXMPackager app.bin app.gxm
GXMPackager app.bin app.gxm --entry 0x1000 --version 2
GXMPackager gui.txt demo.gxm --script gui.txt
When to Use Console Version
- Build Automation - Integrate into build scripts
- CI/CD Pipelines - Automated packaging in continuous integration
- Batch Processing - Package multiple files with scripts
- Linux/macOS - Cross-platform support (GUI is Windows-only)
Key Features
Two Packaging Modes
Package text-based GUI scripts (50-200 bytes)
• No compilation needed
• Perfect for prototypes
• Instant packaging
Package native compiled executables
• Full C# applications
• NativeAOT compilation
• Production apps (50KB-500KB)
GXM Format Support
- Proper Headers - Magic signature, version, entry point, size
- GUI Script Marker - Automatic insertion of script marker when enabled
- Validation - Ensures format compliance before packaging
- Debugging Info - Detailed log output for troubleshooting
Quick Start
Create Your First GXM App (GUI Version)
1. Launch GXMPackager.GUI.exe
2. Click "?? Create New Script"
3. Click "Insert" ? "Complete Template"
4. Press Ctrl+S, save as "myapp.txt"
5. Click "OK"
6. Click "Package GXM"
7. Done! You have myapp.gxm ready to run!
Time: 30 seconds ?
Create Your First GXM App (Console Version)
# 1. Create a simple GUI script
echo "WINDOW|Hello|300|200" > hello.txt
echo "LABEL|Hello World!|20|50" >> hello.txt
echo "BUTTON|1|OK|20|100|100|30" >> hello.txt
echo "ONCLICK|1|CLOSE|" >> hello.txt
# 2. Package it
GXMPackager hello.txt hello.gxm --script hello.txt
# 3. Copy to guideXOS
copy hello.gxm guideXOS\Ramdisk\Programs\
# 4. Rebuild guideXOS and test!
Testing in guideXOS
# In guideXOS console:
cd Programs
hello
# Or use launch command:
launch hello
Building from Source
Prerequisites
- .NET 9.0 SDK or later
- Windows (for GUI version), any OS (for console version)
- Visual Studio 2022 or VS Code (optional)
Build Console Version
cd GXM.Apps/GXMPackager
dotnet build -c Release
# Output:
# bin/Release/net9.0/GXMPackager.dll
# bin/Release/net9.0/GXMPackager.exe (Windows)
Build GUI Version
cd GXM.Apps/GXMPackager.GUI
dotnet build -c Release
# Output:
# bin/Release/net9.0-windows/GXMPackager.GUI.exe
Build Both at Once
cd GXM.Apps
dotnet build GXM.Apps.sln -c Release
Run build-all.ps1
to build and create sample GXM files in one step!
Related Topics
Complete guides, examples, and troubleshooting available in the
GXM.Apps/ directory
in the source repository.