Sqlite package - sqlite3-dotnet

23 views
Skip to first unread message

Simon Whittemore

unread,
Sep 2, 2010, 4:29:31 PM9/2/10
to nu-net
Hi All

In the past hour or so, I have created a .net package for Sqlite3
which includes the sqlite.dll and the managed provider
System.Data.SQlite.

I included the x64 version of the managed provider so should be good
for a whole lot of scenarios.

One question to the group - I added the sqlite3.exe to a binary folder
and it seems that it is being copied to C:\Ruby187\lib\ruby\gems
\1.8\gems\sqlite3-dotnet-3.7.2.0 on my machine, but I can't see it
when I nu install sqlite3-dotnet. Am I doing anything obvious wrong?

Look forward to any feedback

Regards

Simon

Brendan Erwin

unread,
Sep 2, 2010, 4:32:26 PM9/2/10
to nu-...@googlegroups.com
Can you post your .gemspec?

Simon Whittemore

unread,
Sep 2, 2010, 4:33:23 PM9/2/10
to nu-net
Sure :

version = File.read(File.expand_path("../VERSION",__FILE__)).strip

Gem::Specification.new do |spec|
spec.platform = Gem::Platform::RUBY
spec.name = 'sqlite3-dotnet'
spec.version = version
spec.files = Dir['lib/**/*'] + Dir['bin/**/*']
spec.bindir = 'bin'
spec.executables << 'sqlite3'

spec.summary = 'Sqlite 3'
spec.description = '.Net DLLs and exe for Sqlite3'

spec.authors = 'Simon Whittemore'
spec.email = 'simon.wh...@gmail.com'
spec.homepage = 'http://www.sqlite.org/'
spec.rubyforge_project = 'sqlite3-dotnet'
end

Brendan Erwin

unread,
Sep 2, 2010, 4:35:24 PM9/2/10
to nu-...@googlegroups.com
Oh, you are saying you expect to see the .exe in your lib folder?

Nu doesn't do that, just the lib stuff.

Gem modified your PATH to allow you to run the .exe though.

Simon Whittemore

unread,
Sep 2, 2010, 4:37:21 PM9/2/10
to nu-...@googlegroups.com
Ah yes of course, that makes sense.

Well hope the gem is useful to someone.

Thanks Brendan.

Simon

Brendan Erwin

unread,
Sep 2, 2010, 4:38:47 PM9/2/10
to nu-...@googlegroups.com
BTW, you can also announce the new gem on Twitter with the #nugems tag.

(Or, if you are not a Twitter user, I will.)

Simon Whittemore

unread,
Sep 2, 2010, 4:42:02 PM9/2/10
to nu-...@googlegroups.com
Just tweeted.

Dru Sellers

unread,
Sep 2, 2010, 4:42:23 PM9/2/10
to nu-...@googlegroups.com
the

'spec.bindir'

is there to allow for things to be added to the PATH in the cmd line

:)

Rob Reynolds

unread,
Sep 2, 2010, 4:52:27 PM9/2/10
to nu-...@googlegroups.com

Did you see my posts on how to make executables work?

____
Rob
"Be passionate in all you do"

http://devlicio.us/blogs/rob_reynolds
http://ferventcoder.com
http://twitter.com/ferventcoder

Justin Rudd

unread,
Sep 2, 2010, 5:17:36 PM9/2/10
to nu-...@googlegroups.com
Just out of curiosity, why not use the mixed assembly?

Brendan Erwin

unread,
Sep 2, 2010, 5:17:35 PM9/2/10
to nu-...@googlegroups.com
So, how do we get the elmah gem updated to depend on this?

Do we have a chance of having a process or mechanism to deal with these cases?

Simon Whittemore

unread,
Sep 2, 2010, 5:25:17 PM9/2/10
to nu-...@googlegroups.com
What's the Url for that? I tried it, and got a BadImageFormat exception on my x64 machine.

Simon

Justin Rudd

unread,
Sep 2, 2010, 5:39:30 PM9/2/10
to nu-...@googlegroups.com
I use the 1.0.66.0 build from here - http://sqlite.phxsoftware.com/

The only thing special I had to do was to add the following to my .NET 4 project...

  <startup useLegacyV2RuntimeActivationPolicy="true">
    <supportedRuntime version="v4.0" />
  </startup>

I referenced the x64 binary (System.Data.SQLite.dll) in the zip file.

Simon Whittemore

unread,
Sep 3, 2010, 6:10:00 AM9/3/10
to nu-...@googlegroups.com
Hi Justin

Thanks for the feedback. I was indeed using those files in the gem.
I have removed the sqlite3.dll and .def file as it looks like they are not required.

I added the startup config and the mixed mode dll works fine for .net 4 projects.

I noticed that in VS2008, you need to add the x64 version, otherwise you get a BadImageFormatException - not really sure why that is.

Anyway, I have pushed another version that excludes those dll's.

Simon
Reply all
Reply to author
Forward
0 new messages