Skip to content
Merged
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
6 changes: 3 additions & 3 deletions .github/copilot-instructions.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ the frontend with a C++ backend. It is intentionally minimal: executables stay
around 2 MB and no Electron/Chromium runtimes are required.

- **Repository**: https://github.com/spur27/RenWeb-Engine
- **Version**: 0.0.7
- **Version**: 0.1.0
- **License**: Boost Software License 1.0 (BSL-1.0)
- **Author**: spur27 / Spur27
- **App ID**: `io.github.spur27.renweb-engine`
Expand Down Expand Up @@ -183,7 +183,7 @@ All major components have interface base classes (prefix `I`):
"description": "Base RenWeb engine.",
"license": "BSL",
"title": "RenWeb",
"version": "0.0.7",
"version": "0.1.0",
"repository": "https://github.com/spur27/RenWeb-Engine",
"category": "Utility",
"copyright": "Copyright © 2025 Spur27",
Expand Down Expand Up @@ -268,7 +268,7 @@ When modifying makefile defaults, always use the `ifndef VAR` / `VAR := value` p
build/<name>-<version>-<os>-<arch>[.exe]
```

Example: `build/renweb-0.0.7-linux-x86_64`
Example: `build/renweb-0.1.0-linux-x86_64`

Name and version are extracted from `./info.json` using `sed` at build time.

Expand Down
26 changes: 26 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
## Changelog

## 0.1.0 - 2026-04-25
- Bumped engine version to 0.1.0 across runtime metadata, site metadata, wiki templates, and maintenance references.
- Improved Windows plugin build reliability by adding Unix-like tool path handling for make-based plugin builds.
- Improved `rw doctor` on Windows by making npm detection work with `npm.cmd`, `npm`, and `cmd /c` fallback probing.
- Fixed Windows resource metadata mapping so file description uses app title and comments use app description.
- Added consistent cross-platform command naming support for packaging outputs.
- Reduced Windows build noise by replacing deprecated `getenv` usage with `_dupenv_s` for `ComSpec` lookup.
- Validated release build and Windows packaging flow for updated metadata and command behavior.
- Added chooseFiles function to FS for choosing files with full paths
- Added focus function to Window for forcing window focus
- Added isShown function to Window for checking window visibility

## 0.0.7 - 2026-04-23
- Added example plugin
- Added CLI tool (packager and project manager for applications, plugins, and engines)
- Added packages on JSR and NPM for both CLI and API
- Added an "Application" namespace of functions
- Added many more `window.renweb.<fn>` callbacks
- Fixed some issues with windows flashing geometry early
- Added installer generation graphics and more custom icon placeholders
- simplified info.json by removing unneeded server configuration options that didn't do anything
- Updated wiki pictures, contents, and filled in CLI page + plugin and CLI tool download sections
- Added new security distinction to toggle access to JS bindings
- Validation spreadsheet [here](https://drive.proton.me/urls/ZSCMMTTVPW#wQZdg1qyD0O3)
12 changes: 6 additions & 6 deletions MAINTENANCE.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,15 +9,15 @@ a checklist to ensure nothing is missed.
To find all occurrences of any value quickly:

```sh
grep -r "0.0.7" --include="*.json" --include="*.html" --include="*.md" --include="*.js" \
grep -r "0.1.0" --include="*.json" --include="*.html" --include="*.md" --include="*.js" \
--exclude-dir=external --exclude-dir=node_modules .
```

---

## Engine Version

**Current value:** `0.0.7`
**Current value:** `0.1.0`

The authoritative source is `info.json → "version"`. The makefile reads it at
compile time via `sed` to construct the executable filename. All other locations
Expand All @@ -30,17 +30,17 @@ must be kept in sync manually.
| `index.html` | JSON-LD `"softwareVersion"` |
| `wiki/home.html` | JSON-LD `"softwareVersion"` |
| `wiki/template_jsons.js` | template JSON `"version"` field |
| `wiki/cli.html` | example output strings (`renweb-0.0.7-linux-x86_64`) |
| `wiki/cli.html` | example output strings (`renweb-0.1.0-linux-x86_64`) |
| `.github/copilot-instructions.md` | `"Version"` field and example paths |

> `wiki/api.html` contains `"0.0.7"` in a code example comment — update as
> `wiki/api.html` contains `"0.1.0"` in a code example comment — update as
> well for accuracy, but it has no functional effect.

---

## CLI Tool Version

**Current value:** `0.0.6`
**Current value:** `0.1.0`

Versioned independently from the engine. The `package-lock.json` is
auto-updated by `npm install`; do not edit it manually.
Expand All @@ -54,7 +54,7 @@ auto-updated by `npm install`; do not edit it manually.

## JS API Version

**Current value:** `0.0.6`
**Current value:** `0.1.0`

Three separate config files must stay in sync. `package-lock.json` at the root
is auto-updated.
Expand Down
5 changes: 4 additions & 1 deletion cli/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ npm install -g renweb-cli
| `rw doctor` | Check environment and project health |
| `rw package` | Package build output into distributable archives (.deb, .rpm, .zip, .tar.gz) |
| `rw doc [pages...]` | Open RenWeb documentation pages in a browser |
| `rw fetch [verb]` | Download engine assets (executable, plugin headers, JS/TS API files) |
| `rw fetch [verb]` | Download engine assets (executable, plugin binary, JS/TS API files, or example archive) |
| `rw docker <action>` | Manage the renweb-cli Docker image (build, rebuild, kill, delete) |

## Project Types (`rw create`)
Expand Down Expand Up @@ -76,6 +76,9 @@ rw package -olinux -ax86_64 -edeb
# Fetch the latest engine executable
rw fetch executable

# Fetch the latest example archive (zip on Windows, tar.gz on macOS/Linux)
rw fetch example

# Check environment health
rw doctor
```
Expand Down
49 changes: 44 additions & 5 deletions cli/commands/build.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,26 @@ const { fetchPlugins } = require('../shared/fetchers');
const { ProjectState } = require('../project/project_state');
const ui = require('../shared/ui');

function finishBuild(result, buildLabel) {
if (!result) {
ui.error(`Build failed (${buildLabel}) — no process result.`);
process.exit(1);
}

if (result.error) {
ui.error(`Build failed (${buildLabel}) — ${result.error.message}`);
process.exit(1);
}

if (result.status === 0) {
ui.ok(`Build complete (${buildLabel}).`);
process.exit(0);
}

ui.error(`Build failed (${buildLabel}) with exit code ${result.status}.`);
process.exit(result.status ?? 1);
}

function ensureExecutable(projectRoot, buildDir, targetOs, targetArch) {
if (findProjectExecutable(buildDir, targetOs, targetArch)) return true;

Expand Down Expand Up @@ -49,6 +69,24 @@ function ensureExecutable(projectRoot, buildDir, targetOs, targetArch) {
return true;
}

/** On Windows, find MSYS2/Git-for-Windows usr/bin directories and prepend them
* to PATH so that make shell recipes can find grep, sed, tr, xargs, etc. */
function buildMakeEnv() {
if (process.platform !== 'win32') return process.env;

const candidates = [
'C:\\msys64\\usr\\bin',
'C:\\msys32\\usr\\bin',
'C:\\Program Files\\Git\\usr\\bin',
'C:\\Git\\usr\\bin',
];

const found = candidates.filter(p => { try { return fs.statSync(p).isDirectory(); } catch (_) { return false; } });
if (found.length === 0) return process.env;

return { ...process.env, PATH: found.join(path.delimiter) + path.delimiter + (process.env.PATH || '') };
}

function hasBuildScript(projectRoot, jsEngine) {
try {
if (jsEngine === 'node' || jsEngine === 'bun') {
Expand Down Expand Up @@ -103,16 +141,17 @@ function run(args) {
const makefilePath = ['makefile', 'Makefile'].find(f => fs.existsSync(path.join(projectRoot, f)));
if (makefilePath && state.js_engine === 'none') {
ui.step('Building plugin (make)…');
const r = spawnSync('make', [], { cwd: projectRoot, stdio: 'inherit' });
process.exit(r.status ?? 0);
const makeEnv = buildMakeEnv();
const r = spawnSync('make', [], { cwd: projectRoot, stdio: 'inherit', env: makeEnv });
finishBuild(r, 'plugin');
}

if (hasBuildScript(projectRoot, state.js_engine)) {
const [bin, bin_args] = state.pkg_manager().build_cmd();
const pm = state.pkg_manager();
const buildLabel = state.isVanilla() ? state.js_engine : state.framework;
ui.step(`Building (${buildLabel})…`);
const r = spawnSync(bin, bin_args, { cwd: projectRoot, stdio: 'inherit' });
process.exit(r.status ?? 0);
const r = pm.run('build');
finishBuild(r, buildLabel);
}

const srcDir = path.join(projectRoot, 'src');
Expand Down
Loading
Loading