diff options
| author | Ben Marsh <[email protected]> | 2019-10-22 09:07:59 -0400 |
|---|---|---|
| committer | Ben Marsh <[email protected]> | 2019-10-22 09:07:59 -0400 |
| commit | bd0027e737c6512397f841c22786274ed74b927f (patch) | |
| tree | f7ffbdb8f3741bb7f24635616cc189cba5cb865c /mkwinpkg.bat | |
| download | shave-and-a-haircut-bd0027e737c6512397f841c22786274ed74b927f.tar.xz shave-and-a-haircut-bd0027e737c6512397f841c22786274ed74b927f.zip | |
Adding Shave-and-a-Haircut 9.6
Diffstat (limited to 'mkwinpkg.bat')
| -rw-r--r-- | mkwinpkg.bat | 100 |
1 files changed, 100 insertions, 0 deletions
diff --git a/mkwinpkg.bat b/mkwinpkg.bat new file mode 100644 index 0000000..329cc58 --- /dev/null +++ b/mkwinpkg.bat @@ -0,0 +1,100 @@ +echo off +rem Shave and a Haircut +rem (c) 2019 Epic Games +rem US Patent 6720962 + +rem Build a Ghost Installer installation package of Shave for the specified +rem Maya version and release type. + +if a%2b==ab ( + echo Usage: mkwinpkg mayaVersion Release/Trial + goto :eof +) + +if /i %2==release ( + set relType=Release +) else if /i %2==trial ( + set relType=Trial +) else if /i %2==debug ( + set relType=Debug +) else ( + echo %2 is not a valid release type. Please specify Debug, Trial or Release. + goto :eof +) + +call utils\splitMayaVersion %1 +call utils\getShaveVersion + +if not %result%==0 goto :eof + +set mayaCompactVersion=%mayaVersionMajor%%mayaVersionMinor% + +rem +rem The file selection logic for the arnold/mtoa files cannot be handled +rem by the installer script so we do the logic here and copy the required +rem files to a temp directory. +rem +if exist tempFiles rmdir /s /q tempFiles + +mkdir tempFiles +mkdir tempFiles\mtoa +mkdir tempFiles\arnold + +for /f "tokens=4" %%i in ('findstr "^%mayaVersion%:" arnold\supportedMtoAVersions.txt') do call :copyArnoldFiles %%i + + +setlocal + +rem Our shave version number is of the form 9.6v11. When setting the file +rem version we need a standard Windows 4-part version of the form 9.6.11.0 + +set shaveStdVersion=%shaveVersion:v=.%.0 + +if not exist Installers mkdir Installers + +"C:\Program Files (x86)\NSIS\makensis" /NOCD /DMayaVersion=%mayaVersion% /DMayaVersionMajor=%mayaVersionMajor% /DMayaVersionMinor=%mayaVersionMinor% /DReleaseType=%relType% /DShaveVersion=%shaveVersion% /DShaveStdVersion=%shaveStdVersion% install\win\shaveHaircut-maya.nsi + +rem rmdir /s /q tempFiles + +endlocal +goto :eof + +rem -------------------------------------------------------------------------- + +:copyArnoldFiles + +if "%1"=="" exit /b + +rem The version numbers are of the form: +rem +rem mtoaVersion/arnoldVersion +rem +for /f "tokens=1,2 delims=/" %%i in ("%1") do call :copyArnoldFilesForVersion %%i %%j +shift +goto :copyArnoldFiles + +exit /b + +rem -------------------------------------------------------------------------- + +:copyArnoldFilesForVersion + +setlocal + +set MTOA_VERSION=%1 +set ARNOLD_VERSION=%2 +set srcDir=arnold\Release\%mayaVersion%\%MTOA_VERSION% + +rem MtoA doesn't work well when there are periods in the file name. Let's +rem convert them to underscores. +rem +set SAFE_MTOA_VERSION=%MTOA_VERSION:.=_% +set SAFE_ARNOLD_VERSION=%ARNOLD_VERSION:.=_% + +copy %srcDir%\shave.dll tempFiles\mtoa\shave-%SAFE_MTOA_VERSION%.dll +copy arnold\plugin\shave.py tempFiles\mtoa\shave-%SAFE_MTOA_VERSION%.py + +copy %srcDir%\shave_shaders-%SAFE_ARNOLD_VERSION%.dll tempFiles\arnold + +endlocal +exit /b |