Skip to content

Commit 9fb6f2c

Browse files
committed
Merge branch 'LTS_Unity2018' into Unity2019
2 parents eaeb291 + 709c4f5 commit 9fb6f2c

File tree

6 files changed

+23
-16
lines changed

6 files changed

+23
-16
lines changed

Build/CreateSampleBuilds

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
11
#!/bin/bash
22
cd python
3-
python3 -m mtm.zen.CreateSampleBuilds $@
3+
source /usr/local/bin/virtualenvwrapper.sh
4+
workon extenject
5+
python3 -m mtm.zen.CreateSampleBuilds "$@"

Build/python/mtm/util/UnityHelper.py

Lines changed: 12 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -45,8 +45,15 @@ def __init__(self):
4545
def onUnityLog(self, logStr):
4646
self._log.debug(logStr)
4747

48+
def _createUnityOpenCommand(self, args):
49+
if os.name == 'nt':
50+
return '"C:/Program Files/Unity/Hub/Editor/2018.1.0f2/Editor/Unity.exe" ' + args
51+
52+
return 'open -n "/Applications/UnityInstalls/2018.1.0f2/Unity.app" --args ' + args
53+
4854
def openUnity(self, projectPath, platform):
49-
self._sys.executeNoWait('"[UnityExePath]" -buildTarget {0} -projectPath "{1}"'.format(self._getBuildTargetArg(platform), projectPath))
55+
args = '-buildTarget {0} -projectPath "{1}"'.format(self._getBuildTargetArg(platform), projectPath)
56+
self._sys.executeNoWait(self._createUnityOpenCommand(args))
5057

5158
def runEditorFunction(self, projectPath, editorCommand, platform = Platforms.Windows, batchMode = True, quitAfter = True, extraExtraArgs = ''):
5259
extraArgs = ''
@@ -96,17 +103,15 @@ def runEditorFunctionRaw(self, projectPath, editorCommand, platform, extraArgs):
96103
logWatcher = LogWatcher(logPath, self.onUnityLog)
97104
logWatcher.start()
98105

99-
assertThat(self._varMgr.hasKey('UnityExePath'), "Could not find path variable 'UnityExePath'")
100-
101106
try:
102-
command = '"[UnityExePath]" -buildTarget {0} -projectPath "{1}"'.format(self._getBuildTargetArg(platform), projectPath)
107+
args = '-buildTarget {0} -projectPath "{1}"'.format(self._getBuildTargetArg(platform), projectPath)
103108

104109
if editorCommand:
105-
command += ' -executeMethod ' + editorCommand
110+
args += ' -executeMethod ' + editorCommand
106111

107-
command += ' ' + extraArgs
112+
args += ' ' + extraArgs
108113

109-
self._sys.executeAndWait(command)
114+
self._sys.executeAndWait(self._createUnityOpenCommand(args))
110115

111116
except ProcessErrorCodeException as e:
112117
raise UnityReturnedErrorCodeException("Error while running Unity! Command returned with error code.")

Build/python/mtm/zen/CreateRelease.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -159,7 +159,6 @@ def installBindings():
159159

160160
config = {
161161
'PathVars': {
162-
'UnityExePath': 'C:/Program Files/Unity/Hub/Editor/2018.1.0f2/Editor/Unity.exe',
163162
'LogPath': os.path.join(BuildDir, 'Log.txt'),
164163
'MsBuildExePath': 'C:/Windows/Microsoft.NET/Framework/v4.0.30319/msbuild.exe'
165164
},

Build/python/mtm/zen/CreateSampleBuilds.py

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ class Runner:
3636
_varManager = Inject('VarManager')
3737

3838
def __init__(self):
39-
self._platform = Platforms.Windows
39+
self._platform = Platforms.OsX
4040

4141
def run(self, args):
4242
self._args = args
@@ -208,11 +208,6 @@ def installBindings():
208208
},
209209
}
210210

211-
if os.name == 'nt':
212-
config['PathVars']['UnityExePath'] = 'C:/Program Files/Unity/Hub/Editor/2018.1.0f2/Editor/Unity.exe',
213-
else:
214-
config['PathVars']['UnityExePath'] = 'openunity'
215-
216211
Container.bind('Config').toSingle(Config, [config])
217212

218213
Container.bind('LogStream').toSingle(LogStreamFile)

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11

22
# Extenject - Extensions and bug fixes to Zenject
33

4-
This project is simply a fork of <a href="https://github.com/modesttree/zenject">Zenject</a>. I was the primary maintainer but no longer have access after leaving my position at Modest Tree. It is called Extenject to respect Modest Tree's <a href="https://github.com/modesttree/Zenject/commit/2cbbf11b344d083cc697d8b248acf41520d72da3">trademark claim</a> on the name Zenject.
4+
This project is simply a fork of <a href="https://github.com/modesttree/zenject">Zenject</a> with the aim of being actively maintained. I was the primary maintainer but my access was removed after leaving my position at Modest Tree. It is called Extenject to respect Modest Tree's <a href="https://github.com/modesttree/Zenject/commit/2cbbf11b344d083cc697d8b248acf41520d72da3">trademark claim</a> on the name Zenject.
55

66
[![Join the chat at https://gitter.im/Extenject/community](https://badges.gitter.im/Extenject/Lobby.svg)](https://gitter.im/Extenject/community?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
77

UnityProject/Assets/SampleBuilder/Editor/SampleBuilder.cs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,12 @@ static void BuildInternal(bool isRelease)
6161

6262
switch (EditorUserBuildSettings.activeBuildTarget)
6363
{
64+
case BuildTarget.StandaloneOSX:
65+
{
66+
BuildGeneric(
67+
"OsX/{0}/ZenjectSamples".Fmt(GetScriptingRuntimeString()), scenePaths, isRelease);
68+
break;
69+
}
6470
case BuildTarget.StandaloneWindows64:
6571
case BuildTarget.StandaloneWindows:
6672
{

0 commit comments

Comments
 (0)