Skip to content

Commit

Permalink
More work cleaning up the directory structure to be more understandable
Browse files Browse the repository at this point in the history
  • Loading branch information
svermeulen committed Jan 7, 2016
1 parent e639deb commit c3ecce3
Show file tree
Hide file tree
Showing 188 changed files with 59 additions and 10,221 deletions.
8 changes: 4 additions & 4 deletions AssemblyBuild/Zenject.sln
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,13 @@ Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 2013
VisualStudioVersion = 12.0.31101.0
MinimumVisualStudioVersion = 10.0.40219.1
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Zenject", "..\UnityProject\Assets\Zenject\Main\Scripts\Zenject.csproj", "{46F25A62-2E29-48CB-95F3-BDBCB0976DDC}"
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Zenject", "..\UnityProject\Assets\Zenject\Source\Zenject.csproj", "{46F25A62-2E29-48CB-95F3-BDBCB0976DDC}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Zenject-editor", "..\UnityProject\Assets\Zenject\Main\Editor\Zenject-editor.csproj", "{B71F2201-3382-46B3-A9C6-219A72954905}"
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Zenject-editor", "..\UnityProject\Assets\Zenject\Source\Editor\Zenject-editor.csproj", "{B71F2201-3382-46B3-A9C6-219A72954905}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Zenject-tests", "..\UnityProject\Assets\Zenject\Extras\ZenjectUnitTests\Editor\Zenject-tests.csproj", "{34E27462-3046-4DC7-A7FA-45E4F4F7D413}"
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Zenject-tests", "..\UnityProject\Assets\Zenject\OptionalExtras\UnitTests\Editor\Zenject-tests.csproj", "{34E27462-3046-4DC7-A7FA-45E4F4F7D413}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Zenject.Commands", "..\UnityProject\Assets\Zenject\Extras\CommandsAndSignals\Zenject.Commands.csproj", "{B543A0B8-2630-424E-B628-53457BE4884B}"
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Zenject.Commands", "..\UnityProject\Assets\Zenject\OptionalExtras\CommandsAndSignals\Zenject.Commands.csproj", "{B543A0B8-2630-424E-B628-53457BE4884B}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Expand Down
51 changes: 39 additions & 12 deletions Build/python/mtm/zen/CreateRelease.py
Original file line number Diff line number Diff line change
Expand Up @@ -76,11 +76,12 @@ def _populateDistDir(self, versionStr):
self._sys.createDirectory('[TempDir]')

try:
self._createPackage(False, True, '[DistDir]/Zenject-{0}-WithAsteroidsDemo.unitypackage'.format(versionStr))
self._createPackage(False, False, '[DistDir]/Zenject-{0}.unitypackage'.format(versionStr))
self._createPackage(True, False, '[DistDir]/Zenject-{0}-BinariesOnly.unitypackage'.format(versionStr))
self._createCSharpPackage(True, '[DistDir]/Zenject-WithAsteroidsDemo@v{0}.unitypackage'.format(versionStr))
self._createCSharpPackage(False, '[DistDir]/Zenject@v{0}.unitypackage'.format(versionStr))

self._createNonUnityZip('[DistDir]/Zenject-{0}-NonUnity.zip'.format(versionStr))
self._createDllPackage('[DistDir]/Zenject-BinariesOnly@v{0}.unitypackage'.format(versionStr))

self._createNonUnityZip('[DistDir]/Zenject-NonUnity@v{0}.zip'.format(versionStr))
finally:
self._sys.deleteDirectory('[TempDir]')

Expand All @@ -103,7 +104,7 @@ def _createNonUnityZip(self, zipPath):

self._zipHelper.createZipFile(tempDir, zipPath)

def _createPackage(self, useDll, includeSample, outputPath):
def _createDllPackage(self, outputPath):

self._log.heading('Creating {0}'.format(os.path.basename(outputPath)))

Expand All @@ -113,7 +114,7 @@ def _createPackage(self, useDll, includeSample, outputPath):
self._sys.createDirectory('[PackageTempDir]')
self._sys.createDirectory('[PackageTempDir]/ProjectSettings')

if useDll:
try:
self._log.info('Building zenject dlls')

self._varMgr.set('ZenDllDir', '[BinDir]/Release')
Expand All @@ -134,29 +135,55 @@ def _createPackage(self, useDll, includeSample, outputPath):

self._sys.copyFile('[ZenDllDir]/Zenject.Commands.dll', '[ZenTempDir]/Zenject.Commands.dll')
self._sys.copyFile('[ZenDllMetaDir]/Zenject.Commands.dll.meta', '[ZenTempDir]/Zenject.Commands.dll.meta')
else:

self._createUnityPackage('[PackageTempDir]', outputPath)
finally:
self._sys.deleteDirectory('[PackageTempDir]')

self._log.heading('Creating {0}'.format(os.path.basename(outputPath)))

def _createCSharpPackage(self, includeSample, outputPath):

self._log.heading('Creating {0}'.format(os.path.basename(outputPath)))

self._varMgr.set('PackageTempDir', '[TempDir]/Packager')
self._varMgr.set('ZenTempDir', '[PackageTempDir]/Assets/Zenject')

self._sys.createDirectory('[PackageTempDir]')
self._sys.createDirectory('[PackageTempDir]/ProjectSettings')

try:
self._log.info('Copying Zenject to temporary directory')
self._sys.copyDirectory('[ZenjectDir]', '[ZenTempDir]')

self._log.info('Cleaning up Zenject directory')
self._zipHelper.createZipFile('[ZenTempDir]/OptionalExtras/UnitTests', '[ZenTempDir]/OptionalExtras/UnitTests.zip')
self._sys.deleteDirectory('[ZenTempDir]/OptionalExtras/UnitTests')
self._sys.removeFile('[ZenTempDir]/OptionalExtras/UnitTests.meta')

self._zipHelper.createZipFile('[ZenTempDir]/OptionalExtras/AutoMocking', '[ZenTempDir]/OptionalExtras/AutoMocking.zip')
self._sys.deleteDirectory('[ZenTempDir]/OptionalExtras/AutoMocking')
self._sys.removeFile('[ZenTempDir]/OptionalExtras/AutoMocking.meta')

self._sys.removeFile('[ZenTempDir]/Source/Zenject.csproj')
self._sys.removeFile('[ZenTempDir]/Source/Zenject.csproj.user')
self._sys.removeFile('[ZenTempDir]/OptionalExtras/CommandsAndSignals/Zenject.Commands.csproj')
self._sys.removeFile('[ZenTempDir]/OptionalExtras/CommandsAndSignals/Zenject.Commands.csproj.user')

if not includeSample:
self._sys.deleteDirectory('[ZenTempDir]/OptionalExtras/SampleGame')

self._sys.copyFile('[BuildDir]/UnityPackager/UnityPackageUtil.cs', '[PackageTempDir]/Assets/Editor/UnityPackageUtil.cs')
self._createUnityPackage('[PackageTempDir]', outputPath)
finally:
self._sys.deleteDirectory('[PackageTempDir]')

def _createUnityPackage(self, projectPath, outputPath):
self._sys.copyFile('[BuildDir]/UnityPackager/UnityPackageUtil.cs', '{0}/Assets/Editor/UnityPackageUtil.cs'.format(projectPath))

self._log.info('Running unity to create unity package')

self._unityHelper.runEditorFunction('[PackageTempDir]', 'Zenject.UnityPackageUtil.CreateUnityPackage')

self._sys.move('[PackageTempDir]/Zenject.unitypackage', outputPath)

self._sys.deleteDirectory('[PackageTempDir]')
self._sys.move('{0}/Zenject.unitypackage'.format(projectPath), outputPath)

def installBindings():

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@
<Compile Include="Signal\SignalExtensions.cs" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\..\Main\Scripts\Zenject.csproj">
<ProjectReference Include="..\..\Source\Zenject.csproj">
<Project>{46f25a62-2e29-48cb-95f3-bdbcb0976ddc}</Project>
<Name>Zenject</Name>
</ProjectReference>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@
</Reference>
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\..\..\Main\Scripts\Zenject.csproj">
<ProjectReference Include="..\..\..\Source\Zenject.csproj">
<Project>{46f25a62-2e29-48cb-95f3-bdbcb0976ddc}</Project>
<Name>Zenject</Name>
</ProjectReference>
Expand Down Expand Up @@ -156,4 +156,4 @@
<Target Name="AfterBuild">
</Target>
-->
</Project>
</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@
</Reference>
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\Scripts\Zenject.csproj">
<ProjectReference Include="..\Zenject.csproj">
<Project>{46f25a62-2e29-48cb-95f3-bdbcb0976ddc}</Project>
<Name>Zenject</Name>
</ProjectReference>
Expand All @@ -71,4 +71,4 @@
<Target Name="AfterBuild">
</Target>
-->
</Project>
</Project>
61 changes: 0 additions & 61 deletions UnityProject/Assets/Zenject/Source/Main/Binders/BinderBase.cs

This file was deleted.

12 changes: 0 additions & 12 deletions UnityProject/Assets/Zenject/Source/Main/Binders/BinderBase.cs.meta

This file was deleted.

This file was deleted.

This file was deleted.

Loading

0 comments on commit c3ecce3

Please sign in to comment.