Closed runette closed 4 years ago
it was migrated to github workflows, the README should be fixed accordingly. now it uses https://github.com/lutraconsulting/MDAL/blob/master/.github/workflows/windows_tests.yml
I think I must have missed something obvious because I cannot see how to use that to locally build a version of mdal.dll?
Re-opening this just because of a couple of minor builds. The new instructions work really well - better than before - but it should also be noted :
C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\Common7\Tools\VsDevCmd.bat -arch=x86 "
only works for the Enterprise version. For the community version the "enterprise" should be changed to "community". Pretty obvious but worth noting in the text. Also, for safety, it probably should be
"C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\Common7\Tools\VsDevCmd.bat" -arch=x86
The best ctest command is :
ctest -VV --exclude-regex mdalinfo*
This may be my path configuration - but I always need to copy the gdal dlls into the test directory to get the tests to run. Again, might be worth a note. This also ensures that you know exactly which versions you are running against.
Finally, after compile I have to copy mdal.dll from the mdal\debug directory to the tests\debug directory. Again worth a note.
I actually am using the following batch file and it works well :
"C:\Program files\CMake\bin\cmake" -G "Visual Studio 16 2019" ^
-DCMAKE_BUILD_TYPE=Rel ^
-DENABLE_TESTS=ON ^
-DNETCDF_PREFIX="C:\OSGeo4W64" ^
-DHDF5_ROOT="C:\OSGeo4W64" ^
-DGDAL_DIR="C:\OSGeo4W64" ^
-DGDAL_LIBRARY="C:\OSGeo4W64\lib\gdal_i.lib" ^
-DGDAL_INCLUDE_DIR="C:\OSGeo4W64\include" ^
-DLIBXML2_LIBRARIES="C:\OSGeo4W64\lib\libxml2.lib" ^
-DLIBXML2_INCLUDE_DIR="C:\OSGeo4W64\include\libxml2" ..
"C:\Program files\CMake\bin\cmake" --build .
copy /B mdal\debug\mdal.dll tests\debug
"C:\Program files\CMake\bin\ctest" -VV --exclude-regex mdalinfo*
if you do something like
set PATH="C:\OSGeo4W64\bin;<your_build_dir>\build\tool\Debug\;<your_build_dir>\build\mdal\Debug;%PATH%"
you maybe do not need to copy the dlls all the time..
To be honest - I prefer to do it "manually" since that way I know exactly what versions I am testing against. But this is the sort of thing that should be documented.
On Fri, 28 Aug 2020 at 16:32, Peter Petrik notifications@github.com wrote:
if you do something like
set PATH="C:\OSGeo4W64\bin;
\build\tool\Debug\; \build\mdal\Debug;%PATH%" you maybe do not need to copy the dlls all the time..
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/lutraconsulting/MDAL/issues/297#issuecomment-682718621, or unsubscribe https://github.com/notifications/unsubscribe-auth/AARC2MZXQ7KRP5VNACIW6KDSC7EZRANCNFSM4QLS34FQ .
ok, no problem, fixed in https://github.com/lutraconsulting/MDAL/commit/1d302ede9ceee6b93a937581a6419ea07e3d79c5
feel free to adjust the README, I am not doing development on windows and therefore I can only copy what you suggests there.
I don't understand the recent changes to the scripts folder.
BEFORE
There was a win build.bash script. It was not perfect but it worked. The README instructions for building the project in Windows referred to this script.
NOW
The build.bash script has gone. The README instructions still refer to it as the way to build the project in Windows!
I am not sure if the script has been deleted in error, or if the script was deleted for a reason and the README was not updated and if the latter what the intention is for people who need to build the project in Windows?