System.Data.SQLite

Check-in [a912d7f434]
Login

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:Fix issue with building in a Visual Studio Command Prompt window. Support building and testing the VS2010 projects using the .NET Framework 3.5.
Downloads: Tarball | ZIP archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: a912d7f4348746a1b5816043df283aaf82111bec
User & Date: mistachkin 2011-07-22 21:21:50.258
Context
2011-07-23
00:59
Merge interop changes for debug SQLite core testing and updated SQLite core itself. check-in: ff19f6474c user: mistachkin tags: trunk
2011-07-22
23:13
Experimental changes to permit the unit test suite to pass with the debug version of SQLite. check-in: 937230cef0 user: mistachkin tags: debugInteropFix
21:21
Fix issue with building in a Visual Studio Command Prompt window. Support building and testing the VS2010 projects using the .NET Framework 3.5. check-in: a912d7f434 user: mistachkin tags: trunk
2011-07-21
23:50
Remove unnecessary redundancy in the test for [b4a7ddc83f] and verify that it ran in a non-primary AppDomain. check-in: 7f19f2449d user: mistachkin tags: trunk
Changes
Unified Diff Ignore Whitespace Patch
Changes to SQLite.Interop/props/sqlite3.props.
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
-->
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" ToolsVersion="4.0">
  <PropertyGroup Label="UserMacros">
    <SQLITE_MANIFEST_VERSION>3.7.7.1</SQLITE_MANIFEST_VERSION>
    <SQLITE_RC_VERSION>3,7,7,1</SQLITE_RC_VERSION>
    <SQLITE_COMMON_DEFINES>SQLITE_THREADSAFE=1;SQLITE_ENABLE_COLUMN_METADATA=1;SQLITE_ENABLE_STAT2=1;SQLITE_ENABLE_FTS3=1;SQLITE_ENABLE_LOAD_EXTENSION=1;SQLITE_ENABLE_RTREE=1;SQLITE_SOUNDEX=1</SQLITE_COMMON_DEFINES>
    <SQLITE_EXTRA_DEFINES>SQLITE_HAS_CODEC=1</SQLITE_EXTRA_DEFINES>
    <SQLITE_WINCE_DEFINES>SQLITE_OMIT_WAL</SQLITE_WINCE_DEFINES>
    <SQLITE_DEBUG_DEFINES></SQLITE_DEBUG_DEFINES>
    <SQLITE_DISABLE_WARNINGS>4018;4055;4057;4090;4100;4127;4132;4146;4152;4210;4244;4245;4389;4701;4706;4996</SQLITE_DISABLE_WARNINGS>
    <SQLITE_DISABLE_X64_WARNINGS>4267;4306</SQLITE_DISABLE_X64_WARNINGS>
  </PropertyGroup>
  <PropertyGroup>
    <_ProjectFileVersion>10.0.30319.1</_ProjectFileVersion>
  </PropertyGroup>
  <ItemGroup>







|
|







9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
-->
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" ToolsVersion="4.0">
  <PropertyGroup Label="UserMacros">
    <SQLITE_MANIFEST_VERSION>3.7.7.1</SQLITE_MANIFEST_VERSION>
    <SQLITE_RC_VERSION>3,7,7,1</SQLITE_RC_VERSION>
    <SQLITE_COMMON_DEFINES>SQLITE_THREADSAFE=1;SQLITE_ENABLE_COLUMN_METADATA=1;SQLITE_ENABLE_STAT2=1;SQLITE_ENABLE_FTS3=1;SQLITE_ENABLE_LOAD_EXTENSION=1;SQLITE_ENABLE_RTREE=1;SQLITE_SOUNDEX=1</SQLITE_COMMON_DEFINES>
    <SQLITE_EXTRA_DEFINES>SQLITE_HAS_CODEC=1</SQLITE_EXTRA_DEFINES>
    <SQLITE_WINCE_DEFINES>SQLITE_OMIT_WAL=1</SQLITE_WINCE_DEFINES>
    <SQLITE_DEBUG_DEFINES>SQLITE_DEBUG=1;SQLITE_MEMDEBUG=1</SQLITE_DEBUG_DEFINES>
    <SQLITE_DISABLE_WARNINGS>4018;4055;4057;4090;4100;4127;4132;4146;4152;4210;4244;4245;4389;4701;4706;4996</SQLITE_DISABLE_WARNINGS>
    <SQLITE_DISABLE_X64_WARNINGS>4267;4306</SQLITE_DISABLE_X64_WARNINGS>
  </PropertyGroup>
  <PropertyGroup>
    <_ProjectFileVersion>10.0.30319.1</_ProjectFileVersion>
  </PropertyGroup>
  <ItemGroup>
Changes to SQLite.Interop/props/sqlite3.vsprops.
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
	<UserMacro
		Name="SQLITE_EXTRA_DEFINES"
		Value="SQLITE_HAS_CODEC=1"
		PerformEnvironmentSet="true"
	/>
	<UserMacro
		Name="SQLITE_WINCE_DEFINES"
		Value="SQLITE_OMIT_WAL"
		PerformEnvironmentSet="true"
	/>
	<UserMacro
		Name="SQLITE_DEBUG_DEFINES"
		Value=""
		PerformEnvironmentSet="true"
	/>
	<UserMacro
		Name="SQLITE_DISABLE_WARNINGS"
		Value="4018;4055;4057;4090;4100;4127;4132;4146;4152;4210;4244;4245;4389;4701;4706;4996"
		PerformEnvironmentSet="true"
	/>







|




|







30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
	<UserMacro
		Name="SQLITE_EXTRA_DEFINES"
		Value="SQLITE_HAS_CODEC=1"
		PerformEnvironmentSet="true"
	/>
	<UserMacro
		Name="SQLITE_WINCE_DEFINES"
		Value="SQLITE_OMIT_WAL=1"
		PerformEnvironmentSet="true"
	/>
	<UserMacro
		Name="SQLITE_DEBUG_DEFINES"
		Value="SQLITE_DEBUG=1;SQLITE_MEMDEBUG=1"
		PerformEnvironmentSet="true"
	/>
	<UserMacro
		Name="SQLITE_DISABLE_WARNINGS"
		Value="4018;4055;4057;4090;4100;4127;4132;4146;4152;4210;4244;4245;4389;4701;4706;4996"
		PerformEnvironmentSet="true"
	/>
Changes to Setup/build.bat.
47
48
49
50
51
52
53


54
55
56
57
58
59
60

SET TOOLS=%~dp0
SET TOOLS=%TOOLS:\\=\%

%_VECHO% Tools = '%TOOLS%'

IF EXIST "%TOOLS%\set_%CONFIGURATION%_%PLATFORM%.bat" (


  %_AECHO% Running "%TOOLS%\set_%CONFIGURATION%_%PLATFORM%.bat"...
  %_ECHO% CALL "%TOOLS%\set_%CONFIGURATION%_%PLATFORM%.bat"

  IF ERRORLEVEL 1 (
    ECHO File "%TOOLS%\set_%CONFIGURATION%_%PLATFORM%.bat" failed.
    GOTO errors
  )







>
>







47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62

SET TOOLS=%~dp0
SET TOOLS=%TOOLS:\\=\%

%_VECHO% Tools = '%TOOLS%'

IF EXIST "%TOOLS%\set_%CONFIGURATION%_%PLATFORM%.bat" (
  CALL :fn_ResetErrorLevel

  %_AECHO% Running "%TOOLS%\set_%CONFIGURATION%_%PLATFORM%.bat"...
  %_ECHO% CALL "%TOOLS%\set_%CONFIGURATION%_%PLATFORM%.bat"

  IF ERRORLEVEL 1 (
    ECHO File "%TOOLS%\set_%CONFIGURATION%_%PLATFORM%.bat" failed.
    GOTO errors
  )
76
77
78
79
80
81
82












83
84
85
86
87
88
89

IF DEFINED NETFX40ONLY (
  %_AECHO% Forcing the use of the .NET Framework 4.0...
  SET YEAR=2010
  SET FRAMEWORKDIR=%windir%\Microsoft.NET\Framework\v4.0.30319
  GOTO skip_netFxCheck
)













IF NOT DEFINED FRAMEWORKDIR (
  %_AECHO% Checking for the .NET Framework 4.0...
  SET YEAR=2010
  SET FRAMEWORKDIR=%windir%\Microsoft.NET\Framework\v4.0.30319
)








>
>
>
>
>
>
>
>
>
>
>
>







78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103

IF DEFINED NETFX40ONLY (
  %_AECHO% Forcing the use of the .NET Framework 4.0...
  SET YEAR=2010
  SET FRAMEWORKDIR=%windir%\Microsoft.NET\Framework\v4.0.30319
  GOTO skip_netFxCheck
)

IF DEFINED FRAMEWORKDIR (
  IF NOT EXIST "%FRAMEWORKDIR%" (
    CALL :fn_UnsetVariable FRAMEWORKDIR
  )
)

IF DEFINED FRAMEWORKDIR (
  IF NOT EXIST "%FRAMEWORKDIR%\csc.exe" (
    CALL :fn_UnsetVariable FRAMEWORKDIR
  )
)

IF NOT DEFINED FRAMEWORKDIR (
  %_AECHO% Checking for the .NET Framework 4.0...
  SET YEAR=2010
  SET FRAMEWORKDIR=%windir%\Microsoft.NET\Framework\v4.0.30319
)

Changes to Setup/set_Release.bat.
1
2
3
4
5
6
7
8
9
10
@ECHO OFF

::
:: set_Release.bat --
::
:: Written by Joe Mistachkin.
:: Released to the public domain, use at your own risk!
::

REM SET MSBUILD_ARGS=/property:TargetFrameworkVersion=v3.5









|
1
2
3
4
5
6
7
8
9
10
@ECHO OFF

::
:: set_Release.bat --
::
:: Written by Joe Mistachkin.
:: Released to the public domain, use at your own risk!
::

REM SET MSBUILD_ARGS=/p:TargetFrameworkVersion=v3.5 /p:PlatformToolset=v100
Changes to Tests/common.eagle.
1
2
3
4
5
6
7
8
9
10














11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
###############################################################################
#
# common.eagle --
#
# Written by Joe Mistachkin.
# Released to the public domain, use at your own risk!
#
###############################################################################

if {[isEagle]} then {














  proc getBuildDirectory {} {
    #
    # NOTE: See if the "native" runtime option has been added.  If so, use the
    #       directory for the mixed-mode assembly.  To enable this option via
    #       the command line, enter a command similar to the following (all on
    #       one line):
    #
    #       EagleShell.exe -initialize -runtimeOption native
    #         -file .\path\to\all.eagle
    #
    #       To enable this option via the command line prior to the "beta 16"
    #       release of Eagle, the following command must be used instead (also
    #       all on one line):
    #
    #       EagleShell.exe -initialize -postInitialize
    #         "object invoke Interpreter.GetActive AddRuntimeOption native"
    #         -file .\path\to\all.eagle
    #
    if {[hasRuntimeOption native]} then {
      return [file join [file dirname $::path] bin \
          [expr {[haveConstraint imageRuntime40] ? "2010" : "2008"}] \
          [machineToPlatform $::tcl_platform(machine)] $::test_configuration]
    } else {
      return [file join [file dirname $::path] bin \
          [expr {[haveConstraint imageRuntime40] ? "2010" : "2008"}] \
          $::test_configuration bin]
    }
  }

  proc getBuildFileName { fileName } {
    return [file nativename \
        [file join [getBuildDirectory] [file tail $fileName]]]










>
>
>
>
>
>
>
>
>
>
>
>
>
>



















|
<


|
<







1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44

45
46
47

48
49
50
51
52
53
54
###############################################################################
#
# common.eagle --
#
# Written by Joe Mistachkin.
# Released to the public domain, use at your own risk!
#
###############################################################################

if {[isEagle]} then {
  proc getBuildYear {} {
    #
    # NOTE: See if the "year" setting has been overridden by the user (e.g. on
    #       the command line).  This controls which binaries we are testing,
    #       those produced by Visual Studio 2008 or Visual Studio 2010 build
    #       system.
    #
    if {[info exists ::test_year] && [string length $::test_year] > 0} then {
      return $::test_year
    } else {
      return [expr {[haveConstraint imageRuntime40] ? "2010" : "2008"}]
    }
  }

  proc getBuildDirectory {} {
    #
    # NOTE: See if the "native" runtime option has been added.  If so, use the
    #       directory for the mixed-mode assembly.  To enable this option via
    #       the command line, enter a command similar to the following (all on
    #       one line):
    #
    #       EagleShell.exe -initialize -runtimeOption native
    #         -file .\path\to\all.eagle
    #
    #       To enable this option via the command line prior to the "beta 16"
    #       release of Eagle, the following command must be used instead (also
    #       all on one line):
    #
    #       EagleShell.exe -initialize -postInitialize
    #         "object invoke Interpreter.GetActive AddRuntimeOption native"
    #         -file .\path\to\all.eagle
    #
    if {[hasRuntimeOption native]} then {
      return [file join [file dirname $::path] bin [getBuildYear] \

          [machineToPlatform $::tcl_platform(machine)] $::test_configuration]
    } else {
      return [file join [file dirname $::path] bin [getBuildYear] \

          $::test_configuration bin]
    }
  }

  proc getBuildFileName { fileName } {
    return [file nativename \
        [file join [getBuildDirectory] [file tail $fileName]]]
Changes to Tests/tkt-b4a7ddc83f.eagle.
22
23
24
25
26
27
28

29
30
31
32
33
34

35

36
37
38
39
40
41
42
43

for {set i 1} {$i < 3} {incr i} {
  runTest {test tkt-b4a7ddc83f-1.$i {logging shutdown} -setup [subst {
    set appDomainId(1) [object invoke AppDomain.CurrentDomain Id]
    set fileName tkt-b4a7ddc83f-1.$i.db

    set ::path {$::path}

    set ::test_configuration {$::test_configuration}

    source [file join $::path common.eagle]
  }] -body {
    set appDomainId(2) [object invoke AppDomain.CurrentDomain Id]


    package require EagleTest

    tryLoadAssembly System.Data.SQLite.dll
    object invoke System.Data.SQLite.SQLiteLog Initialize

    list $appDomainId(1) $appDomainId(2) \
        [expr {$appDomainId(1) != $appDomainId(2)}] [setupDb $fileName]
  } -cleanup {
    cleanupDb $fileName
    unset -nocomplain appDomainId db fileName







>






>

>
|







22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46

for {set i 1} {$i < 3} {incr i} {
  runTest {test tkt-b4a7ddc83f-1.$i {logging shutdown} -setup [subst {
    set appDomainId(1) [object invoke AppDomain.CurrentDomain Id]
    set fileName tkt-b4a7ddc83f-1.$i.db

    set ::path {$::path}
    set ::test_year [getBuildYear]
    set ::test_configuration {$::test_configuration}

    source [file join $::path common.eagle]
  }] -body {
    set appDomainId(2) [object invoke AppDomain.CurrentDomain Id]

    package require EagleLibrary
    package require EagleTest

    object load -loadtype File [getBuildFileName System.Data.SQLite.dll]
    object invoke System.Data.SQLite.SQLiteLog Initialize

    list $appDomainId(1) $appDomainId(2) \
        [expr {$appDomainId(1) != $appDomainId(2)}] [setupDb $fileName]
  } -cleanup {
    cleanupDb $fileName
    unset -nocomplain appDomainId db fileName
Changes to testlinq/testlinq.2010.csproj.
44
45
46
47
48
49
50







51
52
53
54
55
56
57
58
59



60
61
62
63






64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
    <Reference Include="System" />
    <Reference Include="System.Data.Entity" />
    <Reference Include="System.Runtime.Serialization" />
    <Reference Include="System.Xml" />
    <Reference Include="System.Data" />
  </ItemGroup>
  <ItemGroup>







    <Compile Include="NorthwindModel2010.Designer.cs">
      <AutoGen>True</AutoGen>
      <DesignTime>True</DesignTime>
      <DependentUpon>NorthwindModel2010.edmx</DependentUpon>
    </Compile>
    <Compile Include="Program.cs" />
    <Compile Include="Properties\AssemblyInfo.cs" />
  </ItemGroup>
  <ItemGroup>



    <None Include="2010\App.Config" />
    <None Include="northwindEF.db">
      <CopyToOutputDirectory>Always</CopyToOutputDirectory>
    </None>






    <EntityDeploy Include="NorthwindModel2010.edmx">
      <Generator>EntityModelCodeGenerator</Generator>
      <LastGenOutput>NorthwindModel2010.Designer.cs</LastGenOutput>
    </EntityDeploy>
  </ItemGroup>
  <ItemGroup>
    <Service Include="{C8F2D6AC-F9F4-4E40-A399-22F9A9A5CBD2}" />
  </ItemGroup>
  <Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
  <!-- To modify your build process, add your task inside one of the targets below and uncomment it. 
       Other similar extension points exist, see Microsoft.Common.targets.
  <Target Name="BeforeBuild">
  </Target>
  <Target Name="AfterBuild">
  </Target>
  -->
</Project>







>
>
>
>
>
>
>
|








>
>
>
|



>
>
>
>
>
>
|








|







44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
    <Reference Include="System" />
    <Reference Include="System.Data.Entity" />
    <Reference Include="System.Runtime.Serialization" />
    <Reference Include="System.Xml" />
    <Reference Include="System.Data" />
  </ItemGroup>
  <ItemGroup>
    <Compile Condition="'$(TargetFrameworkVersion)' == 'v3.5'"
             Include="NorthwindModel2008.Designer.cs">
      <AutoGen>True</AutoGen>
      <DesignTime>True</DesignTime>
      <DependentUpon>NorthwindModel2008.edmx</DependentUpon>
    </Compile>
    <Compile Condition="'$(TargetFrameworkVersion)' == 'v4.0'"
             Include="NorthwindModel2010.Designer.cs">
      <AutoGen>True</AutoGen>
      <DesignTime>True</DesignTime>
      <DependentUpon>NorthwindModel2010.edmx</DependentUpon>
    </Compile>
    <Compile Include="Program.cs" />
    <Compile Include="Properties\AssemblyInfo.cs" />
  </ItemGroup>
  <ItemGroup>
    <None Condition="'$(TargetFrameworkVersion)' == 'v3.5'"
          Include="2008\App.Config" />
    <None Condition="'$(TargetFrameworkVersion)' == 'v4.0'"
          Include="2010\App.Config" />
    <None Include="northwindEF.db">
      <CopyToOutputDirectory>Always</CopyToOutputDirectory>
    </None>
    <EntityDeploy Condition="'$(TargetFrameworkVersion)' == 'v3.5'"
                  Include="NorthwindModel2008.edmx">
      <Generator>EntityModelCodeGenerator</Generator>
      <LastGenOutput>NorthwindModel2008.Designer.cs</LastGenOutput>
    </EntityDeploy>
    <EntityDeploy Condition="'$(TargetFrameworkVersion)' == 'v4.0'"
                  Include="NorthwindModel2010.edmx">
      <Generator>EntityModelCodeGenerator</Generator>
      <LastGenOutput>NorthwindModel2010.Designer.cs</LastGenOutput>
    </EntityDeploy>
  </ItemGroup>
  <ItemGroup>
    <Service Include="{C8F2D6AC-F9F4-4E40-A399-22F9A9A5CBD2}" />
  </ItemGroup>
  <Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
  <!-- To modify your build process, add your task inside one of the targets below and uncomment it.
       Other similar extension points exist, see Microsoft.Common.targets.
  <Target Name="BeforeBuild">
  </Target>
  <Target Name="AfterBuild">
  </Target>
  -->
</Project>