Skip to content

Commit b417021

Browse files
committed
Merge pull request #21 from mlubin/master
use BinDeps and WinRPM on windows
2 parents 6d7b158 + fddb412 commit b417021

File tree

4 files changed

+10
-26
lines changed

4 files changed

+10
-26
lines changed

REQUIRE

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
julia 0.2-
22
DataFrames
33
DataArrays
4-
BinDeps
4+
BinDeps
5+
@osx Homebrew
6+
@windows WinRPM

deps/build.jl

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ using BinDeps
22

33
@BinDeps.setup
44

5-
deps = [sqlite3_lib = library_dependency("sqlite3_lib", aliases=["sqlite3","sqlite3-64","libsqlite3"])]
5+
deps = [sqlite3_lib = library_dependency("sqlite3_lib", aliases=["sqlite3","sqlite3-64","libsqlite3","libsqlite3-0"])]
66

77
@osx_only begin
88
using Homebrew
@@ -13,6 +13,9 @@ end
1313
provides(AptGet, {"sqlite3" => sqlite3_lib})
1414
end
1515

16-
provides(Binaries, {URI("http://drive.google.com/uc?export=download&id=0B6x_qYLl89S0TnAxS1Jtd3g3QkU") => sqlite3_lib}, os = :Windows)
16+
@windows_only begin
17+
using WinRPM
18+
provides(WinRPM.RPM,"libsqlite",sqlite3_lib, os = :Windows)
19+
end
1720

18-
@BinDeps.install
21+
@BinDeps.install [:sqlite3_lib => :sqlite3_lib ]

src/SQLite_consts.jl

Lines changed: 1 addition & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,4 @@
1-
#http://blog.synopse.info/post/2013/03/23/Latest-version-of-sqlite3.dll-for-Windows-64-bit
2-
#Link to Sqlite shared library (system-dependent)
3-
let
4-
global sqlite3_lib
5-
local lib
6-
succeeded=false
7-
@linux_only lib_choices = ["libsqlite3"]
8-
@windows_only WORD_SIZE == 64 && (lib_choices = [Pkg.dir() * "\\SQLite\\lib\\sqlite3-64"])
9-
@windows_only WORD_SIZE != 64 && (lib_choices = [Pkg.dir() * "\\SQLite\\lib\\sqlite3"])
10-
@osx_only lib_choices = ["/usr/lib/libsqlite3.dylib", Pkg.dir() * "/SQLite/lib/libsqlite3"]
11-
for lib in lib_choices
12-
try
13-
dlopen(lib)
14-
succeeded=true
15-
break
16-
end
17-
end
18-
if !succeeded error("SQLite library not found") end
19-
@eval const sqlite3_lib = $lib
20-
end
21-
22-
# const sqlite3_lib = "C:/Users/karbarcca/Google Drive/Dropbox/Dropbox/GitHub/sqlite.jl/lib/sqlite3-64"
1+
include("../deps/deps.jl")
232

243
#Macros
254
macro SUCCEEDED(func)

test/Chinook_Sqlite.sqlite

3 KB
Binary file not shown.

0 commit comments

Comments
 (0)