Coder Social home page Coder Social logo

sqlite-erlang's People

Contributors

ttyerlsol avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

sqlite-erlang's Issues

Imprecise README

README file should warn about adapting to one's needs the priv/Makefile as well.

priv dir must be on PATH in order to use sqlite-erlang

In order to use sqlite-erlang, the priv dir containing the sqlite-port executable must be on the PATH environment variable. The following patch solves the problem (I hope the formatting comes out correctly...).

Edit: unfortunately, this only seems to work when sqlite is in ERL_LIBS environment variable or an absolute path is given to -pa. code:priv_dir/1 doesn't work with relative paths specified like -pa ebin.

diff --git a/src/sqlite.erl b/src/sqlite.erl
index 0bdb7c9..3a2736c 100644
--- a/src/sqlite.erl
+++ b/src/sqlite.erl
@@ -442,7 +442,7 @@ code_change(_OldVsn, State, _Extra) ->
 %%--------------------------------------------------------------------

 create_cmd(Dbase) ->
-    "sqlite_port " ++ Dbase.
+    filename:join([code:priv_dir(?MODULE), "sqlite_port "]) ++ Dbase.

 exec(Port, Cmd) ->
     port_command(Port, term_to_binary(Cmd)),

Makefile variable PLT_SRC includes $(OTP_TOP)/hipe-3.6.8/ebin twice


diff --git a/Makefile b/Makefile
index 887c835..fb42265 100644
--- a/Makefile
+++ b/Makefile
@@ -1,6 +1,6 @@
 ERL=erl
 OTP_TOP=/opt/local/lib/erlang/lib
-PLT_SRC=$(OTP_TOP)/kernel-2.12.4/ebin $(OTP_TOP)/stdlib-1.15.4/ebin/ $(OTP_TOP)/crypto-1.5.2.1/ebin $(OTP_TOP)/compiler-4.5.4/ebin $(OTP_TOP)/hipe-3.6.8/ebin/ $(OTP_TOP)/syntax_tools-1.5.5/ebin $(OTP_TOP)/hipe-3.6.8/ebin ebin
+PLT_SRC=$(OTP_TOP)/kernel-2.12.4/ebin $(OTP_TOP)/stdlib-1.15.4/ebin/ $(OTP_TOP)/crypto-1.5.2.1/ebin $(OTP_TOP)/compiler-4.5.4/ebin $(OTP_TOP)/hipe-3.6.8/ebin/ $(OTP_TOP)/syntax_tools-1.5.5/ebin ebin
 
 all: compile docs

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.