mirror of
https://thingvellir.net/git/overte
synced 2025-03-27 23:52:03 +01:00
Merge pull request #15681 from jherico/light-launcher
DEV-77: Enable mac launcher builds
This commit is contained in:
commit
9835f16821
5 changed files with 31 additions and 13 deletions
|
@ -53,10 +53,20 @@ 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()
|
||||
endif()
|
||||
endfunction()
|
||||
|
||||
add_executable(${PROJECT_NAME} MACOSX_BUNDLE ${src_files})
|
||||
set_target_properties(${PROJECT_NAME} PROPERTIES OUTPUT_NAME ${APP_NAME})
|
||||
|
||||
|
||||
set_from_env(LAUNCHER_HMAC_SECRET LAUNCHER_HMAC_SECRET "")
|
||||
target_compile_definitions(${PROJECT_NAME} PRIVATE LAUNCHER_HMAC_SECRET="${LAUNCHER_HMAC_SECRET}")
|
||||
|
||||
file(GLOB NIB_FILES "nib/*.xib")
|
||||
|
||||
|
|
|
@ -6,15 +6,12 @@
|
|||
|
||||
static NSString* const organizationURL = @"https://s3.amazonaws.com/hifi-public/huffman/organizations/";
|
||||
|
||||
#define str(s) #s
|
||||
#define LAUNCHER_HMAC_SECRET_STRING str(LAUNCHER_HMAC_SECRET)
|
||||
|
||||
@implementation OrganizationRequest
|
||||
|
||||
- (void) confirmOrganization:(NSString*)aOrganization :(NSString*)aUsername {
|
||||
self.username = aUsername;
|
||||
|
||||
const char *cKey = LAUNCHER_HMAC_SECRET_STRING;
|
||||
const char *cKey = LAUNCHER_HMAC_SECRET;
|
||||
const char *cData = [aOrganization cStringUsingEncoding:NSASCIIStringEncoding];
|
||||
unsigned char cHMAC[CC_SHA256_DIGEST_LENGTH];
|
||||
CCHmac(kCCHmacAlgSHA256, cKey, strlen(cKey), cData, strlen(cData), cHMAC);
|
||||
|
|
|
@ -39,7 +39,19 @@ add_executable(HQLauncher
|
|||
targetver.h
|
||||
)
|
||||
|
||||
target_compile_definitions(HQLauncher PRIVATE LAUNCHER_HMAC_SECRET=$ENV{LAUNCHER_HMAC_SECRET})
|
||||
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()
|
||||
endif()
|
||||
endfunction()
|
||||
|
||||
set_from_env(LAUNCHER_HMAC_SECRET LAUNCHER_HMAC_SECRET "")
|
||||
target_compile_definitions(${PROJECT_NAME} PRIVATE LAUNCHER_HMAC_SECRET="${LAUNCHER_HMAC_SECRET}")
|
||||
|
||||
|
||||
# Preprocessor definitions
|
||||
target_compile_definitions(HQLauncher PRIVATE
|
||||
|
|
|
@ -170,12 +170,9 @@ void CLauncherDlg::startProcess() {
|
|||
}
|
||||
}
|
||||
|
||||
#define str(s) #s
|
||||
#define LAUNCHER_HMAC_SECRET_STRING str(LAUNCHER_HMAC_SECRET)
|
||||
|
||||
BOOL CLauncherDlg::getHQInfo(const CString& orgname) {
|
||||
CString hash;
|
||||
LauncherUtils::hMac256(orgname, LAUNCHER_HMAC_SECRET_STRING, hash);
|
||||
LauncherUtils::hMac256(orgname, LAUNCHER_HMAC_SECRET, hash);
|
||||
return theApp._manager.readOrganizationJSON(hash) == LauncherUtils::ResponseError::NoError;
|
||||
}
|
||||
|
||||
|
|
|
@ -112,6 +112,9 @@ def fixupWinZip(filename):
|
|||
shutil.move(outFullPath, fullPath)
|
||||
|
||||
def buildLightLauncher():
|
||||
# FIXME remove once MFC is enabled on the windows build hosts
|
||||
if sys.platform == 'win32':
|
||||
return
|
||||
launcherSourcePath = os.path.join(SOURCE_PATH, 'launchers', sys.platform)
|
||||
launcherBuildPath = os.path.join(BUILD_PATH, 'launcher')
|
||||
if not os.path.exists(launcherBuildPath):
|
||||
|
@ -170,5 +173,4 @@ if sys.platform == "win32":
|
|||
elif sys.platform == "darwin":
|
||||
fixupMacZip(archiveName)
|
||||
|
||||
# FIXME enable when MFC is on the Windows build hosts
|
||||
# buildLightLauncher()
|
||||
buildLightLauncher()
|
||||
|
|
Loading…
Reference in a new issue