Skip to content

Commit

Permalink
Build and installer fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
TheHologram committed Nov 7, 2015
1 parent 975d8b5 commit 9b87306
Show file tree
Hide file tree
Showing 7 changed files with 302 additions and 158 deletions.
407 changes: 270 additions & 137 deletions MaxNifTools.iss

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion NifCommon/NifVersion.h
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
#ifndef NIFVERSION_H
#define NIFVERSION_H

#include "config.h"
#include "config.h"

//
// Define the major, minor, build, patch version numbers
Expand Down
2 changes: 1 addition & 1 deletion NifCommon/build.isi
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,6 @@ begin
Result := '';
case Param of
'version' : Result := IntToStr( {#VERSION_MAJOR_INT} ) + '.' + IntToStr({#VERSION_MINOR_INT}) + '.' + IntToStr({#VERSION_BUILD_INT});
'fullver' : Result := IntToStr( {#VERSION_MAJOR_INT} ) + '.' + IntToStr({#VERSION_MINOR_INT}) + '.' + IntToStr({#VERSION_BUILD_INT}) + '.' + IntToStr({#NIFTOOLS_REVISION_INT});
'fullver' : Result := IntToStr( {#VERSION_MAJOR_INT} ) + '.' + IntToStr({#VERSION_MINOR_INT}) + '.' + IntToStr({#VERSION_BUILD_INT}) + '.' + Format('%x', [{#NIFTOOLS_REVISION_INT}]);
end;
end;
17 changes: 11 additions & 6 deletions README.TXT
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
------------

Plugins:
3D Studio Max 2016
3D Studio Max 2012, 2015, 2016

Installation
------------
Expand All @@ -39,13 +39,18 @@
Copy NifPlugins.dlu, to your 3dsmax\plugins directory.

Copy MaxNifTools.ini to the correct plugcfg directory:
Windows Vista and Greater:
%USERPROFILE%\AppData\Local\Autodesk\3dsMax\<version>\enu\plugcfg
Windows XP:
%APPDATA%\Autodesk\3dsMax\<version>\enu\plugcfg

For 2013 and later:
%USERPROFILE%\AppData\Local\Autodesk\3dsMax\<version>\enu\en-US\plugcfg

For 2012 and less:
Windows Vista and Greater:
%USERPROFILE%\AppData\Local\Autodesk\3dsMax\<version>\enu\plugcfg
Windows XP:
%APPDATA%\Autodesk\3dsMax\<version>\enu\plugcfg

You can copy MaxNifTools.ini to your 3dsmax\plugcfg directory but the
folder may be readonly so is discouraged but might still work.

The plugin will search the AppData folder first though as that is the
recommended location from Autodesk and Microsoft.

Expand Down
22 changes: 12 additions & 10 deletions build.bat
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,12 @@ IF EXIST "%ProgramFiles(x86)%" set Program_64=%ProgramFiles%
IF NOT EXIST "%ProgramFiles(x86)%" set Program_32=%ProgramFiles%
IF NOT EXIST "%ProgramFiles(x86)%" set Program_64=

if NOT "%ADSK_3DSMAX_SDK_2012%" == "" set MAXINSTALLPATH2012=%ADSK_3DSMAX_SDK_2012%
if NOT "%ADSK_3DSMAX_SDK_2013%" == "" set MAXINSTALLPATH2013=%ADSK_3DSMAX_SDK_2013%
if NOT "%ADSK_3DSMAX_SDK_2014%" == "" set MAXINSTALLPATH2014=%ADSK_3DSMAX_SDK_2014%
if NOT "%ADSK_3DSMAX_SDK_2015%" == "" set MAXINSTALLPATH2015=%ADSK_3DSMAX_SDK_2015%
if NOT "%ADSK_3DSMAX_SDK_2016%" == "" set MAXINSTALLPATH2016=%ADSK_3DSMAX_SDK_2016%

if "%GMAXINSTALLPATH12%" == "" set GMAXINSTALLPATH12=%SystemDrive%\gmax12
if "%MAXINSTALLPATH40%" == "" set MAXINSTALLPATH40=%SystemDrive%\3dsmax4
if "%MAXINSTALLPATH42%" == "" set MAXINSTALLPATH42=%SystemDrive%\3dsmax42
Expand All @@ -21,13 +27,12 @@ if "%MAXINSTALLPATH2008%" == "" set MAXINSTALLPATH2008=%Program_32%\AutoDesk\3ds
if "%MAXINSTALLPATH2009%" == "" set MAXINSTALLPATH2009=%Program_32%\AutoDesk\3ds Max 2009
if "%MAXINSTALLPATH2010%" == "" set MAXINSTALLPATH2010=%Program_32%\AutoDesk\3ds Max 2010
if "%MAXINSTALLPATH2011%" == "" set MAXINSTALLPATH2011=%Program_32%\AutoDesk\Autodesk 3ds Max 2011 SDK
if "%ADSK_3DSMAX_SDK_2012%" == "" set MAXINSTALLPATH2012=%ADSK_3DSMAX_SDK_2012%
if "%MAXINSTALLPATH2012%" == "" set MAXINSTALLPATH2012=%Program_32%\AutoDesk\3ds Max 2012 SDK
if "%MAXINSTALLPATH2013%" == "" set MAXINSTALLPATH2013=%Program_32%\AutoDesk\3ds Max 2013 SDK
if "%MAXINSTALLPATH2014%" == "" set MAXINSTALLPATH2014=%Program_32%\AutoDesk\3ds Max 2014 SDK
if "%MAXINSTALLPATH2015%" == "" set MAXINSTALLPATH2015=%Program_32%\AutoDesk\3ds Max 2015 SDK
if "%MAXINSTALLPATH2016%" == "" set MAXINSTALLPATH2016=%Program_32%\AutoDesk\3ds Max 2016 SDK

if "%MAXINSTALLPATH2013%" == "" set MAXINSTALLPATH2013=%Program_64%\AutoDesk\3ds Max 2013 SDK
if "%MAXINSTALLPATH2014%" == "" set MAXINSTALLPATH2014=%Program_64%\AutoDesk\3ds Max 2014 SDK
if "%MAXINSTALLPATH2015%" == "" set MAXINSTALLPATH2015=%Program_64%\AutoDesk\3ds Max 2015 SDK
if "%MAXINSTALLPATH2016%" == "" set MAXINSTALLPATH2016=%Program_64%\AutoDesk\3ds Max 2016 SDK
REM svn update
set SUPPRESS_BUILD_CONFIG=0
call makeconfig.bat
Expand Down Expand Up @@ -63,10 +68,7 @@ IF EXIST "%MAXINSTALLPATH2012%" (
msbuild NifPlugins.sln "/p:Configuration=Release - Max 2012" /p:Platform=Win32
IF EXIST "%Program_64%" msbuild NifPlugins.sln "/p:Configuration=Release - Max 2012" /p:Platform=x64
)
IF EXIST "%MAXINSTALLPATH2013%" (
msbuild NifPlugins.sln "/p:Configuration=Release - Max 2013" /p:Platform=Win32
IF EXIST "%Program_64%" msbuild NifPlugins.sln "/p:Configuration=Release - Max 2013" /p:Platform=x64
)
IF EXIST "%MAXINSTALLPATH2013%" msbuild NifPlugins.sln "/p:Configuration=Release - Max 2013" /p:Platform=x64
IF EXIST "%MAXINSTALLPATH2014%" msbuild NifPlugins.sln "/p:Configuration=Release - Max 2014" /p:Platform=x64
IF EXIST "%MAXINSTALLPATH2015%" msbuild NifPlugins.sln "/p:Configuration=Release - Max 2015" /p:Platform=x64
IF EXIST "%MAXINSTALLPATH2016%" msbuild NifPlugins.sln "/p:Configuration=Release - Max 2016" /p:Platform=x64
Expand Down
6 changes: 5 additions & 1 deletion makeconfig.bat
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,11 @@ IF NOT "%SUPPRESS_BUILD_CONFIG%" == "1" (
for /f "usebackq delims=|" %%i in (`git log -1 "--pretty=format:%%h"`) do set WCREV=%%i
for /f "usebackq delims=|" %%i in (`git log -1 "--pretty=format:%%cd"`) do set WCDATE=%%i
for /f "usebackq delims=|" %%i in (`git config --get remote.origin.url`) do set WCURL=%%i
sed "s/[$]WCREV[$]/%WCREV%/g" < NifCommon/config.h.in | sed "s/[$]WCDATE[$]/%WCDATE%/g" | sed "s![$]WCURL[$]!%WCURL%!g" > NifCommon/config.h
)
REM for some reason the above are delayed until after if block so sed is not processed in order
IF NOT "%SUPPRESS_BUILD_CONFIG%" == "1" (
sed "s#[$]WCREV[$]#%WCREV%#g" < NifCommon/config.h.in | sed "s#[$]WCDATE[$]#%WCDATE%#g" | sed "s#[$]WCURL[$]#%WCURL%#g" > NifCommon/config.h
)

endlocal
popd
4 changes: 2 additions & 2 deletions stagenif.bat
Original file line number Diff line number Diff line change
Expand Up @@ -58,9 +58,9 @@ IF EXIST "c:\Program Files\7-Zip\7z.exe" (
popd
)

IF EXIST "c:\Program Files\Inno Setup 5\ISCC.exe" (
IF EXIST "D:\Development\Tools\Inno Setup 5\ISCC.exe" (
pushd "%SRC%"
"c:\Program Files\Inno Setup 5\ISCC.exe" /Q /fniftools-max-plugins-%VERSION% "/o%DEST%\" MaxNifTools.iss
"D:\Development\Tools\Inno Setup 5\ISCC.exe" /Q /fniftools-max-plugins-%VERSION% "/o%DEST%\" MaxNifTools.iss
popd
)
popd
Expand Down

0 comments on commit 9b87306

Please sign in to comment.