Skip to content

Commit 423c364

Browse files
committed
Add the slnx extension file for solution projects
1 parent e42d582 commit 423c364

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

tools/xtdc/src/project_management.hpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -224,9 +224,9 @@ namespace xtdc_command {
224224
if (last_exit_code() != EXIT_SUCCESS) return "Generation error! Open project aborted.";
225225
auto xtdc_default_ide = xtd::environment::get_environment_variable("XTDC_DEFAULT_IDE");
226226
if (!xtd::string::is_empty(xtdc_default_ide)) {
227-
if (xtdc_default_ide == "devenv") launch_and_wait_process(xtd::string::format("{}.sln", xtd::io::path::combine(build_path(), get_name())), true, false);
227+
if (xtdc_default_ide == "devenv") launch_and_wait_process(xtd::string::format("{}.sln{}", xtd::io::path::combine(build_path(), get_name()), xtd::io::file::exists(xtd::string::format("{}.slnx", xtd::io::path::combine(build_path(), get_name()))) ? "x" :""), true, false);
228228
else launch_and_wait_process(xtdc_default_ide, path_, false, false);
229-
} else if (xtd::environment::os_version().is_windows_platform()) launch_and_wait_process(xtd::string::format("{}.sln", xtd::io::path::combine(build_path(), get_name())), true, false);
229+
} else if (xtd::environment::os_version().is_windows_platform()) launch_and_wait_process(xtd::string::format("{}.sln{}", xtd::io::path::combine(build_path(), get_name()), xtd::io::file::exists(xtd::string::format("{}.slnx", xtd::io::path::combine(build_path(), get_name()))) ? "x" :""), true, false);
230230
else if (xtd::environment::os_version().is_macos_platform()) launch_and_wait_process(xtd::string::format("{}.xcodeproj", xtd::io::path::combine(build_path(), get_name())), true, false);
231231
else {
232232
if (xtd::io::file::exists("/usr/bin/code")) launch_and_wait_process("code", path_, false, false);
@@ -559,7 +559,7 @@ namespace xtdc_command {
559559
xtd::io::directory::create_directory(build_path());
560560
change_current_directory current_directory {build_path()};
561561
if (!first_generation && xtd::string::is_empty(name)) name = get_name();
562-
if (xtd::environment::os_version().is_windows_platform() && (first_generation || !xtd::io::file::exists(xtd::io::path::combine(build_path(), xtd::string::format("{}.sln", name)))))
562+
if (xtd::environment::os_version().is_windows_platform() && (first_generation || (!xtd::io::file::exists(xtd::io::path::combine(build_path(), xtd::string::format("{}.slnx", name))) && !xtd::io::file::exists(xtd::io::path::combine(build_path(), xtd::string::format("{}.sln", name))))))
563563
launch_and_wait_process("cmake", xtd::string::format("-S {} -B {}", path_, build_path()), false, verbose);
564564
else if (xtd::environment::os_version().is_macos_platform() && (first_generation || !xtd::io::directory::exists(xtd::io::path::combine(build_path(), xtd::string::format("{}.xcodeproj", name)))))
565565
launch_and_wait_process("cmake", xtd::string::format("-S {} -B {} -G \"Xcode\"", path_, build_path()), false, verbose);

0 commit comments

Comments
 (0)