This repository provides a template for creating Windows XP-compatible software using NW.js 15.4 (the last XP-supported version) and SvelteKit for a lightweight and efficient UI framework.
BuiltApp/
āāā XPlor/
āāā locales/
āāā package.nw/
ā āāā fonts/
ā āāā images/
ā āāā public/
ā ā āāā build/
ā ā āāā data/
ā ā āāā ignore/
ā ā āāā images/
ā ā āāā scripts_compiled/
NW_Cache/
āāā nwjs-sdk-v0.15.4-win-ia32/
ā āāā locales/
ā āāā pnacl/
āāā nwjs-sdk-v0.93.0-win-x64/
ā āāā locales/
ā āāā swiftshader/
āāā nwjs-v0.12.3-win-ia32/
ā āāā locales/
āāā NWTemp/
ā āāā nwjs-sdk-v0.15.4-win-ia32/
ā ā āāā locales/
ā ā āāā pnacl/
ā āāā nwjs-v0.12.3-win-ia32/
ā ā āāā locales/
ā āāā nwjs-v0.15.4-win-ia32/
ā āāā locales/
āāā package.nw/
ā āāā public/
ā ā āāā scripts/
ā ā āāā executables/
SourceCode/ <== š This Repository
āāā rollup.config.js
āāā package.json
āāā CompileBabel.js
āāā BuildApp.js
āāā .env
āāā .gitignore
āāā BuildAppTools/
ā āāā npmInstall.cmd
āāā fonts/
āāā images/
āāā lib/
ā āāā dts/
ā ā āāā jquery/
āāā node_modules/
āāā public/
ā āāā index.html
ā āāā package.json
ā āāā global.css
ā āāā devTools.js
ā āāā build/
ā ā āāā bundle.js
ā ā āāā bundle.css
ā āāā scripts_compiled/
ā ā āāā executables/
ā ā āāā main/
ā ā āāā modules/
āāā src/
ā āāā main.js
ā āāā App.svelte
ā āāā components/
ā āāā scripts/
ā ā āāā main/
ā ā āāā modules/
npm run dev
src/
into public/build/bundle.js
node BuildApp.js
BuildApp.js
before running.BuiltApp/{YourProjectName}/{YourProjectName}.exe
Include multipleInstances.js in index.html:
<script src="multipleInstances.js"></script>
Why?
ā Issue: NW.js fills %LOCALAPPDATA%
with {AppName}-{RandomNumber}
folders.
Solution: Use the following launch parameter:
--user-data-dir=./NWProfile
NWProfile/
, avoiding clutter.To hide your source code inside the executable:
package.nw
package.zip
* ā *package.nw
copy /b YourProject.exe+package.nw FinalExecutable.exe
ā Warning: NW.js extracts the package on launch, so this slows down startup
depending on file count and size.
Any NW.js version higher than 0.12.3 has an issue on Windows XP:
child_process
, http
, or https
, and there is no internet, the application will crash.File | Description |
---|---|
element.js |
Utility functions for HTML element calculations. |
multipleInstances.js |
Enables multiple NW.js instances at once. |
package.json
, add available NW.js versions..env
(set APPLICATION_NAME
here).npm run dev
If you're using custom .js scripts:
src/scripts/**/*
npm run watch_js_modules
0.15.4
and earlier ā Transpiled with Babelpublic/scripts_compiled/**/*
0.16+
ā Only copied, no transpilation.<script src="public/scripts_compiled/my_script.js"></script>
public/package.json
node BuildApp.js
BuiltApp/{YourProjectName}/
.env
with APPLICATION_NAME
Inno Setup
or similar to package everything.