aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJussi Pakkanen <jpakkane@gmail.com>2020-12-22 18:20:54 +0200
committerJussi Pakkanen <jpakkane@gmail.com>2020-12-22 18:08:47 +0000
commit8a11cf357eaae46fd7efbb9993c0bb00e9529a13 (patch)
tree841e3679cf4146b0b9dee8d5a9612ec410be4a84
parent55a3458d7bd259133596df496b415f7849be02b8 (diff)
downloadmeson-8a11cf357eaae46fd7efbb9993c0bb00e9529a13.zip
meson-8a11cf357eaae46fd7efbb9993c0bb00e9529a13.tar.gz
meson-8a11cf357eaae46fd7efbb9993c0bb00e9529a13.tar.bz2
Add simple start page for beginners. [skip ci]
-rw-r--r--docs/markdown/SimpleStart.md164
-rw-r--r--docs/markdown/images/linux_alldone.pngbin0 -> 78463 bytes
-rw-r--r--docs/markdown/images/osx_download.pngbin0 -> 177582 bytes
-rw-r--r--docs/markdown/images/osx_working.pngbin0 -> 152087 bytes
-rw-r--r--docs/markdown/images/osx_xcode.pngbin0 -> 242557 bytes
-rw-r--r--docs/markdown/images/py3-install-1.pngbin101763 -> 0 bytes
-rw-r--r--docs/markdown/images/py3-install-2.pngbin99866 -> 0 bytes
-rw-r--r--docs/markdown/images/py3-install-3.pngbin101063 -> 0 bytes
-rw-r--r--docs/markdown/images/win_dlvs.pngbin0 -> 219590 bytes
-rw-r--r--docs/markdown/images/win_downloadmeson.pngbin0 -> 92472 bytes
-rw-r--r--docs/markdown/images/win_installvs.pngbin0 -> 190136 bytes
-rw-r--r--docs/markdown/images/win_vstoolsprompt.pngbin0 -> 160027 bytes
-rw-r--r--docs/markdown/images/win_working.pngbin0 -> 94387 bytes
-rw-r--r--docs/markdown/index.md5
-rw-r--r--docs/sitemap.txt1
15 files changed, 170 insertions, 0 deletions
diff --git a/docs/markdown/SimpleStart.md b/docs/markdown/SimpleStart.md
new file mode 100644
index 0000000..bda532a
--- /dev/null
+++ b/docs/markdown/SimpleStart.md
@@ -0,0 +1,164 @@
+---
+short-description: Simple getting started guide
+...
+
+# The Absolute Beginner's Guide to Installing and Using Meson
+
+This page is meant for people who are new to using Meson and possibly
+even to compiling C and/or C++ code in general. It is meant to contain
+one simple way of getting your build environment up and running. If
+you are more experienced and have your own preferred way of installing
+and using development software, feel free to use that instead. This
+guide only deals with Linux, Windows and macOS platforms. If you use
+some other platform, such as one of the BSDs, you probably already
+know how to install development tools on it (probably better than we
+do, even).
+
+There are three phases to getting a development environment running.
+
+1. Installing a compiler toolchain
+2. Installing Meson
+3. Creating a project and building it
+
+## Installing a compiler toolchain
+
+### Linux
+
+All Linux distributions provide easy access to development tools.
+Typically you need to open a terminal and execute one command, which
+depends on your distro.
+
+ - Debian, Ubuntu and derivatives: `sudo apt install build-essential`
+ - Fedora, Centos, RHEL and derivatives: `sudo dnf install gcc-c++`
+ - Arch: `sudo pacman -S gcc`
+
+### Windows
+
+The most common development toolchain on Windows is Visual Studio,
+which can be downloaded from [the Visual Studio web
+site](https://visualstudio.microsoft.com/). Select the Community
+version unless you have bought a license.
+
+![Download page of Visual Studio](images/win_dlvs.png)
+
+Download the installer and run it. When you are given a list of things
+to install, select *Desktop development with C++*. This installs both
+a C and a C++ compiler.
+
+![Installing the Visual Studio compilers](images/win_installvs.png)
+
+Once the installer finishes the compiler toolchain is ready to use.
+
+### macOS
+
+On macOS the development toolchain must be installed via the Mac app
+store. Search for an app called XCode and install it.
+
+![App store page for XCode](images/osx_xcode.png)
+
+*Note:* Installing XCode is not sufficient by itself. You also need to
+start XCode' GUI application once. This will make XCode download and
+install more files that are needed for compilation.
+
+## Installing Meson
+
+### Linux
+
+Installing Meson is just as simple as installing the compiler toolchain.
+
+ - Debian, Ubuntu and derivatives: `sudo apt install meson ninja-build`
+ - Fedora, Centos, RHEL and derivatives: `sudo dnf install meson ninja-build`
+ - Arch: `sudo pacman -S meson`
+
+### Windows
+
+Meson provides a standard Windows `.msi` installer that can be
+downloaded from [the Releases
+page](https://github.com/mesonbuild/meson/releases).
+
+![Meson installed download](images/win_downloadmeson.png)
+
+Download and run it to install all the necessary bits. You can verify
+that your installation is working by running the Visual Studio
+developer tools command prompt that can be found in the start menu.
+
+![Devtool prompt](images/win_vstoolsprompt.png)
+
+You should be able to run both `meson` and `ninja` and query their
+versions.
+
+![A working Windows install](images/win_working.png)
+
+### macOS
+
+Due to the way Apple has set things up, getting macOS working is a bit
+more complicated. The first thing you need to do is to install the
+newest version of Python 3 [from the project's web
+site](https://www.python.org/downloads/mac-osx/).
+
+![Downloading the Python for macOS installer](images/osx_download.png)
+
+Once you have a working Python you can install the necessary bits
+using Python's Pip package manager.
+
+ pip install --user meson ninja
+
+This will install the necessary files in your home directory, but
+sadly they are not directly usable. You need to add the directory they
+are written to in the system's `PATH` environment variable so the
+programs can be used directly from the terminal. This requires editing
+a text configuration file.
+
+The correct file to edit depends on which shell you are currently
+using. If you have an old macOS install it is probably Bash and the
+file you need to edit is `.bash_profile`. If, on the other hand, you
+have a new macOS install then you are probably using Zsh and the file
+to edit is `.zshrc`. In either case the file should be in your home
+directory.
+
+For Bash the line you need to add is this:
+
+ PATH=$PATH:/Users/username/Library/Python/3.9/bin
+
+whereas for Zsh it is this:
+
+ export PATH=$PATH:/Users/username/Library/Python/3.9/bin
+
+In both case you need to change the values for `username` and `3.9`.
+The former needs to be substituted with your Unix username while the
+latter needs to contain the actual Python version you installed.
+
+Once this is done close the terminal application and start it again.
+Now you should be able to run the `meson` command.
+
+![A working macOS install](images/osx_working.png)
+
+## Running Meson
+
+Start a terminal application. On Windows you have to use the Visual
+Studio Developer Tools Command Prompt as discussed above, because the
+compilers are only available in that terminal. You also need to change
+into your home directory (Linux and macOS terminals start in the home
+directory by default).
+
+ cd \users\username
+
+Create a new directory to hold your project.
+
+ mkdir testproject
+ cd testproject
+
+Use Meson to create and build a new sample project.
+
+ meson init --name testproject --build
+
+This will create a project skeleton for you and compile it. The result
+is put in the `build` subdirectory and can be run directly from there.
+
+ build/testproject
+
+![All finished and ready to go](images/linux_alldone.png)
+
+The project is now ready for development. You can edit the code with
+any editor and it is rebuilt by going in the `build` subdirectory and
+executing the `meson compile` command.
diff --git a/docs/markdown/images/linux_alldone.png b/docs/markdown/images/linux_alldone.png
new file mode 100644
index 0000000..378c893
--- /dev/null
+++ b/docs/markdown/images/linux_alldone.png
Binary files differ
diff --git a/docs/markdown/images/osx_download.png b/docs/markdown/images/osx_download.png
new file mode 100644
index 0000000..3315886
--- /dev/null
+++ b/docs/markdown/images/osx_download.png
Binary files differ
diff --git a/docs/markdown/images/osx_working.png b/docs/markdown/images/osx_working.png
new file mode 100644
index 0000000..0b1320f
--- /dev/null
+++ b/docs/markdown/images/osx_working.png
Binary files differ
diff --git a/docs/markdown/images/osx_xcode.png b/docs/markdown/images/osx_xcode.png
new file mode 100644
index 0000000..14a6282
--- /dev/null
+++ b/docs/markdown/images/osx_xcode.png
Binary files differ
diff --git a/docs/markdown/images/py3-install-1.png b/docs/markdown/images/py3-install-1.png
deleted file mode 100644
index 74f0819..0000000
--- a/docs/markdown/images/py3-install-1.png
+++ /dev/null
Binary files differ
diff --git a/docs/markdown/images/py3-install-2.png b/docs/markdown/images/py3-install-2.png
deleted file mode 100644
index 9a8f1fe..0000000
--- a/docs/markdown/images/py3-install-2.png
+++ /dev/null
Binary files differ
diff --git a/docs/markdown/images/py3-install-3.png b/docs/markdown/images/py3-install-3.png
deleted file mode 100644
index b702910..0000000
--- a/docs/markdown/images/py3-install-3.png
+++ /dev/null
Binary files differ
diff --git a/docs/markdown/images/win_dlvs.png b/docs/markdown/images/win_dlvs.png
new file mode 100644
index 0000000..938c30d
--- /dev/null
+++ b/docs/markdown/images/win_dlvs.png
Binary files differ
diff --git a/docs/markdown/images/win_downloadmeson.png b/docs/markdown/images/win_downloadmeson.png
new file mode 100644
index 0000000..5917039
--- /dev/null
+++ b/docs/markdown/images/win_downloadmeson.png
Binary files differ
diff --git a/docs/markdown/images/win_installvs.png b/docs/markdown/images/win_installvs.png
new file mode 100644
index 0000000..b217525
--- /dev/null
+++ b/docs/markdown/images/win_installvs.png
Binary files differ
diff --git a/docs/markdown/images/win_vstoolsprompt.png b/docs/markdown/images/win_vstoolsprompt.png
new file mode 100644
index 0000000..d3f0c2b
--- /dev/null
+++ b/docs/markdown/images/win_vstoolsprompt.png
Binary files differ
diff --git a/docs/markdown/images/win_working.png b/docs/markdown/images/win_working.png
new file mode 100644
index 0000000..4bc46d7
--- /dev/null
+++ b/docs/markdown/images/win_working.png
Binary files differ
diff --git a/docs/markdown/index.md b/docs/markdown/index.md
index ccd341f..eba1e58 100644
--- a/docs/markdown/index.md
+++ b/docs/markdown/index.md
@@ -24,6 +24,11 @@ code.
* built-in multiplatform dependency provider that works together with distro packages
* fun!
+## Quickstart for beginners
+
+Are you an absolute beginner when it comes to programming? No worries,
+read [this beginner guide](SimpleStart.md) to get started.
+
## A full manual
The documentation on this site is freely available for all. However
diff --git a/docs/sitemap.txt b/docs/sitemap.txt
index 27f6638..4cae9fe 100644
--- a/docs/sitemap.txt
+++ b/docs/sitemap.txt
@@ -1,4 +1,5 @@
index.md
+ SimpleStart.md
Getting-meson.md
Quick-guide.md
Tutorial.md