reset-framework-cli 1.1.5 → 1.2.0
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 +39 -29
- package/package.json +8 -4
- package/src/commands/build.js +56 -44
- package/src/commands/dev.js +61 -49
- package/src/commands/doctor.js +83 -35
- package/src/commands/init.js +44 -44
- package/src/commands/package.js +27 -27
- package/src/index.js +20 -18
- package/src/lib/framework.js +169 -82
- package/src/lib/output.js +142 -142
- package/src/lib/process.js +155 -155
- package/src/lib/project.js +497 -206
package/src/commands/package.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { existsSync } from "node:fs"
|
|
2
|
-
|
|
3
|
-
import { createMacOSZipArchive, createWindowsZipArchive } from "../lib/output.js"
|
|
4
|
-
import {
|
|
5
|
-
assertAppProject,
|
|
6
|
-
loadResetConfig,
|
|
1
|
+
import { existsSync } from "node:fs"
|
|
2
|
+
|
|
3
|
+
import { createMacOSZipArchive, createWindowsZipArchive } from "../lib/output.js"
|
|
4
|
+
import {
|
|
5
|
+
assertAppProject,
|
|
6
|
+
loadResetConfig,
|
|
7
7
|
resolveAppOutputPaths,
|
|
8
8
|
resolveAppPaths
|
|
9
9
|
} from "../lib/project.js"
|
|
@@ -15,17 +15,17 @@ import {
|
|
|
15
15
|
printStatusTable
|
|
16
16
|
} from "../lib/ui.js"
|
|
17
17
|
|
|
18
|
-
export const description = "Package the built desktop app into a distributable archive"
|
|
19
|
-
|
|
20
|
-
export async function run(context) {
|
|
21
|
-
const dryRun = Boolean(context.flags["dry-run"])
|
|
22
|
-
const isWindows = process.platform === "win32"
|
|
23
|
-
const archiveBuilder = isWindows ? createWindowsZipArchive : createMacOSZipArchive
|
|
24
|
-
const archiveDescription = isWindows
|
|
25
|
-
? "Create a Windows zip package from the built app folder"
|
|
26
|
-
: "Create a macOS zip package from the built app bundle"
|
|
27
|
-
const appPaths = resolveAppPaths(context.projectRoot)
|
|
28
|
-
assertAppProject(appPaths)
|
|
18
|
+
export const description = "Package the built desktop app into a distributable archive"
|
|
19
|
+
|
|
20
|
+
export async function run(context) {
|
|
21
|
+
const dryRun = Boolean(context.flags["dry-run"])
|
|
22
|
+
const isWindows = process.platform === "win32"
|
|
23
|
+
const archiveBuilder = isWindows ? createWindowsZipArchive : createMacOSZipArchive
|
|
24
|
+
const archiveDescription = isWindows
|
|
25
|
+
? "Create a Windows zip package from the built app folder"
|
|
26
|
+
: "Create a macOS zip package from the built app bundle"
|
|
27
|
+
const appPaths = resolveAppPaths(context.projectRoot)
|
|
28
|
+
assertAppProject(appPaths)
|
|
29
29
|
|
|
30
30
|
const config = loadResetConfig(appPaths)
|
|
31
31
|
assertAppProject(appPaths, config)
|
|
@@ -38,11 +38,11 @@ export async function run(context) {
|
|
|
38
38
|
["Archive", outputPaths.zipPath]
|
|
39
39
|
])
|
|
40
40
|
console.log("")
|
|
41
|
-
|
|
42
|
-
printSection("Plan")
|
|
43
|
-
printStatusTable([
|
|
44
|
-
["ready", "Archive", archiveDescription]
|
|
45
|
-
])
|
|
41
|
+
|
|
42
|
+
printSection("Plan")
|
|
43
|
+
printStatusTable([
|
|
44
|
+
["ready", "Archive", archiveDescription]
|
|
45
|
+
])
|
|
46
46
|
|
|
47
47
|
if (!existsSync(outputPaths.appBundlePath) && !dryRun) {
|
|
48
48
|
throw new Error(
|
|
@@ -56,11 +56,11 @@ export async function run(context) {
|
|
|
56
56
|
printStatusTable([["plan", "Package", "No archive will be written"]])
|
|
57
57
|
return
|
|
58
58
|
}
|
|
59
|
-
|
|
60
|
-
console.log("")
|
|
61
|
-
const progress = createProgress(1, "Package")
|
|
62
|
-
await archiveBuilder(outputPaths, { dryRun })
|
|
63
|
-
progress.tick("Archive created")
|
|
59
|
+
|
|
60
|
+
console.log("")
|
|
61
|
+
const progress = createProgress(1, "Package")
|
|
62
|
+
await archiveBuilder(outputPaths, { dryRun })
|
|
63
|
+
progress.tick("Archive created")
|
|
64
64
|
|
|
65
65
|
console.log("")
|
|
66
66
|
printSection("Result")
|
package/src/index.js
CHANGED
|
@@ -16,15 +16,16 @@ import {
|
|
|
16
16
|
} from "./lib/ui.js"
|
|
17
17
|
|
|
18
18
|
const commands = {
|
|
19
|
-
build: {
|
|
20
|
-
description: buildDescription,
|
|
21
|
-
usage: "reset-framework-cli build [--skip-frontend] [--skip-runtime] [--skip-stage] [--dry-run]",
|
|
22
|
-
options: [
|
|
23
|
-
["--skip-frontend", "Skip the frontend build step"],
|
|
24
|
-
["--skip-runtime", "Skip the release runtime build"],
|
|
25
|
-
["--skip-stage", "Skip assembling the final .app bundle"],
|
|
26
|
-
["--
|
|
27
|
-
|
|
19
|
+
build: {
|
|
20
|
+
description: buildDescription,
|
|
21
|
+
usage: "reset-framework-cli build [--skip-frontend] [--skip-runtime] [--skip-stage] [--runtime-source] [--dry-run]",
|
|
22
|
+
options: [
|
|
23
|
+
["--skip-frontend", "Skip the frontend build step"],
|
|
24
|
+
["--skip-runtime", "Skip the release runtime build"],
|
|
25
|
+
["--skip-stage", "Skip assembling the final .app bundle"],
|
|
26
|
+
["--runtime-source", "Build the runtime from @reset-framework/native instead of using a bundled runtime package"],
|
|
27
|
+
["--dry-run", "Print the build plan without running commands"]
|
|
28
|
+
],
|
|
28
29
|
examples: [
|
|
29
30
|
"reset-framework-cli build",
|
|
30
31
|
"reset-framework-cli build --dry-run"
|
|
@@ -56,15 +57,16 @@ const commands = {
|
|
|
56
57
|
],
|
|
57
58
|
run: runCreateApp
|
|
58
59
|
},
|
|
59
|
-
dev: {
|
|
60
|
-
description: devDescription,
|
|
61
|
-
usage: "reset-framework-cli dev [--skip-frontend] [--skip-runtime] [--no-open] [--dry-run]",
|
|
62
|
-
options: [
|
|
63
|
-
["--skip-frontend", "Reuse an already running frontend dev server"],
|
|
64
|
-
["--skip-runtime", "Reuse an existing native dev build"],
|
|
65
|
-
["--no-open", "Do not launch the desktop window after startup"],
|
|
66
|
-
["--
|
|
67
|
-
|
|
60
|
+
dev: {
|
|
61
|
+
description: devDescription,
|
|
62
|
+
usage: "reset-framework-cli dev [--skip-frontend] [--skip-runtime] [--no-open] [--runtime-source] [--dry-run]",
|
|
63
|
+
options: [
|
|
64
|
+
["--skip-frontend", "Reuse an already running frontend dev server"],
|
|
65
|
+
["--skip-runtime", "Reuse an existing native dev build"],
|
|
66
|
+
["--no-open", "Do not launch the desktop window after startup"],
|
|
67
|
+
["--runtime-source", "Build the runtime from @reset-framework/native instead of using a bundled runtime package"],
|
|
68
|
+
["--dry-run", "Print the dev plan without starting processes"]
|
|
69
|
+
],
|
|
68
70
|
examples: [
|
|
69
71
|
"reset-framework-cli dev",
|
|
70
72
|
"reset-framework-cli dev --skip-runtime"
|
package/src/lib/framework.js
CHANGED
|
@@ -3,7 +3,8 @@ import { rm } from "node:fs/promises"
|
|
|
3
3
|
import { readFile } from "node:fs/promises"
|
|
4
4
|
import path from "node:path"
|
|
5
5
|
|
|
6
|
-
import {
|
|
6
|
+
import { assertFrameworkSourceInstall, resolveFrameworkRuntimeStrategy } from "./project.js"
|
|
7
|
+
import { runCommand } from "./process.js"
|
|
7
8
|
import { ensureVcpkgToolchain } from "./toolchain.js"
|
|
8
9
|
|
|
9
10
|
function getBuildDirectory(frameworkBuildPaths, mode) {
|
|
@@ -16,6 +17,11 @@ function getBuildType(mode) {
|
|
|
16
17
|
return mode === "release" ? "Release" : "Debug"
|
|
17
18
|
}
|
|
18
19
|
|
|
20
|
+
function readCmakeCacheValue(cacheContents, key) {
|
|
21
|
+
const match = cacheContents.match(new RegExp(`^${key}:[^=]+=(.+)$`, "m"))
|
|
22
|
+
return match ? match[1].trim() : null
|
|
23
|
+
}
|
|
24
|
+
|
|
19
25
|
function getVsWherePath() {
|
|
20
26
|
const candidates = [
|
|
21
27
|
path.join(process.env["ProgramFiles(x86)"] ?? "", "Microsoft Visual Studio", "Installer", "vswhere.exe"),
|
|
@@ -25,36 +31,100 @@ function getVsWherePath() {
|
|
|
25
31
|
return candidates.find((candidate) => candidate && existsSync(candidate)) ?? null
|
|
26
32
|
}
|
|
27
33
|
|
|
34
|
+
function getVisualStudioInstanceCandidates() {
|
|
35
|
+
const roots = [
|
|
36
|
+
path.join(process.env.ProgramFiles ?? "", "Microsoft Visual Studio", "2022"),
|
|
37
|
+
path.join(process.env["ProgramFiles(x86)"] ?? "", "Microsoft Visual Studio", "2022"),
|
|
38
|
+
path.join(process.env.ProgramFiles ?? "", "Microsoft Visual Studio", "2019"),
|
|
39
|
+
path.join(process.env["ProgramFiles(x86)"] ?? "", "Microsoft Visual Studio", "2019")
|
|
40
|
+
]
|
|
41
|
+
const editions = ["BuildTools", "Community", "Professional", "Enterprise", "Preview"]
|
|
42
|
+
const candidates = []
|
|
43
|
+
|
|
44
|
+
for (const root of roots) {
|
|
45
|
+
if (!root || !existsSync(root)) {
|
|
46
|
+
continue
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
for (const edition of editions) {
|
|
50
|
+
const candidate = path.join(root, edition)
|
|
51
|
+
if (existsSync(candidate)) {
|
|
52
|
+
candidates.push(candidate)
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
return candidates
|
|
58
|
+
}
|
|
59
|
+
|
|
28
60
|
async function findVisualStudioGenerator() {
|
|
61
|
+
const instanceCandidates = getVisualStudioInstanceCandidates()
|
|
62
|
+
|
|
63
|
+
if (instanceCandidates.some((candidate) => candidate.includes(`${path.sep}2022${path.sep}`))) {
|
|
64
|
+
return {
|
|
65
|
+
generator: "Visual Studio 17 2022",
|
|
66
|
+
instance: instanceCandidates.find((candidate) => candidate.includes(`${path.sep}2022${path.sep}`))
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
if (instanceCandidates.some((candidate) => candidate.includes(`${path.sep}2019${path.sep}`))) {
|
|
71
|
+
return {
|
|
72
|
+
generator: "Visual Studio 16 2019",
|
|
73
|
+
instance: instanceCandidates.find((candidate) => candidate.includes(`${path.sep}2019${path.sep}`))
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
|
|
29
77
|
const vswherePath = getVsWherePath()
|
|
30
78
|
if (!vswherePath) {
|
|
31
79
|
return null
|
|
32
80
|
}
|
|
33
81
|
|
|
34
|
-
|
|
35
|
-
|
|
82
|
+
const { captureCommandOutput } = await import("./process.js")
|
|
83
|
+
const version = await captureCommandOutput(vswherePath, [
|
|
84
|
+
"-latest",
|
|
85
|
+
"-products",
|
|
86
|
+
"*",
|
|
87
|
+
"-requires",
|
|
88
|
+
"Microsoft.VisualStudio.Component.VC.Tools.x86.x64",
|
|
89
|
+
"-property",
|
|
90
|
+
"catalog_productLineVersion"
|
|
91
|
+
]).catch(() => "")
|
|
92
|
+
|
|
93
|
+
if (version === "2022") {
|
|
94
|
+
const instance = await captureCommandOutput(vswherePath, [
|
|
36
95
|
"-latest",
|
|
37
96
|
"-products",
|
|
38
97
|
"*",
|
|
39
98
|
"-requires",
|
|
40
99
|
"Microsoft.VisualStudio.Component.VC.Tools.x86.x64",
|
|
41
100
|
"-property",
|
|
42
|
-
"
|
|
43
|
-
])
|
|
101
|
+
"installationPath"
|
|
102
|
+
]).catch(() => "")
|
|
44
103
|
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
104
|
+
return {
|
|
105
|
+
generator: "Visual Studio 17 2022",
|
|
106
|
+
instance: instance || null
|
|
48
107
|
}
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
if (version === "2019") {
|
|
111
|
+
const instance = await captureCommandOutput(vswherePath, [
|
|
112
|
+
"-latest",
|
|
113
|
+
"-products",
|
|
114
|
+
"*",
|
|
115
|
+
"-requires",
|
|
116
|
+
"Microsoft.VisualStudio.Component.VC.Tools.x86.x64",
|
|
117
|
+
"-property",
|
|
118
|
+
"installationPath"
|
|
119
|
+
]).catch(() => "")
|
|
49
120
|
|
|
50
|
-
|
|
51
|
-
|
|
121
|
+
return {
|
|
122
|
+
generator: "Visual Studio 16 2019",
|
|
123
|
+
instance: instance || null
|
|
52
124
|
}
|
|
53
|
-
} catch {
|
|
54
|
-
// Fall through to the default Windows generator if detection fails.
|
|
55
125
|
}
|
|
56
126
|
|
|
57
|
-
return
|
|
127
|
+
return null
|
|
58
128
|
}
|
|
59
129
|
|
|
60
130
|
async function resolveCmakeGenerator() {
|
|
@@ -62,35 +132,36 @@ async function resolveCmakeGenerator() {
|
|
|
62
132
|
typeof process.env.CMAKE_GENERATOR === "string" && process.env.CMAKE_GENERATOR.trim() !== ""
|
|
63
133
|
? process.env.CMAKE_GENERATOR.trim()
|
|
64
134
|
: null
|
|
65
|
-
|
|
66
|
-
if (envGenerator) {
|
|
67
|
-
return {
|
|
68
|
-
name: envGenerator,
|
|
69
|
-
configureArgs: process.platform === "win32" &&
|
|
70
|
-
!process.env.CMAKE_GENERATOR_PLATFORM &&
|
|
71
|
-
envGenerator.startsWith("Visual Studio ")
|
|
72
|
-
? ["-G", envGenerator, "-A", "x64"]
|
|
73
|
-
: ["-G", envGenerator],
|
|
74
|
-
buildArgs: envGenerator.startsWith("Visual Studio ")
|
|
75
|
-
? ["--config"]
|
|
76
|
-
: [],
|
|
135
|
+
|
|
136
|
+
if (envGenerator) {
|
|
137
|
+
return {
|
|
138
|
+
name: envGenerator,
|
|
139
|
+
configureArgs: process.platform === "win32" &&
|
|
140
|
+
!process.env.CMAKE_GENERATOR_PLATFORM &&
|
|
141
|
+
envGenerator.startsWith("Visual Studio ")
|
|
142
|
+
? ["-G", envGenerator, "-A", "x64"]
|
|
143
|
+
: ["-G", envGenerator],
|
|
144
|
+
buildArgs: envGenerator.startsWith("Visual Studio ")
|
|
145
|
+
? ["--config"]
|
|
146
|
+
: [],
|
|
77
147
|
multiConfig: envGenerator.startsWith("Visual Studio ")
|
|
78
148
|
}
|
|
79
149
|
}
|
|
80
150
|
|
|
81
151
|
if (process.platform === "win32") {
|
|
82
|
-
const
|
|
83
|
-
if (
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
152
|
+
const visualStudio = await findVisualStudioGenerator()
|
|
153
|
+
if (visualStudio) {
|
|
154
|
+
const configureArgs = ["-G", visualStudio.generator, "-A", "x64"]
|
|
155
|
+
if (visualStudio.instance) {
|
|
156
|
+
configureArgs.push(`-DCMAKE_GENERATOR_INSTANCE=${visualStudio.instance}`)
|
|
157
|
+
}
|
|
88
158
|
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
159
|
+
return {
|
|
160
|
+
name: visualStudio.generator,
|
|
161
|
+
configureArgs,
|
|
162
|
+
buildArgs: ["--config"],
|
|
163
|
+
multiConfig: true
|
|
164
|
+
}
|
|
94
165
|
}
|
|
95
166
|
}
|
|
96
167
|
|
|
@@ -99,79 +170,95 @@ async function resolveCmakeGenerator() {
|
|
|
99
170
|
configureArgs: ["-G", "Ninja"],
|
|
100
171
|
buildArgs: [],
|
|
101
172
|
multiConfig: false
|
|
102
|
-
}
|
|
103
|
-
}
|
|
104
|
-
|
|
105
|
-
async function
|
|
173
|
+
}
|
|
174
|
+
}
|
|
175
|
+
|
|
176
|
+
async function ensureCompatibleCmakeBuild(buildDir, frameworkRoot, generatorName) {
|
|
106
177
|
const cachePath = path.join(buildDir, "CMakeCache.txt")
|
|
107
178
|
if (!existsSync(cachePath)) {
|
|
108
179
|
return
|
|
109
180
|
}
|
|
110
|
-
|
|
111
|
-
let cache
|
|
112
|
-
try {
|
|
113
|
-
cache = await readFile(cachePath, "utf8")
|
|
114
|
-
} catch {
|
|
115
|
-
return
|
|
116
|
-
}
|
|
117
|
-
|
|
118
|
-
const
|
|
119
|
-
|
|
181
|
+
|
|
182
|
+
let cache
|
|
183
|
+
try {
|
|
184
|
+
cache = await readFile(cachePath, "utf8")
|
|
185
|
+
} catch {
|
|
186
|
+
return
|
|
187
|
+
}
|
|
188
|
+
|
|
189
|
+
const cachedRootValue = readCmakeCacheValue(cache, "CMAKE_HOME_DIRECTORY")
|
|
190
|
+
const cachedGenerator = readCmakeCacheValue(cache, "CMAKE_GENERATOR")
|
|
191
|
+
if (!cachedRootValue) {
|
|
120
192
|
return
|
|
121
193
|
}
|
|
122
194
|
|
|
123
|
-
const cachedRoot = path.resolve(
|
|
195
|
+
const cachedRoot = path.resolve(cachedRootValue)
|
|
124
196
|
const currentRoot = path.resolve(frameworkRoot)
|
|
197
|
+
const generatorChanged =
|
|
198
|
+
typeof cachedGenerator === "string" &&
|
|
199
|
+
cachedGenerator !== generatorName
|
|
125
200
|
|
|
126
|
-
if (cachedRoot !== currentRoot) {
|
|
201
|
+
if (cachedRoot !== currentRoot || generatorChanged) {
|
|
127
202
|
await rm(buildDir, { recursive: true, force: true })
|
|
128
203
|
}
|
|
129
204
|
}
|
|
130
|
-
|
|
205
|
+
|
|
131
206
|
export async function configureFrameworkBuild(frameworkPaths, frameworkBuildPaths, mode, options = {}) {
|
|
132
207
|
const { dryRun = false, cwd } = options
|
|
208
|
+
assertFrameworkSourceInstall(frameworkPaths)
|
|
133
209
|
const toolchainFile = await ensureVcpkgToolchain({ dryRun })
|
|
134
210
|
const buildDir = getBuildDirectory(frameworkBuildPaths, mode)
|
|
135
211
|
const generator = await resolveCmakeGenerator()
|
|
136
212
|
if (!dryRun) {
|
|
137
|
-
await
|
|
213
|
+
await ensureCompatibleCmakeBuild(buildDir, frameworkPaths.frameworkRoot, generator.name)
|
|
138
214
|
}
|
|
139
|
-
const configureArgs = [
|
|
140
|
-
"-S",
|
|
141
|
-
frameworkPaths.frameworkRoot,
|
|
142
|
-
"-B",
|
|
143
|
-
buildDir,
|
|
144
|
-
...generator.configureArgs,
|
|
145
|
-
`-DCMAKE_BUILD_TYPE=${getBuildType(mode)}`,
|
|
146
|
-
"-DCMAKE_CXX_STANDARD=20",
|
|
147
|
-
"-DCMAKE_CXX_STANDARD_REQUIRED=ON",
|
|
148
|
-
"-DCMAKE_CXX_EXTENSIONS=OFF",
|
|
149
|
-
"-DCMAKE_EXPORT_COMPILE_COMMANDS=ON",
|
|
150
|
-
`-DCMAKE_TOOLCHAIN_FILE=${toolchainFile}`
|
|
151
|
-
]
|
|
152
|
-
|
|
153
|
-
try {
|
|
154
|
-
await runCommand("cmake", configureArgs, {
|
|
155
|
-
cwd,
|
|
156
|
-
dryRun
|
|
157
|
-
})
|
|
158
|
-
} catch (error) {
|
|
159
|
-
throw error
|
|
215
|
+
const configureArgs = [
|
|
216
|
+
"-S",
|
|
217
|
+
frameworkPaths.frameworkRoot,
|
|
218
|
+
"-B",
|
|
219
|
+
buildDir,
|
|
220
|
+
...generator.configureArgs,
|
|
221
|
+
`-DCMAKE_BUILD_TYPE=${getBuildType(mode)}`,
|
|
222
|
+
"-DCMAKE_CXX_STANDARD=20",
|
|
223
|
+
"-DCMAKE_CXX_STANDARD_REQUIRED=ON",
|
|
224
|
+
"-DCMAKE_CXX_EXTENSIONS=OFF",
|
|
225
|
+
"-DCMAKE_EXPORT_COMPILE_COMMANDS=ON",
|
|
226
|
+
`-DCMAKE_TOOLCHAIN_FILE=${toolchainFile}`
|
|
227
|
+
]
|
|
228
|
+
|
|
229
|
+
try {
|
|
230
|
+
await runCommand("cmake", configureArgs, {
|
|
231
|
+
cwd,
|
|
232
|
+
dryRun
|
|
233
|
+
})
|
|
234
|
+
} catch (error) {
|
|
235
|
+
throw error
|
|
160
236
|
}
|
|
161
237
|
}
|
|
162
|
-
|
|
163
|
-
|
|
238
|
+
|
|
239
|
+
async function buildFrameworkRuntimeFromSource(frameworkPaths, frameworkBuildPaths, mode, options = {}) {
|
|
164
240
|
const { dryRun = false, cwd } = options
|
|
165
241
|
const buildDir = getBuildDirectory(frameworkBuildPaths, mode)
|
|
166
242
|
const generator = await resolveCmakeGenerator()
|
|
167
|
-
|
|
168
|
-
await configureFrameworkBuild(frameworkPaths, frameworkBuildPaths, mode, {
|
|
169
|
-
cwd,
|
|
170
|
-
dryRun
|
|
171
|
-
})
|
|
243
|
+
|
|
244
|
+
await configureFrameworkBuild(frameworkPaths, frameworkBuildPaths, mode, {
|
|
245
|
+
cwd,
|
|
246
|
+
dryRun
|
|
247
|
+
})
|
|
172
248
|
|
|
173
249
|
await runCommand("cmake", ["--build", buildDir, ...generator.buildArgs, ...(generator.multiConfig ? [getBuildType(mode)] : [])], {
|
|
174
250
|
cwd,
|
|
175
251
|
dryRun
|
|
176
252
|
})
|
|
177
253
|
}
|
|
254
|
+
|
|
255
|
+
export async function prepareFrameworkRuntime(frameworkPaths, frameworkBuildPaths, mode, options = {}) {
|
|
256
|
+
const strategy = resolveFrameworkRuntimeStrategy(frameworkPaths, options)
|
|
257
|
+
|
|
258
|
+
if (strategy.kind === "prebuilt") {
|
|
259
|
+
return strategy
|
|
260
|
+
}
|
|
261
|
+
|
|
262
|
+
await buildFrameworkRuntimeFromSource(frameworkPaths, frameworkBuildPaths, mode, options)
|
|
263
|
+
return strategy
|
|
264
|
+
}
|