#!/usr/bin/tclsh
#
# This script is used to quickly test a VSIX (Visual Studio Extension) file
# with Visual Studio 2015 on Windows.
#
# PREREQUISITES
#
# 1. This tool is Windows only.
#
# 2. This tool must be executed with "elevated administrator" privileges.
#
# 3. Tcl 8.4 and later are supported, earlier versions have not been tested.
#
# 4. The "sqlite-UWP-output.vsix" file is assumed to exist in the parent
# directory of the directory containing this script. The [optional] first
# command line argument to this script may be used to specify an alternate
# file. However, currently, the file must be compatible with both Visual
# Studio 2015 and the Universal Windows Platform.
#
# 5. The "VERSION" file is assumed to exist in the parent directory of the
# directory containing this script. It must contain a version number that
# matches the VSIX file being tested.
#
# 6. The temporary directory specified in the TEMP or TMP environment variables
# must refer to an existing directory writable by the current user.
#
# 7. The VS140COMNTOOLS environment variable must refer to the Visual Studio
# 2015 common tools directory.
#
# USAGE
#
# The first argument to this script is optional. If specified, it must be the
# name of the VSIX file to test.
#
package require Tcl 8.4
#
# NOTE: This is the entry point for this script.
#
set script
if then
if then
if then
set path
set argc ; if then
if then else
###############################################################################
if then
set versionFileName
if then
set projectTemplateFileName
if then
set envVarName VS140COMNTOOLS
set vsDirectory
if then
set vsixInstaller
if then
set envVarName ProgramFiles
set programFiles
if then
set msBuild
if then
set temporaryDirectory
if then
###############################################################################
set installLogFileName
set commands(1)
lappend commands(1) /quiet /norepair
lappend commands(1)
lappend commands(1)
###############################################################################
set buildLogFileName
set commands(2)
lappend commands(2)
lappend commands(2) /target:Rebuild
lappend commands(2) /property:Configuration=%configuration%
lappend commands(2) /property:Platform=%platform%
lappend commands(2)
###############################################################################
set uninstallLogFileName
set commands(3)
lappend commands(3) /quiet /norepair
lappend commands(3)
lappend commands(3)
###############################################################################
if then
###############################################################################
if then