Many hyperlinks are disabled.
Use anonymous login
to enable hyperlinks.
Overview
Comment: | Modify the multi-platform build tool for MSVC to support the latest RC version. |
---|---|
Downloads: | Tarball | ZIP archive |
Timelines: | family | ancestors | descendants | both | trunk |
Files: | files | file ages | folders |
SHA1: |
95b65883bbf476a17f09ff978df4f51a |
User & Date: | mistachkin 2012-07-27 08:21:45.506 |
Context
2012-07-27
| ||
08:33 | For the clean makefile targets, delete the generated VSIX file as well. (check-in: d575d9619a user: mistachkin tags: trunk) | |
08:21 | Modify the multi-platform build tool for MSVC to support the latest RC version. (check-in: 95b65883bb user: mistachkin tags: trunk) | |
07:13 | Add tool to build the core DLL for multiple platforms using MSVC. (check-in: e42f5812f1 user: mistachkin tags: trunk) | |
Changes
Changes to Makefile.msc.
︙ | ︙ | |||
76 77 78 79 80 81 82 | # For example, to use the x86 compiler when cross-compiling for x64, a command # line similar to the following could be used (all on one line): # # nmake /f Makefile.msc # "NCC=""%VCINSTALLDIR%\bin\cl.exe""" # USE_NATIVE_LIBPATHS=1 # | | > > > > | 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 | # For example, to use the x86 compiler when cross-compiling for x64, a command # line similar to the following could be used (all on one line): # # nmake /f Makefile.msc # "NCC=""%VCINSTALLDIR%\bin\cl.exe""" # USE_NATIVE_LIBPATHS=1 # !IFDEF NCC NCC = $(NCC:\\=\) !ELSE NCC = $(CC) !ENDIF # Check for the MSVC runtime library path macro. Othertise, this # value will default to the 'lib' directory underneath the MSVC # installation directory. # !IFNDEF NCRTLIBPATH NCRTLIBPATH = $(VCINSTALLDIR)\lib NCRTLIBPATH = $(NCRTLIBPATH:\\=\) !ENDIF # Check for the Platform SDK library path macro. Othertise, this # value will default to the 'lib' directory underneath the Windows # SDK installation directory (the environment variable used appears # to be available when using Visual C++ 2008 or later via the # command line). # !IFNDEF NSDKLIBPATH NSDKLIBPATH = $(WINDOWSSDKDIR)\lib NSDKLIBPATH = $(NSDKLIBPATH:\\=\) !ENDIF # C compiler and options for use in building executables that # will run on the platform that is doing the build. # BCC = $(NCC) -W3 |
︙ | ︙ |
Changes to tool/build-all-msvc.bat.
︙ | ︙ | |||
117 118 119 120 121 122 123 124 125 126 127 128 129 130 | REM REM NOTE: Set the TOOLPATH variable to contain all the directories where the REM external tools were found in the search above. REM SET TOOLPATH=%gawk.exe_PATH%;%tclsh85.exe_PATH% %_VECHO% ToolPath = '%TOOLPATH%' REM REM NOTE: This is the outer loop. There should be exactly one iteration per REM platform. REM FOR %%P IN (%PLATFORMS%) DO ( REM | > > > > > > > > > > | 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 | REM REM NOTE: Set the TOOLPATH variable to contain all the directories where the REM external tools were found in the search above. REM SET TOOLPATH=%gawk.exe_PATH%;%tclsh85.exe_PATH% %_VECHO% ToolPath = '%TOOLPATH%' REM REM NOTE: Check for MSVC 2012 because the Windows SDK directory handling is REM slightly different for that version. REM IF "%VisualStudioVersion%" == "11.0" ( SET SET_NSDKLIBPATH=1 ) ELSE ( CALL :fn_UnsetVariable SET_NSDKLIBPATH ) REM REM NOTE: This is the outer loop. There should be exactly one iteration per REM platform. REM FOR %%P IN (%PLATFORMS%) DO ( REM |
︙ | ︙ | |||
145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 | FOR /F "tokens=2* delims==" %%D IN ('SET PLATFORMNAME') DO ( REM REM NOTE: Attempt to clean the environment of all variables used by MSVC REM and/or Visual Studio. This block may need to be updated in the REM future to account for additional environment variables. REM CALL :fn_UnsetVariable DevEnvDir CALL :fn_UnsetVariable Framework35Version CALL :fn_UnsetVariable FrameworkDir CALL :fn_UnsetVariable FrameworkDir32 CALL :fn_UnsetVariable FrameworkVersion CALL :fn_UnsetVariable FrameworkVersion32 CALL :fn_UnsetVariable INCLUDE CALL :fn_UnsetVariable LIB CALL :fn_UnsetVariable LIBPATH CALL :fn_UnsetVariable Platform REM CALL :fn_UnsetVariable VCINSTALLDIR CALL :fn_UnsetVariable VSINSTALLDIR CALL :fn_UnsetVariable WindowsSdkDir REM REM NOTE: Reset the PATH here to the absolute bare minimum required. REM SET PATH=%TOOLPATH%;%SystemRoot%\System32;%SystemRoot% %_VECHO% Path = '%PATH%' | > > > > | 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 | FOR /F "tokens=2* delims==" %%D IN ('SET PLATFORMNAME') DO ( REM REM NOTE: Attempt to clean the environment of all variables used by MSVC REM and/or Visual Studio. This block may need to be updated in the REM future to account for additional environment variables. REM CALL :fn_UnsetVariable DevEnvDir CALL :fn_UnsetVariable ExtensionSdkDir CALL :fn_UnsetVariable Framework35Version CALL :fn_UnsetVariable FrameworkDir CALL :fn_UnsetVariable FrameworkDir32 CALL :fn_UnsetVariable FrameworkVersion CALL :fn_UnsetVariable FrameworkVersion32 CALL :fn_UnsetVariable FSHARPINSTALLDIR CALL :fn_UnsetVariable INCLUDE CALL :fn_UnsetVariable LIB CALL :fn_UnsetVariable LIBPATH CALL :fn_UnsetVariable Platform REM CALL :fn_UnsetVariable VCINSTALLDIR CALL :fn_UnsetVariable VSINSTALLDIR CALL :fn_UnsetVariable WindowsSdkDir CALL :fn_UnsetVariable WindowsSdkDir_35 CALL :fn_UnsetVariable WindowsSdkDir_old REM REM NOTE: Reset the PATH here to the absolute bare minimum required. REM SET PATH=%TOOLPATH%;%SystemRoot%\System32;%SystemRoot% %_VECHO% Path = '%PATH%' |
︙ | ︙ | |||
203 204 205 206 207 208 209 210 211 212 213 214 215 216 | REM IF NOT DEFINED __ECHO ( IF NOT DEFINED WindowsSdkDir ( ECHO Cannot build, Windows SDK not found for platform %%P. GOTO errors ) ) REM REM NOTE: Invoke NMAKE with the MSVC makefile to clean any stale build REM output from previous iterations of this loop and/or previous REM runs of this batch file, etc. REM %__ECHO% nmake -f Makefile.msc clean | > > > > > > > > > > > | 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 | REM IF NOT DEFINED __ECHO ( IF NOT DEFINED WindowsSdkDir ( ECHO Cannot build, Windows SDK not found for platform %%P. GOTO errors ) ) REM REM NOTE: When using MSVC 2012, the native SDK path cannot simply use REM the "lib" sub-directory beneath the location specified in the REM WindowsSdkDir environment variable because that location does REM not actually contain the necessary library files for x86. REM IF DEFINED SET_NSDKLIBPATH ( CALL :fn_SetVariable WindowsSdkDir NSDKLIBPATH CALL :fn_AppendVariable NSDKLIBPATH lib\win8\um\x86 ) REM REM NOTE: Invoke NMAKE with the MSVC makefile to clean any stale build REM output from previous iterations of this loop and/or previous REM runs of this batch file, etc. REM %__ECHO% nmake -f Makefile.msc clean |
︙ | ︙ | |||
302 303 304 305 306 307 308 309 310 311 312 313 314 315 | :fn_UnsetVariable IF NOT "%1" == "" ( SET %1= CALL :fn_ResetErrorLevel ) GOTO :EOF :usage ECHO. ECHO Usage: %~nx0 ^<binaryDirectory^> ECHO. GOTO errors | > > > > > > > > > > > > > | 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 | :fn_UnsetVariable IF NOT "%1" == "" ( SET %1= CALL :fn_ResetErrorLevel ) GOTO :EOF :fn_AppendVariable SET __ECHO_CMD=ECHO %%%1%% IF DEFINED %1 ( FOR /F "delims=" %%V IN ('%__ECHO_CMD%') DO ( SET %1=%%V%~2 ) ) ELSE ( SET %1=%~2 ) SET __ECHO_CMD= CALL :fn_ResetErrorLevel GOTO :EOF :usage ECHO. ECHO Usage: %~nx0 ^<binaryDirectory^> ECHO. GOTO errors |
︙ | ︙ |