diff --git a/Makefile.msc b/Makefile.msc index a2d623e653..3d9d9f2eb2 100644 --- a/Makefile.msc +++ b/Makefile.msc @@ -16,6 +16,13 @@ TOP = . USE_AMALGAMATION = 1 !ENDIF +# Set this non-0 to use the library paths and other options 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. # @@ -132,6 +139,12 @@ OPT_FEATURE_FLAGS = $(OPT_FEATURE_FLAGS) -DSQLITE_ENABLE_COLUMN_METADATA=1 ############################### 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'. @@ -550,6 +563,33 @@ 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 diff --git a/manifest b/manifest index 8d7389d529..f27c4b1f83 100644 --- a/manifest +++ b/manifest @@ -1,9 +1,9 @@ -C Fix\sa\sproblem\swith\sthe\shandling\sof\sdelete\smarkers\sby\sautomerge\son\slarge\sdatabases. -D 2014-05-15T18:36:39.233 +C Merge\slatest\strunk\schanges\swith\sthis\sbranch. +D 2014-05-15T19:05:55.306 F Makefile.arm-wince-mingw32ce-gcc d6df77f1f48d690bd73162294bbba7f59507c72f F Makefile.in dd2b1aba364ff9b05de41086f74407f285c57670 F Makefile.linux-gcc 91d710bdc4998cb015f39edf3cb314ec4f4d7e23 -F Makefile.msc f4b4d99d61cfe4ec508600dccd1a0ab2dc8a8b9b +F Makefile.msc 52911c6bfeaf9b40f47ef4615ab66d98ab0f2b3d F Makefile.vxworks 034289efa9d591b04b1a73598623119c306cbba0 F README.md 64f270c43c38c46de749e419c22f0ae2f4499fe8 F VERSION 9f823c026c6a32fc5f84d212a8aae0a221dba45c @@ -199,7 +199,7 @@ F src/mutex.c d3b66a569368015e0fcb1ac15f81c119f504d3bc F src/mutex.h 5bc526e19dccc412b7ff04642f6fdad3fdfdabea F src/mutex_noop.c 7682796b7d8d39bf1c138248858efcd10c9e1553 F src/mutex_unix.c c3a4e00f96ba068a8dbef34084465979aaf369cc -F src/mutex_w32.c ab08c0fc54b71979370ca7c8f42fc64a9f211ebb +F src/mutex_w32.c 9bcab6e699fdb20eae784237c36b299830fb3316 F src/notify.c 976dd0f6171d4588e89e874fcc765e92914b6d30 F src/os.c 1b147e4cf7cc39e618115c14a086aed44bc91ace F src/os.h 60d419395e32a8029fa380a80a3da2e9030f635e @@ -1144,7 +1144,7 @@ F tool/mksqlite3c-noext.tcl 1712d3d71256ca1f297046619c89e77a4d7c8f6d F tool/mksqlite3c.tcl ba274df71f5e6534b0a913c7c48eabfcbd0934b6 F tool/mksqlite3h.tcl ba24038056f51fde07c0079c41885ab85e2cff12 F tool/mksqlite3internalh.tcl b6514145a7d5321b47e64e19b8116cc44f973eb1 -F tool/mkvsix.tcl 64805dc0677009f0ba6b6e7199b2f7613cac3ebe +F tool/mkvsix.tcl 52a4c613707ac34ae9c226e5ccc69cb948556105 F tool/offsets.c fe4262fdfa378e8f5499a42136d17bf3b98f6091 F tool/omittest.tcl 34d7ac01fe4fd18e3637f64abe12c40eca0f6b97 F tool/opcodeDoc.awk b3a2a3d5d3075b8bd90b7afe24283efdd586659c @@ -1172,7 +1172,7 @@ F tool/vdbe_profile.tcl 67746953071a9f8f2f668b73fe899074e2c6d8c1 F tool/warnings-clang.sh f6aa929dc20ef1f856af04a730772f59283631d4 F tool/warnings.sh d1a6de74685f360ab718efda6265994b99bbea01 F tool/win/sqlite.vsix deb315d026cc8400325c5863eef847784a219a2f -P 34f6b4b8e4cb8ea45fd518672dc96335d1ce06ab -R e26158b3998e23a04d5e7968b1e6dfac +P 2b09bd17eb85ea3c682e930d2aabc6441f2265e0 0901dccedaf5679691ba803ec76d113de170185d +R bc36878656a1df406ce5faa15b3690cd U dan -Z 27219917e93f1cfe1a1e1c19124576cc +Z 7b26c3764a28756f379665cd911542c0 diff --git a/manifest.uuid b/manifest.uuid index 8f898f62ee..414ca82c34 100644 --- a/manifest.uuid +++ b/manifest.uuid @@ -1 +1 @@ -2b09bd17eb85ea3c682e930d2aabc6441f2265e0 \ No newline at end of file +5809986ffcc5d9cbab64760f8d7fbfbb6b626ee7 \ No newline at end of file diff --git a/src/mutex_w32.c b/src/mutex_w32.c index 2eb852413e..f43a152389 100644 --- a/src/mutex_w32.c +++ b/src/mutex_w32.c @@ -13,17 +13,19 @@ */ #include "sqliteInt.h" +#if SQLITE_OS_WIN +/* +** Include the header file for the Windows VFS. +*/ +#include "os_win.h" +#endif + /* ** The code in this file is only used if we are compiling multithreaded ** on a win32 system. */ #ifdef SQLITE_MUTEX_W32 -/* -** Include the header file for the Windows VFS. -*/ -#include "os_win.h" - /* ** Each recursive mutex is an instance of the following structure. */ diff --git a/tool/mkvsix.tcl b/tool/mkvsix.tcl index 378435aab4..208ce2b142 100644 --- a/tool/mkvsix.tcl +++ b/tool/mkvsix.tcl @@ -66,14 +66,15 @@ # 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 @@ -210,6 +211,10 @@ proc getMaxPlatformVersionXmlChunk { packageFlavor vsVersion } { return [appendArgs \ "\r\n " {MaxPlatformVersion="8.0"}] } + WP81 { + return [appendArgs \ + "\r\n " {MaxPlatformVersion="8.1"}] + } default { return "" } @@ -219,7 +224,8 @@ proc getMaxPlatformVersionXmlChunk { packageFlavor vsVersion } { 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 "" @@ -359,6 +365,7 @@ 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 @@ -367,6 +374,7 @@ 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" @@ -408,6 +416,22 @@ if {[string equal $packageFlavor WinRT]} then { 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) @@ -422,7 +446,7 @@ if {[string equal $packageFlavor WinRT]} then { } else { fail [appendArgs \ "unsupported package flavor, must be one of: " \ - [list WinRT WinRT81 WP80 Win32]] + [list WinRT WinRT81 WP80 WP81 Win32]] } ###############################################################################