mirror of
https://github.com/JulianGro/overte.git
synced 2025-04-07 07:02:46 +02:00
starting cleanup work
This commit is contained in:
parent
c919980e8b
commit
1eae39b78c
5 changed files with 98 additions and 7 deletions
|
@ -1,7 +1,8 @@
|
|||
cmake_minimum_required(VERSION 3.0)
|
||||
cmake_minimum_required(VERSION 3.2)
|
||||
set(ENV{MACOSX_DEPLOYMENT_TARGET} 10.9)
|
||||
project(HQLauncher)
|
||||
set (CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake/modules/")
|
||||
include("cmake/macros/SetPackagingParameters.cmake")
|
||||
set(src_files
|
||||
src/Launcher.h
|
||||
src/Launcher.m
|
||||
|
@ -38,6 +39,7 @@ set(src_files
|
|||
src/LaunchInterface.h
|
||||
src/CustomUI.h
|
||||
src/CustomUI.m
|
||||
src/LauncherParams.h
|
||||
src/main.mm
|
||||
nib/Window.xib
|
||||
nib/SplashScreen.xib
|
||||
|
@ -59,15 +61,17 @@ set_target_properties(${this_target} PROPERTIES
|
|||
set(MACOSX_BUNDLE_ICON_FILE "interface.icns")
|
||||
|
||||
function(set_from_env _RESULT_NAME _ENV_VAR_NAME _DEFAULT_VALUE)
|
||||
if (NOT DEFINED ${_RESULT_NAME})
|
||||
if ("$ENV{${_ENV_VAR_NAME}}" STREQUAL "")
|
||||
set (${_RESULT_NAME} ${_DEFAULT_VALUE} PARENT_SCOPE)
|
||||
else()
|
||||
set (${_RESULT_NAME} $ENV{${_ENV_VAR_NAME}} PARENT_SCOPE)
|
||||
endif()
|
||||
if (NOT DEFINED ${_RESULT_NAME})
|
||||
if ("$ENV{${_ENV_VAR_NAME}}" STREQUAL "")
|
||||
set (${_RESULT_NAME} ${_DEFAULT_VALUE} PARENT_SCOPE)
|
||||
else()
|
||||
set (${_RESULT_NAME} $ENV{${_ENV_VAR_NAME}} PARENT_SCOPE)
|
||||
endif()
|
||||
endif()
|
||||
endfunction()
|
||||
|
||||
set_packaging_parameters()
|
||||
|
||||
add_executable(${PROJECT_NAME} MACOSX_BUNDLE ${src_files})
|
||||
set_target_properties(${PROJECT_NAME} PROPERTIES OUTPUT_NAME ${APP_NAME}
|
||||
MACOSX_BUNDLE_BUNDLE_NAME ${APP_NAME})
|
||||
|
|
63
launchers/darwin/cmake/macros/SetPackagingParameters.cmake
Normal file
63
launchers/darwin/cmake/macros/SetPackagingParameters.cmake
Normal file
|
@ -0,0 +1,63 @@
|
|||
#
|
||||
# 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_GLOBAL_SERVICES "DEVELOPMENT")
|
||||
set(USE_STABLE_GLOBAL_SERVICES 0)
|
||||
set(BUILD_NUMBER 0)
|
||||
set(APP_USER_MODEL_ID "com.highfidelity.console-dev")
|
||||
|
||||
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(DEPLOY_PACKAGE TRUE)
|
||||
set(PRODUCTION_BUILD 1)
|
||||
set(BUILD_VERSION ${RELEASE_NUMBER})
|
||||
set(BUILD_ORGANIZATION "High Fidelity")
|
||||
|
||||
# add definition for this release type
|
||||
add_definitions(-DPRODUCTION_BUILD)
|
||||
|
||||
elseif (RELEASE_TYPE STREQUAL "PR")
|
||||
set(DEPLOY_PACKAGE TRUE)
|
||||
set(PR_BUILD 1)
|
||||
set(BUILD_VERSION "PR${RELEASE_NUMBER}")
|
||||
set(BUILD_ORGANIZATION "High Fidelity - PR${RELEASE_NUMBER}")
|
||||
|
||||
# add definition for this release type
|
||||
add_definitions(-DPR_BUILD)
|
||||
else ()
|
||||
set(DEV_BUILD 1)
|
||||
set(BUILD_VERSION "dev")
|
||||
set(BUILD_ORGANIZATION "High Fidelity - ${BUILD_VERSION}")
|
||||
|
||||
# add definition for this release type
|
||||
add_definitions(-DDEV_BUILD)
|
||||
endif ()
|
||||
|
||||
|
||||
|
||||
# create a header file our targets can use to find out the application version
|
||||
#file(MAKE_DIRECTORY "${CMAKE_BINARY_DIR}/includes")
|
||||
#configure_file("${HF_CMAKE_DIR}/templates/BuildInfo.h.in" "${CMAKE_BINARY_DIR}/includes/BuildInfo.h")
|
||||
#include_directories("${CMAKE_BINARY_DIR}/includes")
|
||||
|
||||
endmacro(SET_PACKAGING_PARAMETERS)
|
|
@ -5,6 +5,7 @@
|
|||
#import "LatestBuildRequest.h"
|
||||
#import "OrganizationRequest.h"
|
||||
#import "DownloadScripts.h"
|
||||
#import "LauncherParams.h";
|
||||
|
||||
typedef enum processStateTypes
|
||||
{
|
||||
|
@ -59,7 +60,10 @@ struct LatestBuildInfo {
|
|||
@property (nonatomic, assign) NSProgressIndicator* progressIndicator;
|
||||
@property (nonatomic) double progressTarget;
|
||||
@property (nonatomic) struct LatestBuildInfo buildInfo;
|
||||
@property (nonatomic) struct LauncherParams params;
|
||||
|
||||
- (struct LauncherParams) getLauncherParams;
|
||||
- (void) setLuancherParams:(struct LauncherParams) aParams;
|
||||
- (NSProgressIndicator*) getProgressView;
|
||||
- (void) setProgressView:(NSProgressIndicator*) aProgressIndicator;
|
||||
- (void) displayNameEntered:(NSString*)aDisplayName;
|
||||
|
|
|
@ -41,6 +41,8 @@ static BOOL const DELETE_ZIP_FILES = TRUE;
|
|||
latestBuildInfo.shouldDownload = FALSE;
|
||||
latestBuildInfo.requestBuildFinished = FALSE;
|
||||
self.buildInfo = latestBuildInfo;
|
||||
struct LauncherParams launcherParams;
|
||||
self.params = launcherParams;
|
||||
self.credentialsAccepted = TRUE;
|
||||
self.gotCredentialResponse = FALSE;
|
||||
self.waitingForCredentialReponse = FALSE;
|
||||
|
@ -110,6 +112,16 @@ static BOOL const DELETE_ZIP_FILES = TRUE;
|
|||
return lerpValue;
|
||||
}
|
||||
|
||||
- (struct LauncherParams) getLauncherParams
|
||||
{
|
||||
return self.params;
|
||||
}
|
||||
|
||||
- (void) setLauncherParams:(struct LauncherParams) aParams
|
||||
{
|
||||
self.params = aParams;
|
||||
}
|
||||
|
||||
- (BOOL) extractZipFileAtDestination:(NSString *)destination :(NSString*)file
|
||||
{
|
||||
NSTask* task = [[NSTask alloc] init];
|
||||
|
|
8
launchers/darwin/src/LauncherParams.h
Normal file
8
launchers/darwin/src/LauncherParams.h
Normal file
|
@ -0,0 +1,8 @@
|
|||
struct LauncherParams
|
||||
{
|
||||
NSString* domainContentUrl;
|
||||
NSString* interfaceUrl;
|
||||
NSString* orginizationName;
|
||||
NSString* displayName;
|
||||
NSString* domainUrl;
|
||||
}
|
Loading…
Reference in a new issue