The 32-bit version is moved to the root directory.
The 64-bit version is still kept in the amd64/ directory
for reference purposes.
Removed install.cmd and uninstall.cmd.
CMakeLists.txt: Use the top-level CMake directories.
cmake/platform/win32*.cmake: Define the Windows SDK version in
win32.cmake. Use the same version (Windows XP) regardless of
the target operating system in order to keep everything consistent.
[libpng] CMakeLists.txt: Fix MSVC debug paths for png_static.
Currently supports RGB, YCbCr, and grayscale images. (YCbCr is handled
using libjpeg's built-in colorspace conversion.)
NOTE: libjpeg's RGB support outputs 24-bit RGB, so we have to manually
expand it to 32-bit ARGB with an opaque alpha channel.
Tested with Nintendo DS cover art and it works:
- ASME (Super Mario 64 DS) (RGB)
- BXSE (Sonic Colors) (YCbCr)
I manually converted the images to grayscale and those worked as well.
TODO: CMYK/YCCK. (libjpeg has automatic YCCK->CMYK colorspace conversion,
but not CMYK->RGB.)
[cmake] Added libjpeg detection and options.
TODO:
- Add an internal copy of libjpeg-turbo.
- Make libjpeg support optional?
[extlib] CMakeLists.txt: Remove SET_MSVC_DEBUG_PATH() from the
SET_EXTLIB_PROPERTIES() macro.
[minizip] Removed EXCLUDE_FROM_ALL, since this is handled by the
extlib/CMakeLists.txt file.
NOTE: We can't move DO_SPLIT_DEBUG() out of the individual extlib
directories, since CMake complains if we attempt to use it on targets
created in a different directory.
I'll eventually make them delayload so they won't be loaded unless they're
actually needed.
Rearranged the build directory layout such that all binaries are located
in the top-level bin/ directory. This is needed in order for the test
suites to work, since they might depend on zlib and/or libpng.
NOTE: We have to use CACHE INTERNAL; otherwise, the KDE5 build ignores
the directory options. (Maybe this is why the KDE4 build always used
this directory layout in the first place?)
NOTE 2: On Windows, DLLs are copied to ${CMAKE_RUNTIME_OUTPUT_DIRECTORY},
whereas on Linux, SOs are copied to ${CMAKE_LIBRARY_OUTPUT_DIRECTORY}.
Test images are now copied using a custom command, since the output
directory isn't easily determined at generate time. (It could be
the same as ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}, but msbuild uses
configuration-specific subdirectories.
TODO: Keep test images in a subdirectory. This will need adjustments in
the test suites to look in img/ first, then the current directory.
I've decided to get rid of the GDI+ PNG handling. It doesn't improve
anything performance-wise, adds coding overhead, and probably isn't
any faster than libpng.
GDI+ also doesn't support APNG. This version does.
NOTE: If I add APNG export, I'll need to use the included libpng
in Ubuntu builds, since Ubuntu still has libpng-1.2, and it's a
version that doesn't support APNG.
Reworked the bundled library system to be similar to the one in
mcrecover, but improved.
Added "-fpic -fPIC" to all extlib static libraries when building
for Linux systems. This is needed for libpng, but might not be
needed for other libraries; nevertheless, it should be set.
TODO: Use libpng in the Windows build. It's being linked in,
but it isn't actually being used for anything yet.
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.
CMakeLists.txt: Run git_version.sh. This requires a POSIX shell and
git, and both must be present in PATH. If the script can't be run,
a dummy git.h will be generated in the top-level binary directory.
libromdata, win32: Added the top-level binary directory to the
private include directory list.
[win32] resource.rc: #include "libromdata/git.h"
Removed the version string from FileDescription, since it's redundant,
and it gets cut off on Windows 7.
TODO: The git version gets cut off on Windows 7, since it uses a
ListView instead of separate ListBox and Edit controls that were
used on Windows XP.
I thought I committed this before, but apparently I didn't.
This should have been committed in commit 2013307dab.
(Initial CPack setup for Windows (and some Linux changes).)
This fixes#7.
Five days of work, two encryption libraries, and a ton of custom formats,
all for a single field in the GameCube properties page. \o/
[libromdata/tests] CMakeLists.txt: Change ${GTEST_LIBRARY} to gtest.
This was done upstream, but AesCipherTest was still using the variable,
which no longer exists.
Conflicts:
src/libromdata/GameCube.cpp
src/libromdata/tests/CMakeLists.txt
libromdata/tests/CMakeLists.txt:
- Link to gtest directly instead of ${GTEST_LIBRARY}.
- Removed INCLUDE_DIRECTORIES() for googletest, since it's added to
TARGET_INCLUDE_DIRECTORIES() by googletest's CMakeLists.txt.
extlib/googletest/googletest/CMakeLists.txt:
- Uncommented gtest_hide_internal_symbols.
Removed cmake/gtest.cmake, since it doesn't have anything useful other
than INCLUDE(CTest), which is now present in the top-level CMakeLists.txt.
FIXME: Add support for the older nettle-2.x API, since Ubuntu 14.04
still has nettle-2.7.1.
cmake/modules/FindNettle.cmake: CMake module to find Nettle.
Reference: 9fe71b1d77/cmake/FindNettle.cmake
FIXME: If ENABLE_DECRYPTION is enabled, and Nettle can't be found,
the build will fail. Maybe show a message advising the user to
set -DENABLE_DECRYPTION=0?
This fixes issue #2.
In addition to reworking RpImage to use libpng and/or GDI+ directly,
this branch adds AppVeyor support for Windows CI. This required
fixing the build system to work with CMake's Visual Studio project
generator, which uses msbuild instead of nmake.
Conflicts:
.travis.yml
CMakeLists.txt
With nmake, CMake's default /SUBSYSTEM is added after our linker flags.
With msbuild, it's added before, which caused console programs like
RpImageLoaderTest to be linked as /SUBSYSTEM:WINDOWS, which failed
due to no WinMain() function.
AppVeyor, a Windows-based CI service, mostly (only?) works with
msbuild instead of nmake, so I need to get everything working.
TODO: /MANIFEST:NO is causing problems with programs that don't have
a manifest resource (RpImageLoaderTest), and RC isn't accepting the
-nologo option for some reason.
Notable changes:
- win32-msvc.cmake: Set RP_LINKER_FLAGS_${_subsystem}_EXE. This variable
is used by a new function to add to target-specific LINK_FLAGS.
- platform.cmake: New function SET_WINDOWS_SUBSYSTEM. This adds the
relevant linker flags. Note that it's only used for MSVC.
- Added SET_WINDOWS_SUBSYSTEM() to all EXE and DLL projects. Note that
the WIN32 flag is not available in ADD_LIBRARY(), so we're not setting
it for the Win32 rom-properties.dll.
- [win32] Append to the target LINK_FLAGS instead of resetting it.
Otherwise, we lose the /SUBSYSTEM flag.
Google Test will be used for implementing unit tests. The first set of
unit tests will be for testing RpPng with various PNG image formats.
The Google Test code is currently identical to the release archive,
except for the removal of .travis.yml and appveyor.xml.
CMakeLists.txt: Added CTest support. (see cmake/gtest.cmake)
extlibs/CMakeLists.txt: Only build googletest libraries if testing is
enabled and some project depends on them.
Removed the manual CFLAG testing from platform/gcc.cmake.
Other required changes:
- Removed CMAKE_MINIMUM_REQUIRED() from everything except the
top-level CMakeLists.txt. This interfered with setting the
CMake policy, since each invocation reset the policies to
match the specified minimum version.
- Added NO_POLICY_SCOPE to the cmake/platform.cmake include
in order to allow policy changes within platform.cmake to
propagate to the rest of the project.
On my ThinkPad T60p, it's defaulting to Release. On a Kubuntu 16.04 VM,
it was defaulting to "none", so it didn't add debug flags, and it didn't
add release flags, either.
TODO: Switch the default to Release later?
Split RomPropertiesDialogPluginFactory into separate files. Note that
separate files are needed for KDE4 and KDE5 due to changes in automoc.
automoc4 complains if it has an #include for .moc, whereas automoc5
doesn't recognize that K_PLUGIN_FACTORY() has a Q_OBJECT macro, so it
fails to link due to undefined references to a vtable.
cmake/options.cmake: Added BUILD_KDE4 and BUILD_KDE5 options.
Both default to ON, but if the dependencies are missing, then their
respective plugins won't be built.
Minor change in SplitDebugInformation to handle CMake linking the
shared library in build/lib/ instead of build/src/kde/.
Added options for SPLIT_DEBUG and INSTALL_DEBUG, though INSTALL_DEBUG
isn't currently used.
Some stuff was stripped out, including support for ANSI Windows.
The minimum version I'm officially going to support once I add
Windows support is XP, though 2000 might "just work".
The initial version adds a blank "ROM Properties" tab to the
file properties dialog in KDE4.
NOTE: KDE4 on my system doesn't seem to look in /usr/local, so the
plugin must be installed in /usr in order to work.