[dia/neduard/update_dev_docs: 14/17] #30 Move INSTALL to BUILDING.md and update it.
- From: Eduard <neduard src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [dia/neduard/update_dev_docs: 14/17] #30 Move INSTALL to BUILDING.md and update it.
- Date: Tue, 12 Feb 2019 17:59:42 +0000 (UTC)
commit 97d0016334b9242535bf3570e501914471c76f9f
Author: Eduard <eddnicodei gmail com>
Date: Thu Jan 31 14:59:29 2019 +0000
#30 Move INSTALL to BUILDING.md and update it.
BUILDING.md | 99 +++++++++++++++++++++++++++++++++++++++++
INSTALL | 144 ------------------------------------------------------------
README.md | 2 +-
3 files changed, 100 insertions(+), 145 deletions(-)
---
diff --git a/BUILDING.md b/BUILDING.md
new file mode 100644
index 00000000..c6099eac
--- /dev/null
+++ b/BUILDING.md
@@ -0,0 +1,99 @@
+# NOTE FOR WINDOWS USERS
+
+If you are reading this and just want to use Dia rather than
+compiling/extending it, you are in the wrong place. Please go to
+http://dia-installer.sourceforge.net and download the precompiled, easily
+installable binary.
+
+Otherwise, please read on :)
+
+# Requirements
+
+## General
+
+Dia is currently built using [meson](https://github.com/mesonbuild/meson). Meson can be installed either
via a package manager or run directly from source code. Please take 2 minutes to read their [Quick
Guide](https://mesonbuild.com/Quick-guide.html). It provides all the needed information to obtain meson and
run it.
+
+Build requirements are documented in the root [meson.build](/meson.build) file. Meson is designed to be
readable so please have a skim through the file. Some dependencies are required, while others are optional.
+
+As can be seen from `meson.build`, the main requirements are **GTK2**, **libxml2** and **zlib**. Note: at
the moment, **intltool** (`intltool-merge`) is also required.
+
+For reference, a number of other libraries are recommended for extra features. However, not all these have
been moved to meson. It is recommended you run `meson build` (to configure the build directory) and then
check which optional dependencies are not found:
+
+- Cairo is used for anti-alised rendering to screen or PNG as well as PDF:
+ - http://cairographics.org
+ - Minimum version required (if at all) is 1.6
+- Libart allows anti-aliased rendering and anti-aliased export to PNG:
+ - http://www.artofcode.com/libart.html
+- Libpng is need for libart based anti-aliased PNG export:
+ http://download.sourceforge.net/libpng/
+- Libxslt allows export through XSLT translation schemas:
+ - ftp://ftp.gnome.org/pub/GNOME/sources/libxslt/
+- **Python scripting is also possible** by installing Python 2.7 (note that meson requires python 3,
therefore python2 needs to be explicitly installed) and pygtk.
+
+## Windows
+
+Currently (as of 1f930b94) the Windows build is under heavy development and not all features are supported.
Help is always welcome!
+
+The following configuration is supported however: MSYS2 (Pacman v5.1.2) + Mingw64 on Windows 10.
+
+It is recommended you develop Dia in a Virtual Machine since Windows 10 is free to download.
+
+For all git-related operations, it is recommended you use https://gitforwindows.org/ instead of MSYS2.
+
+Please read MSYS2 instructions on https://www.msys2.org/ and their wiki carefully before installing MSYS2.
They have three different environments: MSYS2, Mingw64 and Mingw32. **ALL** packages must be installed from
MSYS2 environment, and all development needs to be performed from Mingw64 one.
+
+It is also recommended you use the source version of meson (https://github.com/mesonbuild/meson) rather than
using the MSYS2 one. However, it is still recommended you install meson from `pacman` since it has a few
dependencies, most notably `ninja`
+
+It is also recommended you read https://www.gtk.org/download/windows.php, even though it is for GTK3 instead
of GTK2.
+
+Assuming you are all set and that pacman is up to date, you'll need to install at least the following
packages:
+```
+base-devel
+mingw-w64-x86_64-toolchain
+mingw-w64-x86_64-gtk2
+mingw-w64-x86_64-python2
+mingw-w64-x86_64-python2-pygtk
+intltool
+```
+
+You might need to install additional packages. Please file an issue / merge request with the updated
packages to ensure others know what to install also.
+
+# Building and Running
+
+Please make sure you at least skim the Meson [Quick Guide](https://mesonbuild.com/Quick-guide.html) before
building.
+
+There are currently (as of 1f930b94) two ways to run Dia:
+
+## 1. Installing to a local prefix
+```
+cd path/to/dia
+path/to/meson.py build -Dprefix=`pwd`/build/install
+cd build
+ninja install
+# Wait for meson to configure, build and install
+# If missing dependencies, please check "Requirements" section
+./install/bin/dia
+```
+
+## 2. Using `run_with_dia_env` (recommended only on *nix)
+```
+cd path/to/dia
+path/to/meson.py build
+cd build
+ninja
+./run_with_dia_env ./app/dia
+```
+
+## Running tests
+
+Build dia then simply do `ninja test`.
+
+## Windows issues
+The most common issue currently on MSYS2 is that paths are incorrect. There are two potential types of
issues that you need to be aware of:
+
+1. "libdia.dll not found": This happens because PATH does not contain the directory where libdia.dll is
located. Simply add that directory to PATH, e.g. `PATH=$(pwd)/lib/:$PATH ./run_with_dia_env ./app/dia`
+2. "Python site module not found": This is because PYTHONPATH or PYTHONHOME are not set. Simply set both
to /mingw64/lib/python2.7 and that should resolve the issue.
+
+# Installing
+
+Simply do `ninja install`.
\ No newline at end of file
diff --git a/README.md b/README.md
index 8056b5ab..dbb3e43f 100644
--- a/README.md
+++ b/README.md
@@ -15,7 +15,7 @@ General documentation can be found in the [doc/](doc/) directory.
If you are thinking of contributing (either code or diagrams), please see
[HACKING](HACKING.md).
-For compilation and installation instructions please see [INSTALL](INSTALL).
+For compilation and installation instructions please see [BUILDING](BUILDING.md).
# Bug reporting
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]