mirror of
https://github.com/HifiExperiments/overte.git
synced 2025-08-04 04:33:11 +02:00
fixing auto updater fpor mac
This commit is contained in:
parent
0afbad6557
commit
c3c283c3ed
8 changed files with 20 additions and 1 deletions
BIN
launchers/darwin/images/HiFi_Voxel.png
Normal file
BIN
launchers/darwin/images/HiFi_Voxel.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 2.9 KiB |
BIN
launchers/darwin/images/HiFi_Window.png
Normal file
BIN
launchers/darwin/images/HiFi_Window.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 4.5 KiB |
BIN
launchers/darwin/images/hifi_logo_large@2x.png
Normal file
BIN
launchers/darwin/images/hifi_logo_large@2x.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 16 KiB |
BIN
launchers/darwin/images/hifi_logo_small@2x.png
Normal file
BIN
launchers/darwin/images/hifi_logo_small@2x.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 4.6 KiB |
BIN
launchers/darwin/images/hifi_window@2x.png
Normal file
BIN
launchers/darwin/images/hifi_window@2x.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 7.6 KiB |
BIN
launchers/darwin/images/interface.icns
Normal file
BIN
launchers/darwin/images/interface.icns
Normal file
Binary file not shown.
|
@ -12,7 +12,23 @@
|
||||||
}
|
}
|
||||||
@end
|
@end
|
||||||
|
|
||||||
|
|
||||||
|
void redirectLogToDocuments()
|
||||||
|
{
|
||||||
|
NSString* filePath = [[NSSearchPathForDirectoriesInDomains(NSApplicationSupportDirectory, NSUserDomainMask, YES) objectAtIndex:0]
|
||||||
|
stringByAppendingString:@"/Launcher/"];
|
||||||
|
|
||||||
|
if (![[NSFileManager defaultManager] fileExistsAtPath:filePath]) {
|
||||||
|
NSError * error = nil;
|
||||||
|
[[NSFileManager defaultManager] createDirectoryAtPath:filePath withIntermediateDirectories:TRUE attributes:nil error:&error];
|
||||||
|
}
|
||||||
|
NSString *pathForLog = [filePath stringByAppendingPathComponent:@"log.txt"];
|
||||||
|
|
||||||
|
freopen([pathForLog cStringUsingEncoding:NSASCIIStringEncoding],"a+",stderr);
|
||||||
|
}
|
||||||
|
|
||||||
int main(int argc, char const* argv[]) {
|
int main(int argc, char const* argv[]) {
|
||||||
|
redirectLogToDocuments();
|
||||||
if (argc < 3) {
|
if (argc < 3) {
|
||||||
NSLog(@"Error: wrong number of arguments");
|
NSLog(@"Error: wrong number of arguments");
|
||||||
return 0;
|
return 0;
|
||||||
|
@ -50,6 +66,7 @@ int main(int argc, char const* argv[]) {
|
||||||
options:NSWorkspaceLaunchNewInstance
|
options:NSWorkspaceLaunchNewInstance
|
||||||
configuration:configuration
|
configuration:configuration
|
||||||
error:&error];
|
error:&error];
|
||||||
|
|
||||||
if (error != nil) {
|
if (error != nil) {
|
||||||
NSLog(@"couldn't start launcher: %@", error);
|
NSLog(@"couldn't start launcher: %@", error);
|
||||||
return 1;
|
return 1;
|
||||||
|
|
|
@ -5,6 +5,8 @@
|
||||||
#import <Cocoa/Cocoa.h>
|
#import <Cocoa/Cocoa.h>
|
||||||
#include <QString>
|
#include <QString>
|
||||||
#include <QDebug>
|
#include <QDebug>
|
||||||
|
#include <QTimer>
|
||||||
|
#include <QCoreApplication>
|
||||||
|
|
||||||
void launchClient(const QString& clientPath, const QString& homePath, const QString& defaultScriptOverride,
|
void launchClient(const QString& clientPath, const QString& homePath, const QString& defaultScriptOverride,
|
||||||
const QString& displayName, const QString& contentCachePath, QString loginTokenResponse) {
|
const QString& displayName, const QString& contentCachePath, QString loginTokenResponse) {
|
||||||
|
@ -72,7 +74,7 @@ void launchAutoUpdater(const QString& autoUpdaterPath) {
|
||||||
@throw exception;
|
@throw exception;
|
||||||
}
|
}
|
||||||
|
|
||||||
exit(0);
|
QCoreApplication::instance()->quit();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue