SQLite
Check-in [99f27d642f]
Not logged in
Overview
SHA1 Hash:99f27d642fbaba02264a470977cde38c3a526d13
Date: 2012-10-28 19:35:55
User: mistachkin
Comment:Merge VSIX tooling and packaging enhancements to trunk.
Tags And Properties
Changes
hide diffs unified diffs patch

Changes to Makefile.in

940 rm -rf quota2a quota2b quota2c 940 rm -rf quota2a quota2b quota2c 941 rm -rf tsrc .target_source 941 rm -rf tsrc .target_source 942 rm -f tclsqlite3$(TEXE) 942 rm -f tclsqlite3$(TEXE) 943 rm -f testfixture$(TEXE) test.db 943 rm -f testfixture$(TEXE) test.db 944 rm -f sqlite3.dll sqlite3.lib sqlite3.exp sqlite3.def 944 rm -f sqlite3.dll sqlite3.lib sqlite3.exp sqlite3.def 945 rm -f sqlite3.c 945 rm -f sqlite3.c 946 rm -f sqlite3_analyzer$(TEXE) sqlite3_analyzer.c 946 rm -f sqlite3_analyzer$(TEXE) sqlite3_analyzer.c 947 rm -f sqlite-output.vsix | 947 rm -f sqlite-*-output.vsix 948 948 949 distclean: clean 949 distclean: clean 950 rm -f config.log config.status libtool Makefile sqlite3.pc 950 rm -f config.log config.status libtool Makefile sqlite3.pc 951 951 952 # 952 # 953 # Windows section 953 # Windows section 954 # 954 #

Changes to Makefile.msc

1243 del /Q .target_source 1243 del /Q .target_source 1244 del /Q tclsqlite3.exe tclsqlite3.exp 1244 del /Q tclsqlite3.exe tclsqlite3.exp 1245 del /Q testfixture.exe testfixture.exp test.db 1245 del /Q testfixture.exe testfixture.exp test.db 1246 del /Q sqlite3.dll sqlite3.lib sqlite3.exp sqlite3.def 1246 del /Q sqlite3.dll sqlite3.lib sqlite3.exp sqlite3.def 1247 del /Q sqlite3.c 1247 del /Q sqlite3.c 1248 del /Q sqlite3rc.h 1248 del /Q sqlite3rc.h 1249 del /Q sqlite3_analyzer.exe sqlite3_analyzer.exp sqlite3_analyzer.c 1249 del /Q sqlite3_analyzer.exe sqlite3_analyzer.exp sqlite3_analyzer.c 1250 del /Q sqlite-output.vsix | 1250 del /Q sqlite-*-output.vsix 1251 1251 1252 # Dynamic link library section. 1252 # Dynamic link library section. 1253 # 1253 # 1254 dll: sqlite3.dll 1254 dll: sqlite3.dll 1255 1255 1256 sqlite3.def: libsqlite3.lib 1256 sqlite3.def: libsqlite3.lib 1257 echo EXPORTS > sqlite3.def 1257 echo EXPORTS > sqlite3.def 1258 dumpbin /all libsqlite3.lib \ 1258 dumpbin /all libsqlite3.lib \ 1259 | $(NAWK) "/ 1 _?sqlite3_/ { sub(/^.* _?/,\"\");print }" \ 1259 | $(NAWK) "/ 1 _?sqlite3_/ { sub(/^.* _?/,\"\");print }" \ 1260 | sort >> sqlite3.def 1260 | sort >> sqlite3.def 1261 1261 1262 sqlite3.dll: $(LIBOBJ) $(LIBRESOBJS) sqlite3.def 1262 sqlite3.dll: $(LIBOBJ) $(LIBRESOBJS) sqlite3.def 1263 $(LD) $(LDFLAGS) $(LTLINKOPTS) $(LTLIBPATHS) /DLL /DEF:sqlite3.def /OUT: 1263 $(LD) $(LDFLAGS) $(LTLINKOPTS) $(LTLIBPATHS) /DLL /DEF:sqlite3.def /OUT:

Changes to main.mk

615 rm -f testloadext.dll libtestloadext.so 615 rm -f testloadext.dll libtestloadext.so 616 rm -f amalgamation-testfixture amalgamation-testfixture.exe 616 rm -f amalgamation-testfixture amalgamation-testfixture.exe 617 rm -f fts3-testfixture fts3-testfixture.exe 617 rm -f fts3-testfixture fts3-testfixture.exe 618 rm -f testfixture testfixture.exe 618 rm -f testfixture testfixture.exe 619 rm -f threadtest3 threadtest3.exe 619 rm -f threadtest3 threadtest3.exe 620 rm -f sqlite3.c fts?amal.c tclsqlite3.c 620 rm -f sqlite3.c fts?amal.c tclsqlite3.c 621 rm -f sqlite3_analyzer sqlite3_analyzer.exe sqlite3_analyzer.c 621 rm -f sqlite3_analyzer sqlite3_analyzer.exe sqlite3_analyzer.c 622 rm -f sqlite-output.vsix | 622 rm -f sqlite-*-output.vsix

Changes to tool/build-all-msvc.bat

147 %_VECHO% Configurations = '%CONFIGURATIONS%' 147 %_VECHO% Configurations = '%CONFIGURATIONS%' 148 148 149 REM 149 REM 150 REM NOTE: Setup environment variables to translate between the MSVC platform 150 REM NOTE: Setup environment variables to translate between the MSVC platform 151 REM names and the names to be used for the platform-specific binary 151 REM names and the names to be used for the platform-specific binary 152 REM directories. 152 REM directories. 153 REM 153 REM > 154 SET amd64_NAME=x64 > 155 SET arm_NAME=ARM > 156 SET x64_NAME=x64 154 SET x86_NAME=x86 157 SET x86_NAME=x86 155 SET x86_amd64_NAME=x64 158 SET x86_amd64_NAME=x64 156 SET x86_arm_NAME=ARM 159 SET x86_arm_NAME=ARM > 160 SET x86_x64_NAME=x64 157 161 > 162 %_VECHO% amd64_Name = '%amd64_NAME%' > 163 %_VECHO% arm_Name = '%arm_NAME%' > 164 %_VECHO% x64_Name = '%x64_NAME%' 158 %_VECHO% x86_Name = '%x86_NAME%' 165 %_VECHO% x86_Name = '%x86_NAME%' 159 %_VECHO% x86_amd64_Name = '%x86_amd64_NAME%' 166 %_VECHO% x86_amd64_Name = '%x86_amd64_NAME%' 160 %_VECHO% x86_arm_Name = '%x86_arm_NAME%' 167 %_VECHO% x86_arm_Name = '%x86_arm_NAME%' > 168 %_VECHO% x86_x64_Name = '%x86_x64_NAME%' 161 169 162 REM 170 REM 163 REM NOTE: Check for the external tools needed during the build process ^(i.e. 171 REM NOTE: Check for the external tools needed during the build process ^(i.e. 164 REM those that do not get compiled as part of the build process itself^) 172 REM those that do not get compiled as part of the build process itself^) 165 REM along the PATH. 173 REM along the PATH. 166 REM 174 REM 167 FOR %%T IN (gawk.exe tclsh85.exe) DO ( 175 FOR %%T IN (gawk.exe tclsh85.exe) DO ( ................................................................................................................................................................................ 206 IF NOT DEFINED NSDKLIBPATH ( 214 IF NOT DEFINED NSDKLIBPATH ( 207 SET SET_NSDKLIBPATH=1 215 SET SET_NSDKLIBPATH=1 208 ) 216 ) 209 ) ELSE ( 217 ) ELSE ( 210 CALL :fn_UnsetVariable SET_NSDKLIBPATH 218 CALL :fn_UnsetVariable SET_NSDKLIBPATH 211 ) 219 ) 212 220 > 221 REM > 222 REM NOTE: Check if this is the Windows Phone SDK. If so, a different batch > 223 REM file is necessary to setup the build environment. Since the variable > 224 REM values involved here may contain parenthesis, using GOTO instead of > 225 REM an IF block is required. > 226 REM > 227 IF DEFINED WindowsPhoneKitDir GOTO set_vcvarsall_phone > 228 SET VCVARSALL=%VCINSTALLDIR%\vcvarsall.bat > 229 GOTO set_vcvarsall_done > 230 :set_vcvarsall_phone > 231 SET VCVARSALL=%VCINSTALLDIR%\WPSDK\WP80\vcvarsphoneall.bat > 232 :set_vcvarsall_done > 233 213 REM 234 REM 214 REM NOTE: This is the outer loop. There should be exactly one iteration per 235 REM NOTE: This is the outer loop. There should be exactly one iteration per 215 REM platform. 236 REM platform. 216 REM 237 REM 217 FOR %%P IN (%PLATFORMS%) DO ( 238 FOR %%P IN (%PLATFORMS%) DO ( 218 REM 239 REM 219 REM NOTE: Using the MSVC platform name, lookup the simpler platform name to 240 REM NOTE: Using the MSVC platform name, lookup the simpler platform name to ................................................................................................................................................................................ 246 CALL :fn_UnsetVariable FSHARPINSTALLDIR 267 CALL :fn_UnsetVariable FSHARPINSTALLDIR 247 CALL :fn_UnsetVariable INCLUDE 268 CALL :fn_UnsetVariable INCLUDE 248 CALL :fn_UnsetVariable LIB 269 CALL :fn_UnsetVariable LIB 249 CALL :fn_UnsetVariable LIBPATH 270 CALL :fn_UnsetVariable LIBPATH 250 CALL :fn_UnsetVariable Platform 271 CALL :fn_UnsetVariable Platform 251 REM CALL :fn_UnsetVariable VCINSTALLDIR 272 REM CALL :fn_UnsetVariable VCINSTALLDIR 252 CALL :fn_UnsetVariable VSINSTALLDIR 273 CALL :fn_UnsetVariable VSINSTALLDIR > 274 CALL :fn_UnsetVariable WindowsPhoneKitDir 253 CALL :fn_UnsetVariable WindowsSdkDir 275 CALL :fn_UnsetVariable WindowsSdkDir 254 CALL :fn_UnsetVariable WindowsSdkDir_35 276 CALL :fn_UnsetVariable WindowsSdkDir_35 255 CALL :fn_UnsetVariable WindowsSdkDir_old 277 CALL :fn_UnsetVariable WindowsSdkDir_old 256 278 257 REM 279 REM 258 REM NOTE: Reset the PATH here to the absolute bare minimum required. 280 REM NOTE: Reset the PATH here to the absolute bare minimum required. 259 REM 281 REM ................................................................................................................................................................................ 288 REM platform to the platform-specific directory beneath the 310 REM platform to the platform-specific directory beneath the 289 REM binary directory. 311 REM binary directory. 290 REM 312 REM 291 "%ComSpec%" /C ( 313 "%ComSpec%" /C ( 292 REM 314 REM 293 REM NOTE: Attempt to setup the MSVC environment for this platform. 315 REM NOTE: Attempt to setup the MSVC environment for this platform. 294 REM 316 REM 295 %__ECHO3% CALL "%VCINSTALLDIR%\vcvarsall.bat" %%P | 317 %__ECHO3% CALL "%VCVARSALL%" %%P 296 318 297 IF ERRORLEVEL 1 ( 319 IF ERRORLEVEL 1 ( 298 ECHO Failed to call "%VCINSTALLDIR%\vcvarsall.bat" for platform %%P. | 320 ECHO Failed to call "%VCVARSALL%" for platform %%P. 299 GOTO errors 321 GOTO errors 300 ) 322 ) 301 323 302 REM 324 REM 303 REM NOTE: If this batch file is not running in "what-if" mode, check to 325 REM NOTE: If this batch file is not running in "what-if" mode, check to 304 REM be sure we were actually able to setup the MSVC environment 326 REM be sure we were actually able to setup the MSVC environment 305 REM as current versions of their official batch file do not set 327 REM as current versions of their official batch file do not set 306 REM the exit code upon failure. 328 REM the exit code upon failure. 307 REM 329 REM 308 IF NOT DEFINED __ECHO ( | 330 IF NOT DEFINED __ECHO3 ( > 331 IF NOT DEFINED WindowsPhoneKitDir ( 309 IF NOT DEFINED WindowsSdkDir ( | 332 IF NOT DEFINED WindowsSdkDir ( 310 ECHO Cannot build, Windows SDK not found for platform %%P. | 333 ECHO Cannot build, Windows SDK not found for platform %%P. 311 GOTO errors | 334 GOTO errors > 335 ) 312 ) 336 ) 313 ) 337 ) 314 338 315 REM 339 REM 316 REM NOTE: When using MSVC 2012, the native SDK path cannot simply use 340 REM NOTE: When using MSVC 2012, the native SDK path cannot simply use 317 REM the "lib" sub-directory beneath the location specified in the 341 REM the "lib" sub-directory beneath the location specified in the 318 REM WindowsSdkDir environment variable because that location does 342 REM WindowsSdkDir environment variable because that location does 319 REM not actually contain the necessary library files for x86. 343 REM not actually contain the necessary library files for x86. 320 REM This must be done for each iteration because it relies upon 344 REM This must be done for each iteration because it relies upon 321 REM the WindowsSdkDir environment variable being set by the batch 345 REM the WindowsSdkDir environment variable being set by the batch 322 REM file used to setup the MSVC environment. 346 REM file used to setup the MSVC environment. 323 REM 347 REM 324 IF DEFINED SET_NSDKLIBPATH ( 348 IF DEFINED SET_NSDKLIBPATH ( > 349 IF DEFINED WindowsPhoneKitDir ( > 350 CALL :fn_CopyVariable WindowsPhoneKitDir NSDKLIBPATH > 351 CALL :fn_AppendVariable NSDKLIBPATH \lib\x86 > 352 ) ELSE IF DEFINED WindowsSdkDir ( 325 CALL :fn_CopyVariable WindowsSdkDir NSDKLIBPATH | 353 CALL :fn_CopyVariable WindowsSdkDir NSDKLIBPATH 326 CALL :fn_AppendVariable NSDKLIBPATH \lib\win8\um\x86 | 354 CALL :fn_AppendVariable NSDKLIBPATH \lib\win8\um\x86 > 355 ) 327 ) 356 ) 328 357 329 REM 358 REM 330 REM NOTE: Unless prevented from doing so, invoke NMAKE with the MSVC 359 REM NOTE: Unless prevented from doing so, invoke NMAKE with the MSVC 331 REM makefile to clean any stale build output from previous 360 REM makefile to clean any stale build output from previous 332 REM iterations of this loop and/or previous runs of this batch 361 REM iterations of this loop and/or previous runs of this batch 333 REM file, etc. 362 REM file, etc.

Changes to tool/mkvsix.tcl

55 # 55 # 56 # The above directory tree organization is performed automatically if the 56 # The above directory tree organization is performed automatically if the 57 # "tool\build-all-msvc.bat" batch script is used to build the binary files 57 # "tool\build-all-msvc.bat" batch script is used to build the binary files 58 # to be packaged. 58 # to be packaged. 59 # 59 # 60 # USAGE 60 # USAGE 61 # 61 # > 62 # The first argument to this script is required and must be the name of the > 63 # top-level directory containing the directories and files organized into a > 64 # tree as described in item 6 of the PREREQUISITES section, above. The second > 65 # argument is optional and if present must contain the name of the directory > 66 # containing the root of the source tree for SQLite. The third argument is > 67 # optional and if present must contain the flavor the VSIX package to build. > 68 # Currently, the only supported package flavors are "WinRT" and "WP80". The > 69 # fourth argument is optional and if present must be a string containing a list > 70 # of platforms to include in the VSIX package. The format of the platform list > 71 # string is "platform1,platform2,platform3". Typically, when on Windows, this 62 # Typically, when on Windows, this script is executed using commands similar to | 72 # script is executed using commands similar to the following from a normal 63 # the following (from a normal Windows command prompt window): | 73 # Windows command prompt: 64 # 74 # 65 # CD /D C:\dev\sqlite\core 75 # CD /D C:\dev\sqlite\core 66 # tclsh85 tool\mkvsix.tcl C:\Temp 76 # tclsh85 tool\mkvsix.tcl C:\Temp 67 # 77 # 68 # In the example above, "C:\dev\sqlite\core" represents the root of the source 78 # In the example above, "C:\dev\sqlite\core" represents the root of the source 69 # tree for SQLite and "C:\Temp" represents the top-level directory containing 79 # tree for SQLite and "C:\Temp" represents the top-level directory containing 70 # the executable and other compiled binary files, organized into a directory 80 # the executable and other compiled binary files, organized into a directory ................................................................................................................................................................................ 85 if {[string length $error] > 0} then { 95 if {[string length $error] > 0} then { 86 puts stdout $error 96 puts stdout $error 87 if {!$usage} then {exit 1} 97 if {!$usage} then {exit 1} 88 } 98 } 89 99 90 puts stdout "usage:\ 100 puts stdout "usage:\ 91 [file tail [info nameofexecutable]]\ 101 [file tail [info nameofexecutable]]\ 92 [file tail [info script]] <binaryDirectory> \[sourceDirectory\]" | 102 [file tail [info script]] <binaryDirectory> \[sourceDirectory\]\ > 103 \[packageFlavor\] \[platformNames\]" 93 104 94 exit 1 105 exit 1 95 } 106 } 96 107 97 proc getEnvironmentVariable { name } { 108 proc getEnvironmentVariable { name } { 98 # 109 # 99 # NOTE: Returns the value of the specified environment variable or an empty 110 # NOTE: Returns the value of the specified environment variable or an empty ................................................................................................................................................................................ 158 close $file_id 169 close $file_id 159 return "" 170 return "" 160 } 171 } 161 172 162 proc substFile { fileName } { 173 proc substFile { fileName } { 163 # 174 # 164 # NOTE: Performs all Tcl command, variable, and backslash substitutions in 175 # NOTE: Performs all Tcl command, variable, and backslash substitutions in 165 # the specified file and then re-writes the contents of that same file | 176 # the specified file and then rewrites the contents of that same file 166 # with the substituted data. 177 # with the substituted data. 167 # 178 # 168 return [writeFile $fileName [uplevel 1 [list subst [readFile $fileName]]]] 179 return [writeFile $fileName [uplevel 1 [list subst [readFile $fileName]]]] 169 } 180 } 170 181 171 proc replaceBuildAndPlatform { fileName buildName platformName } { | 182 proc replaceFileNameTokens { fileName name buildName platformName } { 172 # 183 # 173 # NOTE: Returns the specified file name containing the platform name instead 184 # NOTE: Returns the specified file name containing the platform name instead 174 # of platform placeholder tokens. 185 # of platform placeholder tokens. 175 # 186 # 176 return [string map [list <build> $buildName <platform> $platformName] \ | 187 return [string map [list <build> $buildName <platform> $platformName \ 177 $fileName] | 188 <name> $name] $fileName] 178 } 189 } 179 190 > 191 # > 192 # NOTE: This is the entry point for this script. > 193 # 180 set script [file normalize [info script]] 194 set script [file normalize [info script]] 181 195 182 if {[string length $script] == 0} then { 196 if {[string length $script] == 0} then { 183 fail "script file currently being evaluated is unknown" true 197 fail "script file currently being evaluated is unknown" true 184 } 198 } 185 199 186 set path [file dirname $script] 200 set path [file dirname $script] ................................................................................................................................................................................ 188 202 189 ############################################################################### 203 ############################################################################### 190 204 191 # 205 # 192 # NOTE: Process and verify all the command line arguments. 206 # NOTE: Process and verify all the command line arguments. 193 # 207 # 194 set argc [llength $argv] 208 set argc [llength $argv] 195 if {$argc != 1 && $argc != 2} then {fail} | 209 if {$argc < 1 || $argc > 4} then {fail} 196 210 197 set binaryDirectory [lindex $argv 0] 211 set binaryDirectory [lindex $argv 0] 198 212 199 if {[string length $binaryDirectory] == 0} then { 213 if {[string length $binaryDirectory] == 0} then { 200 fail "invalid binary directory" 214 fail "invalid binary directory" 201 } 215 } 202 216 203 if {![file exists $binaryDirectory] || \ 217 if {![file exists $binaryDirectory] || \ 204 ![file isdirectory $binaryDirectory]} then { 218 ![file isdirectory $binaryDirectory]} then { 205 fail "binary directory does not exist" 219 fail "binary directory does not exist" 206 } 220 } 207 221 208 if {$argc == 2} then { | 222 if {$argc >= 2} then { 209 set sourceDirectory [lindex $argv 1] 223 set sourceDirectory [lindex $argv 1] 210 } else { 224 } else { 211 # 225 # 212 # NOTE: Assume that the source directory is the parent directory of the one 226 # NOTE: Assume that the source directory is the parent directory of the one 213 # that contains this script file. 227 # that contains this script file. 214 # 228 # 215 set sourceDirectory [file dirname $path] 229 set sourceDirectory [file dirname $path] ................................................................................................................................................................................ 219 fail "invalid source directory" 233 fail "invalid source directory" 220 } 234 } 221 235 222 if {![file exists $sourceDirectory] || \ 236 if {![file exists $sourceDirectory] || \ 223 ![file isdirectory $sourceDirectory]} then { 237 ![file isdirectory $sourceDirectory]} then { 224 fail "source directory does not exist" 238 fail "source directory does not exist" 225 } 239 } > 240 > 241 if {$argc >= 3} then { > 242 set packageFlavor [lindex $argv 2] > 243 } else { > 244 # > 245 # NOTE: Assume the package flavor is WinRT. > 246 # > 247 set packageFlavor WinRT > 248 } > 249 > 250 if {[string length $packageFlavor] == 0} then { > 251 fail "invalid package flavor" > 252 } > 253 > 254 if {[string equal -nocase $packageFlavor WinRT]} then { > 255 set shortName SQLite.WinRT > 256 set displayName "SQLite for Windows Runtime" > 257 set targetPlatformIdentifier Windows > 258 set extraSdkPath "" > 259 set extraFileListAttributes [appendArgs \ > 260 "\r\n " {AppliesTo="WindowsAppContainer"} \ > 261 "\r\n " {DependsOn="Microsoft.VCLibs, version=11.0"}] > 262 } elseif {[string equal -nocase $packageFlavor WP80]} then { > 263 set shortName SQLite.WP80 > 264 set displayName "SQLite for Windows Phone" > 265 set targetPlatformIdentifier "Windows Phone" > 266 set extraSdkPath "\\..\\$targetPlatformIdentifier" > 267 set extraFileListAttributes "" > 268 } else { > 269 fail "unsupported package flavor, must be \"WinRT\" or \"WP80\"" > 270 } > 271 > 272 if {$argc >= 4} then { > 273 set platformNames [list] > 274 > 275 foreach platformName [split [lindex $argv 3] ", "] { > 276 if {[string length $platformName] > 0} then { > 277 lappend platformNames $platformName > 278 } > 279 } > 280 } 226 281 227 ############################################################################### 282 ############################################################################### 228 283 229 # 284 # 230 # NOTE: Evaluate the user-specific customizations file, if it exists. 285 # NOTE: Evaluate the user-specific customizations file, if it exists. 231 # 286 # 232 set userFile [file join $path [appendArgs \ 287 set userFile [file join $path [appendArgs \ ................................................................................................................................................................................ 243 298 244 if {![file exists $templateFile] || \ 299 if {![file exists $templateFile] || \ 245 ![file isfile $templateFile]} then { 300 ![file isfile $templateFile]} then { 246 fail [appendArgs "template file \"" $templateFile "\" does not exist"] 301 fail [appendArgs "template file \"" $templateFile "\" does not exist"] 247 } 302 } 248 303 249 set currentDirectory [pwd] 304 set currentDirectory [pwd] 250 set outputFile [file join $currentDirectory sqlite-output.vsix] | 305 set outputFile [file join $currentDirectory [appendArgs sqlite- \ > 306 $packageFlavor -output.vsix]] 251 307 252 if {[file exists $outputFile]} then { 308 if {[file exists $outputFile]} then { 253 fail [appendArgs "output file \"" $outputFile "\" already exists"] 309 fail [appendArgs "output file \"" $outputFile "\" already exists"] 254 } 310 } 255 311 256 ############################################################################### 312 ############################################################################### 257 313 ................................................................................................................................................................................ 319 fail [appendArgs "cannot locate SQLITE_VERSION value in \"" \ 375 fail [appendArgs "cannot locate SQLITE_VERSION value in \"" \ 320 [file join $sourceDirectory sqlite3.h] \"] 376 [file join $sourceDirectory sqlite3.h] \"] 321 } 377 } 322 378 323 ############################################################################### 379 ############################################################################### 324 380 325 # 381 # 326 # NOTE: Setup all the master file list data. This includes the source and | 382 # NOTE: Setup all the master file list data. This includes the source file 327 # destination file names, build-neutral boolean flags, platform-neutral | 383 # names, the destination file names, and the file processing flags. The 328 # boolean flags, and the dynamic content (subst) boolean flags. There | 384 # possible file processing flags are: 329 # is also one set of boolean flags per build configuration, currently < > 385 # 330 # "Debug" and "Retail", that control which files are skipped for it. | 386 # "buildNeutral" -- This flag indicates the file location and content do > 387 # not depend on the build configuration. 331 # 388 # > 389 # "platformNeutral" -- This flag indicates the file location and content > 390 # do not depend on the build platform. > 391 # > 392 # "subst" -- This flag indicates that the file contains dynamic textual > 393 # content that needs to be processed using [subst] prior to > 394 # packaging the file into the final VSIX package. The primary > 395 # use of this flag is to insert the name of the VSIX package, > 396 # some package flavor-specific value, or the SQLite version > 397 # into a file. > 398 # > 399 # "noDebug" -- This flag indicates that the file should be skipped when > 400 # processing the debug build. > 401 # > 402 # "noRetail" -- This flag indicates that the file should be skipped when > 403 # processing the retail build. > 404 # > 405 # "move" -- This flag indicates that the file should be moved from the > 406 # source to the destination instead of being copied. > 407 # > 408 # This file metadata may be overridden, either in whole or in part, via > 409 # the user-specific customizations file. > 410 # 332 if {![info exists fileNames(source)]} then { 411 if {![info exists fileNames(source)]} then { 333 set fileNames(source) [list "" "" "" \ | 412 set fileNames(source) [list "" "" \ > 413 [file join $stagingDirectory DesignTime <build> <platform> sqlite3.props] \ 334 [file join $sourceDirectory sqlite3.h] \ | 414 [file join $sourceDirectory sqlite3.h] \ 335 [file join $binaryDirectory <build> <platform> sqlite3.lib] \ | 415 [file join $binaryDirectory <build> <platform> sqlite3.lib] \ 336 [file join $binaryDirectory <build> <platform> sqlite3.dll]] | 416 [file join $binaryDirectory <build> <platform> sqlite3.dll]] 337 417 338 if {![info exists no(symbols)]} then { 418 if {![info exists no(symbols)]} then { 339 lappend fileNames(source) \ 419 lappend fileNames(source) \ 340 [file join $binaryDirectory <build> <platform> sqlite3.pdb] 420 [file join $binaryDirectory <build> <platform> sqlite3.pdb] 341 } 421 } 342 } 422 } 343 423 344 if {![info exists fileNames(destination)]} then { 424 if {![info exists fileNames(destination)]} then { 345 set fileNames(destination) [list \ 425 set fileNames(destination) [list \ 346 [file join $stagingDirectory extension.vsixmanifest] \ | 426 [file join $stagingDirectory extension.vsixmanifest] \ 347 [file join $stagingDirectory SDKManifest.xml] \ | 427 [file join $stagingDirectory SDKManifest.xml] \ 348 [file join $stagingDirectory DesignTime <build> <platform> \ | 428 [file join $stagingDirectory DesignTime <build> <platform> <name>.props] \ 349 SQLite.WinRT.props] \ < 350 [file join $stagingDirectory DesignTime <build> <platform> sqlite3.h] \ | 429 [file join $stagingDirectory DesignTime <build> <platform> sqlite3.h] \ 351 [file join $stagingDirectory DesignTime <build> <platform> sqlite3.lib] \ | 430 [file join $stagingDirectory DesignTime <build> <platform> sqlite3.lib] \ 352 [file join $stagingDirectory Redist <build> <platform> sqlite3.dll]] | 431 [file join $stagingDirectory Redist <build> <platform> sqlite3.dll]] 353 432 354 if {![info exists no(symbols)]} then { 433 if {![info exists no(symbols)]} then { 355 lappend fileNames(destination) \ 434 lappend fileNames(destination) \ 356 [file join $stagingDirectory Redist <build> <platform> sqlite3.pdb] 435 [file join $stagingDirectory Redist <build> <platform> sqlite3.pdb] 357 } 436 } 358 } 437 } 359 438 360 if {![info exists fileNames(buildNeutral)]} then { | 439 if {![info exists fileNames(flags)]} then { 361 set fileNames(buildNeutral) [list 1 1 1 1 0 0] | 440 set fileNames(flags) [list \ 362 < > 441 [list buildNeutral platformNeutral subst] \ 363 if {![info exists no(symbols)]} then { | 442 [list buildNeutral platformNeutral subst] \ 364 lappend fileNames(buildNeutral) 0 | 443 [list buildNeutral platformNeutral subst move] \ 365 } < 366 } < 367 < 368 if {![info exists fileNames(platformNeutral)]} then { < 369 set fileNames(platformNeutral) [list 1 1 1 1 0 0] < 370 < 371 if {![info exists no(symbols)]} then { < 372 lappend fileNames(platformNeutral) 0 | 444 [list buildNeutral platformNeutral] \ > 445 [list] [list] [list noRetail]] 373 } | 446 374 } < 375 < 376 if {![info exists fileNames(subst)]} then { < 377 set fileNames(subst) [list 1 1 1 0 0 0] < 378 < 379 if {![info exists no(symbols)]} then { 447 if {![info exists no(symbols)]} then { 380 lappend fileNames(subst) 0 | 448 lappend fileNames(flags) [list noRetail] 381 } < 382 } < 383 < 384 if {![info exists fileNames(noDebug)]} then { < 385 set fileNames(noDebug) [list 0 0 0 0 0 0] < 386 < 387 if {![info exists no(symbols)]} then { < 388 lappend fileNames(noDebug) 0 < 389 } < 390 } < 391 < 392 if {![info exists fileNames(noRetail)]} then { < 393 set fileNames(noRetail) [list 0 0 0 0 0 0] < 394 < 395 if {![info exists no(symbols)]} then { < 396 lappend fileNames(noRetail) 1 < 397 } 449 } 398 } 450 } 399 451 400 ############################################################################### 452 ############################################################################### 401 453 402 # 454 # 403 # NOTE: Setup the list of builds supported by this script. | 455 # NOTE: Setup the list of builds supported by this script. These may be > 456 # overridden via the user-specific customizations file. 404 # 457 # 405 if {![info exists buildNames]} then { 458 if {![info exists buildNames]} then { 406 set buildNames [list Debug Retail] 459 set buildNames [list Debug Retail] 407 } 460 } 408 461 409 ############################################################################### 462 ############################################################################### 410 463 411 # 464 # 412 # NOTE: Setup the list of platforms supported by this script. | 465 # NOTE: Setup the list of platforms supported by this script. These may be > 466 # overridden via the command line or the user-specific customizations > 467 # file. 413 # 468 # 414 if {![info exists platformNames]} then { 469 if {![info exists platformNames]} then { 415 set platformNames [list x86 x64 ARM] 470 set platformNames [list x86 x64 ARM] 416 } 471 } 417 472 418 ############################################################################### 473 ############################################################################### 419 474 420 # 475 # 421 # NOTE: Make sure the staging directory exists, creating it if necessary. 476 # NOTE: Make sure the staging directory exists, creating it if necessary. 422 # 477 # 423 file mkdir $stagingDirectory 478 file mkdir $stagingDirectory 424 479 425 # 480 # 426 # NOTE: Build the Tcl command used to extract the template package to the | 481 # NOTE: Build the Tcl command used to extract the template VSIX package to 427 # staging directory. | 482 # the staging directory. 428 # 483 # 429 set extractCommand [list exec -- $unzip $templateFile -d $stagingDirectory] 484 set extractCommand [list exec -- $unzip $templateFile -d $stagingDirectory] 430 485 431 # 486 # 432 # NOTE: Extract the template package to the staging directory. | 487 # NOTE: Extract the template VSIX package to the staging directory. 433 # 488 # 434 eval $extractCommand 489 eval $extractCommand 435 490 436 ############################################################################### 491 ############################################################################### 437 492 438 # 493 # 439 # NOTE: Process each file in the master file list. There are actually seven | 494 # NOTE: Process each file in the master file list. There are actually three 440 # parallel lists that contain the source file names, the destination file 495 # parallel lists that contain the source file names, the destination file 441 # names, the build-neutral flags, the platform-neutral flags, the | 496 # names, and the file processing flags. If the "buildNeutral" flag is 442 # use-subst flags, the no-debug flags, and the no-retail flags. If the | 497 # present, the file location and content do not depend on the build 443 # platform-neutral flag is non-zero, the file is not platform-specific. | 498 # configuration and "CommonConfiguration" will be used in place of the 444 # If the build-neutral flag is non-zero, the file is not build-specific. | 499 # build configuration name. If the "platformNeutral" flag is present, 445 # If the use-subst flag is non-zero, the file is considered to be a text | 500 # the file location and content do not depend on the build platform and 446 # file that may contain Tcl variable and/or command replacements, to be | 501 # "neutral" will be used in place of the build platform name. If the > 502 # "subst" flag is present, the file is assumed to be a text file that may > 503 # contain Tcl variable, command, and backslash replacements, to be 447 # dynamically replaced during processing. If the no-debug flag is | 504 # dynamically replaced during processing using the Tcl [subst] command. > 505 # If the "noDebug" flag is present, the file will be skipped when > 506 # processing for the debug build. If the "noRetail" flag is present, the 448 # non-zero, the file will be skipped when processing for the debug build. | 507 # file will be skipped when processing for the retail build. If the 449 # If the no-retail flag is non-zero, the file will be skipped when < > 508 # "move" flag is present, the source file will be deleted after it is 450 # processing for the retail build. If the source file name is an empty | 509 # copied to the destination file. If the source file name is an empty 451 # string, then the destination file name will be assumed to already exist | 510 # string, the destination file name will be assumed to already exist in 452 # in the staging directory and will not be copied; however, dynamic | 511 # the staging directory and will not be copied; however, Tcl variable, 453 # replacements may still be performed on the destination file prior to | 512 # command, and backslash replacements may still be performed on the 454 # the package being re-zipped. < > 513 # destination file prior to the final VSIX package being built if the > 514 # "subst" flag is present. 455 # 515 # 456 foreach sourceFileName $fileNames(source) \ 516 foreach sourceFileName $fileNames(source) \ 457 destinationFileName $fileNames(destination) \ 517 destinationFileName $fileNames(destination) \ 458 buildNeutral $fileNames(buildNeutral) \ < 459 platformNeutral $fileNames(platformNeutral) \ < 460 useSubst $fileNames(subst) \ | 518 fileFlags $fileNames(flags) { 461 noDebug $fileNames(noDebug) \ < 462 noRetail $fileNames(noRetail) { < > 519 # > 520 # NOTE: Process the file flags into separate boolean variables that may be > 521 # used within the loop. > 522 # > 523 set isBuildNeutral [expr {[lsearch $fileFlags buildNeutral] != -1}] > 524 set isPlatformNeutral [expr {[lsearch $fileFlags platformNeutral] != -1}] > 525 set isMove [expr {[lsearch $fileFlags move] != -1}] > 526 set useSubst [expr {[lsearch $fileFlags subst] != -1}] > 527 463 # 528 # 464 # NOTE: If the current file is build-neutral, then only one build will 529 # NOTE: If the current file is build-neutral, then only one build will 465 # be processed for it, namely "CommonConfiguration"; otherwise, each 530 # be processed for it, namely "CommonConfiguration"; otherwise, each 466 # supported build will be processed for it individually. 531 # supported build will be processed for it individually. 467 # 532 # 468 foreach buildName \ 533 foreach buildName \ 469 [expr {$buildNeutral ? [list CommonConfiguration] : $buildNames}] { | 534 [expr {$isBuildNeutral ? [list CommonConfiguration] : $buildNames}] { 470 # 535 # 471 # NOTE: Should the current file be skipped for this build? 536 # NOTE: Should the current file be skipped for this build? 472 # 537 # 473 if {[info exists no${buildName}] && [set no${buildName}]} then { | 538 if {[lsearch $fileFlags no${buildName}] != -1} then { 474 continue 539 continue 475 } 540 } 476 541 477 # 542 # 478 # NOTE: If the current file is platform-neutral, then only one platform 543 # NOTE: If the current file is platform-neutral, then only one platform 479 # will be processed for it, namely "neutral"; otherwise, each 544 # will be processed for it, namely "neutral"; otherwise, each 480 # supported platform will be processed for it individually. 545 # supported platform will be processed for it individually. 481 # 546 # 482 foreach platformName \ 547 foreach platformName \ 483 [expr {$platformNeutral ? [list neutral] : $platformNames}] { | 548 [expr {$isPlatformNeutral ? [list neutral] : $platformNames}] { 484 # 549 # 485 # NOTE: Use the actual platform name in the destination file name. 550 # NOTE: Use the actual platform name in the destination file name. 486 # 551 # 487 set newDestinationFileName [replaceBuildAndPlatform \ | 552 set newDestinationFileName [replaceFileNameTokens $destinationFileName \ 488 $destinationFileName $buildName $platformName] | 553 $shortName $buildName $platformName] 489 554 490 # 555 # 491 # NOTE: Does the source file need to be copied to the destination file? 556 # NOTE: Does the source file need to be copied to the destination file? 492 # 557 # 493 if {[string length $sourceFileName] > 0} then { 558 if {[string length $sourceFileName] > 0} then { 494 # 559 # 495 # NOTE: First, make sure the destination directory exists. 560 # NOTE: First, make sure the destination directory exists. 496 # 561 # 497 file mkdir [file dirname $newDestinationFileName] 562 file mkdir [file dirname $newDestinationFileName] 498 563 499 # 564 # 500 # NOTE: Then, copy the source file to the destination file verbatim. 565 # NOTE: Then, copy the source file to the destination file verbatim. 501 # 566 # 502 file copy [replaceBuildAndPlatform $sourceFileName $buildName \ | 567 set newSourceFileName [replaceFileNameTokens $sourceFileName \ > 568 $shortName $buildName $platformName] > 569 503 $platformName] $newDestinationFileName | 570 file copy $newSourceFileName $newDestinationFileName > 571 > 572 # > 573 # NOTE: If this is a move instead of a copy, delete the source file > 574 # now. > 575 # > 576 if {$isMove} then { > 577 file delete $newSourceFileName > 578 } 504 } 579 } 505 580 506 # 581 # 507 # NOTE: Does the destination file contain dynamic replacements that must 582 # NOTE: Does the destination file contain dynamic replacements that must 508 # be processed now? 583 # be processed now? 509 # 584 # 510 if {$useSubst} then { 585 if {$useSubst} then { ................................................................................................................................................................................ 524 # NOTE: Change the current directory to the staging directory so that the 599 # NOTE: Change the current directory to the staging directory so that the 525 # external archive building tool can pickup the necessary files using 600 # external archive building tool can pickup the necessary files using 526 # relative paths. 601 # relative paths. 527 # 602 # 528 cd $stagingDirectory 603 cd $stagingDirectory 529 604 530 # 605 # 531 # NOTE: Build the Tcl command used to archive the final package in the | 606 # NOTE: Build the Tcl command used to archive the final VSIX package in the 532 # output directory. 607 # output directory. 533 # 608 # 534 set archiveCommand [list exec -- $zip -r $outputFile *] 609 set archiveCommand [list exec -- $zip -r $outputFile *] 535 610 536 # 611 # 537 # NOTE: Build the final package archive in the output directory. | 612 # NOTE: Build the final VSIX package archive in the output directory. 538 # 613 # 539 eval $archiveCommand 614 eval $archiveCommand 540 615 541 # 616 # 542 # NOTE: Change back to the previously saved current directory. 617 # NOTE: Change back to the previously saved current directory. 543 # 618 # 544 cd $currentDirectory 619 cd $currentDirectory

Changes to tool/win/sqlite.vsix

cannot compute difference between binary files