plusui-native 0.2.108 → 0.2.109
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/package.json +4 -4
- package/src/assets/icon-generator.js +251 -251
- package/src/assets/resource-embedder.js +351 -351
- package/src/index.js +1357 -1357
- package/templates/base/Justfile +115 -115
- package/templates/base/README.md.template +185 -185
- package/templates/base/assets/README.md +88 -88
- package/templates/manager.js +261 -261
- package/templates/react/CMakeLists.txt.template +199 -202
- package/templates/react/frontend/vite.config.ts +36 -36
- package/templates/react/main.cpp.template +109 -109
- package/templates/solid/CMakeLists.txt.template +199 -202
- package/templates/solid/frontend/vite.config.ts +36 -36
- package/templates/solid/main.cpp.template +109 -109
|
@@ -1,88 +1,88 @@
|
|
|
1
|
-
# Assets Directory
|
|
2
|
-
|
|
3
|
-
## Icon File
|
|
4
|
-
|
|
5
|
-
Place your app icon as **`icon.png`** (512x512 or larger recommended).
|
|
6
|
-
|
|
7
|
-
This single icon will be automatically converted to all platform-specific formats:
|
|
8
|
-
|
|
9
|
-
### Windows
|
|
10
|
-
- `icons/windows/app.ico` - Multi-resolution .ico file
|
|
11
|
-
- Used in: Title bar, taskbar, task manager, system tray
|
|
12
|
-
|
|
13
|
-
### macOS
|
|
14
|
-
- `icons/macos/app.icns` - Apple icon format
|
|
15
|
-
- Used in: Dock, Finder, About dialog, system tray
|
|
16
|
-
|
|
17
|
-
### Linux
|
|
18
|
-
- `icons/linux/icon_*.png` - Multiple PNG sizes
|
|
19
|
-
- Used in: Window manager, system tray, desktop files
|
|
20
|
-
|
|
21
|
-
### Tray Icons
|
|
22
|
-
- `icons/tray/tray_16x16.png` - Small tray icon
|
|
23
|
-
- `icons/tray/tray_32x32.png` - Large tray icon
|
|
24
|
-
- Used in: System tray/notification area (all platforms)
|
|
25
|
-
|
|
26
|
-
## Automatic Generation
|
|
27
|
-
|
|
28
|
-
Run this command to generate all platform icons:
|
|
29
|
-
|
|
30
|
-
```bash
|
|
31
|
-
plusui icons
|
|
32
|
-
```
|
|
33
|
-
|
|
34
|
-
Or specify a different source icon:
|
|
35
|
-
|
|
36
|
-
```bash
|
|
37
|
-
plusui icons path/to/my-icon.png
|
|
38
|
-
```
|
|
39
|
-
|
|
40
|
-
## Icon Guidelines
|
|
41
|
-
|
|
42
|
-
- **Format**: PNG with transparency
|
|
43
|
-
- **Size**: 512x512 pixels minimum (1024x1024 recommended)
|
|
44
|
-
- **Design**: Simple, recognizable at small sizes
|
|
45
|
-
- **Colors**: High contrast for visibility
|
|
46
|
-
|
|
47
|
-
## Other Assets
|
|
48
|
-
|
|
49
|
-
Any other files in this directory will be embedded into your application binary:
|
|
50
|
-
|
|
51
|
-
```cpp
|
|
52
|
-
#include "generated/assets.h"
|
|
53
|
-
|
|
54
|
-
// Access embedded assets
|
|
55
|
-
const char* data = ASSET_MY_FILE_PNG;
|
|
56
|
-
size_t size = ASSET_MY_FILE_PNG_LEN;
|
|
57
|
-
```
|
|
58
|
-
|
|
59
|
-
## Build Integration
|
|
60
|
-
|
|
61
|
-
Assets are automatically processed during build:
|
|
62
|
-
|
|
63
|
-
1. `plusui icons` - Generates platform-specific icons (manual or in build)
|
|
64
|
-
2. `plusui build` - Embeds all assets into the binary
|
|
65
|
-
3. Production binary includes all resources (single executable!)
|
|
66
|
-
|
|
67
|
-
## Usage in Code
|
|
68
|
-
|
|
69
|
-
### C++ Backend
|
|
70
|
-
```cpp
|
|
71
|
-
#include <plusui/resources.hpp>
|
|
72
|
-
|
|
73
|
-
// Load embedded resource
|
|
74
|
-
std::string html = plusui::resources::getResource("index.html");
|
|
75
|
-
std::string icon = plusui::resources::getResource("icons/tray/tray_32x32.png");
|
|
76
|
-
```
|
|
77
|
-
|
|
78
|
-
### TypeScript Frontend
|
|
79
|
-
```typescript
|
|
80
|
-
// Vite handles assets during dev
|
|
81
|
-
import icon from '../assets/icon.png';
|
|
82
|
-
|
|
83
|
-
// In production, assets are served from embedded resources
|
|
84
|
-
```
|
|
85
|
-
|
|
86
|
-
---
|
|
87
|
-
|
|
88
|
-
**Note**: The `icons/` subdirectory is auto-generated. Don't edit those files manually!
|
|
1
|
+
# Assets Directory
|
|
2
|
+
|
|
3
|
+
## Icon File
|
|
4
|
+
|
|
5
|
+
Place your app icon as **`icon.png`** (512x512 or larger recommended).
|
|
6
|
+
|
|
7
|
+
This single icon will be automatically converted to all platform-specific formats:
|
|
8
|
+
|
|
9
|
+
### Windows
|
|
10
|
+
- `icons/windows/app.ico` - Multi-resolution .ico file
|
|
11
|
+
- Used in: Title bar, taskbar, task manager, system tray
|
|
12
|
+
|
|
13
|
+
### macOS
|
|
14
|
+
- `icons/macos/app.icns` - Apple icon format
|
|
15
|
+
- Used in: Dock, Finder, About dialog, system tray
|
|
16
|
+
|
|
17
|
+
### Linux
|
|
18
|
+
- `icons/linux/icon_*.png` - Multiple PNG sizes
|
|
19
|
+
- Used in: Window manager, system tray, desktop files
|
|
20
|
+
|
|
21
|
+
### Tray Icons
|
|
22
|
+
- `icons/tray/tray_16x16.png` - Small tray icon
|
|
23
|
+
- `icons/tray/tray_32x32.png` - Large tray icon
|
|
24
|
+
- Used in: System tray/notification area (all platforms)
|
|
25
|
+
|
|
26
|
+
## Automatic Generation
|
|
27
|
+
|
|
28
|
+
Run this command to generate all platform icons:
|
|
29
|
+
|
|
30
|
+
```bash
|
|
31
|
+
plusui icons
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
Or specify a different source icon:
|
|
35
|
+
|
|
36
|
+
```bash
|
|
37
|
+
plusui icons path/to/my-icon.png
|
|
38
|
+
```
|
|
39
|
+
|
|
40
|
+
## Icon Guidelines
|
|
41
|
+
|
|
42
|
+
- **Format**: PNG with transparency
|
|
43
|
+
- **Size**: 512x512 pixels minimum (1024x1024 recommended)
|
|
44
|
+
- **Design**: Simple, recognizable at small sizes
|
|
45
|
+
- **Colors**: High contrast for visibility
|
|
46
|
+
|
|
47
|
+
## Other Assets
|
|
48
|
+
|
|
49
|
+
Any other files in this directory will be embedded into your application binary:
|
|
50
|
+
|
|
51
|
+
```cpp
|
|
52
|
+
#include "generated/assets.h"
|
|
53
|
+
|
|
54
|
+
// Access embedded assets
|
|
55
|
+
const char* data = ASSET_MY_FILE_PNG;
|
|
56
|
+
size_t size = ASSET_MY_FILE_PNG_LEN;
|
|
57
|
+
```
|
|
58
|
+
|
|
59
|
+
## Build Integration
|
|
60
|
+
|
|
61
|
+
Assets are automatically processed during build:
|
|
62
|
+
|
|
63
|
+
1. `plusui icons` - Generates platform-specific icons (manual or in build)
|
|
64
|
+
2. `plusui build` - Embeds all assets into the binary
|
|
65
|
+
3. Production binary includes all resources (single executable!)
|
|
66
|
+
|
|
67
|
+
## Usage in Code
|
|
68
|
+
|
|
69
|
+
### C++ Backend
|
|
70
|
+
```cpp
|
|
71
|
+
#include <plusui/resources.hpp>
|
|
72
|
+
|
|
73
|
+
// Load embedded resource
|
|
74
|
+
std::string html = plusui::resources::getResource("index.html");
|
|
75
|
+
std::string icon = plusui::resources::getResource("icons/tray/tray_32x32.png");
|
|
76
|
+
```
|
|
77
|
+
|
|
78
|
+
### TypeScript Frontend
|
|
79
|
+
```typescript
|
|
80
|
+
// Vite handles assets during dev
|
|
81
|
+
import icon from '../assets/icon.png';
|
|
82
|
+
|
|
83
|
+
// In production, assets are served from embedded resources
|
|
84
|
+
```
|
|
85
|
+
|
|
86
|
+
---
|
|
87
|
+
|
|
88
|
+
**Note**: The `icons/` subdirectory is auto-generated. Don't edit those files manually!
|