OSDN Git Service

Some build fixes.
authorLoRd_MuldeR <mulder2@gmx.de>
Sun, 2 Jul 2017 13:15:55 +0000 (15:15 +0200)
committerLoRd_MuldeR <mulder2@gmx.de>
Sun, 2 Jul 2017 13:15:55 +0000 (15:15 +0200)
Make.cmd
bindings/Delphi/example/bin/delete.me [deleted file]
bindings/Delphi/example/obj/delete.me [deleted file]
bindings/Delphi/native/src/MHashDelphi384.cpp
bindings/Microsoft.NET/MHashDotNet384.sln [moved from bindings/Microsoft.NET/MHashDotNet384_Example.sln with 100% similarity]
bindings/Microsoft.NET/example/MHashDotNet384_Example.sln [deleted file]

index 7201035..6f9d9d9 100644 (file)
--- a/Make.cmd
+++ b/Make.cmd
@@ -125,12 +125,11 @@ REM ///////////////////////////////////////////////////////////////////////////
 call "%MSVC_PATH%\vcvarsall.bat"
 
 set "MSVC_PROJECTS=MHashLib.sln"
-set "MSVC_PROJECTS=%MSVC_PROJECTS%,bindings\Microsoft.NET\example\MHashDotNet384_Example.sln"
-set "MSVC_PROJECTS=%MSVC_PROJECTS%,bindings\Microsoft.NET\wrapper\MHashDotNet384_Wrapper.sln"
-set "MSVC_PROJECTS=%MSVC_PROJECTS%,bindings\Java\native\MHashJava384_Native.sln"
-set "MSVC_PROJECTS=%MSVC_PROJECTS%,bindings\Python\native\MHashPy384_Native.sln"
+::set "MSVC_PROJECTS=%MSVC_PROJECTS%,bindings\Python\native\MHashPy384_Native.sln"
 set "MSVC_PROJECTS=%MSVC_PROJECTS%,bindings\Delphi\native\MHashDelphi384.sln"
 
+set "DOTNET_PROJECTS=bindings\Microsoft.NET\MHashDotNet384.sln"
+
 for %%q in (%MSVC_PROJECTS%) do (
        for %%p in (x86,x64) do (
                "%~dp0\tools\cecho.exe" CYAN "\n----[ %%~nq (%%~p) ]----\n"
@@ -141,6 +140,15 @@ for %%q in (%MSVC_PROJECTS%) do (
        )
 )
 
+for %%q in (%DOTNET_PROJECTS%) do (
+       "%~dp0\tools\cecho.exe" CYAN "\n----[ %%~nq (%%~p) ]----\n"
+       MSBuild.exe /property:Platform="Any CPU" /property:Configuration=Release /target:Clean   "%~dp0\%%~q"
+       if not "!ERRORLEVEL!"=="0" goto BuildHasFailed
+       MSBuild.exe /property:Platform="Any CPU" /property:Configuration=Release /target:Rebuild "%~dp0\%%~q"
+       if not "!ERRORLEVEL!"=="0" goto BuildHasFailed
+)
+
+
 for %%q in (example) do (
        echo pushd "%~dp0\bindings\Delphi\%%~q"
        pushd "%~dp0\bindings\Delphi\%%~q"
@@ -152,7 +160,7 @@ for %%q in (example) do (
        popd
 )
 
-for %%q in (wrapper,example) do (
+for %%q in (library,example) do (
        "%~dp0\tools\cecho.exe" CYAN "\n----[ %%~nq ]----\n"
        pushd "%~dp0\bindings\Java\%%~q"
        call "%ANT_HOME%\bin\ant.bat" clean jar
diff --git a/bindings/Delphi/example/bin/delete.me b/bindings/Delphi/example/bin/delete.me
deleted file mode 100644 (file)
index 356be7a..0000000
+++ /dev/null
@@ -1 +0,0 @@
-delete.me
diff --git a/bindings/Delphi/example/obj/delete.me b/bindings/Delphi/example/obj/delete.me
deleted file mode 100644 (file)
index 356be7a..0000000
+++ /dev/null
@@ -1 +0,0 @@
-delete.me
index 97a8016..a7cb4cc 100644 (file)
 
 EXPORT_FUNC(mhash384_create, uintptr_t, void)
 {
-       return (uintptr_t) new mhash::MHash384();
+       return (uintptr_t) new mhash_384::MHash384();
 }
 
 EXPORT_FUNC(mhash384_update, void, const uintptr_t instance, uint8_t *const input, const size_t offset, const size_t len)
 {
-       reinterpret_cast<mhash::MHash384*>(instance)->update(input + offset, len);
+       reinterpret_cast<mhash_384::MHash384*>(instance)->update(input + offset, len);
 }
 
 EXPORT_FUNC(mhash384_result, void, const uintptr_t instance, uint8_t *const buffer)
 {
-       reinterpret_cast<mhash::MHash384*>(instance)->finalize(buffer);
+       reinterpret_cast<mhash_384::MHash384*>(instance)->finalize(buffer);
 }
 
 EXPORT_FUNC(mhash384_freeup, void, const uintptr_t instance)
 {
-       delete reinterpret_cast<mhash::MHash384*>(instance);
+       delete reinterpret_cast<mhash_384::MHash384*>(instance);
 }
 
 EXPORT_FUNC(mhash384_getver, void, uint32_t *const major, uint32_t *const minor, uint32_t *const patch)
 {
-       *major = MHASH_384_VERSION_MAJOR;
-       *minor = MHASH_384_VERSION_MINOR;
-       *patch = MHASH_384_VERSION_PATCH;
+       uint16_t version_major, version_minor, version_patch;
+       mhash_384::MHash384::version(version_major, version_minor, version_patch);
+       *major = static_cast<uint16_t>(version_major);
+       *minor = static_cast<uint16_t>(version_minor);
+       *patch = static_cast<uint16_t>(version_patch);
 }
diff --git a/bindings/Microsoft.NET/example/MHashDotNet384_Example.sln b/bindings/Microsoft.NET/example/MHashDotNet384_Example.sln
deleted file mode 100644 (file)
index d6b8d4f..0000000
+++ /dev/null
@@ -1,38 +0,0 @@
-
-Microsoft Visual Studio Solution File, Format Version 12.00
-# Visual Studio 14
-VisualStudioVersion = 14.0.24720.0
-MinimumVisualStudioVersion = 10.0.40219.1
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "MHashDotNet384_Wrapper", "..\wrapper\MHashDotNet384_Wrapper.vcxproj", "{4A7224B3-8B4D-49BE-B215-79BD5AD5989A}"
-EndProject
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MHashDotNet384_Example", "MHashDotNet384_Example.csproj", "{E11B4C39-0C15-4127-AF18-4EC9EFE79C6C}"
-EndProject
-Global
-       GlobalSection(SolutionConfigurationPlatforms) = preSolution
-               Debug|x64 = Debug|x64
-               Debug|x86 = Debug|x86
-               Release|x64 = Release|x64
-               Release|x86 = Release|x86
-       EndGlobalSection
-       GlobalSection(ProjectConfigurationPlatforms) = postSolution
-               {4A7224B3-8B4D-49BE-B215-79BD5AD5989A}.Debug|x64.ActiveCfg = Debug|x64
-               {4A7224B3-8B4D-49BE-B215-79BD5AD5989A}.Debug|x64.Build.0 = Debug|x64
-               {4A7224B3-8B4D-49BE-B215-79BD5AD5989A}.Debug|x86.ActiveCfg = Debug|Win32
-               {4A7224B3-8B4D-49BE-B215-79BD5AD5989A}.Debug|x86.Build.0 = Debug|Win32
-               {4A7224B3-8B4D-49BE-B215-79BD5AD5989A}.Release|x64.ActiveCfg = Release|x64
-               {4A7224B3-8B4D-49BE-B215-79BD5AD5989A}.Release|x64.Build.0 = Release|x64
-               {4A7224B3-8B4D-49BE-B215-79BD5AD5989A}.Release|x86.ActiveCfg = Release|Win32
-               {4A7224B3-8B4D-49BE-B215-79BD5AD5989A}.Release|x86.Build.0 = Release|Win32
-               {E11B4C39-0C15-4127-AF18-4EC9EFE79C6C}.Debug|x64.ActiveCfg = Debug|x64
-               {E11B4C39-0C15-4127-AF18-4EC9EFE79C6C}.Debug|x64.Build.0 = Debug|x64
-               {E11B4C39-0C15-4127-AF18-4EC9EFE79C6C}.Debug|x86.ActiveCfg = Debug|x86
-               {E11B4C39-0C15-4127-AF18-4EC9EFE79C6C}.Debug|x86.Build.0 = Debug|x86
-               {E11B4C39-0C15-4127-AF18-4EC9EFE79C6C}.Release|x64.ActiveCfg = Release|x64
-               {E11B4C39-0C15-4127-AF18-4EC9EFE79C6C}.Release|x64.Build.0 = Release|x64
-               {E11B4C39-0C15-4127-AF18-4EC9EFE79C6C}.Release|x86.ActiveCfg = Release|x86
-               {E11B4C39-0C15-4127-AF18-4EC9EFE79C6C}.Release|x86.Build.0 = Release|x86
-       EndGlobalSection
-       GlobalSection(SolutionProperties) = preSolution
-               HideSolutionNode = FALSE
-       EndGlobalSection
-EndGlobal