diff --git a/launchers/darwin/CMakeLists.txt b/launchers/darwin/CMakeLists.txt index ae451ee73d..e286e0d177 100644 --- a/launchers/darwin/CMakeLists.txt +++ b/launchers/darwin/CMakeLists.txt @@ -39,7 +39,6 @@ set(src_files src/LaunchInterface.h src/CustomUI.h src/CustomUI.m - src/LauncherParams.h src/main.mm nib/Window.xib nib/SplashScreen.xib @@ -81,6 +80,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}") file(GLOB NIB_FILES "nib/*.xib") diff --git a/launchers/darwin/nib/DisplayNameScreen.xib b/launchers/darwin/nib/DisplayNameScreen.xib index 94fa739f8e..1115d2c55e 100644 --- a/launchers/darwin/nib/DisplayNameScreen.xib +++ b/launchers/darwin/nib/DisplayNameScreen.xib @@ -102,12 +102,22 @@ <action selector="termsOfService:" target="YVh-OH-vU8" id="bgc-08-8Lj"/> </connections> </textField> + <textField horizontalHuggingPriority="251" verticalHuggingPriority="750" fixedFrame="YES" translatesAutoresizingMaskIntoConstraints="NO" id="oJs-u5-OOJ"> + <rect key="frame" x="466" y="0.0" width="42" height="14"/> + <autoresizingMask key="autoresizingMask"/> + <textFieldCell key="cell" lineBreakMode="clipping" title="Label" id="H6o-Xs-wK1"> + <font key="font" metaFont="system" size="11"/> + <color key="textColor" name="systemGrayColor" catalog="System" colorSpace="catalog"/> + <color key="backgroundColor" name="textBackgroundColor" catalog="System" colorSpace="catalog"/> + </textFieldCell> + </textField> </subviews> <point key="canvasLocation" x="138.5" y="154"/> </customView> <customObject id="YVh-OH-vU8" customClass="DisplayNameScreen"> <connections> <outlet property="backgroundImage" destination="aus-lo-eVi" id="SRc-pV-lXG"/> + <outlet property="buildVersion" destination="oJs-u5-OOJ" id="avj-j2-5P6"/> <outlet property="displayName" destination="Vhg-rq-xUH" id="Fb5-im-2hx"/> <outlet property="smallLogo" destination="j8K-TD-h7e" id="OVd-p3-nu6"/> </connections> diff --git a/launchers/darwin/nib/ErrorScreen.xib b/launchers/darwin/nib/ErrorScreen.xib index 26abe80b29..8a55039034 100644 --- a/launchers/darwin/nib/ErrorScreen.xib +++ b/launchers/darwin/nib/ErrorScreen.xib @@ -69,12 +69,22 @@ <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/> <imageCell key="cell" refusesFirstResponder="YES" alignment="left" imageScaling="proportionallyDown" id="CBD-Vk-Xd4"/> </imageView> + <textField horizontalHuggingPriority="251" verticalHuggingPriority="750" fixedFrame="YES" translatesAutoresizingMaskIntoConstraints="NO" id="Omk-5j-C6r"> + <rect key="frame" x="466" y="0.0" width="42" height="14"/> + <autoresizingMask key="autoresizingMask"/> + <textFieldCell key="cell" lineBreakMode="clipping" title="Label" id="xpG-oP-agI"> + <font key="font" metaFont="system" size="11"/> + <color key="textColor" name="systemGrayColor" catalog="System" colorSpace="catalog"/> + <color key="backgroundColor" name="textBackgroundColor" catalog="System" colorSpace="catalog"/> + </textFieldCell> + </textField> </subviews> <point key="canvasLocation" x="138.5" y="152"/> </customView> <customObject id="nWn-x7-LxT" customClass="ErrorViewController"> <connections> <outlet property="backgroundImage" destination="eih-a8-Pqa" id="2xh-8r-1Qu"/> + <outlet property="buildVersion" destination="Omk-5j-C6r" id="aTp-c3-RVy"/> <outlet property="smallLogo" destination="ugn-Hk-gWL" id="EVI-d3-mf5"/> <outlet property="voxelImage" destination="jmW-5q-Mf3" id="NiI-cY-tAf"/> </connections> diff --git a/launchers/darwin/nib/LoginScreen.xib b/launchers/darwin/nib/LoginScreen.xib index fc1ccfcc90..60bf69cd61 100644 --- a/launchers/darwin/nib/LoginScreen.xib +++ b/launchers/darwin/nib/LoginScreen.xib @@ -119,12 +119,22 @@ <action selector="havingTrouble:" target="NkF-nk-81S" id="tsf-tC-aqq"/> </connections> </textField> + <textField horizontalHuggingPriority="251" verticalHuggingPriority="750" fixedFrame="YES" translatesAutoresizingMaskIntoConstraints="NO" id="EsT-hn-six"> + <rect key="frame" x="466" y="0.0" width="42" height="14"/> + <autoresizingMask key="autoresizingMask"/> + <textFieldCell key="cell" lineBreakMode="clipping" title="Label" id="AGt-jH-mX2"> + <font key="font" metaFont="system" size="11"/> + <color key="textColor" name="systemGrayColor" catalog="System" colorSpace="catalog"/> + <color key="backgroundColor" name="textBackgroundColor" catalog="System" colorSpace="catalog"/> + </textFieldCell> + </textField> </subviews> <point key="canvasLocation" x="138.5" y="154"/> </customView> <customObject id="NkF-nk-81S" customClass="LoginScreen"> <connections> <outlet property="backgroundImage" destination="L56-Jv-0N8" id="INT-rB-YtG"/> + <outlet property="buildVersion" destination="EsT-hn-six" id="Z4k-Gv-U5g"/> <outlet property="button" destination="jKE-fV-Tjv" id="or6-tG-r6R"/> <outlet property="header" destination="hIC-qf-Abj" id="sVQ-rl-cvR"/> <outlet property="orginization" destination="L7W-3n-OKy" id="TiL-wn-Z2b"/> diff --git a/launchers/darwin/nib/ProcessScreen.xib b/launchers/darwin/nib/ProcessScreen.xib index d16d71e5fa..6413d523b8 100644 --- a/launchers/darwin/nib/ProcessScreen.xib +++ b/launchers/darwin/nib/ProcessScreen.xib @@ -53,6 +53,15 @@ <rect key="frame" x="68" y="78" width="394" height="20"/> <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/> </progressIndicator> + <textField horizontalHuggingPriority="251" verticalHuggingPriority="750" fixedFrame="YES" translatesAutoresizingMaskIntoConstraints="NO" id="U3I-TA-xRz"> + <rect key="frame" x="466" y="0.0" width="42" height="14"/> + <autoresizingMask key="autoresizingMask"/> + <textFieldCell key="cell" lineBreakMode="clipping" title="Label" id="8YH-Td-daK"> + <font key="font" metaFont="system" size="11"/> + <color key="textColor" name="systemGrayColor" catalog="System" colorSpace="catalog"/> + <color key="backgroundColor" name="textBackgroundColor" catalog="System" colorSpace="catalog"/> + </textFieldCell> + </textField> </subviews> <point key="canvasLocation" x="138.5" y="154"/> </customView> @@ -60,6 +69,7 @@ <connections> <outlet property="background" destination="kuY-e2-Hqb" id="CBc-bD-ux7"/> <outlet property="boldStatus" destination="EMF-E4-qLL" id="udm-8B-7lt"/> + <outlet property="buildVersion" destination="U3I-TA-xRz" id="HDI-tW-1cC"/> <outlet property="progressView" destination="aEr-fi-fkV" id="OUy-Qp-tiP"/> <outlet property="smallLogo" destination="uh2-4K-n56" id="pYg-hP-nr5"/> <outlet property="smallStatus" destination="BSg-lp-njL" id="ziz-ek-Lq4"/> diff --git a/launchers/darwin/nib/SplashScreen.xib b/launchers/darwin/nib/SplashScreen.xib index 3bbed22a59..2fdc19ad69 100644 --- a/launchers/darwin/nib/SplashScreen.xib +++ b/launchers/darwin/nib/SplashScreen.xib @@ -26,11 +26,21 @@ <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/> <imageCell key="cell" refusesFirstResponder="YES" alignment="left" imageScaling="proportionallyDown" id="qC6-tI-Uwf"/> </imageView> + <textField horizontalHuggingPriority="251" verticalHuggingPriority="750" fixedFrame="YES" translatesAutoresizingMaskIntoConstraints="NO" id="EgF-VK-Hfo"> + <rect key="frame" x="466" y="0.0" width="42" height="14"/> + <autoresizingMask key="autoresizingMask"/> + <textFieldCell key="cell" lineBreakMode="clipping" alignment="center" title="Label" id="gWS-UL-cjB"> + <font key="font" metaFont="smallSystem"/> + <color key="textColor" name="systemGrayColor" catalog="System" colorSpace="catalog"/> + <color key="backgroundColor" name="systemGrayColor" catalog="System" colorSpace="catalog"/> + </textFieldCell> + </textField> </subviews> <point key="canvasLocation" x="119.5" y="134"/> </customView> <customObject id="iJ0-FI-XIf" customClass="SplashScreen"> <connections> + <outlet property="buildVersion" destination="EgF-VK-Hfo" id="lVp-Ua-9Mt"/> <outlet property="imageView" destination="qtD-mb-qqq" id="rCt-Gd-Uux"/> <outlet property="logoImage" destination="2i5-Zw-nH7" id="7tM-sX-cvR"/> </connections> diff --git a/launchers/darwin/src/DisplayNameScreen.m b/launchers/darwin/src/DisplayNameScreen.m index 581eabc4ee..ecb619dc01 100644 --- a/launchers/darwin/src/DisplayNameScreen.m +++ b/launchers/darwin/src/DisplayNameScreen.m @@ -6,6 +6,7 @@ @property (nonatomic, assign) IBOutlet NSImageView* backgroundImage; @property (nonatomic, assign) IBOutlet NSImageView* smallLogo; @property (nonatomic, assign) IBOutlet NSTextField* displayName; +@property (nonatomic, assign) IBOutlet NSTextField* buildVersion; @end @implementation DisplayNameScreen @@ -13,10 +14,9 @@ [self.backgroundImage setImage: [NSImage imageNamed:hifiBackgroundFilename]]; [self.smallLogo setImage: [NSImage imageNamed:hifiSmallLogoFilename]]; NSMutableAttributedString* displayNameString = [[NSMutableAttributedString alloc] initWithString:@"Display Name"]; - + [self.buildVersion setStringValue: [@"V." stringByAppendingString:@LAUNCHER_BUILD_VERSION]]; [displayNameString addAttribute:NSForegroundColorAttributeName value:[NSColor grayColor] range:NSMakeRange(0, displayNameString.length)]; [displayNameString addAttribute:NSFontAttributeName value:[NSFont systemFontOfSize:18] range:NSMakeRange(0,displayNameString.length)]; - [self.displayName setPlaceholderAttributedString:displayNameString]; [self.displayName setTarget:self]; [self.displayName setAction:@selector(login:)]; diff --git a/launchers/darwin/src/ErrorViewController.m b/launchers/darwin/src/ErrorViewController.m index 84dee95678..af45175254 100644 --- a/launchers/darwin/src/ErrorViewController.m +++ b/launchers/darwin/src/ErrorViewController.m @@ -6,6 +6,7 @@ @property (nonatomic, assign) IBOutlet NSImageView* backgroundImage; @property (nonatomic, assign) IBOutlet NSImageView* smallLogo; @property (nonatomic, assign) IBOutlet NSImageView* voxelImage; +@property (nonatomic, assign) IBOutlet NSTextField* buildVersion; @end @@ -16,6 +17,7 @@ [self.backgroundImage setImage:[NSImage imageNamed:hifiBackgroundFilename]]; [self.smallLogo setImage:[NSImage imageNamed:hifiSmallLogoFilename]]; [self.voxelImage setImage:[NSImage imageNamed:hifiVoxelFilename]]; + [self.buildVersion setStringValue: [@"V." stringByAppendingString:@LAUNCHER_BUILD_VERSION]]; } -(IBAction)resartLauncher:(id)sender diff --git a/launchers/darwin/src/Launcher.h b/launchers/darwin/src/Launcher.h index cfeb66e008..de67850bfe 100644 --- a/launchers/darwin/src/Launcher.h +++ b/launchers/darwin/src/Launcher.h @@ -5,7 +5,6 @@ #import "LatestBuildRequest.h" #import "OrganizationRequest.h" #import "DownloadScripts.h" -#import "LauncherParams.h"; typedef enum processStateTypes { @@ -60,10 +59,7 @@ 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; diff --git a/launchers/darwin/src/Launcher.m b/launchers/darwin/src/Launcher.m index c24af01b71..1a84e9143d 100644 --- a/launchers/darwin/src/Launcher.m +++ b/launchers/darwin/src/Launcher.m @@ -41,8 +41,6 @@ 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; @@ -112,16 +110,6 @@ 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]; diff --git a/launchers/darwin/src/LauncherParams.h b/launchers/darwin/src/LauncherParams.h deleted file mode 100644 index 10a5a57541..0000000000 --- a/launchers/darwin/src/LauncherParams.h +++ /dev/null @@ -1,8 +0,0 @@ -struct LauncherParams -{ - NSString* domainContentUrl; - NSString* interfaceUrl; - NSString* orginizationName; - NSString* displayName; - NSString* domainUrl; -} diff --git a/launchers/darwin/src/LoginScreen.m b/launchers/darwin/src/LoginScreen.m index d654a14f1b..5b8cab2db6 100644 --- a/launchers/darwin/src/LoginScreen.m +++ b/launchers/darwin/src/LoginScreen.m @@ -12,6 +12,7 @@ @property (nonatomic, assign) IBOutlet NSTextField* smallHeader; @property (nonatomic, assign) IBOutlet NSTextField* trouble; @property (nonatomic, assign) IBOutlet NSButton* button; +@property (nonatomic, assign) IBOutlet NSTextField* buildVersion; @end @implementation LoginScreen @@ -36,6 +37,7 @@ [self.button setTitle:@"TRY AGAIN"]; } + [self.buildVersion setStringValue: [@"V." stringByAppendingString:@LAUNCHER_BUILD_VERSION]]; [self.backgroundImage setImage:[NSImage imageNamed:hifiBackgroundFilename]]; [self.smallLogo setImage:[NSImage imageNamed:hifiSmallLogoFilename]]; diff --git a/launchers/darwin/src/ProcessScreen.m b/launchers/darwin/src/ProcessScreen.m index 85ec5c8d5b..876be3fea3 100644 --- a/launchers/darwin/src/ProcessScreen.m +++ b/launchers/darwin/src/ProcessScreen.m @@ -9,6 +9,7 @@ @property (nonatomic, assign) IBOutlet NSTextField* boldStatus; @property (nonatomic, assign) IBOutlet NSTextField* smallStatus; @property (nonatomic, assign) IBOutlet NSProgressIndicator* progressView; +@property (nonatomic, assign) IBOutlet NSTextField* buildVersion; @end @implementation ProcessScreen @@ -37,6 +38,7 @@ default: break; } + [self.buildVersion setStringValue: [@"V." stringByAppendingString:@LAUNCHER_BUILD_VERSION]]; [self.background setImage: [NSImage imageNamed:hifiBackgroundFilename]]; [self.smallLogo setImage: [NSImage imageNamed:hifiSmallLogoFilename]]; [self.voxelImage setImage: [NSImage imageNamed:hifiVoxelFilename]]; diff --git a/launchers/darwin/src/SplashScreen.m b/launchers/darwin/src/SplashScreen.m index a1f726c1df..87d8681629 100644 --- a/launchers/darwin/src/SplashScreen.m +++ b/launchers/darwin/src/SplashScreen.m @@ -6,6 +6,7 @@ @property (nonatomic, assign) IBOutlet NSImageView* imageView; @property (nonatomic, assign) IBOutlet NSImageView* logoImage; @property (nonatomic, assign) IBOutlet NSButton* button; +@property (nonatomic, assign) IBOutlet NSTextField* buildVersion; @end @implementation SplashScreen @@ -15,5 +16,6 @@ -(void)awakeFromNib { [self.imageView setImage:[NSImage imageNamed:hifiBackgroundFilename]]; [self.logoImage setImage:[NSImage imageNamed:hifiLargeLogoFilename]]; + [self.buildVersion setStringValue: [@"V." stringByAppendingString:@LAUNCHER_BUILD_VERSION]]; } @end