plusui-native 0.2.77 → 0.2.80
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/index.js +3 -5
- package/templates/manager.js +22 -10
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "plusui-native",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.80",
|
|
4
4
|
"description": "PlusUI CLI - Build C++ desktop apps modern UI ",
|
|
5
5
|
"main": "src/index.js",
|
|
6
6
|
"type": "module",
|
|
@@ -27,11 +27,11 @@
|
|
|
27
27
|
"semver": "^7.6.0",
|
|
28
28
|
"which": "^4.0.0",
|
|
29
29
|
"execa": "^8.0.1",
|
|
30
|
-
"plusui-native-builder": "^0.1.
|
|
31
|
-
"plusui-native-connect": "^0.1.
|
|
30
|
+
"plusui-native-builder": "^0.1.78",
|
|
31
|
+
"plusui-native-connect": "^0.1.78"
|
|
32
32
|
},
|
|
33
33
|
"peerDependencies": {
|
|
34
|
-
"plusui-native-connect": "^0.1.
|
|
34
|
+
"plusui-native-connect": "^0.1.78"
|
|
35
35
|
},
|
|
36
36
|
"publishConfig": {
|
|
37
37
|
"access": "public"
|
package/src/index.js
CHANGED
|
@@ -690,9 +690,8 @@ function buildBackend(platform = null, devMode = false) {
|
|
|
690
690
|
if (platformConfig.generator) {
|
|
691
691
|
cmakeArgs += ` -G "${platformConfig.generator}"`;
|
|
692
692
|
} else if (process.platform === 'win32') {
|
|
693
|
-
// Use Ninja on Windows to avoid VS generator compatibility issues
|
|
694
693
|
// Use embedded debug info (/Z7) to avoid VS 2026 PDB creation bug (C1041)
|
|
695
|
-
cmakeArgs += ' -
|
|
694
|
+
cmakeArgs += ' -DCMAKE_MSVC_DEBUG_INFORMATION_FORMAT=Embedded';
|
|
696
695
|
}
|
|
697
696
|
|
|
698
697
|
log(`Configuring CMake...`, 'blue');
|
|
@@ -884,11 +883,10 @@ async function startBackend() {
|
|
|
884
883
|
|
|
885
884
|
const buildDir = getDevBuildDir();
|
|
886
885
|
|
|
887
|
-
// On Windows, use
|
|
888
|
-
// Also use embedded debug info (/Z7) to avoid VS 2026 PDB creation bug (C1041)
|
|
886
|
+
// On Windows, use embedded debug info (/Z7) to avoid VS 2026 PDB creation bug (C1041)
|
|
889
887
|
let generatorArgs = '';
|
|
890
888
|
if (process.platform === 'win32') {
|
|
891
|
-
generatorArgs = ' -
|
|
889
|
+
generatorArgs = ' -DCMAKE_MSVC_DEBUG_INFORMATION_FORMAT=Embedded';
|
|
892
890
|
}
|
|
893
891
|
|
|
894
892
|
// Auto-clean build dir if generator changed (e.g. VS → Ninja)
|
package/templates/manager.js
CHANGED
|
@@ -81,7 +81,16 @@ export class TemplateManager {
|
|
|
81
81
|
const template = options.template || 'react';
|
|
82
82
|
const templatePath = join(this.templatesDir, template);
|
|
83
83
|
|
|
84
|
-
|
|
84
|
+
// Determine target path and actual project name
|
|
85
|
+
let targetDirName = projectName;
|
|
86
|
+
let projectPath = resolve(projectName);
|
|
87
|
+
|
|
88
|
+
if (projectName === '.') {
|
|
89
|
+
targetDirName = require('path').basename(process.cwd());
|
|
90
|
+
projectPath = process.cwd();
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
console.log(chalk.bold(`\nCreating PlusUI project: ${targetDirName}\n`));
|
|
85
94
|
|
|
86
95
|
// 1. Check environment first
|
|
87
96
|
console.log(chalk.blue('Checking environment...'));
|
|
@@ -98,21 +107,24 @@ export class TemplateManager {
|
|
|
98
107
|
|
|
99
108
|
// 2. Create project directory
|
|
100
109
|
console.log(chalk.blue('Creating project structure...'));
|
|
101
|
-
const projectPath = resolve(projectName);
|
|
102
110
|
|
|
103
|
-
if (
|
|
104
|
-
|
|
111
|
+
if (projectName !== '.') {
|
|
112
|
+
if (existsSync(projectPath)) {
|
|
113
|
+
throw new Error(`Directory ${projectName} already exists`);
|
|
114
|
+
}
|
|
115
|
+
await mkdir(projectPath, { recursive: true });
|
|
116
|
+
} else {
|
|
117
|
+
// Warn but proceed if using current directory
|
|
118
|
+
console.log(chalk.yellow(`Initializing in current directory...`));
|
|
105
119
|
}
|
|
106
120
|
|
|
107
|
-
await mkdir(projectPath, { recursive: true });
|
|
108
|
-
|
|
109
121
|
// 3. Resolve package versions for generated app dependencies
|
|
110
122
|
const resolvedVersions = await this.resolveTemplatePackageVersions();
|
|
111
|
-
|
|
123
|
+
|
|
112
124
|
// 4. Prepare template variables
|
|
113
125
|
const variables = {
|
|
114
|
-
PROJECT_NAME:
|
|
115
|
-
PROJECT_NAME_LOWER:
|
|
126
|
+
PROJECT_NAME: targetDirName,
|
|
127
|
+
PROJECT_NAME_LOWER: targetDirName.toLowerCase(),
|
|
116
128
|
PROJECT_VERSION: '0.1.0',
|
|
117
129
|
PLUSUI_CLI_VERSION: resolvedVersions.cli,
|
|
118
130
|
PLUSUI_CORE_VERSION: resolvedVersions.core,
|
|
@@ -192,7 +204,7 @@ export class TemplateManager {
|
|
|
192
204
|
async runNpmInstall(projectPath) {
|
|
193
205
|
return new Promise((resolve, reject) => {
|
|
194
206
|
const npm = process.platform === 'win32' ? 'npm.cmd' : 'npm';
|
|
195
|
-
|
|
207
|
+
|
|
196
208
|
// Install root dependencies
|
|
197
209
|
const rootProc = spawn(npm, ['install'], {
|
|
198
210
|
cwd: projectPath,
|