reapack

Package manager for REAPER
Log | Files | Refs | Submodules | README | LICENSE

commit 64bd852a7c06ed5e78e256a9aeaf766d3532ffd5
parent 9455bb0eb71726dbd82ca0147bc36d6c816786f3
Author: cfillion <cfillion@users.noreply.github.com>
Date:   Sun,  4 Jun 2017 16:33:03 -0700

win32: build using Visual Studio 2017's C++ compiler and runtime libraries

(also: updated boost, curl and sqlite to latest)

Diffstat:
MREADME.md | 6+++---
Mbuild_deps.bat | 10+++++++++-
Mwin32.tup | 12++++++------
Mwrapper.bat | 7+++++--
4 files changed, 23 insertions(+), 12 deletions(-)

diff --git a/README.md b/README.md @@ -61,11 +61,11 @@ vendor [tup](http://gittup.org/tup/win32/tup-explicit-variant-v0.7.3-45-gcf6a829.zip) (explicit-variant branch, see [this thread](https://groups.google.com/d/topic/tup-users/UNUSE15PQdA/discussion)) - and [Visual Studio 2015, with Visual C++](https://www.visualstudio.com/products/visual-studio-community-vs) + and [Visual Studio 2017, with C++ support](https://www.visualstudio.com/vs/community/) 2. Prevent Microsoft's C++ compiler from saving telemetry outside of the build directory: [instructions here](https://msdn.microsoft.com/en-us/library/ee225238.aspx#Anchor_5) or set the `OptIn` registry key to `0` in - `HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\Microsoft\VSCommon\14.0\SQM` + `HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\Microsoft\VSCommon\15.0\SQM` 3. Download the latest [boost](http://www.boost.org/) and copy the `boost` subdirectory into `<reapack>\vendor` 4. Download the latest [curl](http://curl.haxx.se/download.html) source @@ -86,6 +86,6 @@ vendor 5. Download the latest stable amalgamation build of [sqlite](https://www.sqlite.org/download.html). Put `sqlite3.h` and `sqlite3.c` in `<reapack>\vendor`. 6. Run `build_deps.bat` and `rake` from this directory using - "Developer Command Prompt for VS2015" + "Developer Command Prompt for VS 2017" 7. Copy or symlink `x64\bin\reaper_reapack64.dll` or `x86\bin\reaper_reapack32.dll` to your REAPER plugin folder diff --git a/build_deps.bat b/build_deps.bat @@ -2,9 +2,11 @@ setlocal set self=%~dp0 -set vendor=%self%\vendor +set vendor=%self%vendor set curl=%vendor%\curl +call :AssertExists "%curl%\winbuild\Makefile.vc" || goto :eof + if "%1%"=="curl32" ( cd "%curl%\winbuild" nmake /f Makefile.vc mode=static RTLIBCFG=static MACHINE=x86 @@ -22,3 +24,9 @@ if "%1%"=="curl64" ( call %self%\wrapper i386 cmd /c %self%\build_deps curl32 call %self%\wrapper x86_64 cmd /c %self%\build_deps curl64 + +:AssertExists +if not exist "%~1" ( + echo [build_deps] %~1: No such file or directory + exit /b 1 +) diff --git a/win32.tup b/win32.tup @@ -17,10 +17,10 @@ SQLFLAGS := /Os /wd4101 SQLFLAGS += /DSQLITE_OMIT_COMPOUND_SELECT /DSQLITE_OMIT_DATETIME_FUNCS SQLFLAGS += /DSQLITE_OMIT_INTEGRITY_CHECK /DSQLITE_OMIT_UTF16 SQLFLAGS += /DSQLITE_OMIT_SHARED_CACHE /DSQLITE_OMIT_INCRBLOB -SQLFLAGS += /DSQLITE_OMIT_AUTHORIZATION /DSQLITE_OMIT_PAGER_PRAGMAS -SQLFLAGS += /DSQLITE_OMIT_BUILTIN_TEST /DSQLITE_OMIT_SCHEMA_PRAGMAS -SQLFLAGS += /DSQLITE_OMIT_TRACE /DSQLITE_OMIT_LOAD_EXTENSION -SQLFLAGS += /DSQLITE_OMIT_GET_TABLE /DSQLITE_OMIT_COMPLETE /DSQLITE_OMIT_TEMPDB +SQLFLAGS += /DSQLITE_OMIT_AUTHORIZATION /DSQLITE_OMIT_BUILTIN_TEST +SQLFLAGS += /DSQLITE_OMIT_SCHEMA_PRAGMAS /DSQLITE_OMIT_TRACE +SQLFLAGS += /DSQLITE_OMIT_LOAD_EXTENSION /DSQLITE_OMIT_GET_TABLE +SQLFLAGS += /DSQLITE_OMIT_COMPLETE /DSQLITE_OMIT_TEMPDB SQLFLAGS += /DSQLITE_OMIT_COMPILEOPTION_DIAGS /DSQLITE_OMIT_CAST SQLFLAGS += /DSQLITE_OMIT_CHECK /DSQLITE_OMIT_DECLTYPE /DSQLITE_OMIT_DEPRECATED @@ -38,10 +38,10 @@ RCFLAGS += /nologo /fo $(TUP_VARIANTDIR)/src/resource.res TARGET := bin/$(REAPACK_FILE) SOFLAGS := /DLL /OUT:$(TUP_VARIANTDIR)/$(TARGET).dll -SOTARGET := $(TARGET).dll $(TARGET).lib $(TARGET).exp +SOTARGET := $(TARGET).dll $(TARGET).lib $(TARGET).exp $(TARGET).pdb TSFLAGS := /OUT:$(TUP_VARIANTDIR)/bin/test.exe -TSTARGET := bin/test.exe bin/test.lib bin/test.exp +TSTARGET := bin/test.exe bin/test.lib bin/test.exp bin/test.pdb !build = |> $(CXX) $(CXXFLAGS) /c %f /Fo%o |> !link = |> $(LD) $(LDFLAGS) %f |> diff --git a/wrapper.bat b/wrapper.bat @@ -12,10 +12,13 @@ shift goto next_arg :continue +set PATH=%PATH%;%VCINSTALLDIR%\Auxiliary\Build + if "%arch%"=="x86_64" ( - call "%VCINSTALLDIR%\vcvarsall.bat" x86_amd64 + call vcvars64.bat > NUL ) else ( if "%arch%"=="i386" ( - call "%VCINSTALLDIR%\vcvarsall.bat" x86 + rem Using the x86 64-bit cross-compiler to avoid conflicts on the pdb file with tup + call vcvarsamd64_x86.bat > NUL ) else ( echo Unknown Architecture: %arch% exit /b 42