Add switch to disable feature for build

This commit is contained in:
daleclack 2023-04-13 11:51:21 +08:00
parent d3861fe0a5
commit 74cf777428
2 changed files with 12 additions and 2 deletions

View File

@ -311,14 +311,24 @@ void MyWin::main_releases()
#endif
break;
case Releases::Stable:
#ifdef DISABLE_STABLE_BUILD
msg_dialog.Init("The stable build is diasbled!");
msg_dialog.present();
#else
stable(local, config_stable.c_str(), str);
msg_dialog.Init(str);
msg_dialog.present();
#endif
break;
case Releases::Dev:
#ifdef DISABLE_DEVELOP_BUILD
msg_dialog.Init("The development build is diasbled!");
msg_dialog.present();
#else
develop(local, config_devel.c_str(), str);
msg_dialog.Init(str);
msg_dialog.present();
#endif
break;
}
}

View File

@ -21,5 +21,5 @@ static inline OS_Type get_os_type(){
#endif
}
// Disable longterm build
#define DISABLE_LONGTERM_BUILD
// Enable/Disable longterm build
// #define DISABLE_LONGTERM_BUILD