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