diff --git a/.gitmodules b/.gitmodules new file mode 100644 index 0000000..9e30caf --- /dev/null +++ b/.gitmodules @@ -0,0 +1,6 @@ +[submodule "submodules/opengl"] + path = submodules/opengl + url = git@github.com:nim-lang/opengl.git +[submodule "submodules/x11"] + path = submodules/x11 + url = git@github.com:nim-lang/x11.git diff --git a/.travis.yml b/.travis.yml index 7cbe9e1..859ec48 100644 --- a/.travis.yml +++ b/.travis.yml @@ -6,4 +6,4 @@ before_install: - docker pull nimlang/nim script: - docker run nimlang/nim nim --version - - docker run -v "$(pwd):/project" -w /project nimlang/nim sh -c "nimble install -dy && nimble build" + - docker run -v "$(pwd):/project" -w /project/src nimlang/nim sh -c "nim c boomer.nim" diff --git a/README.md b/README.md index 9e0660b..32c46b3 100644 --- a/README.md +++ b/README.md @@ -12,6 +12,8 @@ Zoomer application for Linux. ## Dependencies +tested on nim version 1.1.1 + ### Debian ```console @@ -20,10 +22,15 @@ $ sudo apt-get install libgl1-mesa-dev libx11-dev libxext-dev libxrandr-dev ## Quick Start +Don't forget to also clone the submodules. This shit should be done by +default, but some APIs insist to cause friction to developers. + ```console -$ nimble build -$ ./boomer --help -$ ./boomer # to just start using +$ git clone --recurse-submodules git@github.com:tsoding/boomer.git +$ cd boomer +$ nim c src/boomer.nim +$ src/boomer --help +$ src/boomer # to just start using ``` ## Developer Capabilities @@ -31,10 +38,10 @@ $ ./boomer # to just start using For additional Developer Capabilities compile the application with the following flags: ```console -$ nimble build -d:developer +$ nim c -d:developer src/boomer.nim ``` -This will enable reloading the shaders with `Ctrl+R`. The shader files (`frag.glsl` and `vert.glsl`) should be located in the same folder as `boomer.nim` for this feature to work. If the shader files not found the program won't even start. +This will enable reloading the shaders with `Ctrl+R`. For this feature to work, the shader files (`frag.glsl` and `vert.glsl`) should be located in the same folder as `boomer.nim` and you must compile from the project root, not from the src folder. If the shader files are not found the program won't even start. **Keep in mind that the developer build is not suitable for day-to-day usage because it creates the external dependency on the shader files. Compiling the program without `-d:developer` "bakes" the shaders into the executable and eliminates the dependency.** diff --git a/boomer.nimble b/boomer.nimble deleted file mode 100644 index 55d080c..0000000 --- a/boomer.nimble +++ /dev/null @@ -1,8 +0,0 @@ -version = "0.0.1" -author = "me" -description = "Zoomer application for boomers" -license = "MIT" -srcDir = "src" -bin = @["boomer"] - -requires "nim >= 0.18.0", "x11 >= 1.1", "opengl >= 1.2.3" diff --git a/nim.cfg b/nim.cfg new file mode 100644 index 0000000..4ab8248 --- /dev/null +++ b/nim.cfg @@ -0,0 +1,4 @@ +--noNimblePath +--path="submodules/x11" +--path="submodules/opengl/src" +-d:danger diff --git a/submodules/opengl b/submodules/opengl new file mode 160000 index 0000000..8e2e098 --- /dev/null +++ b/submodules/opengl @@ -0,0 +1 @@ +Subproject commit 8e2e098f82dc5eefd874488c37b5830233cd18f4 diff --git a/submodules/x11 b/submodules/x11 new file mode 160000 index 0000000..29aca5e --- /dev/null +++ b/submodules/x11 @@ -0,0 +1 @@ +Subproject commit 29aca5e519ebf5d833f63a6a2769e62ec7bfb83a