mirror of
https://github.com/JulianGro/overte.git
synced 2025-04-07 07:02:46 +02:00
Merge branch 'qt-launcher' of github.com:danteruiz/hifi into qt-launcher
This commit is contained in:
commit
9256ce35a4
4 changed files with 18 additions and 3 deletions
|
@ -183,12 +183,23 @@ if (WIN32)
|
|||
configure_file("${CMAKE_CURRENT_SOURCE_DIR}/cmake/templates/Icon.rc.in" ${CONFIGURE_ICON_RC_OUTPUT})
|
||||
add_executable(${PROJECT_NAME} WIN32 ${src_files} ${RES_SOURCES} ${CONFIGURE_ICON_RC_OUTPUT})
|
||||
elseif (APPLE)
|
||||
set(APP_NAME "HQ Launcher")
|
||||
set_target_properties(${this_target} PROPERTIES
|
||||
MACOSX_BUNDLE_INFO_PLIST MacOSXBundleInfo.plist.in)
|
||||
|
||||
set(MACOSX_BUNDLE_ICON_FILE "interface.icns")
|
||||
add_executable(${PROJECT_NAME} MACOSX_BUNDLE ${src_files} ${RES_SOURCES})
|
||||
set_target_properties(${PROJECT_NAME} PROPERTIES OUTPUT_NAME ${APP_NAME}
|
||||
MACOSX_BUNDLE_BUNDLE_NAME ${APP_NAME})
|
||||
set_target_properties(${PROJECT_NAME} PROPERTIES XCODE_ATTRIBUTE_ENABLE_BITCODE "NO")
|
||||
|
||||
|
||||
add_custom_command(TARGET ${PROJECT_NAME} POST_BUILD
|
||||
COMMAND ${CMAKE_COMMAND} -E make_directory "${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_CFG_INTDIR}/${APP_NAME}.app/Contents/Resources"
|
||||
COMMAND ${CMAKE_COMMAND} -E chdir "${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_CFG_INTDIR}/${APP_NAME}.app/Contents/MacOS/" ln -sf ./HQ\ Launcher updater
|
||||
# Older versions of Launcher put updater in `/Contents/Resources/updater`.
|
||||
COMMAND ${CMAKE_COMMAND} -E chdir "${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_CFG_INTDIR}/${APP_NAME}.app/Contents/Resources" ln -sf ../MacOS/HQ\ Launcher updater
|
||||
)
|
||||
endif()
|
||||
|
||||
target_link_libraries(${PROJECT_NAME}
|
||||
|
|
|
@ -33,7 +33,6 @@ void launchClient(const QString& clientPath, const QString& homePath, const QStr
|
|||
|
||||
NSWorkspace *workspace = [NSWorkspace sharedWorkspace];
|
||||
NSURL *url = [NSURL fileURLWithPath:[workspace fullPathForApplication:clientPath.toNSString()]];
|
||||
NSLog(@"------> path %@: ", [url path]);
|
||||
NSTask *task = [[NSTask alloc] init];
|
||||
task.launchPath = [url path];
|
||||
task.arguments = arguments;
|
||||
|
|
|
@ -75,6 +75,8 @@ void launchAutoUpdater(const QString& autoUpdaterPath) {
|
|||
&si, // Pointer to STARTUPINFO structure
|
||||
&pi // Pointer to PROCESS_INFORMATION structure
|
||||
);
|
||||
|
||||
QCoreApplication::instance()->quit();
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
#include "LauncherState.h"
|
||||
|
||||
#include "CommandlineOptions.h"
|
||||
#include "PathUtils.h"
|
||||
#include "Unzipper.h"
|
||||
#include "Helper.h"
|
||||
|
@ -200,8 +201,10 @@ void LauncherState::requestBuilds() {
|
|||
|
||||
_latestBuilds = request->getLatestBuilds();
|
||||
|
||||
if (shouldDownloadLauncher()) {
|
||||
CommandlineOptions* options = CommandlineOptions::getInstance();
|
||||
if (shouldDownloadLauncher() && !options->contains("--noUpdate")) {
|
||||
downloadLauncher();
|
||||
return;
|
||||
}
|
||||
getCurrentClientVersion();
|
||||
});
|
||||
|
@ -578,7 +581,7 @@ void LauncherState::installLauncher() {
|
|||
#elif defined(Q_OS_MACOS)
|
||||
launcherPath = installDirectory.absoluteFilePath("HQ Launcher.app");
|
||||
#endif
|
||||
//::launchAutoUpdater(launcherPath);
|
||||
::launchAutoUpdater(launcherPath);
|
||||
}
|
||||
});
|
||||
|
||||
|
|
Loading…
Reference in a new issue