diff --git a/Build/python/mtm/log/LogWatcher.py b/Build/python/mtm/log/LogWatcher.py deleted file mode 100644 index 0fab3ee5b..000000000 --- a/Build/python/mtm/log/LogWatcher.py +++ /dev/null @@ -1,97 +0,0 @@ - -import sys -import time -import errno -import os -import signal -import threading - -class LogWatcher: - def __init__(self, logPath, logFunc): - self.thread = threading.Thread(target=self.update) - # Setting daemon to true will kill the thread if the main - # thread aborts (eg. user hitting ctrl+c) - self.thread.daemon = True - self.logPath = logPath - self.logFunc = logFunc - self.killed = False - self.isDone = False - - def start(self): - self.thread.start() - - def stop(self): - self.killed = True - - def update(self): - - # Wait until file exists - while True: - - if self.killed: - return - - if os.path.isfile(self.logPath): - break - - time.sleep(1) - - with open(self.logPath, 'r', encoding='utf-8', errors='ignore') as logFile: - - logFile.seek(0,2) - - while not self.killed: - - try: - where = logFile.tell() - except: - time.sleep(0.1) - continue - - line = logFile.readline() - - if not line: - time.sleep(1) - logFile.seek(where) - else: - self.logFunc(line.strip()) - - # Make sure we get the rest of the log before quitting - while True: - line = logFile.readline() - if not line: - break - - self.logFunc(line.strip()) - - self.isDone = True - -def onLog(logStr): - print(logStr) - -if __name__ == '__main__': - - import msvcrt - - if len(sys.argv) != 2: - print("Invalid # of arguments") - exit(-1) - - path = sys.argv[1] - - log = LogWatcher(path, onLog) - log.start() - - while 1: - if msvcrt.kbhit(): - key = msvcrt.getch().decode('UTF-8') - - if ord(key) == 27: - sys.exit() - - if key == 'c': - os.system('cls') - - time.sleep(0.1) - - log.stop() diff --git a/Build/python/mtm/util/UnityHelper.py b/Build/python/mtm/util/UnityHelper.py index 9c8a123f4..fa7cae042 100644 --- a/Build/python/mtm/util/UnityHelper.py +++ b/Build/python/mtm/util/UnityHelper.py @@ -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 @@ -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' @@ -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) @@ -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) @@ -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) - diff --git a/Build/python/mtm/zen/CreateSampleBuilds.py b/Build/python/mtm/zen/CreateSampleBuilds.py index cfa3a2736..b4ced72eb 100644 --- a/Build/python/mtm/zen/CreateSampleBuilds.py +++ b/Build/python/mtm/zen/CreateSampleBuilds.py @@ -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 @@ -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:]) diff --git a/UnityProject/ProjectSettings/GraphicsSettings.asset b/UnityProject/ProjectSettings/GraphicsSettings.asset index 77bf2f1b1..d8b1468c2 100644 --- a/UnityProject/ProjectSettings/GraphicsSettings.asset +++ b/UnityProject/ProjectSettings/GraphicsSettings.asset @@ -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} diff --git a/UnityProject/ProjectSettings/ProjectSettings.asset b/UnityProject/ProjectSettings/ProjectSettings.asset index 249f3afdd..f0c3735f4 100644 --- a/UnityProject/ProjectSettings/ProjectSettings.asset +++ b/UnityProject/ProjectSettings/ProjectSettings.asset @@ -630,7 +630,7 @@ PlayerSettings: apiCompatibilityLevelPerPlatform: Metro: 3 Standalone: 2 - WebGL: 2 + WebGL: 1 m_RenderingPath: 1 m_MobileRenderingPath: 1 metroPackageName: Game1