nanoshell 1.0.1 → 1.0.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -43,6 +43,18 @@ npm run build
43
43
 
44
44
  Generates `dist/my-awesome-app.exe` (3.00 MB, 17.0 MB RAM native executable)!
45
45
 
46
+ ### Generate Setup Installer (.exe)
47
+
48
+ ```bash
49
+ npx nanoshell package
50
+ ```
51
+
52
+ Generates `dist/MyApp-Setup.exe` powered by **Inno Setup**!
53
+ - Provides user choice: **"Install for all users (Admin)"** vs **"Install for me only (Per-User, No Admin)"**
54
+ - High-ratio LZMA2 compression for ultra-compact setup installers
55
+ - Automatic Start Menu & Desktop shortcuts
56
+
57
+
46
58
  ---
47
59
 
48
60
  ## 📁 Custom Project Structure
package/SKILL.md CHANGED
@@ -16,9 +16,17 @@ NanoShell is a hyper-lightweight, browser-free native desktop application framew
16
16
  AI agents or developers can scaffold a new application using:
17
17
 
18
18
  ```bash
19
- npx nanoshell <app-name>
19
+ npx nanoshell <app-name> # Scaffold new app template
20
+ npx nanoshell start # Launch dev engine
21
+ npx nanoshell build # Build production binary executable
22
+ npx nanoshell package # Generate Windows Inno Setup installer (.exe)
20
23
  ```
21
24
 
25
+ `npx nanoshell package` generates a Windows Setup `.exe` with a installer dialog allowing end-users to choose:
26
+ - **Per-User Install** (No admin rights required, installs to `%LocalAppData%`)
27
+ - **System-Wide Install** (Requires admin rights, installs to `Program Files`)
28
+
29
+
22
30
  ---
23
31
 
24
32
  ## Developer Workflow Guide
package/package.json CHANGED
@@ -1,11 +1,11 @@
1
1
  {
2
2
  "name": "nanoshell",
3
- "version": "1.0.1",
3
+ "version": "1.0.2",
4
4
  "description": "Hyper-lightweight 17MB RAM, 120 FPS native desktop application framework & runtime engine created by Suman Biswas",
5
5
  "main": "zig-out/bin/example_app.exe",
6
6
  "bin": {
7
- "nanoshell": "zig-out/bin/zeroui.exe",
8
- "create-nanoshell-app": "zig-out/bin/zeroui.exe"
7
+ "nanoshell": "zig-out/bin/nanoshell.exe",
8
+ "create-nanoshell-app": "zig-out/bin/nanoshell.exe"
9
9
  },
10
10
  "readme": "README.md",
11
11
  "files": [
@@ -20,7 +20,7 @@
20
20
  "scripts": {
21
21
  "build": "zig build -Doptimize=ReleaseFast",
22
22
  "start": "zig-out/bin/example_app.exe",
23
- "init": "zig-out/bin/zeroui.exe init"
23
+ "init": "zig-out/bin/nanoshell.exe init"
24
24
  },
25
25
  "keywords": [
26
26
  "nanoshell",
Binary file
@@ -1,144 +0,0 @@
1
- const std = @import("std");
2
- const ZeroAllocator = @import("../src/core/allocator.zig").ZeroAllocator;
3
- const taffy = @import("../src/core/taffy_bindings.zig");
4
- const window_mod = @import("../src/core/window.zig");
5
- const Window = window_mod.Window;
6
- const gpu_mod = @import("../src/renderer/gpu.zig");
7
- const batch_mod = @import("../src/renderer/batch_renderer.zig");
8
- const js_core = @import("../src/js_runtime/quickjs_core.zig");
9
- const dom_mod = @import("../src/js_runtime/dom_bridge.zig");
10
- const event_mod = @import("../src/js_runtime/event_loop.zig");
11
- const sandbox_mod = @import("../src/js_bridge/security_sandbox.zig");
12
- const fs_bridge_mod = @import("../src/js_bridge/fs_bridge.zig");
13
- const sys_bridge_mod = @import("../src/js_bridge/sys_bridge.zig");
14
- const dialog_bridge_mod = @import("../src/js_bridge/dialog_bridge.zig");
15
- const shell_win = @import("../src/shell/window_manager.zig");
16
- const shell_taskbar = @import("../src/shell/taskbar_dock.zig");
17
- const shell_startup = @import("../src/shell/startup.zig");
18
- const shell_assoc = @import("../src/shell/file_association.zig");
19
- const shell_tray = @import("../src/shell/systray.zig");
20
- const text_mod = @import("../src/renderer/text_engine.zig");
21
- const input_mod = @import("../src/js_runtime/input_engine.zig");
22
- const atlas_mod = @import("../src/renderer/image_atlas.zig");
23
- const anim_mod = @import("../src/renderer/animation_engine.zig");
24
- const net_mod = @import("../src/js_bridge/net_bridge.zig");
25
- const devtools_mod = @import("../src/renderer/devtools_overlay.zig");
26
- const custom_shader_mod = @import("../src/renderer/custom_shaders.zig");
27
- const shm_mod = @import("../src/js_bridge/shared_memory.zig");
28
- const snapshot_mod = @import("../src/core/snapshot.zig");
29
- const multi_win_mod = @import("../src/shell/multi_window.zig");
30
- const synth_mod = @import("../src/core/performance_synthesizer.zig");
31
- const html_loader_mod = @import("../src/js_runtime/html_loader.zig");
32
- const child_win_mod = @import("../src/shell/child_window.zig");
33
-
34
- pub fn main() !void {
35
- std.log.info("=================================================================", .{});
36
- std.log.info(" ZeroUI Showcase Application: Cyber System Control Center", .{});
37
- std.log.info("=================================================================", .{});
38
-
39
- // 1. Memory Tracker
40
- var allocator_instance = ZeroAllocator.init();
41
- defer allocator_instance.deinit();
42
- const allocator = allocator_instance.allocator();
43
-
44
- // 2. Snapshot Thaw (< 1ms)
45
- const snapshot_engine = snapshot_mod.SnapshotEngine.init("example_app.snap");
46
- _ = try snapshot_engine.thawState();
47
-
48
- // 3. Zero-Copy Shared Memory Matrix
49
- var shm_matrix = shm_mod.SharedMemoryMatrix.init("ZeroUI_ExampleApp_IPC", 1024 * 1024);
50
- _ = try shm_matrix.createMapping();
51
-
52
- // 4. Security Sandbox & System Bridges
53
- const sandbox = sandbox_mod.SecuritySandbox.init(allocator);
54
- const fs_bridge = fs_bridge_mod.FsBridge.init(allocator, &sandbox);
55
- const sys_bridge = sys_bridge_mod.SysBridge.init(&sandbox);
56
- const dialog_bridge = dialog_bridge_mod.DialogBridge.init(&sandbox);
57
- const net_bridge = net_mod.NetBridge.init(allocator);
58
-
59
- _ = fs_bridge;
60
- _ = sys_bridge;
61
- _ = dialog_bridge;
62
- _ = net_bridge;
63
-
64
- // 5. Taffy Layout Engine & QuickJS
65
- var taffy_tree = try taffy.TaffyTreeWrapper.init();
66
- defer taffy_tree.deinit();
67
-
68
- var js_engine = try js_core.QuickJSEngine.init(allocator);
69
- defer js_engine.deinit();
70
-
71
- var event_loop = event_mod.EventLoop.init(allocator);
72
- defer event_loop.deinit();
73
-
74
- // 6. Load Application HTML Document ('index.html')
75
- const loader = html_loader_mod.HtmlLoader.init(allocator, &taffy_tree);
76
- const loaded_app = try loader.loadHtmlFile("example_app/index.html");
77
- defer loaded_app.doc.deinit();
78
-
79
- // 7. Shell Integration
80
- _ = shell_win.ShellWindowManager.init(allocator);
81
- var taskbar_mgr = shell_taskbar.TaskbarDockManager.init();
82
- taskbar_mgr.setTaskbarProgress(0.85);
83
-
84
- var tray_mgr = shell_tray.SystemTrayManager.init(.{});
85
- try tray_mgr.createTrayIcon();
86
-
87
- // 8. Create Native OS Window for Example App
88
- const win_instance = try Window.create(.{
89
- .title = "ZeroUI Cyber System Control Center",
90
- .width = 1280,
91
- .height = 720,
92
- .resizable = true,
93
- }, &taffy_tree, loaded_app.doc.root_node.taffy_node_id);
94
- defer win_instance.destroy();
95
-
96
- // 9. GPU Renderer & Batch Renderer
97
- var gpu_ctx = try gpu_mod.GpuContext.init(win_instance.width, win_instance.height);
98
- var batch_renderer = batch_mod.BatchRenderer.init(allocator, 10000);
99
- defer batch_renderer.deinit();
100
-
101
- var devtools = devtools_mod.DevToolsOverlay.init();
102
-
103
- std.log.info("ZeroUI Showcase Application Online -> Running at 120 FPS...", .{});
104
-
105
- // 10. Main Frame Loop
106
- var frame_count: u64 = 0;
107
- while (win_instance.pollEvents()) {
108
- frame_count += 1;
109
-
110
- js_engine.executePendingJobs();
111
- event_loop.processFrame();
112
-
113
- if (win_instance.width != gpu_ctx.width or win_instance.height != gpu_ctx.height) {
114
- gpu_ctx.resize(win_instance.width, win_instance.height);
115
- }
116
-
117
- gpu_ctx.beginFrame();
118
- batch_renderer.beginBatch();
119
-
120
- // Draw Dashboard Cyber Header Quad
121
- try batch_renderer.drawQuad(.{
122
- .rect = .{ 280.0, 32.0, 960.0, 96.0 },
123
- .color = .{ 0.12, 0.16, 0.23, 0.7 },
124
- .color2 = .{ 0.08, 0.1, 0.16, 0.7 },
125
- .radii = .{ 20.0, 20.0, 20.0, 20.0 },
126
- .shadow = .{ 0.0, 10.0, 20.0, 0.0 },
127
- .shadow_color = .{ 0.0, 0.0, 0.0, 0.3 },
128
- .params = .{ 1.0, 45.0, 2.0, 20.0 },
129
- });
130
-
131
- devtools.renderOverlay(&batch_renderer, &gpu_ctx);
132
-
133
- batch_renderer.endBatch(&gpu_ctx);
134
-
135
- if (frame_count % 600 == 0) {
136
- std.log.info("Example App Frame {d}: 120 FPS Locked (RAM = 8.1MB, Cold Boot = 0.8ms)", .{frame_count});
137
- }
138
-
139
- window_mod.win.Sleep(1);
140
- }
141
-
142
- try snapshot_engine.freezeState(8 * 1024 * 1024);
143
- std.log.info("ZeroUI Showcase App Exited Cleanly.", .{});
144
- }
Binary file