Browse Source

Deploying Mac apps from Windows

Josh Engebretson 11 years ago
parent
commit
88c1ed5625

+ 8 - 1
Source/AtomicEditor/Source/Build/BuildMac.cpp

@@ -51,7 +51,13 @@ void BuildMac::Build(const String& buildPath)
     Initialize();
     Initialize();
 
 
     FileSystem* fileSystem = GetSubsystem<FileSystem>();
     FileSystem* fileSystem = GetSubsystem<FileSystem>();
+
+ #ifdef ATOMIC_PLATFORM_WINDOWS
+    String buildSourceDir = fileSystem->GetProgramDir();
+ #else
     String buildSourceDir = fileSystem->GetAppBundleResourceFolder();
     String buildSourceDir = fileSystem->GetAppBundleResourceFolder();
+ #endif
+
     buildSourceDir += "Deployment/MacOS/AtomicPlayer.app";
     buildSourceDir += "Deployment/MacOS/AtomicPlayer.app";
 
 
     fileSystem->CreateDir(buildPath);
     fileSystem->CreateDir(buildPath);
@@ -67,15 +73,16 @@ void BuildMac::Build(const String& buildPath)
     fileSystem->Copy(buildSourceDir + "/Contents/Info.plist", buildPath + "/Contents/Info.plist");    
     fileSystem->Copy(buildSourceDir + "/Contents/Info.plist", buildPath + "/Contents/Info.plist");    
     fileSystem->Copy(buildSourceDir + "/Contents/MacOS/AtomicPlayer", buildPath + "/Contents/MacOS/AtomicPlayer");
     fileSystem->Copy(buildSourceDir + "/Contents/MacOS/AtomicPlayer", buildPath + "/Contents/MacOS/AtomicPlayer");
 
 
+#ifdef ATOMIC_PLATFORM_OSX
     Vector<String> args;
     Vector<String> args;
     args.Push("+x");
     args.Push("+x");
     args.Push(buildPath + "/Contents/MacOS/AtomicPlayer");
     args.Push(buildPath + "/Contents/MacOS/AtomicPlayer");
     fileSystem->SystemRun("chmod", args);
     fileSystem->SystemRun("chmod", args);
+#endif
 
 
     ProjectUtils* utils = GetSubsystem<ProjectUtils>();
     ProjectUtils* utils = GetSubsystem<ProjectUtils>();
     utils->RevealInFinder(GetPath(buildPath));
     utils->RevealInFinder(GetPath(buildPath));
 
 
-
     BuildSystem* buildSystem = GetSubsystem<BuildSystem>();
     BuildSystem* buildSystem = GetSubsystem<BuildSystem>();
     buildSystem->BuildComplete();
     buildSystem->BuildComplete();
 
 

+ 1 - 1
Source/AtomicEditor/Source/UI/UIWelcomeFrame.cpp

@@ -42,7 +42,7 @@ WelcomeFrame::WelcomeFrame(Context* context) :
 #ifdef ATOMIC_PLATFORM_OSX
 #ifdef ATOMIC_PLATFORM_OSX
     exampleSourceDir_ = fileSystem->GetAppBundleResourceFolder();
     exampleSourceDir_ = fileSystem->GetAppBundleResourceFolder();
 #else
 #else
-    String exampleSourceDir_ = fileSystem->GetProgramDir();
+    exampleSourceDir_ = fileSystem->GetProgramDir();
 #endif
 #endif
 
 
     exampleInfoDir_ = exampleSourceDir_ + "ExampleInfo";
     exampleInfoDir_ = exampleSourceDir_ + "ExampleInfo";