OutpostUniverse / OP2Archive

Console Application for examining, creating, and extracting files from Outpost 2 .vol and .clm archives.
https://wiki.outpost2.net/doku.php?id=outpost_2:helper_programs:op2archive
MIT License
1 stars 0 forks source link

Create an x64 build of OP2Archive #19

Closed Brett208 closed 6 years ago

Brett208 commented 6 years ago

Use CMake for project generation.

Test:

Brett208 commented 6 years ago

Good news! I compiled an x64 version of OP2Archive, and it was capable of manipulating volume and CLM files. Both extraction and creation of new volumes appears to be identical between x86 and x64 builds of OP2Archive. Outpost 2 accepted a newly created maps.vol and op2.clm created using the x64 build without issue. The repository reported the new version of maps.vol as identical to the version maintained in the repository.

So, this should be easy to compile in both x64 and x86 on the next release if we want to.


A couple of notes:

MSVC is reported about a dozen warnings on x64. It is recognzing that size_t can now accomodate larger values and is warning where we are in various ways manipulating 32 bit variables with at 64 bit size_t.

By default, CMake is only generating a WIN32 project for Visual Studio. We are going to need to decide how to handle generating a x64 MSVC build. I think the answer is to set a variable in CMakeLists.txt that directs generating an x86 or x64 build. This way we can tell CMake to compensate for the differences when say fetching a different FreeImage DLL or labeling a directory for release x86 vs x64.

http://www.saoe.net/blog/778/

DanRStevens commented 6 years ago

This is very good news.


I enabled both an x86 and x64 build on AppVeyor for the OP2Utility project. That way we can see and track the new warnings for x64 code.

As expected, there are a bunch of warnings about size conversions for size_t under x64.


I assume CMake should be able to create a Visual Studio project file with both x86 and x64 project settings. At least, I assume it would be one project file with multiple configurations.