Commit Graph

74 Commits

Author SHA1 Message Date
David Korth
da6e62128e [scripts] package.cmd: +"the" 2017-01-07 19:24:20 -05:00
David Korth
9501a6e506 [scripts] install.cmd, uninstall.cmd: Updated DLL paths. 2016-11-05 16:08:17 -04:00
David Korth
5c640e35ed [scripts] package.cmd: Removed "-i386" and "-amd64" from status messages. 2016-11-05 16:03:37 -04:00
David Korth
d3bfc7a7ac [scripts] package.cmd: Handle the new split-architecture directory layout.
[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/.)
2016-11-05 15:46:59 -04:00
Egor
8edd84f8e2 [scripts] Fixed a bug in install.cmd MSVCRT detection 2016-11-01 17:04:43 +02:00
David Korth
3e676052d6 [scripts] install.cmd: Check for the MSVC 2015 runtime.
The DLLs won't register properly if the MSVC 2015 runtime isn't
installed.
2016-10-25 23:06:22 -04:00
David Korth
44408b9275 [scripts] Fixed some Windows installation script errors.
"Run as administrator" changes the working directory to C:\Windows\System32.
Change back to "%~dp0" to get the correct directory.

Also fixed some other minor typos.

Reference: http://www.codeproject.com/Tips/119828/Running-a-bat-file-as-administrator-Correcting-cur
2016-10-23 23:46:35 -04:00
David Korth
948f2de119 [scripts] package.cmd: Display a message when the distribution ZIP files are being created. 2016-10-21 23:47:42 -04:00
David Korth
936fb53915 [scripts] package.cmd: Delete the target ZIP files before creating them. 2016-10-21 23:46:59 -04:00
David Korth
f157124215 [scripts] package.cmd: Print "MSVC 2015 (14.0)" instead of "MSVC 14.0 (2015)". 2016-10-21 23:41:37 -04:00
David Korth
972edba369 [scripts] package.cmd: Merge the two architecture-specific ZIP files.
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.
2016-10-21 21:25:14 -04:00
David Korth
4298993623 [scripts] package.cmd: Moved the travis.sh check to the top of the file; check one level up.
This allows running package.cmd directly from the scripts directory.
2016-10-21 20:54:21 -04:00
David Korth
50d6be5416 [scripts] package.cmd: Check for MSVC 2010, 2012, 2013, and 2015.
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.
2016-10-21 20:50:19 -04:00
David Korth
ca86c38d4b Rename *.bat to *.cmd.
These batch files take advantage of newer functionality in NT cmd,
so they should be named *.cmd instead of *.bat.
2016-10-21 20:03:08 -04:00
David Korth
7fb155d8b9 [scripts] package.bat: Initial Windows packaging script.
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.
2016-10-20 23:54:21 -04:00
David Korth
07b9285373 [scripts] Use SETLOCAL to prevent leakage of variables outside of the batch file. 2016-10-20 23:27:50 -04:00
David Korth
6469f0e023 [scripts] *.bat: Emphasized errors and warnings by prepending "***". 2016-10-20 23:12:07 -04:00
David Korth
b9702f03c7 Merge branch 'feature/TextFuncs.split-os'
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.
2016-10-19 23:26:52 -04:00
David Korth
a394a3321e [scripts] lcov.sh: Exclude the extlib/ directory.
We only want to check coverage of rom-properties code, not external
libraries.
2016-10-18 23:00:52 -04:00
David Korth
b3ad0ef659 Added support for code coverage testing when using gcc or clang.
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.
2016-10-18 22:55:21 -04:00
David Korth
70649eb528 scripts/*.bat: Use the correct REGSVR32 executables for 32-bit and 64-bit DLLs.
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.
2016-10-17 23:34:09 -04:00
David Korth
2a7888a94a scripts/*.bat: Actually register/unregister the 32-bit DLL on 64-bit systems. 2016-10-17 23:27:39 -04:00
David Korth
2013307dab Initial CPack setup for Windows (and some Linux changes).
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.
2016-10-17 01:16:50 -04:00
David Korth
b8aac6ae8c scripts/: New install/uninstall scripts for Windows.
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.
2016-10-17 00:11:18 -04:00