/ Check-in [b9626b59]
Login

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:Further improvements to the MSVC batch build tool.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: b9626b5954068ae2e7733dd14f906a1f6d7090a5
User & Date: mistachkin 2016-02-19 00:48:23
Context
2016-02-19
10:18
Add an "#ifndef SQLITE_AMALGAMATION" guard around a typedef in fts5_test_mi.c to avoid redefining "u32" if it is compiled as part of the amalgamation. check-in: f9c49ba1 user: dan tags: trunk
00:48
Further improvements to the MSVC batch build tool. check-in: b9626b59 user: mistachkin tags: trunk
00:47
Further improvements to the MSVC batch build tool. check-in: 90dd6eb1 user: mistachkin tags: branch-3.11
2016-02-18
21:15
Correct the install location for the UWP VSIX package. check-in: f74de325 user: mistachkin tags: trunk
Changes
Hide Diffs Side-by-Side Diffs Ignore Whitespace Patch

Changes to tool/build-all-msvc.bat.

    64     64   REM
    65     65   REM                        NOSYMBOLS
    66     66   REM
    67     67   REM When set, copying of symbol files ^(*.pdb^) created during the build will
    68     68   REM be skipped and they will not appear in the final destination directory.
    69     69   REM Setting this environment variable is never strictly needed and could cause
    70     70   REM issues in some circumstances; therefore, setting it is not recommended.
           71  +REM
           72  +REM                        NOMEMDEBUG
           73  +REM
           74  +REM When set, disables use of MEMDEBUG when building binaries for the "Debug"
           75  +REM configuration.
    71     76   REM
    72     77   REM                        BUILD_ALL_SHELL
    73     78   REM
    74     79   REM When set, the command line shell will be built for each selected platform
    75     80   REM and configuration as well.  In addition, the command line shell binaries
    76     81   REM will be copied, with their symbols, to the final destination directory.
    77     82   REM
................................................................................
    94     99   REM example:
    95    100   REM
    96    101   REM                        SET NMAKE_ARGS=FOR_WINRT=1
    97    102   REM
    98    103   REM Using the above command before running this tool will cause the compiled
    99    104   REM binaries to target the WinRT environment, which provides a subset of the
   100    105   REM Win32 API.
          106  +REM
          107  +REM                        DLL_FILE_NAME
          108  +REM                        DLL_PDB_FILE_NAME
          109  +REM                        LIB_FILE_NAME
          110  +REM                        EXE_FILE_NAME
          111  +REM                        EXE_PDB_FILE_NAME
          112  +REM
          113  +REM When set, these values will override the associated target file name used
          114  +REM for the build.
   101    115   REM
   102    116   SETLOCAL
   103    117   
   104    118   REM SET __ECHO=ECHO
   105    119   REM SET __ECHO2=ECHO
   106    120   REM SET __ECHO3=ECHO
   107    121   IF NOT DEFINED _AECHO (SET _AECHO=REM)
................................................................................
   250    264   REM NOTE: A Tcl shell executable is required during the SQLite build process
   251    265   REM       unless a pre-existing amalgamation file is used.
   252    266   REM
   253    267   IF NOT DEFINED %TCLSH_FILE%_PATH (
   254    268     ECHO The Tcl shell executable "%TCLSH_FILE%" is required to be in the PATH.
   255    269     GOTO errors
   256    270   )
          271  +
          272  +REM
          273  +REM NOTE: Setup the default names for the build targets we are creating.  Any
          274  +REM       ^(or all^) of these may end up being overridden.
          275  +REM
          276  +IF NOT DEFINED DLL_FILE_NAME (
          277  +  SET DLL_FILE_NAME=sqlite3.dll
          278  +)
          279  +
          280  +IF NOT DEFINED DLL_PDB_FILE_NAME (
          281  +  SET DLL_PDB_FILE_NAME=sqlite3.pdb
          282  +)
          283  +
          284  +IF NOT DEFINED LIB_FILE_NAME (
          285  +  SET LIB_FILE_NAME=sqlite3.lib
          286  +)
          287  +
          288  +IF NOT DEFINED EXE_FILE_NAME (
          289  +  SET EXE_FILE_NAME=sqlite3.exe
          290  +)
          291  +
          292  +IF NOT DEFINED EXE_PDB_FILE_NAME (
          293  +  SET EXE_PDB_FILE_NAME=sqlite3sh.pdb
          294  +)
   257    295   
   258    296   REM
   259    297   REM NOTE: Set the TOOLPATH variable to contain all the directories where the
   260    298   REM       external tools were found in the search above.
   261    299   REM
   262    300   CALL :fn_CopyVariable %TCLSH_FILE%_PATH TOOLPATH
   263    301   
................................................................................
   430    468           REM
   431    469           SET DEBUG=3
   432    470   
   433    471           REM
   434    472           REM NOTE: Setting this to non-zero should enable the SQLITE_MEMDEBUG
   435    473           REM       define.
   436    474           REM
   437         -        SET MEMDEBUG=1
          475  +        IF NOT DEFINED NOMEMDEBUG (
          476  +          SET MEMDEBUG=1
          477  +        )
   438    478         ) ELSE (
   439    479           CALL :fn_UnsetVariable DEBUG
   440    480           CALL :fn_UnsetVariable MEMDEBUG
   441    481         )
   442    482   
   443    483         REM
   444    484         REM NOTE: Launch a nested command shell to perform the following steps:
................................................................................
   555    595           ) ELSE (
   556    596             REM
   557    597             REM NOTE: Even when the cleaning step has been disabled, we still
   558    598             REM       need to remove the build output for all the files we are
   559    599             REM       specifically wanting to build for each platform.
   560    600             REM
   561    601             %_AECHO% Cleaning final core library output files only...
   562         -          %__ECHO% DEL /Q *.lo sqlite3.dll sqlite3.lib sqlite3.pdb 2%REDIRECT% NUL
          602  +          %__ECHO% DEL /Q *.lo "%DLL_FILE_NAME%" "%LIB_FILE_NAME%" "%DLL_PDB_FILE_NAME%" 2%REDIRECT% NUL
   563    603           )
   564    604   
   565    605           REM
   566    606           REM NOTE: Call NMAKE with the MSVC makefile to build the "sqlite3.dll"
   567    607           REM       binary.  The x86 compiler will be used to compile the native
   568    608           REM       command line tools needed during the build process itself.
   569    609           REM       Also, disable looking for and/or linking to the native Tcl
   570    610           REM       runtime library.
   571    611           REM
   572         -        %__ECHO% %NMAKE_CMD% sqlite3.dll XCOMPILE=1 USE_NATIVE_LIBPATHS=1 NO_TCL=1 %NMAKE_ARGS%
          612  +        %__ECHO% %NMAKE_CMD% "%DLL_FILE_NAME%" "PLATFORM=%%D" XCOMPILE=1 USE_NATIVE_LIBPATHS=1 NO_TCL=1 %NMAKE_ARGS%
   573    613   
   574    614           IF ERRORLEVEL 1 (
   575         -          ECHO Failed to build %%B "sqlite3.dll" for platform %%P.
          615  +          ECHO Failed to build %%B "%DLL_FILE_NAME%" for platform %%P.
   576    616             GOTO errors
   577    617           )
   578    618   
   579    619           REM
   580    620           REM NOTE: Copy the "sqlite3.dll" file to the appropriate directory for
   581    621           REM       the build and platform beneath the binary directory.
   582    622           REM
   583         -        %__ECHO% XCOPY sqlite3.dll "%BINARYDIRECTORY%\%%B\%%D\" %FFLAGS% %DFLAGS%
          623  +        %__ECHO% XCOPY "%DLL_FILE_NAME%" "%BINARYDIRECTORY%\%%B\%%D\" %FFLAGS% %DFLAGS%
   584    624   
   585    625           IF ERRORLEVEL 1 (
   586         -          ECHO Failed to copy "sqlite3.dll" to "%BINARYDIRECTORY%\%%B\%%D\".
          626  +          ECHO Failed to copy "%DLL_FILE_NAME%" to "%BINARYDIRECTORY%\%%B\%%D\".
   587    627             GOTO errors
   588    628           )
   589    629   
   590    630           REM
   591    631           REM NOTE: Copy the "sqlite3.lib" file to the appropriate directory for
   592    632           REM       the build and platform beneath the binary directory.
   593    633           REM
   594         -        %__ECHO% XCOPY sqlite3.lib "%BINARYDIRECTORY%\%%B\%%D\" %FFLAGS% %DFLAGS%
          634  +        %__ECHO% XCOPY "%LIB_FILE_NAME%" "%BINARYDIRECTORY%\%%B\%%D\" %FFLAGS% %DFLAGS%
   595    635   
   596    636           IF ERRORLEVEL 1 (
   597         -          ECHO Failed to copy "sqlite3.lib" to "%BINARYDIRECTORY%\%%B\%%D\".
          637  +          ECHO Failed to copy "%LIB_FILE_NAME%" to "%BINARYDIRECTORY%\%%B\%%D\".
   598    638             GOTO errors
   599    639           )
   600    640   
   601    641           REM
   602    642           REM NOTE: Copy the "sqlite3.pdb" file to the appropriate directory for
   603    643           REM       the build and platform beneath the binary directory unless we
   604    644           REM       are prevented from doing so.
   605    645           REM
   606    646           IF NOT DEFINED NOSYMBOLS (
   607         -          %__ECHO% XCOPY sqlite3.pdb "%BINARYDIRECTORY%\%%B\%%D\" %FFLAGS% %DFLAGS%
          647  +          %__ECHO% XCOPY "%DLL_PDB_FILE_NAME%" "%BINARYDIRECTORY%\%%B\%%D\" %FFLAGS% %DFLAGS%
   608    648   
   609    649             IF ERRORLEVEL 1 (
   610         -            ECHO Failed to copy "sqlite3.pdb" to "%BINARYDIRECTORY%\%%B\%%D\".
          650  +            ECHO Failed to copy "%DLL_PDB_FILE_NAME%" to "%BINARYDIRECTORY%\%%B\%%D\".
   611    651               GOTO errors
   612    652             )
   613    653           )
   614    654   
   615    655           REM
   616    656           REM NOTE: If requested, also build the shell executable.
   617    657           REM
................................................................................
   623    663             IF DEFINED NOCLEAN (
   624    664               REM
   625    665               REM NOTE: Even when the cleaning step has been disabled, we still
   626    666               REM       need to remove the build output for all the files we are
   627    667               REM       specifically wanting to build for each platform.
   628    668               REM
   629    669               %_AECHO% Cleaning final shell executable output files only...
   630         -            %__ECHO% DEL /Q sqlite3.exe sqlite3sh.pdb 2%REDIRECT% NUL
          670  +            %__ECHO% DEL /Q "%EXE_FILE_NAME%" "%EXE_PDB_FILE_NAME%" 2%REDIRECT% NUL
   631    671             )
   632    672   
   633    673             REM
   634    674             REM NOTE: Call NMAKE with the MSVC makefile to build the "sqlite3.exe"
   635    675             REM       binary.  The x86 compiler will be used to compile the native
   636    676             REM       command line tools needed during the build process itself.
   637    677             REM       Also, disable looking for and/or linking to the native Tcl
   638    678             REM       runtime library.
   639    679             REM
   640         -          %__ECHO% %NMAKE_CMD% sqlite3.exe XCOMPILE=1 USE_NATIVE_LIBPATHS=1 NO_TCL=1 %NMAKE_ARGS%
          680  +          %__ECHO% %NMAKE_CMD% "%EXE_FILE_NAME%" "PLATFORM=%%D" XCOMPILE=1 USE_NATIVE_LIBPATHS=1 NO_TCL=1 %NMAKE_ARGS%
   641    681   
   642    682             IF ERRORLEVEL 1 (
   643         -            ECHO Failed to build %%B "sqlite3.exe" for platform %%P.
          683  +            ECHO Failed to build %%B "%EXE_FILE_NAME%" for platform %%P.
   644    684               GOTO errors
   645    685             )
   646    686   
   647    687             REM
   648    688             REM NOTE: Copy the "sqlite3.exe" file to the appropriate directory
   649    689             REM       for the build and platform beneath the binary directory.
   650    690             REM
   651         -          %__ECHO% XCOPY sqlite3.exe "%BINARYDIRECTORY%\%%B\%%D\" %FFLAGS% %DFLAGS%
          691  +          %__ECHO% XCOPY "%EXE_FILE_NAME%" "%BINARYDIRECTORY%\%%B\%%D\" %FFLAGS% %DFLAGS%
   652    692   
   653    693             IF ERRORLEVEL 1 (
   654         -            ECHO Failed to copy "sqlite3.exe" to "%BINARYDIRECTORY%\%%B\%%D\".
          694  +            ECHO Failed to copy "%EXE_FILE_NAME%" to "%BINARYDIRECTORY%\%%B\%%D\".
   655    695               GOTO errors
   656    696             )
   657    697   
   658    698             REM
   659    699             REM NOTE: Copy the "sqlite3sh.pdb" file to the appropriate directory
   660    700             REM       for the build and platform beneath the binary directory
   661    701             REM       unless we are prevented from doing so.
   662    702             REM
   663    703             IF NOT DEFINED NOSYMBOLS (
   664         -            %__ECHO% XCOPY sqlite3sh.pdb "%BINARYDIRECTORY%\%%B\%%D\" %FFLAGS% %DFLAGS%
          704  +            %__ECHO% XCOPY "%EXE_PDB_FILE_NAME%" "%BINARYDIRECTORY%\%%B\%%D\" %FFLAGS% %DFLAGS%
   665    705   
   666    706               IF ERRORLEVEL 1 (
   667         -              ECHO Failed to copy "sqlite3sh.pdb" to "%BINARYDIRECTORY%\%%B\%%D\".
          707  +              ECHO Failed to copy "%EXE_PDB_FILE_NAME%" to "%BINARYDIRECTORY%\%%B\%%D\".
   668    708                 GOTO errors
   669    709               )
   670    710             )
   671    711           )
   672    712         )
   673    713       )
   674    714     )