Commit 4c93b6dc authored by Carlos Galindo's avatar Carlos Galindo
Browse files

Improve README and leave release in `dist` folder

parent c1ee66fa
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -5,12 +5,13 @@ all: beams

.PHONY: release
release: beams
    rm -rf e-knife-$(VERSION) dist
	mvn clean package
	mkdir -p e-knife-$(VERSION)/ebin
	cp e-Knife/target/e-Knife-$(VERSION)-jar-with-dependencies.jar e-knife-$(VERSION)/e-knife.jar
	cd e-knife-$(VERSION)/ebin/ && jar -xf ../e-knife.jar ast.beam ast.erl saver.beam saver.erl
	zip -rq e-knife-$(VERSION){.zip,/}
	rm -rf e-knife-$(VERSION)/
	mv e-knife-$(VERSION)/ dist/

.PHONY: clean
clean:
+14 −4
Original line number Diff line number Diff line
@@ -10,18 +10,24 @@ This project consists of three modules:

## Build

Requirements: Java >= 11, Erlang/OTP 24, Maven and Make.
Requirements: Java > 11, Erlang/OTP 24, Maven and Make.

Just run `make release` and a zip containing a jar and additional resources will be built.
Just run `make release` to generate the zipped release `e-knife-VERSION.zip`.
You'll also find it unzipped in the `dist` folder, ready to be run.

### Build with another version of Erlang

Part of the process requires some communication with an Erlang process. To
that end, the `jinterface` library must match the version of Erlang installed
in your machine. If your installation of Erlang is not OTP 24, you should replace
the bundled `jinterface` library with the one from your Erlang installation.

Before running `make`, replace the package `com.ericsson.otp.erlang` from
`e-Knife/src` with the one from your Erlang distribution,
at `lib/jinterface-VERSION/java_src`.

Your Erlang distribution will most likely be installed at `/usr/lib/erlang`
or `/usr/local/lib/erlang`.
Your Erlang distribution will most likely be installed at `/usr/lib/erlang`,
`/usr/local/lib/erlang`, `~/.local/lib/erlang` or `/usr/local/Cellar/erlang/VERSION/lib/erlang`.

As an example:

@@ -33,6 +39,8 @@ mv /usr/lib/erlang/lib/jinterface-1.12/java_src/$pkg e-Knife/src/$pkg

## Run

Requirements: Java > 11 and Erlang/OTP 24

The release version contains a jar file and a folder (`ebin`) with additional resources.
It is important to keep them in the same directory.

@@ -62,6 +70,8 @@ use an interactive graphviz viewer, such as [XDot][xdot].

Most IDEs will autodetect the structure from the Maven configuration files.

You'll need to run `make beams` to compile the necessary Erlang files before running the program.

Otherwise, you can treat each folder (EDG, e-Knife and Miscellanea) as a
separate module, with the following dependencies: