System.Data.SQLite

Check-in [421eadd049]
Login

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

Overview
Comment:Modify the core managed assembly to always omit the '.dll' suffix. For the Mono related scripts, always use interop assembly naming. For the POSIX build scripts, always adhere to the Mono DLL naming convention.
Downloads: Tarball | ZIP archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: 421eadd0490e08cda16b8a6e53eb62299e0959dc
User & Date: mistachkin 2016-03-24 23:57:26.845
Context
2016-03-25
00:10
Fix file permissions. check-in: 27a389ce40 user: mistachkin tags: trunk
2016-03-24
23:57
Modify the core managed assembly to always omit the '.dll' suffix. For the Mono related scripts, always use interop assembly naming. For the POSIX build scripts, always adhere to the Mono DLL naming convention. check-in: 421eadd049 user: mistachkin tags: trunk
23:10
Add better detection of the right shared library name for the POSIX sub-platform. check-in: 05063e5426 user: mistachkin tags: trunk
Changes
Unified Diff Ignore Whitespace Patch
Changes to Setup/build_mono.bat.
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45

%_VECHO% Tools = '%TOOLS%'

SET BUILD_CONFIGURATIONS=DebugManagedOnly ReleaseManagedOnly
SET PLATFORMS="Any CPU"
SET YEARS=2013
SET NOUSER=1
SET MSBUILD_ARGS=/property:UseSqliteStandardLibraryName=true
SET MSBUILD_ARGS=%MSBUILD_ARGS% /property:InteropCodec=false
SET MSBUILD_ARGS=%MSBUILD_ARGS% /property:InteropLog=false
SET MSBUILD_ARGS_DEBUG=/property:CheckState=true
SET MSBUILD_ARGS_DEBUG=%MSBUILD_ARGS_DEBUG% /property:CountHandle=true
SET MSBUILD_ARGS_DEBUG=%MSBUILD_ARGS_DEBUG% /property:TraceConnection=true
SET MSBUILD_ARGS_DEBUG=%MSBUILD_ARGS_DEBUG% /property:TraceDetection=true
SET MSBUILD_ARGS_DEBUG=%MSBUILD_ARGS_DEBUG% /property:TraceHandle=true
SET MSBUILD_ARGS_DEBUG=%MSBUILD_ARGS_DEBUG% /property:TraceStatement=true







|
<







30
31
32
33
34
35
36
37

38
39
40
41
42
43
44

%_VECHO% Tools = '%TOOLS%'

SET BUILD_CONFIGURATIONS=DebugManagedOnly ReleaseManagedOnly
SET PLATFORMS="Any CPU"
SET YEARS=2013
SET NOUSER=1
SET MSBUILD_ARGS=/property:InteropCodec=false

SET MSBUILD_ARGS=%MSBUILD_ARGS% /property:InteropLog=false
SET MSBUILD_ARGS_DEBUG=/property:CheckState=true
SET MSBUILD_ARGS_DEBUG=%MSBUILD_ARGS_DEBUG% /property:CountHandle=true
SET MSBUILD_ARGS_DEBUG=%MSBUILD_ARGS_DEBUG% /property:TraceConnection=true
SET MSBUILD_ARGS_DEBUG=%MSBUILD_ARGS_DEBUG% /property:TraceDetection=true
SET MSBUILD_ARGS_DEBUG=%MSBUILD_ARGS_DEBUG% /property:TraceHandle=true
SET MSBUILD_ARGS_DEBUG=%MSBUILD_ARGS_DEBUG% /property:TraceStatement=true
Changes to Setup/compile-interop-assembly-debug.sh.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
#!/bin/bash

scriptdir=`dirname "$BASH_SOURCE"`

if [[ "$OSTYPE" == "darwin"* ]]; then
  libname=libsqlite3.dylib
else
  libname=libsqlite3.so.0
fi

pushd "$scriptdir/../SQLite.Interop/src/generic"
gcc -g -fPIC -shared -o $libname interop.c -I../core -DSQLITE_THREADSAFE=1 -DSQLITE_USE_URI=1 -DSQLITE_ENABLE_COLUMN_METADATA=1 -DSQLITE_ENABLE_STAT4=1 -DSQLITE_ENABLE_FTS3=1 -DSQLITE_ENABLE_LOAD_EXTENSION=1 -DSQLITE_ENABLE_RTREE=1 -DSQLITE_SOUNDEX=1 -DSQLITE_ENABLE_MEMORY_MANAGEMENT=1 -DSQLITE_ENABLE_API_ARMOR=1 -DSQLITE_ENABLE_DBSTAT_VTAB=1 -DSQLITE_DEBUG=1 -DSQLITE_MEMDEBUG=1 -DSQLITE_ENABLE_EXPENSIVE_ASSERT=1 -DINTEROP_LOG=1 -DINTEROP_TEST_EXTENSION=1 -DINTEROP_EXTENSION_FUNCTIONS=1 -DINTEROP_VIRTUAL_TABLE=1 -DINTEROP_FTS5_EXTENSION=1 -DINTEROP_PERCENTILE_EXTENSION=1 -DINTEROP_TOTYPE_EXTENSION=1 -DINTEROP_REGEXP_EXTENSION=1 -DINTEROP_JSON1_EXTENSION=1 -lm -lpthread -ldl
mv $libname ../../../bin/2013/Debug/bin
popd





|

|






1
2
3
4
5
6
7
8
9
10
11
12
13
14
#!/bin/bash

scriptdir=`dirname "$BASH_SOURCE"`

if [[ "$OSTYPE" == "darwin"* ]]; then
  libname=libSQLite.Interop.dylib
else
  libname=libSQLite.Interop.so
fi

pushd "$scriptdir/../SQLite.Interop/src/generic"
gcc -g -fPIC -shared -o $libname interop.c -I../core -DSQLITE_THREADSAFE=1 -DSQLITE_USE_URI=1 -DSQLITE_ENABLE_COLUMN_METADATA=1 -DSQLITE_ENABLE_STAT4=1 -DSQLITE_ENABLE_FTS3=1 -DSQLITE_ENABLE_LOAD_EXTENSION=1 -DSQLITE_ENABLE_RTREE=1 -DSQLITE_SOUNDEX=1 -DSQLITE_ENABLE_MEMORY_MANAGEMENT=1 -DSQLITE_ENABLE_API_ARMOR=1 -DSQLITE_ENABLE_DBSTAT_VTAB=1 -DSQLITE_DEBUG=1 -DSQLITE_MEMDEBUG=1 -DSQLITE_ENABLE_EXPENSIVE_ASSERT=1 -DINTEROP_LOG=1 -DINTEROP_TEST_EXTENSION=1 -DINTEROP_EXTENSION_FUNCTIONS=1 -DINTEROP_VIRTUAL_TABLE=1 -DINTEROP_FTS5_EXTENSION=1 -DINTEROP_PERCENTILE_EXTENSION=1 -DINTEROP_TOTYPE_EXTENSION=1 -DINTEROP_REGEXP_EXTENSION=1 -DINTEROP_JSON1_EXTENSION=1 -lm -lpthread -ldl
mv $libname ../../../bin/2013/Debug/bin
popd
Changes to Setup/compile-interop-assembly-release.sh.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
#!/bin/bash

scriptdir=`dirname "$BASH_SOURCE"`

if [[ "$OSTYPE" == "darwin"* ]]; then
  libname=libsqlite3.dylib
else
  libname=libsqlite3.so.0
fi

pushd "$scriptdir/../SQLite.Interop/src/generic"
gcc -g -fPIC -shared -o $libname interop.c -I../core -DSQLITE_THREADSAFE=1 -DSQLITE_USE_URI=1 -DSQLITE_ENABLE_COLUMN_METADATA=1 -DSQLITE_ENABLE_STAT4=1 -DSQLITE_ENABLE_FTS3=1 -DSQLITE_ENABLE_LOAD_EXTENSION=1 -DSQLITE_ENABLE_RTREE=1 -DSQLITE_SOUNDEX=1 -DSQLITE_ENABLE_MEMORY_MANAGEMENT=1 -DSQLITE_ENABLE_API_ARMOR=1 -DSQLITE_ENABLE_DBSTAT_VTAB=1 -DINTEROP_TEST_EXTENSION=1 -DINTEROP_EXTENSION_FUNCTIONS=1 -DINTEROP_VIRTUAL_TABLE=1 -DINTEROP_FTS5_EXTENSION=1 -DINTEROP_PERCENTILE_EXTENSION=1 -DINTEROP_TOTYPE_EXTENSION=1 -DINTEROP_REGEXP_EXTENSION=1 -DINTEROP_JSON1_EXTENSION=1 -lm -lpthread -ldl
mv $libname ../../../bin/2013/Release/bin
popd





|

|






1
2
3
4
5
6
7
8
9
10
11
12
13
14
#!/bin/bash

scriptdir=`dirname "$BASH_SOURCE"`

if [[ "$OSTYPE" == "darwin"* ]]; then
  libname=libSQLite.Interop.dylib
else
  libname=libSQLite.Interop.so
fi

pushd "$scriptdir/../SQLite.Interop/src/generic"
gcc -g -fPIC -shared -o $libname interop.c -I../core -DSQLITE_THREADSAFE=1 -DSQLITE_USE_URI=1 -DSQLITE_ENABLE_COLUMN_METADATA=1 -DSQLITE_ENABLE_STAT4=1 -DSQLITE_ENABLE_FTS3=1 -DSQLITE_ENABLE_LOAD_EXTENSION=1 -DSQLITE_ENABLE_RTREE=1 -DSQLITE_SOUNDEX=1 -DSQLITE_ENABLE_MEMORY_MANAGEMENT=1 -DSQLITE_ENABLE_API_ARMOR=1 -DSQLITE_ENABLE_DBSTAT_VTAB=1 -DINTEROP_TEST_EXTENSION=1 -DINTEROP_EXTENSION_FUNCTIONS=1 -DINTEROP_VIRTUAL_TABLE=1 -DINTEROP_FTS5_EXTENSION=1 -DINTEROP_PERCENTILE_EXTENSION=1 -DINTEROP_TOTYPE_EXTENSION=1 -DINTEROP_REGEXP_EXTENSION=1 -DINTEROP_JSON1_EXTENSION=1 -lm -lpthread -ldl
mv $libname ../../../bin/2013/Release/bin
popd
Changes to Setup/run-mono-tests-debug.sh.
1
2
3
4
5
6
7
8
9
10
11
12
13
#!/bin/bash

scriptdir=`dirname "$BASH_SOURCE"`

if [[ "$OSTYPE" == "darwin"* ]]; then
  libname=libsqlite3.dylib
else
  libname=libsqlite3.so.0
fi

pushd "$scriptdir/.."
mono Externals/Eagle/bin/EagleShell.exe -preInitialize "set test_configuration Debug; set build_directory {bin/2013/Debug/bin}; set native_library_file_names $libname" -file Tests/all.eagle
popd





|

|



|

1
2
3
4
5
6
7
8
9
10
11
12
13
#!/bin/bash

scriptdir=`dirname "$BASH_SOURCE"`

if [[ "$OSTYPE" == "darwin"* ]]; then
  libname=libSQLite.Interop.dylib
else
  libname=libSQLite.Interop.so
fi

pushd "$scriptdir/.."
mono Externals/Eagle/bin/EagleShell.exe -preInitialize "set test_configuration Debug; set build_directory {bin/2013/Debug/bin}; set interop_assembly_file_names $libname" -file Tests/all.eagle
popd
Changes to Setup/run-mono-tests-release.sh.
1
2
3
4
5
6
7
8
9
10
11
12
13
#!/bin/bash

scriptdir=`dirname "$BASH_SOURCE"`

if [[ "$OSTYPE" == "darwin"* ]]; then
  libname=libsqlite3.dylib
else
  libname=libsqlite3.so.0
fi

pushd "$scriptdir/.."
mono Externals/Eagle/bin/EagleShell.exe -preInitialize "set test_configuration Release; set build_directory {bin/2013/Release/bin}; set native_library_file_names $libname" -file Tests/all.eagle
popd





|

|



|

1
2
3
4
5
6
7
8
9
10
11
12
13
#!/bin/bash

scriptdir=`dirname "$BASH_SOURCE"`

if [[ "$OSTYPE" == "darwin"* ]]; then
  libname=libSQLite.Interop.dylib
else
  libname=libSQLite.Interop.so
fi

pushd "$scriptdir/.."
mono Externals/Eagle/bin/EagleShell.exe -preInitialize "set test_configuration Release; set build_directory {bin/2013/Release/bin}; set interop_assembly_file_names $libname" -file Tests/all.eagle
popd
Changes to System.Data.SQLite/UnsafeNativeMethods.cs.
1680
1681
1682
1683
1684
1685
1686
1687
1688
1689
1690
1691
1692
1693
1694
1695
1696
1697
1698
1699
1700
1701
1702
1703
1704
1705
1706
1707
1708
1709
1710
1711
1712
1713
1714
1715
    //       Framework limitations important for proper operation of the core
    //       System.Data.SQLite functionality (e.g. being able to bind
    //       parameters and handle column values of types Int64 and Double).
    //
#if SQLITE_STANDARD_LIBRARY_NAME
    internal const string SQLITE_DLL = "sqlite3";
#else
    internal const string SQLITE_DLL = "SQLite.Interop.100.dll";
#endif
#elif SQLITE_STANDARD
    //
    // NOTE: Otherwise, if the standard SQLite library is enabled, use it.
    //
    internal const string SQLITE_DLL = "sqlite3";
#elif USE_INTEROP_DLL
    //
    // NOTE: Otherwise, if the native SQLite interop assembly is enabled,
    //       use it.
    //
#if SQLITE_STANDARD_LIBRARY_NAME
    internal const string SQLITE_DLL = "sqlite3";
#else
    internal const string SQLITE_DLL = "SQLite.Interop.dll";
#endif
#else
    //
    // NOTE: Finally, assume that the mixed-mode assembly is being used.
    //
    internal const string SQLITE_DLL = "System.Data.SQLite.dll";
#endif

    // This section uses interop calls that also fetch text length to optimize conversion.
    // When using the standard dll, we can replace these calls with normal sqlite calls and
    // do unoptimized conversions instead afterwards
    #region interop added textlength calls








|














|





|







1680
1681
1682
1683
1684
1685
1686
1687
1688
1689
1690
1691
1692
1693
1694
1695
1696
1697
1698
1699
1700
1701
1702
1703
1704
1705
1706
1707
1708
1709
1710
1711
1712
1713
1714
1715
    //       Framework limitations important for proper operation of the core
    //       System.Data.SQLite functionality (e.g. being able to bind
    //       parameters and handle column values of types Int64 and Double).
    //
#if SQLITE_STANDARD_LIBRARY_NAME
    internal const string SQLITE_DLL = "sqlite3";
#else
    internal const string SQLITE_DLL = "SQLite.Interop.100";
#endif
#elif SQLITE_STANDARD
    //
    // NOTE: Otherwise, if the standard SQLite library is enabled, use it.
    //
    internal const string SQLITE_DLL = "sqlite3";
#elif USE_INTEROP_DLL
    //
    // NOTE: Otherwise, if the native SQLite interop assembly is enabled,
    //       use it.
    //
#if SQLITE_STANDARD_LIBRARY_NAME
    internal const string SQLITE_DLL = "sqlite3";
#else
    internal const string SQLITE_DLL = "SQLite.Interop";
#endif
#else
    //
    // NOTE: Finally, assume that the mixed-mode assembly is being used.
    //
    internal const string SQLITE_DLL = "System.Data.SQLite";
#endif

    // This section uses interop calls that also fetch text length to optimize conversion.
    // When using the standard dll, we can replace these calls with normal sqlite calls and
    // do unoptimized conversions instead afterwards
    #region interop added textlength calls

Changes to lib/System.Data.SQLite/common.eagle.
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
        return [list sqlite3.dll]
      } else {
        #
        # NOTE: Otherwise, return both the generic POSIX file name and the
        #       Mac OS X file name, since we do not currently have an easy
        #       way to detect which of those platforms we are running on.
        #
        return [list libsqlite3.so libsqlite3.dylib]
      }
    }

    proc getInteropAssemblyFileNamesOnly {} {
      #
      # NOTE: First, check if the list of interop assembly file names has been
      #       manually overridden.







|







523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
        return [list sqlite3.dll]
      } else {
        #
        # NOTE: Otherwise, return both the generic POSIX file name and the
        #       Mac OS X file name, since we do not currently have an easy
        #       way to detect which of those platforms we are running on.
        #
        return [list libsqlite3.dylib libsqlite3.so]
      }
    }

    proc getInteropAssemblyFileNamesOnly {} {
      #
      # NOTE: First, check if the list of interop assembly file names has been
      #       manually overridden.
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
        return [list SQLite.Interop.dll]
      } else {
        #
        # NOTE: Otherwise, return both the generic POSIX file name and the
        #       Mac OS X file name, since we do not currently have an easy
        #       way to detect which of those platforms we are running on.
        #
        return [list \
            SQLite.Interop.dll.so SQLite.Interop.so \
            SQLite.Interop.dylib SQLite.Interop.dll.dylib]
      }
    }

    proc getCoreExtensionBinaryFileName { {default ""} } {
      set fileName [getCoreBinaryFileName]

      if {[file exists $fileName]} then {







|
<
<







551
552
553
554
555
556
557
558


559
560
561
562
563
564
565
        return [list SQLite.Interop.dll]
      } else {
        #
        # NOTE: Otherwise, return both the generic POSIX file name and the
        #       Mac OS X file name, since we do not currently have an easy
        #       way to detect which of those platforms we are running on.
        #
        return [list libSQLite.Interop.dylib libSQLite.Interop.so]


      }
    }

    proc getCoreExtensionBinaryFileName { {default ""} } {
      set fileName [getCoreBinaryFileName]

      if {[file exists $fileName]} then {