add version overrides for builds.
This commit is contained in:
3
.gitignore
vendored
3
.gitignore
vendored
@@ -27,3 +27,6 @@ out
|
|||||||
usb_test/
|
usb_test/
|
||||||
__pycache__
|
__pycache__
|
||||||
usb_*.spec
|
usb_*.spec
|
||||||
|
|
||||||
|
CMakeUserPresets.json
|
||||||
|
build_patreon.sh
|
||||||
|
|||||||
@@ -58,7 +58,11 @@ execute_process(
|
|||||||
OUTPUT_STRIP_TRAILING_WHITESPACE
|
OUTPUT_STRIP_TRAILING_WHITESPACE
|
||||||
)
|
)
|
||||||
|
|
||||||
set(sphaira_VERSION_HASH "${sphaira_VERSION} [${GIT_COMMIT}]")
|
if (DEFINED sphaira_VERSION_OVERRIDE)
|
||||||
|
set(sphaira_DISPLAY_VERSION "${sphaira_VERSION_OVERRIDE} [${GIT_COMMIT}]")
|
||||||
|
else()
|
||||||
|
set(sphaira_DISPLAY_VERSION "${sphaira_VERSION} [${GIT_COMMIT}]")
|
||||||
|
endif()
|
||||||
|
|
||||||
add_executable(sphaira
|
add_executable(sphaira
|
||||||
source/ui/menus/appstore.cpp
|
source/ui/menus/appstore.cpp
|
||||||
@@ -158,7 +162,7 @@ add_executable(sphaira
|
|||||||
|
|
||||||
target_compile_definitions(sphaira PRIVATE
|
target_compile_definitions(sphaira PRIVATE
|
||||||
-DAPP_VERSION="${sphaira_VERSION}"
|
-DAPP_VERSION="${sphaira_VERSION}"
|
||||||
-DAPP_VERSION_HASH="${sphaira_VERSION_HASH}"
|
-DAPP_DISPLAY_VERSION="${sphaira_DISPLAY_VERSION}"
|
||||||
-DCURL_NO_OLDIES=1
|
-DCURL_NO_OLDIES=1
|
||||||
-DDEV_BUILD=$<BOOL:${DEV_BUILD}>
|
-DDEV_BUILD=$<BOOL:${DEV_BUILD}>
|
||||||
-DZSTD_STATIC_LINKING_ONLY=1
|
-DZSTD_STATIC_LINKING_ONLY=1
|
||||||
|
|||||||
@@ -1552,7 +1552,7 @@ App::App(const char* argv0) {
|
|||||||
|
|
||||||
if (App::GetLogEnable()) {
|
if (App::GetLogEnable()) {
|
||||||
log_file_init();
|
log_file_init();
|
||||||
log_write("hello world v%s\n", APP_VERSION_HASH);
|
log_write("hello world v%s\n", APP_DISPLAY_VERSION);
|
||||||
}
|
}
|
||||||
|
|
||||||
// anything that can be async loaded should be placed in here in order
|
// anything that can be async loaded should be placed in here in order
|
||||||
|
|||||||
@@ -953,7 +953,7 @@ void FsView::ZipFiles(fs::FsPath zip_out) {
|
|||||||
|
|
||||||
auto zfile = zipOpen2_64(zip_out, APPEND_STATUS_CREATE, nullptr, &file_func);
|
auto zfile = zipOpen2_64(zip_out, APPEND_STATUS_CREATE, nullptr, &file_func);
|
||||||
R_UNLESS(zfile, Result_ZipOpen2_64);
|
R_UNLESS(zfile, Result_ZipOpen2_64);
|
||||||
ON_SCOPE_EXIT(zipClose(zfile, "sphaira v" APP_VERSION_HASH));
|
ON_SCOPE_EXIT(zipClose(zfile, "sphaira v" APP_DISPLAY_VERSION));
|
||||||
|
|
||||||
const auto zip_add = [&](const fs::FsPath& file_path) -> Result {
|
const auto zip_add = [&](const fs::FsPath& file_path) -> Result {
|
||||||
// the file name needs to be relative to the current directory.
|
// the file name needs to be relative to the current directory.
|
||||||
|
|||||||
@@ -276,7 +276,7 @@ MainMenu::MainMenu() {
|
|||||||
std::make_pair(Button::START, Action{App::Exit}),
|
std::make_pair(Button::START, Action{App::Exit}),
|
||||||
std::make_pair(Button::SELECT, Action{App::DisplayMenuOptions}),
|
std::make_pair(Button::SELECT, Action{App::DisplayMenuOptions}),
|
||||||
std::make_pair(Button::Y, Action{"Menu"_i18n, [this](){
|
std::make_pair(Button::Y, Action{"Menu"_i18n, [this](){
|
||||||
auto options = std::make_unique<Sidebar>("Menu Options"_i18n, "v" APP_VERSION_HASH, Sidebar::Side::LEFT);
|
auto options = std::make_unique<Sidebar>("Menu Options"_i18n, "v" APP_DISPLAY_VERSION, Sidebar::Side::LEFT);
|
||||||
ON_SCOPE_EXIT(App::Push(std::move(options)));
|
ON_SCOPE_EXIT(App::Push(std::move(options)));
|
||||||
|
|
||||||
SidebarEntryArray::Items language_items;
|
SidebarEntryArray::Items language_items;
|
||||||
|
|||||||
@@ -1037,7 +1037,7 @@ Result Menu::BackupSaveInternal(ProgressBox* pbox, const dump::DumpLocation& loc
|
|||||||
{
|
{
|
||||||
auto zfile = zipOpen2_64(path, APPEND_STATUS_CREATE, nullptr, &file_func);
|
auto zfile = zipOpen2_64(path, APPEND_STATUS_CREATE, nullptr, &file_func);
|
||||||
R_UNLESS(zfile, Result_ZipOpen2_64);
|
R_UNLESS(zfile, Result_ZipOpen2_64);
|
||||||
ON_SCOPE_EXIT(zipClose(zfile, "sphaira v" APP_VERSION_HASH));
|
ON_SCOPE_EXIT(zipClose(zfile, "sphaira v" APP_DISPLAY_VERSION));
|
||||||
|
|
||||||
// add save meta.
|
// add save meta.
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user