nanoshell 1.2.1 → 1.2.3

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
@@ -136,3 +136,5 @@ NanoShell includes a built-in AI Agent Skill definition (`SKILL.md`). Any AI cod
136
136
  **Created & Engineered by Suman Biswas**
137
137
 
138
138
  MIT License © Suman Biswas (NanoShell Creator)
139
+ "# nanoshell"
140
+ # nanoshell
package/cli/bundler.zig CHANGED
@@ -21,9 +21,60 @@ pub const SingleBinaryBundler = struct {
21
21
  std.log.info("Starting ZeroUI Native App Bundler for '{s}'...", .{self.config.app_name});
22
22
  std.log.info("Packaging Assets -> {s}", .{self.config.entry_point});
23
23
 
24
- var out_buf: [256]u8 = undefined;
25
- const exe_name = try std.fmt.bufPrint(&out_buf, "{s}/{s}.exe", .{ self.config.output_dir, self.config.app_name });
24
+ const io = std.Io.Threaded.global_single_threaded.io();
25
+ _ = std.Io.Dir.cwd().createDir(io, self.config.output_dir, .default_dir) catch {};
26
26
 
27
- std.log.info("Built Custom Named Executable -> '{s}' (3.00 MB, 17MB RAM Native Engine)", .{exe_name});
27
+ var dist_dir = std.Io.Dir.cwd().openDir(io, self.config.output_dir, .{}) catch |err| {
28
+ std.log.err("Failed to open output dir: {s}", .{@errorName(err)});
29
+ return err;
30
+ };
31
+
32
+ _ = dist_dir.createDir(io, "app", .default_dir) catch {};
33
+ _ = dist_dir.createDir(io, "resources", .default_dir) catch {};
34
+
35
+ const cwd = std.Io.Dir.cwd();
36
+
37
+ // Copy Main Executable bin/<app_name>.exe -> dist/<app_name>.exe
38
+ const src_exe_path = try std.fmt.allocPrint(self.allocator, "bin/{s}.exe", .{self.config.app_name});
39
+ defer self.allocator.free(src_exe_path);
40
+ const dst_exe_path = try std.fmt.allocPrint(self.allocator, "{s}/{s}.exe", .{ self.config.output_dir, self.config.app_name });
41
+ defer self.allocator.free(dst_exe_path);
42
+
43
+ _ = cwd.copyFile(src_exe_path, dist_dir, try std.fmt.allocPrint(self.allocator, "{s}.exe", .{self.config.app_name}), io, .{}) catch |err| {
44
+ std.log.warn("Executable copy warning: {s}", .{@errorName(err)});
45
+ };
46
+
47
+ // Copy DLLs
48
+ const dlls = [_][]const u8{ "AppCore.dll", "Ultralight.dll", "UltralightCore.dll", "WebCore.dll", "vcruntime140.dll", "msvcp140.dll", "vcruntime140_1.dll" };
49
+ for (dlls) |dll| {
50
+ const src_dll = try std.fmt.allocPrint(self.allocator, "bin/{s}", .{dll});
51
+ defer self.allocator.free(src_dll);
52
+ _ = cwd.copyFile(src_dll, dist_dir, dll, io, .{}) catch {};
53
+ }
54
+
55
+ // Copy Resource Files
56
+ const res_files = [_][]const u8{ "icudt67l.dat", "cacert.pem" };
57
+ for (res_files) |file| {
58
+ const src_res = try std.fmt.allocPrint(self.allocator, "bin/{s}", .{file});
59
+ defer self.allocator.free(src_res);
60
+ _ = cwd.copyFile(src_res, dist_dir, file, io, .{}) catch {};
61
+ _ = cwd.copyFile(src_res, dist_dir, try std.fmt.allocPrint(self.allocator, "resources/{s}", .{file}), io, .{}) catch {};
62
+ }
63
+
64
+ // Copy app/* files to dist/app/*
65
+ var app_dir_opt = cwd.openDir(io, "app", .{ .iterate = true }) catch null;
66
+ if (app_dir_opt) |*app_dir| {
67
+ var dist_app_dir = dist_dir.openDir(io, "app", .{}) catch null;
68
+ if (dist_app_dir) |*dst_app| {
69
+ var iter = app_dir.iterate();
70
+ while (iter.next(io) catch null) |entry| {
71
+ if (entry.kind == .file) {
72
+ _ = app_dir.copyFile(entry.name, dst_app.*, entry.name, io, .{}) catch {};
73
+ }
74
+ }
75
+ }
76
+ }
77
+
78
+ std.log.info("Built Custom Named Executable -> '{s}' (Self-contained release package)", .{dst_exe_path});
28
79
  }
29
80
  };
package/cli/installer.zig CHANGED
@@ -193,9 +193,9 @@ pub fn generateIss(allocator: std.mem.Allocator, config: AppConfig) ![]const u8
193
193
  \\Source: "bin\Ultralight.dll"; DestDir: "{{app}}"; Flags: ignoreversion
194
194
  \\Source: "bin\UltralightCore.dll"; DestDir: "{{app}}"; Flags: ignoreversion
195
195
  \\Source: "bin\WebCore.dll"; DestDir: "{{app}}"; Flags: ignoreversion
196
- \\Source: "bin\vcruntime140.dll"; DestDir: "{{app}}"; Flags: ignoreversion skipifdoesntexist
197
- \\Source: "bin\msvcp140.dll"; DestDir: "{{app}}"; Flags: ignoreversion skipifdoesntexist
198
- \\Source: "bin\vcruntime140_1.dll"; DestDir: "{{app}}"; Flags: ignoreversion skipifdoesntexist
196
+ \\Source: "bin\vcruntime140.dll"; DestDir: "{{app}}"; Flags: ignoreversion skipifsourcedoesntexist
197
+ \\Source: "bin\msvcp140.dll"; DestDir: "{{app}}"; Flags: ignoreversion skipifsourcedoesntexist
198
+ \\Source: "bin\vcruntime140_1.dll"; DestDir: "{{app}}"; Flags: ignoreversion skipifsourcedoesntexist
199
199
  \\
200
200
  \\; ICU Unicode data and TLS certs
201
201
  \\Source: "bin\icudt67l.dat"; DestDir: "{{app}}"; Flags: ignoreversion
@@ -349,4 +349,4 @@ pub fn run(allocator: std.mem.Allocator) !void {
349
349
  std.log.info(" 2. Open setup.iss or run: ISCC setup.iss", .{});
350
350
  std.log.info(" 3. Output binary will be saved in: dist\\{s}-Setup.exe", .{config.name});
351
351
  }
352
- }
352
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "nanoshell",
3
- "version": "1.2.1",
3
+ "version": "1.2.3",
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": {
Binary file
Binary file