Skip to content

Commit 70433a2

Browse files
committed
Export all supported platforms as default
1 parent 92540a4 commit 70433a2

1 file changed

Lines changed: 4 additions & 16 deletions

File tree

editor/cli/CommandLine.cpp

Lines changed: 4 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -225,18 +225,6 @@ static bool parseShaderSpec(const std::string& value, ShaderKey& out, std::strin
225225
return true;
226226
}
227227

228-
static void addHostDefaultPlatform(std::set<EnginePlatform>& platforms) {
229-
#if defined(__linux__)
230-
platforms.insert(EnginePlatform::Linux);
231-
#elif defined(_WIN32)
232-
platforms.insert(EnginePlatform::Windows);
233-
#elif defined(__APPLE__)
234-
platforms.insert(EnginePlatform::MacOS);
235-
#else
236-
platforms.insert(EnginePlatform::Linux);
237-
#endif
238-
}
239-
240228
static void addAllSupportedPlatforms(std::set<EnginePlatform>& platforms) {
241229
platforms.insert(EnginePlatform::Linux);
242230
platforms.insert(EnginePlatform::Windows);
@@ -271,7 +259,7 @@ static void printUsage(const std::string& commandName) {
271259
<< " --shader <spec> Shader type and optional properties, e.g. mesh:Uv1,Nor. Can repeat.\n"
272260
<< " --list-scenes Print project scenes and exit.\n"
273261
<< " -h, --help Show this help.\n\n"
274-
<< "If no --platform is provided, the current host platform is used.\n"
262+
<< "If no --platform is provided, all supported platforms are used.\n"
275263
<< "If no --shader is provided, shaders discovered while regenerating scenes are exported.\n"
276264
<< "For standalone shader generation, use `" << commandName << " shaders`.\n";
277265
}
@@ -287,7 +275,7 @@ static void printShadersUsage(const std::string& commandName) {
287275
<< " --all-platforms Generate shader formats for every supported platform.\n"
288276
<< " --shader <spec> Shader type and optional properties, e.g. mesh:Uv1,Nor. Can repeat.\n"
289277
<< " -h, --help Show this help.\n\n"
290-
<< "If no --platform is provided, the current host platform is used.\n"
278+
<< "If no --platform is provided, all supported platforms are used.\n"
291279
<< "Shader output is written directly to <out>.\n";
292280
}
293281

@@ -361,7 +349,7 @@ static bool parseArgs(int argc, char** argv, ExportCliOptions& options, std::str
361349
return false;
362350
}
363351
if (options.platforms.empty()) {
364-
addHostDefaultPlatform(options.platforms);
352+
addAllSupportedPlatforms(options.platforms);
365353
}
366354

367355
return true;
@@ -420,7 +408,7 @@ static bool parseShadersArgs(int argc, char** argv, ShaderCliOptions& options, s
420408
return false;
421409
}
422410
if (options.platforms.empty()) {
423-
addHostDefaultPlatform(options.platforms);
411+
addAllSupportedPlatforms(options.platforms);
424412
}
425413

426414
return true;

0 commit comments

Comments
 (0)