Index: Makefile.msc ================================================================== --- Makefile.msc +++ Makefile.msc @@ -13,10 +13,16 @@ # Set this non-0 to create and use the SQLite amalgamation file. # !IFNDEF USE_AMALGAMATION USE_AMALGAMATION = 1 !ENDIF + +# Set this non-0 to use the libraries necessary for Windows Phone 8.1. +# +!IFNDEF USE_WP81_OPTS +USE_WP81_OPTS = 0 +!ENDIF # Set this non-0 to split the SQLite amalgamation file into chunks to # be used for debugging with Visual Studio. # !IFNDEF SPLIT_AMALGAMATION @@ -129,10 +135,16 @@ !ENDIF ############################################################################### ############################### END OF OPTIONS ################################ ############################################################################### + +# This assumes that MSVC is always installed in 32-bit Program Files directory +# and sets the variable for use in locating other 32-bit installs accordingly. +# +PROGRAMFILES_X86 = $(VCINSTALLDIR)\..\.. +PROGRAMFILES_X86 = $(PROGRAMFILES_X86:\\=\) # Check for the predefined command macro CC. This should point to the compiler # binary for the target platform. If it is not defined, simply define it to # the legacy default value 'cl.exe'. # @@ -547,10 +559,37 @@ !ENDIF STORELIBPATH = $(STORELIBPATH:\\=\) LTLINKOPTS = $(LTLINKOPTS) "/LIBPATH:$(STORELIBPATH)" !ENDIF !ENDIF + +# When compiling for Windows Phone 8.1, an extra library path is +# required. +# +!IF $(USE_WP81_OPTS)!=0 +!IFNDEF WP81LIBPATH +!IF "$(PLATFORM)"=="x86" +WP81LIBPATH = $(PROGRAMFILES_X86)\Windows Phone Kits\8.1\lib\x86 +!ELSEIF "$(PLATFORM)"=="ARM" +WP81LIBPATH = $(PROGRAMFILES_X86)\Windows Phone Kits\8.1\lib\ARM +!ELSE +WP81LIBPATH = $(PROGRAMFILES_X86)\Windows Phone Kits\8.1\lib\x86 +!ENDIF +!ENDIF +!ENDIF + +# When compiling for Windows Phone 8.1, some extra linker options +# are also required. +# +!IF $(USE_WP81_OPTS)!=0 +!IFDEF WP81LIBPATH +LTLINKOPTS = $(LTLINKOPTS) "/LIBPATH:$(WP81LIBPATH)" +!ENDIF +LTLINKOPTS = $(LTLINKOPTS) /DYNAMICBASE +LTLINKOPTS = $(LTLINKOPTS) WindowsPhoneCore.lib RuntimeObject.lib PhoneAppModelHost.lib +LTLINKOPTS = $(LTLINKOPTS) /NODEFAULTLIB:kernel32.lib /NODEFAULTLIB:ole32.lib +!ENDIF # If either debugging or symbols are enabled, enable PDBs. # !IF $(DEBUG)>0 || $(SYMBOLS)!=0 LDFLAGS = /DEBUG Index: tool/mkvsix.tcl ================================================================== --- tool/mkvsix.tcl +++ tool/mkvsix.tcl @@ -64,18 +64,19 @@ # tree as described in item 6 of the PREREQUISITES section, above. The second # argument is optional and if present must contain the name of the directory # containing the root of the source tree for SQLite. The third argument is # optional and if present must contain the flavor the VSIX package to build. # Currently, the only supported package flavors are "WinRT", "WinRT81", "WP80", -# and "Win32". The fourth argument is optional and if present must be a string -# containing a list of platforms to include in the VSIX package. The platform -# list is "platform1,platform2,platform3". The fifth argument is optional and -# if present must contain the version of Visual Studio required by the package. -# Currently, the only supported versions are "2012" and "2013". The package -# flavor "WinRT81" is only supported when the Visual Studio version is "2013". -# Typically, when on Windows, this script is executed using commands similar to -# the following from a normal Windows command prompt: +# "WP81", and "Win32". The fourth argument is optional and if present must be +# a string containing a list of platforms to include in the VSIX package. The +# platform list is "platform1,platform2,platform3". The fifth argument is +# optional and if present must contain the version of Visual Studio required by +# the package. Currently, the only supported versions are "2012" and "2013". +# The package flavors "WinRT81" and "WP81" are only supported when the Visual +# Studio version is "2013". Typically, when on Windows, this script is +# executed using commands similar to the following from a normal Windows +# command prompt: # # CD /D C:\dev\sqlite\core # tclsh85 tool\mkvsix.tcl C:\Temp # # In the example above, "C:\dev\sqlite\core" represents the root of the source @@ -208,20 +209,25 @@ } WP80 { return [appendArgs \ "\r\n " {MaxPlatformVersion="8.0"}] } + WP81 { + return [appendArgs \ + "\r\n " {MaxPlatformVersion="8.1"}] + } default { return "" } } } proc getExtraFileListXmlChunk { packageFlavor vsVersion } { # # NOTE: Windows Phone 8.0 does not require any extra attributes in its VSIX - # package SDK manifests. + # package SDK manifests; however, it appears that Windows Phone 8.1 + # does. # if {[string equal $packageFlavor WP80]} then { return "" } @@ -357,18 +363,20 @@ set shortNames(WinRT,2012) SQLite.WinRT set shortNames(WinRT,2013) SQLite.WinRT.2013 set shortNames(WinRT81,2013) SQLite.WinRT81 set shortNames(WP80,2012) SQLite.WP80 set shortNames(WP80,2013) SQLite.WP80.2013 +set shortNames(WP81,2013) SQLite.WP81 set shortNames(Win32,2012) SQLite.Win32 set shortNames(Win32,2013) SQLite.Win32.2013 set displayNames(WinRT,2012) "SQLite for Windows Runtime" set displayNames(WinRT,2013) "SQLite for Windows Runtime" set displayNames(WinRT81,2013) "SQLite for Windows Runtime (Windows 8.1)" set displayNames(WP80,2012) "SQLite for Windows Phone" set displayNames(WP80,2013) "SQLite for Windows Phone" +set displayNames(WP81,2013) "SQLite for Windows Phone 8.1" set displayNames(Win32,2012) "SQLite for Windows" set displayNames(Win32,2013) "SQLite for Windows" if {[string equal $packageFlavor WinRT]} then { set shortName $shortNames($packageFlavor,$vsVersion) @@ -404,10 +412,26 @@ set targetPlatformVersion v8.0 set minVsVersion [getMinVsVersionXmlChunk $vsVersion] set maxPlatformVersion \ [getMaxPlatformVersionXmlChunk $packageFlavor $vsVersion] set extraSdkPath "\\..\\$targetPlatformIdentifier" + set extraFileListAttributes \ + [getExtraFileListXmlChunk $packageFlavor $vsVersion] +} elseif {[string equal $packageFlavor WP81]} then { + if {$vsVersion ne "2013"} then { + fail [appendArgs \ + "unsupported combination, package flavor " $packageFlavor \ + " is only supported with Visual Studio 2013"] + } + set shortName $shortNames($packageFlavor,$vsVersion) + set displayName $displayNames($packageFlavor,$vsVersion) + set targetPlatformIdentifier WindowsPhoneApp + set targetPlatformVersion v8.1 + set minVsVersion [getMinVsVersionXmlChunk $vsVersion] + set maxPlatformVersion \ + [getMaxPlatformVersionXmlChunk $packageFlavor $vsVersion] + set extraSdkPath "\\..\\$targetPlatformIdentifier" set extraFileListAttributes \ [getExtraFileListXmlChunk $packageFlavor $vsVersion] } elseif {[string equal $packageFlavor Win32]} then { set shortName $shortNames($packageFlavor,$vsVersion) set displayName $displayNames($packageFlavor,$vsVersion) @@ -420,11 +444,11 @@ set extraFileListAttributes \ [getExtraFileListXmlChunk $packageFlavor $vsVersion] } else { fail [appendArgs \ "unsupported package flavor, must be one of: " \ - [list WinRT WinRT81 WP80 Win32]] + [list WinRT WinRT81 WP80 WP81 Win32]] } ############################################################################### #