[win32] CMakeLists.txt: Don't install import libraries. They're not
useful for shell extensions. (This wasn't done when the target was
set as MODULE, but then the DLL was installed in lib/, not bin/.)
Two new ZIP files are created in the top-level source directory:
- rom-properties-[version]-windows.zip: Standard distribution.
- rom-properties-[version]-windows.debug.zip: PDB files.
Highest version is preferred.
For MSVC 2012+, set the toolchain to e.g. v120_xp for XP compatibility.
Check for cmake.exe. CMake 3.0.0 is now required due to a naming change
for the MSVC generators. (The old names for 2010, 2012, and 2013 are
still supported, but I'd rather not use them.)
NOTE: We aren't checking the CMake version. Older versions will fail
due to an unsupported generator name.
This script calls cmake to build 32-bit and 64-bit DLLs using
Visual Studio 2015.
Requirements:
- CMake 2.8.12 or later
- MSVC 2015 with 32-bit and 64-bit compilers
- Windows 7 SDK
- zip.exe and unzip.exe in %PATH%
NOTE: The test suite is NOT run here.
TODO:
- Merge the two packages.
- Check for MSVC 2015, 2013, 2012, and 2010, as well as 32-bit and
64-bit compilers.
TextFuncs.cpp has been split into OS-specific and OS-independent files,
and a comprehensive unit test has been added. Several issues have been
identified and fixed thanks to the unit test.
In addition, code coverage testing via gcov and lcov has been added
for gcc and clang builds. Set -DBUILD_TESTING=ON -DENABLE_COVERAGE=ON
and run the scripts/lcov.sh script after compiling to test code coverage
in the unit tests.
Set ENABLE_COVERAGE=ON to enable code coverage testing.
After the build is finished, run 'make coverage' to run the unit tests
and generate a code coverage page in the ${CMAKE_BINARY_DIR}/coverage
directory.
Reference: https://github.com/bilke/cmake-modules/blob/master/CodeCoverage.cmake
(commit 59f8ab8dded56b490dec388ac6ad449318de8779)
CMakeLists.txt:
- Moved the CMAKE_BUILD_TYPE check to before INCLUDE(CTest),
and capitalized the 'D' in "Debug", since CodeCoverage.cmake
checks for that.
gcc.cmake:
- Set the required CFLAGS. (These aren't checked for explicitly, since
they're basically present on all gcc since forever.)
- Link all targets to -lgcov.
- Create a 'coverage' target for automatically running tests and
generating HTML output using lcov/genhtml.
options.cmake:
- Added ENABLE_COVERAGE.
scripts/lcov.sh:
- Shell script used by the 'coverage' target to generate the lcov/genhtml
output from the gcov profiling data.
Windows 7 allows 32-bit DLLs to be registered with the 64-bit REGSVR32,
but Windows Vista, 2003, and XP64 might not.
Determine the correct path based on the version of cmd being used,
then use it to register the appropriate DLLs.
CMakeLists.txt:
- Set the version to 0.7.99+.
- Added more CPack fields.
- Added an architecture-specific suffix for Windows packages.
(TODO: Package both 32-bit and 64-bit DLLs in the Win64 package.)
DirInstallPaths.cmake: Copied from GCN MemCard Recover, with some
changes to accomodate the different setup for rom-properties.
options.cmake: s/debug file/debug files/g
doc/, scripts/: Install the relevant files. Note that the files aren't
converted to Windows line endings when compiling for Windows.
[win32] CMakeLists.txt: Added INSTALL() commands.
These scripts run regsvr32.exe on the ROM Properties DLLs in the
current directory.
On 64-bit systems, both the 32-bit and 64-bit DLLs are registered,
whereas on 32-bit systems, only the 32-bit DLL is registered.
NOTE: These files use DOS line endings.