Permalink
Browse files

[OpenCOLLADA NetAllied RFQ]

- max/maya remove boost dependency
- adjust max/maya configs
- adjust batch-files for installer-dll
  • Loading branch information...
1 parent 3c44119 commit 3c0181e761f34930badf85856d6603fd8569d122 @GerhardMaier GerhardMaier committed Mar 13, 2013
@@ -20,7 +20,7 @@
#include <math.h>
#include <string>
#include <iostream>
-
+#include <direct.h>
@@ -169,6 +169,13 @@ namespace COLLADABU
static void split ( const String& text, const String& separators, std::vector<String>& words );
+ static bool createDirectoryIfNeeded( const WideString &pathString );
+ static bool createDirectoryIfNeeded( const String &pathString );
+ static bool directoryExists( const WideString &pathString );
+ static bool directoryExists( const String &pathString );
+
+ static bool copyFile( const String &source, const String &destination );
+ static bool fileExistsAndIsReadable( const String &pathString );
};
}
@@ -13,6 +13,7 @@
#include "COLLADABUPlatform.h"
#include <string.h>
+#include <fstream>
namespace COLLADABU
{
@@ -201,4 +202,106 @@ namespace COLLADABU
start = text.find_first_not_of(separators, stop+1);
}
}
+
+ //--------------------------------
+ bool Utils::createDirectoryIfNeeded( const WideString &pathString )
+ {
+ SystemType type = getSystemType();
+ if( type != WINDOWS )
+ return false;
+
+ const wchar_t* currentPath = _wgetcwd( 0, 0);
+ const wchar_t* testPath = pathString.c_str();
+
+ bool pathExists = _wchdir( testPath ) == 0;
+ if( !pathExists )
+ {
+ _wmkdir( testPath );
+ pathExists = _wchdir( testPath ) == 0;
+ }
+
+ _wchdir( currentPath );
+ return pathExists;
+ }
+
+ //--------------------------------
+ bool Utils::createDirectoryIfNeeded( const String &pathString )
+ {
+ SystemType type = getSystemType();
+ if( type != WINDOWS )
+ return false;
+
+ const char* currentPath = _getcwd( 0, 0);
+ const char* testPath = pathString.c_str();
+
+ bool pathExists = _chdir( testPath ) == 0;
+ if( !pathExists )
+ {
+ _mkdir( testPath );
+ pathExists = _chdir( testPath ) == 0;
+ }
+
+ _chdir( currentPath );
+ return pathExists;
+ }
+
+ //--------------------------------
+ bool Utils::directoryExists( const WideString &pathString )
+ {
+ SystemType type = getSystemType();
+ if( type != WINDOWS )
+ return false;
+
+ const wchar_t* currentPath = _wgetcwd( 0, 0);
+ const wchar_t* testPath = pathString.c_str();
+
+ bool pathExists = _wchdir( testPath ) == 0;
+ _wchdir( currentPath );
+ return pathExists;
+ }
+
+ //--------------------------------
+ bool Utils::directoryExists( const String &pathString )
+ {
+ SystemType type = getSystemType();
+ if( type != WINDOWS )
+ return false;
+
+ const char* currentPath = _getcwd( 0, 0);
+ const char* testPath = pathString.c_str();
+
+ bool pathExists = _chdir( testPath ) == 0;
+ _chdir( currentPath );
+ return pathExists;
+ }
+
+ //--------------------------------
+ bool Utils::copyFile( const String &source, const String &destination )
+ {
+ SystemType type = getSystemType();
+ if( type != WINDOWS )
+ return false;
+
+ char command[4097];
+ sprintf(command,"copy \"%s\" \"%s\"", source.c_str(), destination.c_str() );
+ size_t length = strlen(command);
+ if( length > 4096)
+ return false;
+
+ system(command);
+ return true;
+ }
+
+ //--------------------------------
+ bool Utils::fileExistsAndIsReadable( const String &pathString )
+ {
+// ifstream in( pathString.c_str(), ios::in );
+// bool readable = in.good();
+// return readable;
+ FILE* f = fopen( pathString.c_str(), "r");
+ bool readable = (f != 0);
+ if( readable )
+ fclose(f);
+ return readable;
+ }
}
@@ -400,8 +400,8 @@ Global
{EAB66F01-60B5-43C9-B78D-A8B0B545A20B}.Release_Max2009_ProgDB_static|x64.Build.0 = Release_ProgDB_static|x64
{EAB66F01-60B5-43C9-B78D-A8B0B545A20B}.Release_Max2009_static|Win32.ActiveCfg = Release_static|Win32
{EAB66F01-60B5-43C9-B78D-A8B0B545A20B}.Release_Max2009_static|Win32.Build.0 = Release_static|Win32
- {EAB66F01-60B5-43C9-B78D-A8B0B545A20B}.Release_Max2009_static|x64.ActiveCfg = Release_ProgDB_static|x64
- {EAB66F01-60B5-43C9-B78D-A8B0B545A20B}.Release_Max2009_static|x64.Build.0 = Release_ProgDB_static|x64
+ {EAB66F01-60B5-43C9-B78D-A8B0B545A20B}.Release_Max2009_static|x64.ActiveCfg = Release_static|x64
+ {EAB66F01-60B5-43C9-B78D-A8B0B545A20B}.Release_Max2009_static|x64.Build.0 = Release_static|x64
{EAB66F01-60B5-43C9-B78D-A8B0B545A20B}.Release_Max2009|Win32.ActiveCfg = Release|Win32
{EAB66F01-60B5-43C9-B78D-A8B0B545A20B}.Release_Max2009|Win32.Build.0 = Release|Win32
{EAB66F01-60B5-43C9-B78D-A8B0B545A20B}.Release_Max2009|x64.ActiveCfg = Release|x64
@@ -704,8 +704,8 @@ Global
{2C3C4869-D684-4981-98E7-6D9798B72145}.Release_Max2009_ProgDB_static|x64.Build.0 = Release_ProgDB_static|x64
{2C3C4869-D684-4981-98E7-6D9798B72145}.Release_Max2009_static|Win32.ActiveCfg = Release_static|Win32
{2C3C4869-D684-4981-98E7-6D9798B72145}.Release_Max2009_static|Win32.Build.0 = Release_static|Win32
- {2C3C4869-D684-4981-98E7-6D9798B72145}.Release_Max2009_static|x64.ActiveCfg = Release_ProgDB_static|x64
- {2C3C4869-D684-4981-98E7-6D9798B72145}.Release_Max2009_static|x64.Build.0 = Release_ProgDB_static|x64
+ {2C3C4869-D684-4981-98E7-6D9798B72145}.Release_Max2009_static|x64.ActiveCfg = Release_static|x64
+ {2C3C4869-D684-4981-98E7-6D9798B72145}.Release_Max2009_static|x64.Build.0 = Release_static|x64
{2C3C4869-D684-4981-98E7-6D9798B72145}.Release_Max2009|Win32.ActiveCfg = Release|Win32
{2C3C4869-D684-4981-98E7-6D9798B72145}.Release_Max2009|Win32.Build.0 = Release|Win32
{2C3C4869-D684-4981-98E7-6D9798B72145}.Release_Max2009|x64.ActiveCfg = Release|x64
@@ -44,6 +44,7 @@ namespace COLLADAMax
void GetDescriptionText(TSTR& descText);
BOOL ExecuteAction();
+
BOOL IsEnabled();
int GetId();
@@ -64,7 +65,6 @@ namespace COLLADAMax
/** Disable default assignment operator. */
const GoogleWarehouseActionItem& operator= ( const GoogleWarehouseActionItem& pre );
-
};
} // namespace COLLADAMAX
@@ -1,86 +1,93 @@
-@echo off & setlocal
-
-REM set VS2008_PATH to your vs2008 installation path
-REM set MAXMAYA_INSTALLER_PATH to the location of the maxmaya installer
-
-SET DESTINATION=%MAXMAYA_INSTALLER_PATH%\ColladaMaxInstaller\bin
-
-SET LOGFILE=release_log.txt
-SET WD=%CD%
-
-CALL "%VS2008_PATH%\VC\vcvarsall.bat"
-
-del /Q %WD%\%LOGFILE%
-
-
-
-devenv ..\COLLADAMax.sln /build "Release_Max7_static|Win32" >> %LOGFILE%
-copy "..\bin\win\win32\Release_Max7_static\COLLADAMaxNew.dle" %DESTINATION%\max7-x86 >> %LOGFILE%
-%UPX_PATH%\upx.exe -9 %DESTINATION%\max7-x86\COLLADAMaxNew.dle >> %LOGFILE%
-
-
-devenv ..\COLLADAMax.sln /build "Release_Max8_static|Win32" >> %LOGFILE%
-copy "..\bin\win\win32\Release_Max8_static\COLLADAMaxNew.dle" %DESTINATION%\max8-x86 >> %LOGFILE%
-%UPX_PATH%\upx.exe -9 %DESTINATION%\max8-x86\COLLADAMaxNew.dle >> %LOGFILE%
-
-
-devenv ..\COLLADAMax.sln /build "Release_Max9_static|x64"
-copy "..\bin\win\x64\Release_Max9_static\COLLADAMaxNew.dle" %DESTINATION%\max9-x64 >> %LOGFILE%
-
-devenv ..\COLLADAMax.sln /build "Release_Max9_static|Win32" >> %LOGFILE%
-copy "..\bin\win\win32\Release_Max9_static\COLLADAMaxNew.dle" %DESTINATION%\max9-x86 >> %LOGFILE%
-%UPX_PATH%\upx.exe -9 %DESTINATION%\max9-x86\COLLADAMaxNew.dle >> %LOGFILE%
-
-
-devenv ..\COLLADAMax.sln /build "Release_Max2008_static|x64"
-copy "..\bin\win\x64\Release_Max2008_static\COLLADAMaxNew.dle" %DESTINATION%\max2008-x64 >> %LOGFILE%
-
-devenv ..\COLLADAMax.sln /build "Release_Max2008_static|Win32" >> %LOGFILE%
-copy "..\bin\win\win32\Release_Max2008_static\COLLADAMaxNew.dle" %DESTINATION%\max2008-x86 >> %LOGFILE%
-%UPX_PATH%\upx.exe -9 %DESTINATION%\max2008-x86\COLLADAMaxNew.dle >> %LOGFILE%
-
-
-devenv ..\COLLADAMax.sln /build "Release_Max2009_static|x64"
-copy "..\bin\win\x64\Release_Max2009_static\COLLADAMaxNew.dle" %DESTINATION%\max2009-x64 >> %LOGFILE%
-
-devenv ..\COLLADAMax.sln /build "Release_Max2009_static|Win32" >> %LOGFILE%
-copy "..\bin\win\win32\Release_Max2009_static\COLLADAMaxNew.dle" %DESTINATION%\max2009-x86 >> %LOGFILE%
-%UPX_PATH%\upx.exe -9 %DESTINATION%\max2009-x86\COLLADAMaxNew.dle >> %LOGFILE%
-
-
-devenv ..\COLLADAMax.sln /build "Release_Max2010_static|x64"
-copy "..\bin\win\x64\Release_Max2010_static\COLLADAMaxNew.dle" %DESTINATION%\max2010-x64 >> %LOGFILE%
-
-devenv ..\COLLADAMax.sln /build "Release_Max2010_static|Win32" >> %LOGFILE%
-copy "..\bin\win\win32\Release_Max2010_static\COLLADAMaxNew.dle" %DESTINATION%\max2010-x86 >> %LOGFILE%
-%UPX_PATH%\upx.exe -9 %DESTINATION%\max2010-x86\COLLADAMaxNew.dle >> %LOGFILE%
-
-
-devenv ..\COLLADAMax.sln /build "Release_Max2011_static|x64"
-copy "..\bin\win\x64\Release_Max2011_static\COLLADAMaxNew.dle" %DESTINATION%\max2011-x64 >> %LOGFILE%
-
-devenv ..\COLLADAMax.sln /build "Release_Max2011_static|Win32" >> %LOGFILE%
-copy "..\bin\win\win32\Release_Max2011_static\COLLADAMaxNew.dle" %DESTINATION%\max2011-x86 >> %LOGFILE%
-%UPX_PATH%\upx.exe -9 %DESTINATION%\max2011-x86\COLLADAMaxNew.dle >> %LOGFILE%
-
-
-devenv ..\COLLADAMax.sln /build "Release_Max2012_static|x64"
-copy "..\bin\win\x64\Release_Max2012_static\COLLADAMaxNew.dle" %DESTINATION%\max2012-x64 >> %LOGFILE%
-
-devenv ..\COLLADAMax.sln /build "Release_Max2012_static|Win32" >> %LOGFILE%
-copy "..\bin\win\win32\Release_Max2012_static\COLLADAMaxNew.dle" %DESTINATION%\max2012-x86 >> %LOGFILE%
-%UPX_PATH%\upx.exe -9 %DESTINATION%\max2012-x86\COLLADAMaxNew.dle >> %LOGFILE%
-
-
-
-pause
-
-
-
-
-
-
-
-
-
-
+@echo off & setlocal
+
+REM set VS2008_PATH to your vs2008 installation path
+REM set MAXMAYA_INSTALLER_PATH to the location of the maxmaya installer
+
+SET DESTINATION=%MAXMAYA_INSTALLER_PATH%\ColladaMaxInstaller\bin
+
+SET LOGFILE=release_log.txt
+SET WD=%CD%
+
+CALL "%VS2008_PATH%\VC\vcvarsall.bat"
+
+del /Q %WD%\%LOGFILE%
+
+
+
+REM devenv ..\COLLADAMax.sln /build "Release_Max7_static|Win32" >> %LOGFILE%
+REM copy "..\bin\win\win32\Release_Max7_static\COLLADAMaxNew.dle" %DESTINATION%\max7-x86 >> %LOGFILE%
+REM %UPX_PATH%\upx.exe -9 %DESTINATION%\max7-x86\COLLADAMaxNew.dle >> %LOGFILE%
+REM
+REM
+REM devenv ..\COLLADAMax.sln /build "Release_Max8_static|Win32" >> %LOGFILE%
+REM copy "..\bin\win\win32\Release_Max8_static\COLLADAMaxNew.dle" %DESTINATION%\max8-x86 >> %LOGFILE%
+REM %UPX_PATH%\upx.exe -9 %DESTINATION%\max8-x86\COLLADAMaxNew.dle >> %LOGFILE%
+REM
+REM
+REM devenv ..\COLLADAMax.sln /build "Release_Max9_static|x64"
+REM copy "..\bin\win\x64\Release_Max9_static\COLLADAMaxNew.dle" %DESTINATION%\max9-x64 >> %LOGFILE%
+REM
+REM devenv ..\COLLADAMax.sln /build "Release_Max9_static|Win32" >> %LOGFILE%
+REM copy "..\bin\win\win32\Release_Max9_static\COLLADAMaxNew.dle" %DESTINATION%\max9-x86 >> %LOGFILE%
+REM %UPX_PATH%\upx.exe -9 %DESTINATION%\max9-x86\COLLADAMaxNew.dle >> %LOGFILE%
+REM
+REM
+REM devenv ..\COLLADAMax.sln /build "Release_Max2008_static|x64"
+REM copy "..\bin\win\x64\Release_Max2008_static\COLLADAMaxNew.dle" %DESTINATION%\max2008-x64 >> %LOGFILE%
+REM
+REM devenv ..\COLLADAMax.sln /build "Release_Max2008_static|Win32" >> %LOGFILE%
+REM copy "..\bin\win\win32\Release_Max2008_static\COLLADAMaxNew.dle" %DESTINATION%\max2008-x86 >> %LOGFILE%
+REM %UPX_PATH%\upx.exe -9 %DESTINATION%\max2008-x86\COLLADAMaxNew.dle >> %LOGFILE%
+
+
+devenv ..\COLLADAMax.sln /build "Release_Max2009_static|x64"
+copy "..\bin\win\x64\Release_Max2009_static\COLLADAMaxNew.dle" %DESTINATION%\max2009-x64 >> %LOGFILE%
+
+devenv ..\COLLADAMax.sln /build "Release_Max2009_static|Win32" >> %LOGFILE%
+copy "..\bin\win\win32\Release_Max2009_static\COLLADAMaxNew.dle" %DESTINATION%\max2009-x86 >> %LOGFILE%
+%UPX_PATH%\upx.exe -9 %DESTINATION%\max2009-x86\COLLADAMaxNew.dle >> %LOGFILE%
+
+
+devenv ..\COLLADAMax.sln /build "Release_Max2010_static|x64"
+copy "..\bin\win\x64\Release_Max2010_static\COLLADAMaxNew.dle" %DESTINATION%\max2010-x64 >> %LOGFILE%
+
+devenv ..\COLLADAMax.sln /build "Release_Max2010_static|Win32" >> %LOGFILE%
+copy "..\bin\win\win32\Release_Max2010_static\COLLADAMaxNew.dle" %DESTINATION%\max2010-x86 >> %LOGFILE%
+%UPX_PATH%\upx.exe -9 %DESTINATION%\max2010-x86\COLLADAMaxNew.dle >> %LOGFILE%
+
+
+devenv ..\COLLADAMax.sln /build "Release_Max2011_static|x64"
+copy "..\bin\win\x64\Release_Max2011_static\COLLADAMaxNew.dle" %DESTINATION%\max2011-x64 >> %LOGFILE%
+
+devenv ..\COLLADAMax.sln /build "Release_Max2011_static|Win32" >> %LOGFILE%
+copy "..\bin\win\win32\Release_Max2011_static\COLLADAMaxNew.dle" %DESTINATION%\max2011-x86 >> %LOGFILE%
+%UPX_PATH%\upx.exe -9 %DESTINATION%\max2011-x86\COLLADAMaxNew.dle >> %LOGFILE%
+
+
+devenv ..\COLLADAMax.sln /build "Release_Max2012_static|x64"
+copy "..\bin\win\x64\Release_Max2012_static\COLLADAMaxNew.dle" %DESTINATION%\max2012-x64 >> %LOGFILE%
+
+devenv ..\COLLADAMax.sln /build "Release_Max2012_static|Win32" >> %LOGFILE%
+copy "..\bin\win\win32\Release_Max2012_static\COLLADAMaxNew.dle" %DESTINATION%\max2012-x86 >> %LOGFILE%
+%UPX_PATH%\upx.exe -9 %DESTINATION%\max2012-x86\COLLADAMaxNew.dle >> %LOGFILE%
+
+
+devenv ..\COLLADAMax.sln /build "Release_Max2013_static|x64"
+copy "..\bin\win\x64\Release_Max2013_static\COLLADAMaxNew.dle" %DESTINATION%\max2013-x64 >> %LOGFILE%
+
+devenv ..\COLLADAMax.sln /build "Release_Max2013_static|Win32" >> %LOGFILE%
+copy "..\bin\win\win32\Release_Max2013_static\COLLADAMaxNew.dle" %DESTINATION%\max2013-x86 >> %LOGFILE%
+%UPX_PATH%\upx.exe -9 %DESTINATION%\max2012-x86\COLLADAMaxNew.dle >> %LOGFILE%
+
+
+pause
+
+
+
+
+
+
+
+
+
+
Oops, something went wrong.

0 comments on commit 3c0181e

Please sign in to comment.