6a05d8680109d2a8ea954d0a08e39180b84ef467
get_text_index_at_cursor() returns an index into the stripped string, but PoB expects an index into the original unstripped text. Accumulate the total length of all escape sequences preceding the cursor position and add it to the returned index. Fixes #45
Rusty Path of Building
Rusty Path of Building is a cross-platform runtime environment for Path of Building and Path of Building 2. Like SimpleGraphic, PoB's official runtime environment, it implements the API functions required by PoB's Lua code, handles window management and input, and renders the UI.
The primary goal of this project is to provide native Linux support for Path of Building. It is written in Rust with cross-platform compatibility in mind and also runs on Windows, though testing there has been minimal.
Usage
rusty-path-of-building [poe1|poe2]
Installation
Flathub
Building from source
LuaJIT needs to be installed on your system for the mlua crate to compile.
cargo build --release
Runtime Dependencies
Path of Building's Lua code requires the following C libraries:
- Lua-cURLv3
- luautf8
- luasocket
lzip- The source is included in this repo underlua/libs/lzipand requires zlib to compile. Build it withmake LUA_IMPL=luajit.
Please refer to the Lua documentation to see how it locates libraries.
Known Issues
- If automatic updates fail, navigate to
~/.local/share/RustyPathOfBuilding{1,2}/and delete both therpob.versionfile and theUpdatedirectory. This will force a complete re-download of PoB's latest assets and Lua code on the next startup. (Note: Third-party backends, like this project, face challenges supporting PoB's update mechanism. To make it work, fragile workarounds had to be implemented that can break unexpectedly)