Skip to content

Commit

Permalink
Fixes related to getting osx builds working
Browse files Browse the repository at this point in the history
  • Loading branch information
svermeulen committed Apr 22, 2019
1 parent c59e070 commit 5f8db9e
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 118 deletions.
97 changes: 0 additions & 97 deletions Build/python/mtm/log/LogWatcher.py

This file was deleted.

20 changes: 1 addition & 19 deletions Build/python/mtm/util/UnityHelper.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
import os
import time

from mtm.log.LogWatcher import LogWatcher

import mtm.ioc.Container as Container
from mtm.ioc.Inject import Inject
import mtm.ioc.IocAssertions as Assertions
Expand All @@ -12,11 +10,6 @@

from mtm.util.SystemHelper import ProcessErrorCodeException

if os.name == 'nt':
UnityLogFileLocation = os.getenv('localappdata') + '\\Unity\\Editor\\Editor.log'
else:
UnityLogFileLocation = '~/Library/Logs/Unity/Editor.log'

class Platforms:
Windows = 'windows'
WebPlayer = 'webplayer'
Expand Down Expand Up @@ -49,7 +42,7 @@ def _createUnityOpenCommand(self, args):
if os.name == 'nt':
return '"C:/Program Files/Unity/Hub/Editor/2018.1.0f2/Editor/Unity.exe" ' + args

return 'open -n "/Applications/UnityInstalls/2018.1.0f2/Unity.app" --args ' + args
return 'open -n -W "/Applications/UnityInstalls/2018.1.0f2/Unity.app" --args ' + args

def openUnity(self, projectPath, platform):
args = '-buildTarget {0} -projectPath "{1}"'.format(self._getBuildTargetArg(platform), projectPath)
Expand Down Expand Up @@ -98,11 +91,6 @@ def _getBuildTargetArg(self, platform):

def runEditorFunctionRaw(self, projectPath, editorCommand, platform, extraArgs):

logPath = self._varMgr.expandPath(UnityLogFileLocation)

logWatcher = LogWatcher(logPath, self.onUnityLog)
logWatcher.start()

try:
args = '-buildTarget {0} -projectPath "{1}"'.format(self._getBuildTargetArg(platform), projectPath)

Expand All @@ -119,9 +107,3 @@ def runEditorFunctionRaw(self, projectPath, editorCommand, platform, extraArgs):
except:
raise UnityUnknownErrorException("Unknown error occurred while running Unity!")

finally:
logWatcher.stop()

while not logWatcher.isDone:
time.sleep(0.1)

14 changes: 13 additions & 1 deletion Build/python/mtm/zen/CreateSampleBuilds.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,18 @@ def _runBuilds(self):
self._enableNet46()
self._createBuild()

if self._args.buildType == 'all' or self._args.buildType == 'osx35':
self._log.heading("Building osx 3.5")
self._platform = Platforms.OsX
self._enableNet35()
self._createBuild()

if self._args.buildType == 'all' or self._args.buildType == 'osx46':
self._log.heading("Building osx 4.6")
self._platform = Platforms.OsX
self._enableNet46()
self._createBuild()

if self._args.buildType == 'all' or self._args.buildType == 'wsa35':
self._log.heading("Building WindowsStoreApp 3.5 .net")
self._platform = Platforms.WindowsStoreApp
Expand Down Expand Up @@ -233,7 +245,7 @@ def installBindings():
parser.add_argument('-c', '--clearOutput', action='store_true', help='')
parser.add_argument('-rt', '--runTests', action='store_true', help='')
parser.add_argument('-rb', '--runBuilds', action='store_true', help='')
parser.add_argument('-t', '--buildType', type=str, default='win35', choices=['win35', 'win46', 'wsa35', 'wsa46', 'wsa46il2cpp', 'wsa35il2cpp', 'webgl35', 'webgl46', 'all'], help='')
parser.add_argument('-t', '--buildType', type=str, default='win35', choices=['win35', 'win46', 'osx35', 'osx46', 'wsa35', 'wsa46', 'wsa46il2cpp', 'wsa35il2cpp', 'webgl35', 'webgl46', 'all'], help='')

args = parser.parse_args(sys.argv[1:])

Expand Down
1 change: 1 addition & 0 deletions UnityProject/ProjectSettings/GraphicsSettings.asset
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ GraphicsSettings:
- {fileID: 10782, guid: 0000000000000000f000000000000000, type: 0}
- {fileID: 16000, guid: 0000000000000000f000000000000000, type: 0}
- {fileID: 17000, guid: 0000000000000000f000000000000000, type: 0}
- {fileID: 16001, guid: 0000000000000000f000000000000000, type: 0}
m_PreloadedShaders: []
m_SpritesDefaultMaterial: {fileID: 10754, guid: 0000000000000000f000000000000000,
type: 0}
Expand Down
2 changes: 1 addition & 1 deletion UnityProject/ProjectSettings/ProjectSettings.asset
Original file line number Diff line number Diff line change
Expand Up @@ -630,7 +630,7 @@ PlayerSettings:
apiCompatibilityLevelPerPlatform:
Metro: 3
Standalone: 2
WebGL: 2
WebGL: 1
m_RenderingPath: 1
m_MobileRenderingPath: 1
metroPackageName: Game1
Expand Down

0 comments on commit 5f8db9e

Please sign in to comment.