fix: CSPRNG on Windows, and a window's first title is the package's app name

Crypto.random_* and Uuid.* read /dev/urandom, which Windows lacks, so every
byte was zero; the Windows target now calls RtlGenRandom (advapi32).
ludicc takes --title, which ludic build/run/bundle pass from package.ludic's
app name, so rt_init opens the window under that name instead of the
program name.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
Orkun ÇAKILKAYA 2026-09-17 16:22:05 +03:00
parent 28f661c36f
commit 7f9f8de08a
9 changed files with 33592 additions and 33300 deletions

View file

@ -288,7 +288,7 @@ function cmd_bundle_windows() -> int {
let staged = tmp_path("bundle_exe")
var flags = "--windowed --gui"
if res != "" { flags = flags + ` --link "{res}"` }
if not shq(`{ludicc()} {flags} {entry} -o {staged}`) { return 1 }
if not shq(`{ludicc()} {flags}{title_flag()} {entry} -o {staged}`) { return 1 }
if not shq(`cp "{staged}.exe" "{root}/{name}.exe"`) {
err("ludic bundle: could not place the executable\n")
return 1