mirror of
https://github.com/JulianGro/overte.git
synced 2025-04-05 21:22:07 +02:00
Display version and autoupdate
This commit is contained in:
parent
e1c198903d
commit
4d9557dfc1
8 changed files with 181 additions and 41 deletions
|
@ -10,6 +10,7 @@ set(CMAKE_MFC_FLAG 1)
|
|||
|
||||
set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} /MT")
|
||||
set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} /MTd")
|
||||
include("cmake/macros/SetPackagingParameters.cmake")
|
||||
|
||||
add_executable(HQLauncher
|
||||
WIN32
|
||||
|
@ -49,6 +50,8 @@ function(set_from_env _RESULT_NAME _ENV_VAR_NAME _DEFAULT_VALUE)
|
|||
endif()
|
||||
endfunction()
|
||||
|
||||
set_packaging_parameters()
|
||||
|
||||
set_from_env(LAUNCHER_HMAC_SECRET LAUNCHER_HMAC_SECRET "")
|
||||
|
||||
if (LAUNCHER_HMAC_SECRET STREQUAL "")
|
||||
|
@ -56,7 +59,7 @@ if (LAUNCHER_HMAC_SECRET STREQUAL "")
|
|||
endif()
|
||||
|
||||
target_compile_definitions(${PROJECT_NAME} PRIVATE LAUNCHER_HMAC_SECRET="${LAUNCHER_HMAC_SECRET}")
|
||||
|
||||
target_compile_definitions(${PROJECT_NAME} PRIVATE LAUNCHER_BUILD_VERSION="${BUILD_VERSION}")
|
||||
|
||||
# Preprocessor definitions
|
||||
target_compile_definitions(HQLauncher PRIVATE
|
||||
|
|
|
@ -92,8 +92,8 @@ STYLE DS_SETFONT | DS_FIXEDSYS | WS_POPUP | WS_VISIBLE | WS_CAPTION
|
|||
EXSTYLE WS_EX_APPWINDOW
|
||||
FONT 10, "MS Shell Dlg", 400, 0, 0x0
|
||||
BEGIN
|
||||
CONTROL "",IDC_VOXEL,"Static",SS_BLACKRECT,65,3,174,123, NOT WS_VISIBLE
|
||||
CONTROL "", IDC_PROGRESS, "Static", SS_BLACKRECT, 35, 170, 239, 4, NOT WS_VISIBLE
|
||||
CONTROL "",IDC_VOXEL,"Static",SS_BLACKRECT,65,3,174,123
|
||||
CONTROL "",IDC_PROGRESS,"Static",SS_BLACKRECT,35,170,239,4
|
||||
EDITTEXT IDC_ORGNAME,44,68,219,12,ES_AUTOHSCROLL | NOT WS_VISIBLE | NOT WS_BORDER
|
||||
EDITTEXT IDC_USERNAME,44,95,219,12,ES_AUTOHSCROLL | NOT WS_VISIBLE | NOT WS_BORDER
|
||||
EDITTEXT IDC_PASSWORD,44,122,219,12,ES_PASSWORD | ES_AUTOHSCROLL | NOT WS_VISIBLE | NOT WS_BORDER
|
||||
|
@ -107,6 +107,7 @@ BEGIN
|
|||
RTEXT "",IDC_TERMS,15,172,180,15,NOT WS_VISIBLE
|
||||
CONTROL "",IDC_TERMS_LINK,"Button",BS_OWNERDRAW | BS_FLAT | NOT WS_VISIBLE | WS_TABSTOP,197,172,80,15
|
||||
CTEXT "",IDC_TROUBLE,65,203,174,15,NOT WS_VISIBLE
|
||||
RTEXT "THIS IS THE VERSION",IDC_VERSION,0,205,305,10
|
||||
CONTROL "NEXT",IDC_BUTTON_NEXT,"Button",BS_OWNERDRAW | BS_FLAT | NOT WS_VISIBLE | WS_TABSTOP,107,158,94,16
|
||||
CONTROL "Having Trouble?",IDC_TROUBLE_LINK,"Button",BS_OWNERDRAW | BS_FLAT | NOT WS_VISIBLE | WS_TABSTOP,126,203,56,11
|
||||
END
|
||||
|
|
|
@ -40,6 +40,8 @@ static CString GRAPHIK_SEMIBOLD = _T("Graphik-Semibold");
|
|||
static CString TROUBLE_URL = _T("https://www.highfidelity.com/hq-support");
|
||||
static CString TERMS_URL = _T("https://www.highfidelity.com/termsofservice");
|
||||
|
||||
static int SPLASH_DURATION = 100;
|
||||
|
||||
|
||||
CLauncherDlg::CLauncherDlg(CWnd* pParent)
|
||||
: CDialog(IDD_LAUNCHER_DIALOG, pParent)
|
||||
|
@ -112,6 +114,11 @@ BOOL CLauncherDlg::OnInitDialog() {
|
|||
m_voxel = (CStatic *)GetDlgItem(IDC_VOXEL);
|
||||
m_progress = (CStatic *)GetDlgItem(IDC_PROGRESS);
|
||||
|
||||
m_version = (CStatic *)GetDlgItem(IDC_VERSION);
|
||||
CString version;
|
||||
version.Format(_T("V.%s"), theApp._manager.getLauncherVersion());
|
||||
m_version->SetWindowTextW(version);
|
||||
|
||||
m_voxel->EnableD2DSupport();
|
||||
m_progress->EnableD2DSupport();
|
||||
|
||||
|
@ -230,7 +237,6 @@ void CLauncherDlg::startProcess() {
|
|||
theApp._manager.setFailed(true);
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
BOOL CLauncherDlg::getHQInfo(const CString& orgname) {
|
||||
|
@ -322,11 +328,12 @@ void CLauncherDlg::drawLogo(CHwndRenderTarget* pRenderTarget) {
|
|||
void CLauncherDlg::drawSmallLogo(CHwndRenderTarget* pRenderTarget) {
|
||||
CD2DBitmap m_pBitmamLogo(pRenderTarget, IDB_PNG5, _T("PNG"));
|
||||
auto size = pRenderTarget->GetSize();
|
||||
int padding = 6;
|
||||
int xPadding = 6;
|
||||
int yPadding = 22;
|
||||
int logoWidth = 100;
|
||||
int logoHeight = 18;
|
||||
float logoPosX = size.width - logoWidth - padding;
|
||||
float logoPosY = size.height - logoHeight - padding;
|
||||
float logoPosX = size.width - logoWidth - xPadding;
|
||||
float logoPosY = size.height - logoHeight - yPadding;
|
||||
CD2DRectF logoRec(logoPosX, logoPosY, logoPosX + logoWidth, logoPosY + logoHeight);
|
||||
pRenderTarget->DrawBitmap(&m_pBitmamLogo, logoRec);
|
||||
}
|
||||
|
@ -521,6 +528,7 @@ BOOL CLauncherDlg::getTextFormat(int resID, TextFormat& formatOut) {
|
|||
formatOut.size = FIELDS_FONT_SIZE;
|
||||
formatOut.color = COLOR_GREY;
|
||||
break;
|
||||
case IDC_VERSION:
|
||||
case IDC_TERMS:
|
||||
formatOut.size = TERMS_FONT_SIZE;
|
||||
break;
|
||||
|
@ -663,6 +671,24 @@ void CLauncherDlg::OnTimer(UINT_PTR nIDEvent) {
|
|||
// Refresh
|
||||
setDrawDialog(_drawStep, true);
|
||||
}
|
||||
|
||||
if (theApp._manager.needsSelfUpdate()) {
|
||||
if (theApp._manager.needsSelfDownload()) {
|
||||
theApp._manager.downloadNewLauncher();
|
||||
} else {
|
||||
if (_splashStep > SPLASH_DURATION && _splashStep < 2 * SPLASH_DURATION) {
|
||||
theApp._manager.updateProgress(LauncherManager::ProcessType::Uninstall, (float)(_splashStep - SPLASH_DURATION) / SPLASH_DURATION);
|
||||
_splashStep++;
|
||||
}
|
||||
if (theApp._manager.needsRestartNewLauncher()) {
|
||||
if (_splashStep >= 2 * SPLASH_DURATION) {
|
||||
theApp._manager.restartNewLauncher();
|
||||
exit(0);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (_showSplash) {
|
||||
if (_splashStep == 0) {
|
||||
if (theApp._manager.needsUninstall()) {
|
||||
|
@ -672,7 +698,7 @@ void CLauncherDlg::OnTimer(UINT_PTR nIDEvent) {
|
|||
theApp._manager.addToLog(_T("Start splash screen"));
|
||||
setDrawDialog(DrawStep::DrawLogo);
|
||||
}
|
||||
} else if (_splashStep > 100 && !theApp._manager.needsToWait()) {
|
||||
} else if (_splashStep > SPLASH_DURATION && !theApp._manager.needsToWait()) {
|
||||
_showSplash = false;
|
||||
if (theApp._manager.shouldShutDown()) {
|
||||
if (_applicationWND != NULL) {
|
||||
|
@ -692,12 +718,14 @@ void CLauncherDlg::OnTimer(UINT_PTR nIDEvent) {
|
|||
theApp._manager.addToLog(_T("HQ failed to uninstall."));
|
||||
theApp._manager.setFailed(true);
|
||||
}
|
||||
} else if (theApp._manager.needsSelfUpdate()) {
|
||||
setDrawDialog(DrawStep::DrawProcessUpdate);
|
||||
} else {
|
||||
theApp._manager.addToLog(_T("Starting login"));
|
||||
setDrawDialog(DrawStep::DrawLoginLogin);
|
||||
}
|
||||
} else if (theApp._manager.needsUninstall()) {
|
||||
theApp._manager.updateProgress(LauncherManager::ProcessType::Uninstall, (float)_splashStep/100);
|
||||
theApp._manager.updateProgress(LauncherManager::ProcessType::Uninstall, (float)_splashStep / SPLASH_DURATION);
|
||||
}
|
||||
_splashStep++;
|
||||
} else if (theApp._manager.shouldShutDown()) {
|
||||
|
|
|
@ -94,6 +94,8 @@ protected:
|
|||
CStatic* m_username_banner;
|
||||
CStatic* m_password_banner;
|
||||
|
||||
CStatic* m_version;
|
||||
|
||||
HWND _applicationWND { 0 };
|
||||
|
||||
void drawBackground(CHwndRenderTarget* pRenderTarget);
|
||||
|
|
|
@ -23,8 +23,11 @@ LauncherManager::~LauncherManager() {
|
|||
|
||||
void LauncherManager::init() {
|
||||
initLog();
|
||||
addToLog(_T("Getting most recent build"));
|
||||
getMostRecentBuild(_latestApplicationURL, _latestVersion);
|
||||
int tokenPos = 0;
|
||||
_launcherVersion = CString(LAUNCHER_BUILD_VERSION).Tokenize(_T("-"), tokenPos);
|
||||
addToLog(_T("Launcher is running version: " + _launcherVersion));
|
||||
addToLog(_T("Getting most recent builds"));
|
||||
getMostRecentBuilds(_latestLauncherURL, _latestLauncherVersion, _latestApplicationURL, _latestVersion);
|
||||
}
|
||||
|
||||
BOOL LauncherManager::initLog() {
|
||||
|
@ -124,6 +127,8 @@ BOOL LauncherManager::restartLauncher() {
|
|||
|
||||
void LauncherManager::updateProgress(ProcessType processType, float progress) {
|
||||
switch (processType) {
|
||||
case ProcessType::DownloadLauncher:
|
||||
break;
|
||||
case ProcessType::Uninstall:
|
||||
_progress = progress;
|
||||
break;
|
||||
|
@ -359,14 +364,23 @@ LauncherUtils::ResponseError LauncherManager::readOrganizationJSON(const CString
|
|||
return LauncherUtils::ResponseError::ParsingJSON;
|
||||
}
|
||||
|
||||
void LauncherManager::getMostRecentBuild(CString& urlOut, CString& versionOut) {
|
||||
void LauncherManager::getMostRecentBuilds(CString& launcherUrlOut, CString& launcherVersionOut,
|
||||
CString& interfaceUrlOut, CString& interfaceVersionOut) {
|
||||
CString contentTypeJson = L"content-type:application/json";
|
||||
std::function<void(CString, int)> httpCallback = [&](CString response, int err) {
|
||||
LauncherUtils::ResponseError error = LauncherUtils::ResponseError(err);
|
||||
if (error == LauncherUtils::ResponseError::NoError) {
|
||||
Json::Value json;
|
||||
error = LauncherUtils::ResponseError::ParsingJSON;
|
||||
if (LauncherUtils::parseJSON(response, json)) {
|
||||
if (json["launcher"].isObject()) {
|
||||
if (json["launcher"]["windows"].isObject() && json["launcher"]["windows"]["url"].isString()) {
|
||||
launcherUrlOut = json["launcher"]["windows"]["url"].asCString();
|
||||
}
|
||||
if (json["launcher"]["version"].isInt()) {
|
||||
std::string version = std::to_string(json["launcher"]["version"].asInt());
|
||||
launcherVersionOut = CString(version.c_str());
|
||||
}
|
||||
}
|
||||
int count = json["count"].isInt() ? json["count"].asInt() : 0;
|
||||
if (count > 0 && json["results"].isArray()) {
|
||||
for (int i = 0; i < count; i++) {
|
||||
|
@ -374,19 +388,21 @@ void LauncherManager::getMostRecentBuild(CString& urlOut, CString& versionOut) {
|
|||
Json::Value result = json["results"][i];
|
||||
if (result["latest_version"].isInt()) {
|
||||
std::string version = std::to_string(result["latest_version"].asInt());
|
||||
versionOut = CString(version.c_str());
|
||||
interfaceVersionOut = CString(version.c_str());
|
||||
}
|
||||
if (result["installers"].isObject() &&
|
||||
result["installers"]["windows"].isObject() &&
|
||||
result["installers"]["windows"]["zip_url"].isString()) {
|
||||
urlOut = result["installers"]["windows"]["zip_url"].asCString();
|
||||
error = LauncherUtils::ResponseError::NoError;
|
||||
interfaceUrlOut = result["installers"]["windows"]["zip_url"].asCString();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
if (launcherUrlOut.IsEmpty() || launcherVersionOut.IsEmpty() || interfaceUrlOut.IsEmpty() || interfaceVersionOut.IsEmpty()) {
|
||||
error = LauncherUtils::ResponseError::ParsingJSON;
|
||||
}
|
||||
}
|
||||
onMostRecentBuildReceived(response, error);
|
||||
onMostRecentBuildsReceived(response, error);
|
||||
}
|
||||
};
|
||||
LauncherUtils::httpCallOnThread(L"HQ Launcher",
|
||||
|
@ -395,31 +411,46 @@ void LauncherManager::getMostRecentBuild(CString& urlOut, CString& versionOut) {
|
|||
contentTypeJson, CStringA(), false, httpCallback);
|
||||
}
|
||||
|
||||
void LauncherManager::onMostRecentBuildReceived(const CString& response, LauncherUtils::ResponseError error) {
|
||||
void LauncherManager::onMostRecentBuildsReceived(const CString& response, LauncherUtils::ResponseError error) {
|
||||
if (error == LauncherUtils::ResponseError::NoError) {
|
||||
addToLog(_T("Latest version: ") + _latestVersion);
|
||||
CString currentVersion;
|
||||
if (isApplicationInstalled(currentVersion, _domainURL, _contentURL, _loggedIn) && _loggedIn) {
|
||||
addToLog(_T("Installed version: ") + currentVersion);
|
||||
if (_latestVersion.Compare(currentVersion) == 0) {
|
||||
addToLog(_T("Already running most recent build. Launching interface.exe"));
|
||||
_shouldLaunch = TRUE;
|
||||
_shouldShutdown = TRUE;
|
||||
} else {
|
||||
addToLog(_T("New build found. Updating"));
|
||||
_shouldUpdate = TRUE;
|
||||
}
|
||||
} else if (_loggedIn) {
|
||||
addToLog(_T("Interface not found but logged in. Reinstalling"));
|
||||
_shouldUpdate = TRUE;
|
||||
addToLog(_T("Latest launcher version: ") + _latestLauncherVersion);
|
||||
|
||||
if (_updateLauncherAllowed && _latestLauncherVersion.Compare(_launcherVersion) != 0) {
|
||||
CString updatingMsg;
|
||||
updatingMsg.Format(_T("Updating Launcher from version: %s to version: %s"), _launcherVersion, _latestLauncherVersion);
|
||||
addToLog(updatingMsg);
|
||||
_shouldUpdateLauncher = TRUE;
|
||||
_shouldDownloadLauncher = TRUE;
|
||||
} else {
|
||||
_shouldInstall = TRUE;
|
||||
if (_updateLauncherAllowed) {
|
||||
addToLog(_T("Already running most recent build. Launching interface.exe"));
|
||||
} else {
|
||||
addToLog(_T("Updating the launcher was not allowed --noUpdate"));
|
||||
}
|
||||
CString currentVersion;
|
||||
if (isApplicationInstalled(currentVersion, _domainURL, _contentURL, _loggedIn) && _loggedIn) {
|
||||
addToLog(_T("Installed version: ") + currentVersion);
|
||||
if (_latestVersion.Compare(currentVersion) == 0) {
|
||||
addToLog(_T("Already running most recent build. Launching interface.exe"));
|
||||
_shouldLaunch = TRUE;
|
||||
_shouldShutdown = TRUE;
|
||||
} else {
|
||||
addToLog(_T("New build found. Updating"));
|
||||
_shouldUpdate = TRUE;
|
||||
}
|
||||
} else if (_loggedIn) {
|
||||
addToLog(_T("Interface not found but logged in. Reinstalling"));
|
||||
_shouldUpdate = TRUE;
|
||||
} else {
|
||||
_shouldInstall = TRUE;
|
||||
}
|
||||
}
|
||||
_shouldWait = FALSE;
|
||||
|
||||
} else {
|
||||
_hasFailed = true;
|
||||
CString msg;
|
||||
msg.Format(_T("Getting most recent build has failed with error: %d"), error);
|
||||
msg.Format(_T("Getting most recent builds has failed with error: %d"), error);
|
||||
addToLog(msg);
|
||||
msg.Format(_T("Response: %s"), response);
|
||||
addToLog(msg);
|
||||
|
@ -563,9 +594,15 @@ void LauncherManager::onFileDownloaded(ProcessType type) {
|
|||
setFailed(true);
|
||||
}
|
||||
});
|
||||
} else if (type == ProcessType::DownloadLauncher) {
|
||||
_shouldRestartNewLauncher = true;
|
||||
}
|
||||
}
|
||||
|
||||
void LauncherManager::restartNewLauncher() {
|
||||
LauncherUtils::launchApplication(_tempLauncherPath, _T(" --restart"));
|
||||
}
|
||||
|
||||
|
||||
BOOL LauncherManager::installContent() {
|
||||
std::string contentZipFile = LauncherUtils::cStringToStd(_contentZipPath);
|
||||
|
@ -610,18 +647,18 @@ BOOL LauncherManager::downloadFile(ProcessType type, const CString& url, CString
|
|||
} else {
|
||||
if (type == ProcessType::DownloadApplication) {
|
||||
addToLog(_T("Error downloading content."));
|
||||
} else if (type == ProcessType::DownloadLauncher) {
|
||||
addToLog(_T("Error downloading launcher."));
|
||||
} else {
|
||||
addToLog(_T("Error downloading application."));
|
||||
}
|
||||
_hasFailed = true;
|
||||
}
|
||||
};
|
||||
std::function<void(float)> onProgress = [&](float progress) {
|
||||
std::function<void(float)> onProgress = [&, type](float progress) {
|
||||
updateProgress(_currentProcess, progress);
|
||||
};
|
||||
if (!LauncherUtils::downloadFileOnThread(type, url, outPath, onDownloadFinished, onProgress)) {
|
||||
success = FALSE;
|
||||
}
|
||||
success = LauncherUtils::downloadFileOnThread(type, url, outPath, onDownloadFinished, onProgress);
|
||||
}
|
||||
return success;
|
||||
}
|
||||
|
@ -637,6 +674,13 @@ BOOL LauncherManager::downloadApplication() {
|
|||
return downloadFile(ProcessType::DownloadApplication, applicationURL, _applicationZipPath);
|
||||
}
|
||||
|
||||
BOOL LauncherManager::downloadNewLauncher() {
|
||||
_shouldDownloadLauncher = FALSE;
|
||||
getAndCreatePaths(PathType::Temp_Directory, _tempLauncherPath);
|
||||
_tempLauncherPath += _T("/") + LAUNCHER_EXE_FILENAME;
|
||||
return downloadFile(ProcessType::DownloadLauncher, _latestLauncherURL, _tempLauncherPath);
|
||||
}
|
||||
|
||||
void LauncherManager::onCancel() {
|
||||
if (_currentProcess == ProcessType::UnzipApplication) {
|
||||
_latestVersion = _T("");
|
||||
|
|
|
@ -49,6 +49,7 @@ public:
|
|||
ErrorIOFiles
|
||||
};
|
||||
enum ProcessType {
|
||||
DownloadLauncher = 0,
|
||||
DownloadContent,
|
||||
DownloadApplication,
|
||||
UnzipContent,
|
||||
|
@ -67,7 +68,8 @@ public:
|
|||
BOOL isApplicationInstalled(CString& version, CString& domain,
|
||||
CString& content, bool& loggedIn);
|
||||
LauncherUtils::ResponseError getAccessTokenForCredentials(const CString& username, const CString& password);
|
||||
void getMostRecentBuild(CString& urlOut, CString& versionOut);
|
||||
void getMostRecentBuilds(CString& launcherUrlOut, CString& launcherVersionOut,
|
||||
CString& interfaceUrlOut, CString& interfaceVersionOut);
|
||||
LauncherUtils::ResponseError readOrganizationJSON(const CString& hash);
|
||||
LauncherUtils::ResponseError readConfigJSON(CString& version, CString& domain,
|
||||
CString& content, bool& loggedIn);
|
||||
|
@ -88,9 +90,12 @@ public:
|
|||
BOOL shouldShutDown() const { return _shouldShutdown; }
|
||||
BOOL shouldLaunch() const { return _shouldLaunch; }
|
||||
BOOL needsUpdate() { return _shouldUpdate; }
|
||||
BOOL needsSelfUpdate() { return _shouldUpdateLauncher; }
|
||||
BOOL needsSelfDownload() { return _shouldDownloadLauncher; }
|
||||
BOOL needsUninstall() { return _shouldUninstall; }
|
||||
BOOL needsInstall() { return _shouldInstall; }
|
||||
BOOL needsToWait() { return _shouldWait; }
|
||||
BOOL needsRestartNewLauncher() { return _shouldRestartNewLauncher; }
|
||||
void setDisplayName(const CString& displayName) { _displayName = displayName; }
|
||||
bool isLoggedIn() { return _loggedIn; }
|
||||
bool hasFailed() { return _hasFailed; }
|
||||
|
@ -101,19 +106,24 @@ public:
|
|||
BOOL downloadFile(ProcessType type, const CString& url, CString& localPath);
|
||||
BOOL downloadContent();
|
||||
BOOL downloadApplication();
|
||||
BOOL downloadNewLauncher();
|
||||
BOOL installContent();
|
||||
BOOL extractApplication();
|
||||
void restartNewLauncher();
|
||||
void onZipExtracted(ProcessType type, int size);
|
||||
void onFileDownloaded(ProcessType type);
|
||||
float getProgress() { return _progress; }
|
||||
void updateProgress(ProcessType processType, float progress);
|
||||
void onCancel();
|
||||
const CString& getLauncherVersion() const { return _launcherVersion; }
|
||||
|
||||
private:
|
||||
ProcessType _currentProcess { ProcessType::DownloadApplication };
|
||||
void onMostRecentBuildReceived(const CString& response, LauncherUtils::ResponseError error);
|
||||
void onMostRecentBuildsReceived(const CString& response, LauncherUtils::ResponseError error);
|
||||
CString _latestApplicationURL;
|
||||
CString _latestVersion;
|
||||
CString _latestLauncherURL;
|
||||
CString _latestLauncherVersion;
|
||||
CString _contentURL;
|
||||
CString _domainURL;
|
||||
CString _version;
|
||||
|
@ -121,6 +131,8 @@ private:
|
|||
CString _tokensJSON;
|
||||
CString _applicationZipPath;
|
||||
CString _contentZipPath;
|
||||
CString _launcherVersion;
|
||||
CString _tempLauncherPath;
|
||||
bool _loggedIn { false };
|
||||
bool _hasFailed { false };
|
||||
BOOL _shouldUpdate { FALSE };
|
||||
|
@ -129,6 +141,10 @@ private:
|
|||
BOOL _shouldShutdown { FALSE };
|
||||
BOOL _shouldLaunch { FALSE };
|
||||
BOOL _shouldWait { TRUE };
|
||||
BOOL _shouldUpdateLauncher { FALSE };
|
||||
BOOL _shouldDownloadLauncher{ FALSE };
|
||||
BOOL _updateLauncherAllowed { TRUE };
|
||||
BOOL _shouldRestartNewLauncher { FALSE };
|
||||
float _progress { 0.0f };
|
||||
CStdioFile _logFile;
|
||||
};
|
||||
|
|
45
launchers/win32/cmake/macros/SetPackagingParameters.cmake
Normal file
45
launchers/win32/cmake/macros/SetPackagingParameters.cmake
Normal file
|
@ -0,0 +1,45 @@
|
|||
#
|
||||
# SetPackagingParameters.cmake
|
||||
# cmake/macros
|
||||
#
|
||||
# Created by Leonardo Murillo on 07/14/2015.
|
||||
# Copyright 2015 High Fidelity, Inc.
|
||||
#
|
||||
# Distributed under the Apache License, Version 2.0.
|
||||
# See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
|
||||
|
||||
# This macro checks some Jenkins defined environment variables to determine the origin of this build
|
||||
# and decides how targets should be packaged.
|
||||
|
||||
macro(SET_PACKAGING_PARAMETERS)
|
||||
set(PR_BUILD 0)
|
||||
set(PRODUCTION_BUILD 0)
|
||||
set(DEV_BUILD 0)
|
||||
set(BUILD_NUMBER 0)
|
||||
|
||||
set_from_env(RELEASE_TYPE RELEASE_TYPE "DEV")
|
||||
set_from_env(RELEASE_NUMBER RELEASE_NUMBER "")
|
||||
set_from_env(STABLE_BUILD STABLE_BUILD 0)
|
||||
|
||||
message(STATUS "The RELEASE_TYPE variable is: ${RELEASE_TYPE}")
|
||||
set(BUILD_NUMBER ${RELEASE_NUMBER})
|
||||
|
||||
if (RELEASE_TYPE STREQUAL "PRODUCTION")
|
||||
set(PRODUCTION_BUILD 1)
|
||||
set(BUILD_VERSION ${RELEASE_NUMBER})
|
||||
|
||||
# add definition for this release type
|
||||
add_definitions(-DPRODUCTION_BUILD)
|
||||
|
||||
elseif (RELEASE_TYPE STREQUAL "PR")
|
||||
set(PR_BUILD 1)
|
||||
set(BUILD_VERSION "PR${RELEASE_NUMBER}")
|
||||
|
||||
# add definition for this release type
|
||||
add_definitions(-DPR_BUILD)
|
||||
else ()
|
||||
set(DEV_BUILD 1)
|
||||
set(BUILD_VERSION "dev")
|
||||
endif ()
|
||||
|
||||
endmacro(SET_PACKAGING_PARAMETERS)
|
|
@ -27,6 +27,7 @@
|
|||
#define IDC_TROUBLE 1023
|
||||
#define IDC_VOXEL 1024
|
||||
#define IDC_PROGRESS 1025
|
||||
#define IDC_VERSION 1026
|
||||
#define IDC_TROUBLE_LINK 1027
|
||||
|
||||
// Next default values for new objects
|
||||
|
|
Loading…
Reference in a new issue