Add default keys for file Optimize CCs
Some checks failed
CD / ${{ matrix.platform.name }} ${{ matrix.config.name }} (map[flags:-DBUILD_SHARED_LIBS=FALSE name:Static], map[artifact_name:linux32 flags:32 name:Linux GCC 32 os:ubuntu-latest]) (push) Has been cancelled
CD / ${{ matrix.platform.name }} ${{ matrix.config.name }} (map[flags:-DBUILD_SHARED_LIBS=FALSE name:Static], map[artifact_name:linux64 flags:64 name:Linux GCC x64 os:ubuntu-latest]) (push) Has been cancelled
CD / ${{ matrix.platform.name }} ${{ matrix.config.name }} (map[flags:-DBUILD_SHARED_LIBS=FALSE name:Static], map[artifact_name:linuxarm32 flags:arm32 name:Linux GCC ARM 32 os:ubuntu-latest]) (push) Has been cancelled
CD / ${{ matrix.platform.name }} ${{ matrix.config.name }} (map[flags:-DBUILD_SHARED_LIBS=FALSE name:Static], map[artifact_name:linuxarm64 flags:arm64 name:Linux GCC ARM 64 os:ubuntu-latest]) (push) Has been cancelled
CD / ${{ matrix.platform.name }} ${{ matrix.config.name }} (map[flags:-DBUILD_SHARED_LIBS=FALSE name:Static], map[artifact_name:macos name:macOS Apple Silicon os:macos-14]) (push) Has been cancelled
CD / ${{ matrix.platform.name }} ${{ matrix.config.name }} (map[flags:-DBUILD_SHARED_LIBS=FALSE name:Static], map[artifact_name:win32 flags:-A Win32 -DCMAKE_PARALLEL_MSVC=TRUE -DCMAKE_PREPARE_WINDOWS_DRIVERS=TRUE name:Windows VS2022 Win32 os:windows-2022]) (push) Has been cancelled
CD / ${{ matrix.platform.name }} ${{ matrix.config.name }} (map[flags:-DBUILD_SHARED_LIBS=FALSE name:Static], map[artifact_name:win64 flags:-A x64 -DCMAKE_PARALLEL_MSVC=TRUE -DCMAKE_PREPARE_WINDOWS_DRIVERS=TRUE name:Windows VS2022 x64 os:windows-2022]) (push) Has been cancelled
CD / ${{ matrix.platform.name }} ${{ matrix.config.name }} (map[flags:-DBUILD_SHARED_LIBS=FALSE name:Static], map[artifact_name:winarm64 flags:-A ARM64 -DCMAKE_PARALLEL_MSVC=TRUE -DCMAKE_PREPARE_WINDOWS_DRIVERS=TRUE name:Windows VS2022 ARM os:windows-2022]) (push) Has been cancelled
CD / Create Pi Mono Setup (push) Has been cancelled
CD / Publishing (push) Has been cancelled

This commit is contained in:
Lorenzooone
2026-05-31 23:04:26 +02:00
parent 9b4e1cc579
commit 85dec4fbbb
5 changed files with 40 additions and 12 deletions

View File

@@ -926,6 +926,30 @@ static bool create_folder(const std::string path) {
return false;
}
static bool create_file(const std::string path, std::string base_content) {
try {
#if (!defined(_MSC_VER)) || (_MSC_VER > 1916)
bool file_exists = std::filesystem::exists(path);
#else
bool file_exists = std::experimental::filesystem::exists(path);
#endif
if(file_exists)
return true;
std::ofstream file(path, std::ios_base::app | std::ios_base::out);
if(!file.good()) {
ActualConsoleOutTextError("Error creating file " + path);
return false;
}
file << base_content << std::endl;
file.close();
return true;
}
catch(...) {
ActualConsoleOutTextError("Error creating file " + path);
}
return false;
}
static bool create_out_folder() {
bool success = create_folder(get_base_path(false, false));
if(!success)
@@ -933,6 +957,8 @@ static bool create_out_folder() {
create_folder(get_base_path(true));
create_folder(get_base_path_keys());
create_folder(get_base_path_device_specific_configs());
create_file(get_optimize_keys_file_path(true), "THIS-ISAN-EXAM-PLE0-KEY0\nONE0-LINE-FOR0-ONE0-KEY0");
create_file(get_optimize_keys_file_path(false), "THIS-ISAN-EXAM-PLE0-KEY0\nONE0-LINE-FOR0-ONE0-KEY0");
return success;
}