Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
44 commits
Select commit Hold shift + click to select a range
12b572c
refactor: required mondernization of the io_service
michyaraque Jan 23, 2026
b935c8b
feat: introduce lua_api engine
michyaraque Jan 23, 2026
c310f80
chore: bump version
michyaraque Jan 23, 2026
92dc1c5
feat: add script manager and menu section
michyaraque Jan 23, 2026
b55ce29
feat: add event emitters
michyaraque Jan 23, 2026
501ab0c
feat: add map overlay, a way to show custom data in the mapView
michyaraque Jan 23, 2026
ec537ba
feat: expose methods to the lua engine
michyaraque Jan 23, 2026
7b84100
doc: add documentation related to the lua engine
michyaraque Jan 23, 2026
5655936
feat: add some lua script examples
michyaraque Jan 23, 2026
4dc1a38
fix: downgrade version to base version 2>1
michyaraque Jan 23, 2026
05ab989
Code format - (Clang-format)
github-actions[bot] Jan 23, 2026
52096e5
ci: fix required files in cmakelist and build flow
michyaraque Jan 23, 2026
06a5533
ci: typo in the FastNoiseLite -> fast_noise_lite, unhandled libsol
michyaraque Jan 23, 2026
6ccc864
ci: solve libsol reaching in linux
michyaraque Jan 23, 2026
c1ef38b
fix: remove autoborder redefinition issue
michyaraque Jan 23, 2026
6e12201
fix: remove unnecesary const
michyaraque Jan 23, 2026
cd54816
fix: solve issue related to source header discover
michyaraque Jan 23, 2026
6edcc8d
feat: add sandbox security, prevent use of malicious paths or unknown…
michyaraque Jan 23, 2026
140bca3
fix: force to correct overload resolution in fast_noise_lite lib
michyaraque Jan 23, 2026
309db7e
Code format - (Clang-format)
github-actions[bot] Jan 23, 2026
d819074
ci: fix strings in lua_dialog
michyaraque Jan 23, 2026
ec59eb7
Merge branch 'lua-scripting' of github.com:michyaraque/RME into lua-s…
michyaraque Jan 23, 2026
65e41cc
Code format - (Clang-format)
github-actions[bot] Jan 23, 2026
ebd372b
ci: Fix sol2 warnings, LuaImage deprecation, and add cpr/json depende…
michyaraque Jan 23, 2026
f06b7f8
Merge branch 'lua-scripting' of github.com:michyaraque/RME into lua-s…
michyaraque Jan 23, 2026
c2a216d
docs: update documentation related to init new script project
michyaraque Jan 23, 2026
13e5196
ci: include windows CI
michyaraque Jan 23, 2026
97d26be
ci: label correctly linux build, add release CI
michyaraque Jan 23, 2026
0eeed5a
ci: update release GA tags to handle OTA release convention correctly
michyaraque Jan 23, 2026
a541a18
feat: expose keyboard methods, mouse methods and internal selection m…
michyaraque Jan 24, 2026
6aeed4a
docs: improve documentation
michyaraque Jan 24, 2026
26137dc
Code format - (Clang-format)
github-actions[bot] Jan 24, 2026
d9f37e9
ci: fix windows build
michyaraque Jan 24, 2026
5e5324a
Merge branch 'lua-scripting' of github.com:michyaraque/RME into lua-s…
michyaraque Jan 24, 2026
6832ecd
typo: remove on~ in mouse events
michyaraque Jan 24, 2026
52a2483
build: update MSVC flags
michyaraque Jan 24, 2026
dc825bc
build: fix linux unhandled packages
michyaraque Jan 24, 2026
77e5ac1
build: solve lua libraries
michyaraque Jan 24, 2026
4a60d6f
ci: support vcpkg cache
michyaraque Jan 24, 2026
4b96efe
build: remove sol2 ambiguity
michyaraque Jan 24, 2026
88be3bf
ci: include lua.hpp header
michyaraque Jan 24, 2026
60d2c2f
build: fix lua version link
michyaraque Jan 24, 2026
5a0e2a6
ci: improve vcpkg cache
michyaraque Jan 24, 2026
e102d16
ci: drop windows CI for now
michyaraque Jan 24, 2026
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
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Build RME
name: Build - Linux

on:
push:
Expand Down Expand Up @@ -33,8 +33,11 @@ jobs:
freeglut3-dev \
libarchive-dev \
zlib1g-dev \
libarchive-dev \
zlib1g-dev \
libxmu-dev \
libxi-dev
libxi-dev \
liblua5.3-dev

- name: Setup ccache
run: |
Expand Down
89 changes: 89 additions & 0 deletions .github/workflows/build-windows.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,89 @@
name: Build - Windows

on:
workflow_dispatch:

permissions:
contents: read

jobs:
build-windows:
name: Windows-Release
runs-on: windows-2022

env:
CMAKE_BUILD_PARALLEL_LEVEL: 4
VCPKG_DEFAULT_BINARY_CACHE: ${{ github.workspace }}\vcpkg_cache
VCPKG_COMMIT: '734f8130ffe2f02cf855a3a42a2958f01b3fb005'

steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
submodules: recursive
fetch-depth: 0

- name: Get latest CMake and Ninja
uses: lukka/get-cmake@v3.31.6

- name: Create vcpkg cache directory
run: mkdir -p "${{ env.VCPKG_DEFAULT_BINARY_CACHE }}"
shell: bash

- name: Restore vcpkg binary cache
id: vcpkg-cache
uses: actions/cache@v4
with:
path: ${{ env.VCPKG_DEFAULT_BINARY_CACHE }}
key: vcpkg-bin-${{ runner.os }}-${{ env.VCPKG_COMMIT }}-${{ hashFiles('vcpkg.json') }}
restore-keys: |
vcpkg-bin-${{ runner.os }}-${{ env.VCPKG_COMMIT }}-

- name: Restore vcpkg installed packages
id: vcpkg-installed
uses: actions/cache@v4
with:
path: build/vcpkg_installed
key: vcpkg-installed-${{ runner.os }}-${{ env.VCPKG_COMMIT }}-${{ hashFiles('vcpkg.json') }}
restore-keys: |
vcpkg-installed-${{ runner.os }}-${{ env.VCPKG_COMMIT }}-

- name: Setup vcpkg
uses: lukka/run-vcpkg@v11
with:
vcpkgGitCommitId: ${{ env.VCPKG_COMMIT }}
vcpkgJsonGlob: 'vcpkg.json'

- name: Configure CMake
shell: pwsh
run: |
cmake -S . -B build -G "Visual Studio 17 2022" -A x64 `
-DCMAKE_TOOLCHAIN_FILE="$env:VCPKG_ROOT/scripts/buildsystems/vcpkg.cmake" `
-DVCPKG_TARGET_TRIPLET=x64-windows-static `
-DVCPKG_INSTALL_OPTIONS="--clean-after-build" `
-DCMAKE_BUILD_TYPE=Release

- name: Build
shell: pwsh
run: cmake --build build --config Release --parallel

- name: Prepare Artifacts
shell: pwsh
run: |
$artifactDir = "$env:GITHUB_WORKSPACE\artifacts"
New-Item -ItemType Directory -Force -Path $artifactDir | Out-Null

$exePath = Get-ChildItem -Recurse -Path "$env:GITHUB_WORKSPACE\build" -Filter "rme.exe" | Select-Object -First 1

if (-not $exePath) {
Write-Error "Not found rme.exe!"
exit 1
}

Copy-Item $exePath.FullName -Destination $artifactDir

- name: Upload Artifact
uses: actions/upload-artifact@v4
with:
name: rme-windows
path: artifacts/
148 changes: 148 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,148 @@
name: Release

on:
push:
tags:
- 'v*'
- 'Hotfix*'
- 'Release*'
- 'Hotfix *'
- 'Release *'

permissions:
contents: write

jobs:
release:
name: Release ${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
include:
- os: ubuntu-24.04
asset_prefix: rme-linux
- os: windows-2022
asset_prefix: rme-windows

env:
CMAKE_BUILD_PARALLEL_LEVEL: 2
LUKKA_RUN_VCPKG_SHA: '734f8130ffe2f02cf855a3a42a2958f01b3fb005'

steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
submodules: recursive
fetch-depth: 0

# --- Linux Dependencies ---
- name: Install Dependencies (Linux)
if: runner.os == 'Linux'
run: |
sudo apt-get update
sudo apt-get install -y \
build-essential cmake ccache libasio-dev nlohmann-json3-dev \
libfmt-dev libboost-system-dev libboost-thread-dev libwxgtk3.2-dev \
libglu1-mesa-dev freeglut3-dev libarchive-dev zlib1g-dev \
libxmu-dev libxi-dev liblua5.3-dev

# --- Windows Dependencies ---
- name: Get latest CMake (Windows)
if: runner.os == 'Windows'
uses: lukka/get-cmake@v3.31.6

- name: Setup vcpkg (Windows)
if: runner.os == 'Windows'
uses: lukka/run-vcpkg@v11
with:
vcpkgGitCommitId: ${{ env.LUKKA_RUN_VCPKG_SHA }}

- name: Install Dependencies via vcpkg (Windows)
if: runner.os == 'Windows'
shell: pwsh
run: |
$deps = @("wxwidgets", "boost-thread", "boost-system", "libarchive", "freeglut", "zlib", "lua", "cpr", "nlohmann-json")
& "$env:VCPKG_ROOT/vcpkg" install $deps --triplet x64-windows-static

# --- Configure ---
- name: Configure CMake (Linux)
if: runner.os == 'Linux'
run: |
cmake -S . -B build -DCMAKE_BUILD_TYPE=Release

- name: Configure CMake (Windows)
if: runner.os == 'Windows'
shell: pwsh
run: |
cmake -S . -B build -G "Visual Studio 17 2022" -A x64 `
-DCMAKE_TOOLCHAIN_FILE="$env:VCPKG_ROOT/scripts/buildsystems/vcpkg.cmake" `
-DVCPKG_TARGET_TRIPLET=x64-windows-static `
-DCMAKE_BUILD_TYPE=Release

# --- Build ---
- name: Build
run: cmake --build build --config Release --parallel 2

# --- Package ---
- name: Prepare Release Bundle
shell: bash
run: |
mkdir release_package

# Copy Executable
if [ "${{ runner.os }}" == "Windows" ]; then
find build -name "rme.exe" -exec cp {} release_package/ \;
else
find build -name "rme" -exec cp {} release_package/ \;
chmod +x release_package/rme
fi

# Copy Resources
cp -r data release_package/
[ -d "brushes" ] && cp -r brushes release_package/
[ -d "icons" ] && cp -r icons release_package/
[ -d "extensions" ] && cp -r extensions release_package/
[ -d "modules" ] && cp -r modules release_package/
[ -d "scripts" ] && cp -r scripts release_package/

# Copy License/Readme
[ -f "LICENSE" ] && cp LICENSE release_package/
[ -f "LICENSE.rtf" ] && cp LICENSE.rtf release_package/
[ -f "README.md" ] && cp README.md release_package/

- name: Prepare Source Bundle
if: runner.os == 'Windows'
shell: bash
run: |
mkdir source_package
[ -d "source" ] && cp -r source source_package/
[ -d "vcproj" ] && cp -r vcproj source_package/
[ -f "CMakeLists.txt" ] && cp CMakeLists.txt source_package/
[ -f "vcpkg.json" ] && cp vcpkg.json source_package/
[ -f "LICENSE.rtf" ] && cp LICENSE.rtf source_package/
[ -f "README.md" ] && cp README.md source_package/

- name: Zip Source
if: runner.os == 'Windows'
uses: thedoctor0/zip-release@0.7.6
with:
type: zip
filename: rme-source-${{ github.ref_name }}.zip
path: source_package/

- name: Zip Release
uses: thedoctor0/zip-release@0.7.6
with:
type: zip
filename: ${{ matrix.asset_prefix }}-${{ github.ref_name }}.zip
path: release_package/

# --- Upload ---
- name: Upload Release Artifact
uses: ncipollo/release-action@v1
with:
artifacts: "*.zip"
allowUpdates: true
replacesArtifacts: true
token: ${{ secrets.GITHUB_TOKEN }}
114 changes: 106 additions & 8 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,16 +1,32 @@
cmake_minimum_required(VERSION 3.1)
cmake_minimum_required(VERSION 3.12)

project(rme)

if(POLICY CMP0072)
cmake_policy(SET CMP0072 NEW) # Prefer GLVND
endif()

if(POLICY CMP0167)
cmake_policy(SET CMP0167 NEW) # Use BoostConfig
endif()

if(NOT CMAKE_BUILD_TYPE)
set(CMAKE_BUILD_TYPE RelWithDebInfo)
endif()

set(CMAKE_CXX_FLAGS "-Wall -Wextra -Wno-unused-parameter -Wno-unused-variable -Wno-deprecated-declarations -Wno-overloaded-virtual -Wno-strict-aliasing -Wno-sign-compare -Wno-unused-function -Wunused-result")
set(CMAKE_CXX_FLAGS_DEBUG "-O0 -g -D__DEBUG__")
set(CMAKE_CXX_FLAGS_MINSIZEREL "-Os -DNDEBUG")
set(CMAKE_CXX_FLAGS_RELEASE "-O4 -DNDEBUG")
set(CMAKE_CXX_FLAGS_RELWITHDEBINFO "-O2 -g")
if(MSVC)
set(CMAKE_CXX_FLAGS "/W3 /EHsc /D_CRT_SECURE_NO_WARNINGS")
set(CMAKE_CXX_FLAGS_DEBUG "/Od /Zi /D__DEBUG__")
set(CMAKE_CXX_FLAGS_MINSIZEREL "/O1 /DNDEBUG")
set(CMAKE_CXX_FLAGS_RELEASE "/O2 /DNDEBUG")
set(CMAKE_CXX_FLAGS_RELWITHDEBINFO "/O2 /Zi")
else()
set(CMAKE_CXX_FLAGS "-Wall -Wextra -Wno-unused-parameter -Wno-unused-variable -Wno-deprecated-declarations -Wno-overloaded-virtual -Wno-strict-aliasing -Wno-sign-compare -Wno-unused-function -Wunused-result")
set(CMAKE_CXX_FLAGS_DEBUG "-O0 -g -D__DEBUG__")
set(CMAKE_CXX_FLAGS_MINSIZEREL "-Os -DNDEBUG")
set(CMAKE_CXX_FLAGS_RELEASE "-O4 -DNDEBUG")
set(CMAKE_CXX_FLAGS_RELWITHDEBINFO "-O2 -g")
endif()

find_package(OpenGL REQUIRED)

Expand All @@ -29,12 +45,94 @@ find_package(wxWidgets COMPONENTS html aui gl adv core net base REQUIRED)
find_package(GLUT REQUIRED)
find_package(ZLIB REQUIRED)

# Lua scripting support
if(MSVC)
# Windows/vcpkg specific configuration
find_package(lua CONFIG REQUIRED)
find_package(sol2 CONFIG REQUIRED)
find_package(cpr CONFIG REQUIRED)
find_package(nlohmann_json CONFIG REQUIRED)

# Validate Lua target from vcpkg
if(TARGET lua::lua)
set(LUA_LIB_TARGET lua::lua)
elseif(TARGET lua)
set(LUA_LIB_TARGET lua)
else()
message(FATAL_ERROR "Lua target not found in vcpkg config!")
endif()

# Explicitly add Lua includes to global path to ensure sol2 finds 'lua.hpp'
get_target_property(VCPKG_LUA_INCLUDES ${LUA_LIB_TARGET} INTERFACE_INCLUDE_DIRECTORIES)
if(VCPKG_LUA_INCLUDES)
include_directories(${VCPKG_LUA_INCLUDES})
endif()

add_compile_definitions(SOL_USING_CXX_LUA_HPP=1)

set(LIBS_TO_LINK ${LUA_LIB_TARGET} cpr::cpr nlohmann_json::nlohmann_json sol2::sol2)

else()
# Linux / Standard CMake Module configuration
find_package(Lua REQUIRED)

include(FetchContent)

# sol2
find_package(sol2 CONFIG QUIET)
if(NOT sol2_FOUND)
message(STATUS "sol2 not found via find_package, using FetchContent...")
FetchContent_Declare(
sol2
GIT_REPOSITORY https://github.com/ThePhD/sol2.git
GIT_TAG v3.3.0
)
FetchContent_MakeAvailable(sol2)
if(NOT TARGET sol2::sol2)
if(TARGET sol2)
add_library(sol2::sol2 ALIAS sol2)
else()
set(SOL2_INCLUDE_DIRS ${sol2_SOURCE_DIR}/include)
include_directories(${SOL2_INCLUDE_DIRS})
add_library(sol2::sol2 INTERFACE IMPORTED)
set_target_properties(sol2::sol2 PROPERTIES INTERFACE_INCLUDE_DIRECTORIES "${SOL2_INCLUDE_DIRS}")
endif()
endif()
endif()

# cpr
find_package(cpr CONFIG QUIET)
if(NOT cpr_FOUND)
message(STATUS "cpr not found via find_package, using FetchContent...")
FetchContent_Declare(
cpr
GIT_REPOSITORY https://github.com/libcpr/cpr.git
GIT_TAG 1.10.5
)
FetchContent_MakeAvailable(cpr)
endif()

# nlohmann_json
find_package(nlohmann_json CONFIG QUIET)
if(NOT nlohmann_json_FOUND)
message(STATUS "nlohmann_json not found via find_package, using FetchContent...")
FetchContent_Declare(
json
GIT_REPOSITORY https://github.com/nlohmann/json.git
GIT_TAG v3.11.3
)
FetchContent_MakeAvailable(json)
endif()

set(LIBS_TO_LINK ${LUA_LIBRARIES} cpr::cpr nlohmann_json::nlohmann_json sol2::sol2)
endif()

include(${wxWidgets_USE_FILE})
include(source/CMakeLists.txt)
add_executable(rme ${rme_H} ${rme_SRC})

set_target_properties(rme PROPERTIES CXX_STANDARD 17)
set_target_properties(rme PROPERTIES CXX_STANDARD_REQUIRED ON)

include_directories(${Boost_INCLUDE_DIRS} ${LibArchive_INCLUDE_DIRS} ${OPENGL_INCLUDE_DIR} ${GLUT_INCLUDE_DIRS} ${ZLIB_INCLUDE_DIR})
target_link_libraries(rme ${wxWidgets_LIBRARIES} ${Boost_LIBRARIES} ${LibArchive_LIBRARIES} ${OPENGL_LIBRARIES} ${GLUT_LIBRARIES} ${ZLIB_LIBRARIES})
include_directories(${CMAKE_SOURCE_DIR}/source ${Boost_INCLUDE_DIRS} ${LibArchive_INCLUDE_DIRS} ${OPENGL_INCLUDE_DIR} ${GLUT_INCLUDE_DIRS} ${ZLIB_INCLUDE_DIR} ${LUA_INCLUDE_DIR} ${LUA_INCLUDE_DIRS})
target_link_libraries(rme ${wxWidgets_LIBRARIES} ${Boost_LIBRARIES} ${LibArchive_LIBRARIES} ${OPENGL_LIBRARIES} ${GLUT_LIBRARIES} ${ZLIB_LIBRARIES} ${LIBS_TO_LINK})
Loading