Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issue4015 update binary #4061

Merged
merged 2 commits into from
Nov 26, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file modified Buildings/Resources/Library/win32/ffd.dll
Binary file not shown.
Binary file modified Buildings/Resources/Library/win32/ffd.lib
Binary file not shown.
Binary file modified Buildings/Resources/Library/win64/ffd.dll
Binary file not shown.
Binary file modified Buildings/Resources/Library/win64/ffd.lib
Binary file not shown.
81 changes: 71 additions & 10 deletions Buildings/Resources/src/FastFluidDynamics/Compile.bat
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@
::*******************************************************************
::Set the Output Directory, Compile Mode and MSbuild File Name
::*******************************************************************
set DIR=..\..\Library\win32
set DIR=..\..\Library\win64
set MSbuildName=ffd
set BuildConfiguration=Release
set Platform=Win32
set Platform=Win64
::Note: Two build mode, Debug or Release

::*******************************************************************
Expand Down Expand Up @@ -41,8 +41,8 @@ if exist "%DIR%\%MSbuildName%.lib" (
::Set Default Compiler Version and Toolset (edited by user)
::-------------------------------------------------------------------
::Note: Toolset: V100 for VC10.0, v110 for VC11.0
set VCVersion=10.0
set Toolset=v100
set VCVersion=14.0
set Toolset=v140

::-------------------------------------------------------------------
::Call vcvarsall.bat (Not user editable)
Expand All @@ -53,8 +53,17 @@ if %PROCESSOR_ARCHITECTURE%==AMD64 set VCDIR=C:\Program Files (x86)\Microsoft Vi
::Note: IA64 is not supported

::Set Environment Variable
if %Platform%==Win32 (
set Conf=x86
set Conf_Platform=Win32
)
if %Platform%==Win64 (
set conf=x64
set Conf_Platform=x64
)

if exist "%VCDIR% %VCVersion%\VC\vcvarsall.bat" (
call "%VCDIR% %VCVersion%\VC\vcvarsall.bat" x86
call "%VCDIR% %VCVersion%\VC\vcvarsall.bat" %Conf%
goto MSbuildSetting
)

Expand Down Expand Up @@ -84,7 +93,7 @@ goto missing
:: Debug mode emitted symbolic debug information,and the code execution is not optimized.
:: Release mode does not emitted debug information,and the code execution is optimized.
::Note: WIN32 in Preprocessor Definitions: Defined for applications for Win32 and Win64. Always defined.
if /i %BuildConfiguration%_%Platform%==Debug_Win32 (
if /i %BuildConfiguration%_%Conf_Platform%==Debug_Win32 (
set UseDebugLibrariesSetValue=true
set WholeProgramOptimizationSetValue=false
set CharacterSetSetValue=Unicode
Expand All @@ -104,8 +113,29 @@ if /i %BuildConfiguration%_%Platform%==Debug_Win32 (
goto compile
)

if /i %BuildConfiguration%_%Conf_Platform%==Debug_x64 (
set UseDebugLibrariesSetValue=true
set WholeProgramOptimizationSetValue=false
set CharacterSetSetValue=Unicode
set LinkIncrementalSetValue=true

set WarningLevelSetValue=Level3
set OptimizationSetValue=Disabled
set FunctionLevelLinkingSetValue=false
set IntrinsicFunctionsSetValue=false
set PreprocessorDefinitionsSetValue=Win64;_DEBUG;_WINDOWS;_USRDLL;_CRT_SECURE_NO_WARNINGS;

set SubSystemSetValue=Windows
set GenerateDebugInformationSetValue=true
set EnableCOMDATFoldingSetValue=false
set OptimizeReferencesSetValue=false

goto compile
)

echo BuildingConfig is %BuildConfiguration% and the platform is %Platform%
::Note: To better understand code optimization, recommend to read "Optimization Best Practices" http://msdn.microsoft.com/en-us/library/ms235601.aspx
if /i %BuildConfiguration%_%Platform%==Release_Win32 (
if /i %BuildConfiguration%_%Conf_Platform%==Release_Win32 (
set UseDebugLibrariesSetValue=false
set WholeProgramOptimizationSetValue=true
set CharacterSetSetValue=Unicode
Expand All @@ -125,6 +155,26 @@ if /i %BuildConfiguration%_%Platform%==Release_Win32 (
goto compile
)

if /i %BuildConfiguration%_%Conf_Platform%==Release_x64 (
set UseDebugLibrariesSetValue=false
set WholeProgramOptimizationSetValue=true
set CharacterSetSetValue=Unicode
set LinkIncrementalSetValue=false

set WarningLevelSetValue=Level3
set OptimizationSetValue=MaxSpeed
set FunctionLevelLinkingSetValue=true
set IntrinsicFunctionsSetValue=true
set PreprocessorDefinitionsSetValue=Win64;NDEBUG;_WINDOWS;_USRDLL;_CRT_SECURE_NO_WARNINGS;

set SubSystemSetValue=Windows
set GenerateDebugInformationSetValue=true
set EnableCOMDATFoldingSetValue=true
set OptimizeReferencesSetValue=true

goto compile
)

goto missingBuildConfiguration

:compile
Expand All @@ -141,15 +191,26 @@ msbuild %MSbuildName%.vcxproj /t:rebuild /p:PlatformToolset=%Toolset%;Configurat
::Copy ffd.dll to Output Directory
::*******************************************************************
echo Copy %MSbuildName%.dll and %MSbuildName%.lib to %DIR%
copy "%BuildConfiguration%\%MSbuildName%.dll" "%DIR%" /Y
copy "%BuildConfiguration%\%MSbuildName%.lib" "%DIR%" /Y
if %Platform%==Win32 (
copy "%BuildConfiguration%\%MSbuildName%.dll" "%DIR%" /Y
copy "%BuildConfiguration%\%MSbuildName%.lib" "%DIR%" /Y
)
if %Platform%==X64 (
copy "X64\%BuildConfiguration%\%MSbuildName%.dll" "%DIR%" /Y
copy "X64\%BuildConfiguration%\%MSbuildName%.lib" "%DIR%" /Y
)
::Note: /y: Suppresses prompting to confirm that you want to overwrite an existing destination file.

::*******************************************************************
::Clean Build Folder
::*******************************************************************
echo Clean %BuildConfiguration% Build Folder
rmdir %BuildConfiguration% /s /q
if %Platform%==Win32 (
rmdir %BuildConfiguration% /s /q
)
if %Platform%==X64 (
rmdir X64 /s /q
)
goto :eof
::Note: /s: Removes the specified directory and all subdirectories including any files.

Expand Down
2 changes: 1 addition & 1 deletion Buildings/Resources/src/FastFluidDynamics/ffd.vcxproj
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Your comment -->
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Project DefaultTargets="Build" ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">

<!--***************************************************************
MSBuild Structure (Not user editable)
Expand Down
Loading