From aed36e15c5ee476531abf990c251dac4ff3f5fa0 Mon Sep 17 00:00:00 2001 From: Martin Owens Date: Tue, 11 Sep 2018 19:11:22 +0200 Subject: Update install and contributing --- CONTRIBUTING.md | 45 ++++++++++++++++++++++++++++++++------------- INSTALL.md | 27 ++------------------------- 2 files changed, 34 insertions(+), 38 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 93b61a294..d2626e4a2 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -64,25 +64,44 @@ appreciate this. New files should have one or two lines describing the purpose of the code inside the file. -Makefiles -========= -Inkscape currently uses CMake. We encourage you to build it by creating a build -folder, and running +Building +======== -`cmake <<>> \` -`-DCMAKE_C_COMPILER_LAUNCHER=ccache \` -`-DCMAKE_CXX_COMPILER_LAUNCHER=ccache \` -`-DCMAKE_BUILD_TYPE=Debug \` -`-DCMAKE_INSTALL_PREFIX:PATH=$PWD/..` +This is the best set of instructions for setting up your build directory... -This uses ccache to speed up later builds (optional), create a Debug build -(use "Release" otherwise) and makes a local install prefix. +You should install ninga and ccache for the fastest build: -(If you have ninja available, add "-G Ninja" to enable it) +```bash +sudo apt-get install ninja-build ccache +``` + +Next we prepare a build directory with a symlink to Inkscape's share folder, add a profile dir and set the bin folder (optional): -Then, run `make -j$(nproc) install` (or `ninja install`) to build & install +```bash +ln -s share share/inkscape +mkdir -p build/conf +cd build +export INKSCAPE_PROFILE_DIR=$PWD/conf +PATH=$PWD/bin/:$PATH +``` +Now we invoke cmake, letting it know to use our new build directory prefix, ccache and the Ninja compiler: +```bash +cmake -DCMAKE_INSTALL_PREFIX:PATH=$PWD/../ -DCMAKE_C_COMPILER_LAUNCHER=ccache -DCMAKE_CXX_COMPILER_LAUNCHER=ccache -DCMAKE_BUILD_TYPE=Debug -G Ninja .. +``` + +Invoke ninja to build the code. You may also use plain gcc's `make` if you didn't specific `-G` in the command above: +```bash +ninja +``` + +Now we can run inkscape that we have built, with the latest resources and code: + +```bash +./bin/inkscape +``` + Testing ======= diff --git a/INSTALL.md b/INSTALL.md index 052a8d935..0978924be 100644 --- a/INSTALL.md +++ b/INSTALL.md @@ -17,31 +17,8 @@ a developer and packager task. These instructions are kept on the Inkscape wiki. Running Without Installing ========================== -For developers and others who want to run inkscape without installing it: - -```bash -sudo apt-get install ninja-build ccache -``` - -```bash -ln -s share share/inkscape -mkdir -p build/conf -cd build -cmake -DCMAKE_INSTALL_PREFIX:PATH=$PWD/../ -DCMAKE_C_COMPILER_LAUNCHER=ccache -DCMAKE_CXX_COMPILER_LAUNCHER=ccache -DCMAKE_BUILD_TYPE=Debug -G Ninja .. -ninja -export INKSCAPE_PROFILE_DIR=$PWD/conf -PATH=$PWD/bin/:$PATH -./bin/inkscape -``` - -This won't work for other platforms such as Windows and Mac, see above. But -what it is doing is linking the share directory into a location where -the inkscape binary will be able to find it. Allowing you to change the -inkscape shared files without rebuilding or installing. - -Then setting a local configuration directory, keeping your configurations -separate from any installed version. - +For developers and others who want to run inkscape without installing it please +see the ***Building*** section in the `CONTRIBUTING.md` file. Required Dependencies ===================== -- cgit v1.2.3