Merge pull request #105 from Bo98/canary_burnout5_pr2
xb & build improvements, store recent.toml in storage root
This commit is contained in:
commit
f55defc1ab
|
@ -1137,7 +1137,7 @@ void EmulatorWindow::FillRecentlyLaunchedTitlesMenu(
|
||||||
}
|
}
|
||||||
|
|
||||||
void EmulatorWindow::ReadRecentlyLaunchedTitles() {
|
void EmulatorWindow::ReadRecentlyLaunchedTitles() {
|
||||||
std::ifstream file("recent.toml");
|
std::ifstream file(emulator()->storage_root() / "recent.toml");
|
||||||
if (!file.is_open()) {
|
if (!file.is_open()) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -1198,7 +1198,8 @@ void EmulatorWindow::AddRecentlyLaunchedTitle(
|
||||||
toml_table->end();
|
toml_table->end();
|
||||||
|
|
||||||
// Open and write serialized data.
|
// Open and write serialized data.
|
||||||
std::ofstream file("recent.toml", std::ofstream::trunc);
|
std::ofstream file(emulator()->storage_root() / "recent.toml",
|
||||||
|
std::ofstream::trunc);
|
||||||
file << *toml_table;
|
file << *toml_table;
|
||||||
file.close();
|
file.close();
|
||||||
}
|
}
|
||||||
|
|
3
xb.bat
3
xb.bat
|
@ -40,7 +40,8 @@ SET "CANDIDATE_PATHS[1]=C:\python39\python.exe"
|
||||||
SET "CANDIDATE_PATHS[2]=C:\python38\python.exe"
|
SET "CANDIDATE_PATHS[2]=C:\python38\python.exe"
|
||||||
SET "CANDIDATE_PATHS[3]=C:\python37\python.exe"
|
SET "CANDIDATE_PATHS[3]=C:\python37\python.exe"
|
||||||
SET "CANDIDATE_PATHS[4]=C:\python%PYTHON_MINIMUM_VERSION[0]%%PYTHON_MINIMUM_VERSION[1]%\python.exe"
|
SET "CANDIDATE_PATHS[4]=C:\python%PYTHON_MINIMUM_VERSION[0]%%PYTHON_MINIMUM_VERSION[1]%\python.exe"
|
||||||
SET OUTPUT_INDEX=5
|
SET "CANDIDATE_PATHS[5]=C:\Windows\py.exe"
|
||||||
|
SET OUTPUT_INDEX=6
|
||||||
|
|
||||||
FOR /F "usebackq delims=" %%L IN (`2^>NUL where python3`) DO (
|
FOR /F "usebackq delims=" %%L IN (`2^>NUL where python3`) DO (
|
||||||
IF %%~zL NEQ 0 (
|
IF %%~zL NEQ 0 (
|
||||||
|
|
|
@ -47,6 +47,7 @@ def import_subprocess_environment(args):
|
||||||
'systemroot',
|
'systemroot',
|
||||||
'temp',
|
'temp',
|
||||||
'tmp',
|
'tmp',
|
||||||
|
'vcinstalldir',
|
||||||
'windowssdkdir',
|
'windowssdkdir',
|
||||||
)
|
)
|
||||||
for line in variables.splitlines():
|
for line in variables.splitlines():
|
||||||
|
@ -436,6 +437,8 @@ def get_clang_format_binary():
|
||||||
'clang-format-13',
|
'clang-format-13',
|
||||||
'clang-format',
|
'clang-format',
|
||||||
]
|
]
|
||||||
|
if 'VCINSTALLDIR' in os.environ:
|
||||||
|
attempts.append(os.path.join(os.environ['VCINSTALLDIR'], 'Tools', 'Llvm', 'bin', 'clang-format.exe'))
|
||||||
for binary in attempts:
|
for binary in attempts:
|
||||||
if has_bin(binary):
|
if has_bin(binary):
|
||||||
return binary
|
return binary
|
||||||
|
|
Loading…
Reference in New Issue