mirror of
https://github.com/sqlite/sqlite.git
synced 2025-07-29 08:01:23 +03:00
Modify metadata for the VSIX package and add tooling support for PDBs.
FossilOrigin-Name: 12cbf6a9343ffb24065f77f679e50b67bc2e43f9
This commit is contained in:
@ -147,6 +147,19 @@ if {![file exists $sourceDirectory] || \
|
||||
|
||||
###############################################################################
|
||||
|
||||
#
|
||||
# NOTE: Evaluate the user-specific customizations file, if it exists.
|
||||
#
|
||||
set userFile [file join $path [appendArgs \
|
||||
$rootName . $tcl_platform(user) .tcl]]
|
||||
|
||||
if {[file exists $userFile] && \
|
||||
[file isfile $userFile]} then {
|
||||
source $userFile
|
||||
}
|
||||
|
||||
###############################################################################
|
||||
|
||||
set templateFile [file join $path win sqlite.vsix]
|
||||
|
||||
if {![file exists $templateFile] || \
|
||||
@ -220,7 +233,7 @@ if {![info exists unzip]} then {
|
||||
# in the source directory. This script assumes that the header file has
|
||||
# already been generated by the build process.
|
||||
#
|
||||
set pattern {^#define\s+?SQLITE_VERSION\s+?"(.*?)"$}
|
||||
set pattern {^#define\s+SQLITE_VERSION\s+"(.*)"$}
|
||||
set data [readFile [file join $sourceDirectory sqlite3.h]]
|
||||
|
||||
if {![regexp -line -- $pattern $data dummy version]} then {
|
||||
@ -233,32 +246,62 @@ if {![regexp -line -- $pattern $data dummy version]} then {
|
||||
#
|
||||
# NOTE: Setup the master file list data, including the necessary flags.
|
||||
#
|
||||
set fileNames(source) [list "" "" "" \
|
||||
[file join $sourceDirectory sqlite3.h] \
|
||||
[file join $binaryDirectory <platform> sqlite3.lib] \
|
||||
[file join $binaryDirectory <platform> sqlite3.dll]]
|
||||
if {![info exists fileNames(source)]} then {
|
||||
set fileNames(source) [list "" "" "" \
|
||||
[file join $sourceDirectory sqlite3.h] \
|
||||
[file join $binaryDirectory <platform> sqlite3.lib] \
|
||||
[file join $binaryDirectory <platform> sqlite3.dll]]
|
||||
|
||||
set fileNames(destination) [list \
|
||||
[file join $stagingDirectory extension.vsixmanifest] \
|
||||
[file join $stagingDirectory SDKManifest.xml] \
|
||||
[file join $stagingDirectory DesignTime CommonConfiguration \
|
||||
<platform> SQLite.WinRT.props] \
|
||||
[file join $stagingDirectory DesignTime CommonConfiguration \
|
||||
<platform> sqlite3.h] \
|
||||
[file join $stagingDirectory DesignTime CommonConfiguration \
|
||||
<platform> sqlite3.lib] \
|
||||
[file join $stagingDirectory Redist CommonConfiguration \
|
||||
<platform> sqlite3.dll]]
|
||||
if {![info exists no(symbols)]} then {
|
||||
lappend fileNames(source) \
|
||||
[file join $binaryDirectory <platform> sqlite3.pdb]
|
||||
}
|
||||
}
|
||||
|
||||
set fileNames(neutral) [list 1 1 1 1 0 0]
|
||||
set fileNames(subst) [list 1 1 1 0 0 0]
|
||||
if {![info exists fileNames(destination)]} then {
|
||||
set fileNames(destination) [list \
|
||||
[file join $stagingDirectory extension.vsixmanifest] \
|
||||
[file join $stagingDirectory SDKManifest.xml] \
|
||||
[file join $stagingDirectory DesignTime CommonConfiguration \
|
||||
<platform> SQLite.WinRT.props] \
|
||||
[file join $stagingDirectory DesignTime CommonConfiguration \
|
||||
<platform> sqlite3.h] \
|
||||
[file join $stagingDirectory DesignTime CommonConfiguration \
|
||||
<platform> sqlite3.lib] \
|
||||
[file join $stagingDirectory Redist CommonConfiguration \
|
||||
<platform> sqlite3.dll]]
|
||||
|
||||
if {![info exists no(symbols)]} then {
|
||||
lappend fileNames(destination) \
|
||||
[file join $stagingDirectory Redist CommonConfiguration \
|
||||
<platform> sqlite3.pdb]
|
||||
}
|
||||
}
|
||||
|
||||
if {![info exists fileNames(neutral)]} then {
|
||||
set fileNames(neutral) [list 1 1 1 1 0 0]
|
||||
|
||||
if {![info exists no(symbols)]} then {
|
||||
lappend fileNames(neutral) 0
|
||||
}
|
||||
}
|
||||
|
||||
if {![info exists fileNames(subst)]} then {
|
||||
set fileNames(subst) [list 1 1 1 0 0 0]
|
||||
|
||||
if {![info exists no(symbols)]} then {
|
||||
lappend fileNames(subst) 0
|
||||
}
|
||||
}
|
||||
|
||||
###############################################################################
|
||||
|
||||
#
|
||||
# NOTE: Setup the list of platforms supported by this script.
|
||||
#
|
||||
set platformNames [list ARM x64 x86]
|
||||
if {![info exists platformNames]} then {
|
||||
set platformNames [list ARM x64 x86]
|
||||
}
|
||||
|
||||
###############################################################################
|
||||
|
||||
@ -302,15 +345,26 @@ foreach sourceFileName $fileNames(source) \
|
||||
# platform will be processed for it individually.
|
||||
#
|
||||
foreach platformName [expr {$isNeutral ? [list neutral] : $platformNames}] {
|
||||
#
|
||||
# NOTE: Use the actual platform name in the destination file name.
|
||||
#
|
||||
set newDestinationFileName [replacePlatform $destinationFileName \
|
||||
$platformName]
|
||||
|
||||
#
|
||||
# NOTE: Does the source file need to be copied to the destination file?
|
||||
#
|
||||
if {[string length $sourceFileName] > 0} then {
|
||||
#
|
||||
# NOTE: Copy the source file to the destination file verbatim.
|
||||
# NOTE: First, make sure the destination directory exists.
|
||||
#
|
||||
file mkdir [file dirname $newDestinationFileName]
|
||||
|
||||
#
|
||||
# NOTE: Then, copy the source file to the destination file verbatim.
|
||||
#
|
||||
file copy [replacePlatform $sourceFileName $platformName] \
|
||||
[replacePlatform $destinationFileName $platformName]
|
||||
$newDestinationFileName
|
||||
}
|
||||
|
||||
#
|
||||
@ -322,7 +376,7 @@ foreach sourceFileName $fileNames(source) \
|
||||
# NOTE: Perform any dynamic replacements contained in the destination
|
||||
# file and then re-write it in-place.
|
||||
#
|
||||
substFile [replacePlatform $destinationFileName $platformName]
|
||||
substFile $newDestinationFileName
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user