README.md 6.38 KB
Newer Older
Maren Hachmann's avatar
Maren Hachmann committed
1 2
## What do you need this for?

3
If you want to help the Inkscape project by testing feature branches (branches of the Inkscape code that have been created by a developer
Maren Hachmann's avatar
Maren Hachmann committed
4 5
to work on a specific feature), or if you would like to install multiple Inkscape versions in parallel on Linux, this script is for you.

6 7 8
When run on the command line with the name of an Inkscape branch, it will build a package of it that it installs into a separate
location for that branch. It will also create a start script file on your desktop, that needs to be run to start the Inkscape program
for that branch. This is necessary to make sure that the different Inkscape versions will not mess up each others' preferences and
Maren Hachmann's avatar
Maren Hachmann committed
9 10
will not disturb how extensions work.

11 12
The builds created by this script will not interfere with an Inkscape installation that has been installed via package management
(ppa or official repositories) or snap.
13 14 15

This means that you can continue to use your stable Inkscape version, and have other versions available for testing.

Maren Hachmann's avatar
Maren Hachmann committed
16 17
Before you use this script, make sure that you have at least 3 GB of free disk space (more is better).

Maren Hachmann's avatar
Maren Hachmann committed
18 19 20 21 22
## INSTRUCTIONS


### Step 1: Install required software:

23 24
To execute this script, you will need:
`libnotify`, `git`, `checkinstall` and all dependencies for building the main program (find an always up-to-date list
Maren Hachmann's avatar
Maren Hachmann committed
25 26
[here](https://gitlab.com/inkscape/inkscape-ci-docker/blob/master/Dockerfile)), and `cmake`.

27
As of 2018-09-27, this means that you need to execute this installation command on the command line (tested for Ubuntu 16.04, Ubuntu 17.10 and Ubuntu 18.04):
Maren Hachmann's avatar
Maren Hachmann committed
28

29
`sudo apt-get install git libnotify-bin checkinstall intltool pkg-config python-dev libtool ccache libart-2.0-dev libaspell-dev libboost-dev libcdr-dev libgc-dev libgdl-3-dev libglib2.0-dev libgnomevfs2-dev libgsl-dev libgtk-3-dev libgtkmm-3.0-dev libgtkspell-dev libgtkspell3-3-dev libjemalloc-dev liblcms2-dev libmagick++-dev libpango1.0-dev libpng-dev libpoppler-glib-dev libpoppler-private-dev libpopt-dev libpotrace-dev librevenge-dev libsigc++-2.0-dev libsoup2.4-dev libvisio-dev libwpg-dev libxml-parser-perl libxml2-dev libxslt1-dev libyaml-dev python-lxml zlib1g-dev cmake libgtkmm-2.4-dev gdb adwaita-icon-theme-full`
Maren Hachmann's avatar
Maren Hachmann committed
30

Maren Hachmann's avatar
Maren Hachmann committed
31 32
This will install up to 650 Mb of software.

Maren Hachmann's avatar
Maren Hachmann committed
33 34
### Step 2: Get the source code:

35 36 37 38
#### For this script:
Download https://gitlab.com/Moini/make_ink/-/archive/master/make_ink-master.zip and unpack it.

#### For Inkscape:
39
The script will by default look for the Inkscape source code in your documents directory. To find out where that is type `xdg-user-dir DOCUMENTS`
40
on the command line. Either in that directory, or in another directory of your choice, clone the git repository for Inkscape:
Maren Hachmann's avatar
Maren Hachmann committed
41 42 43

```
cd /directory/of/choice
44
git clone --recurse-submodules https://gitlab.com/inkscape/inkscape.git
Maren Hachmann's avatar
Maren Hachmann committed
45 46
```

47
(this will create a new directory for your local copy of the Inkscape git repository, which will take very long and require ~2GB of disk space!)
Maren Hachmann's avatar
Maren Hachmann committed
48

49 50
### Step 3: Adapt the settings for this script:

51
In the directory of the make_inkscape script, there is a file called 'make_ink_config_template'. Copy this file to 'make_ink_config'. This is your settings file. If you like, you can adapt the paths used for compilation in that file. The comments explain what they will do. 
52 53

Default parameters will work okay, too, if you followed the instructions above.
Maren Hachmann's avatar
Maren Hachmann committed
54

55 56
The only really important thing is the location of the git clone you made in step 2. If you did not use your documents directory for it,
then you need to write the correct path at ~ line 13, by replacing the text inside the quotations of "$DOCUMENTS_DIR/inkscape".
Maren Hachmann's avatar
Maren Hachmann committed
57

58
### Step 4: Build Inkscape with the script:
Maren Hachmann's avatar
Maren Hachmann committed
59 60 61 62 63

Execute

```
cd /directory/where/script/is_saved
64
./make_inkscape
Maren Hachmann's avatar
Maren Hachmann committed
65 66
```

Maren Hachmann's avatar
Maren Hachmann committed
67
in a terminal to build and install the Inkscape master (main development) branch,
Maren Hachmann's avatar
Maren Hachmann committed
68 69 70 71 72

or optionally, run

```
cd /directory/where/script/is_saved
Maren Hachmann's avatar
Maren Hachmann committed
73
./make_inkscape cool_branch_name
Maren Hachmann's avatar
Maren Hachmann committed
74 75
```

Maren Hachmann's avatar
Maren Hachmann committed
76
to install another Inkscape version from another branch, which must be in the common Inkscape git repository.
Maren Hachmann's avatar
Maren Hachmann committed
77

Maren Hachmann's avatar
Maren Hachmann committed
78 79 80 81 82 83
To force a build, in case something went wrong with the previous one, you can add ´-f´ after indicating a branch name:

```
cd /directory/where/script/is_saved
./make_inkscape cool_branch_name -f
```
84

85 86
(this will rebuild the Inkscape branch 'cool_branch_name' from scratch)

Maren Hachmann's avatar
Maren Hachmann committed
87 88 89 90
The script will take some time to execute, and it will also use a lot of your CPU power.

Near the end of the process, it will ask you to enter your password once, to be allowed to install the freshly created package.

91 92
### Step 5: Start your fresh Inkscape version:

93 94
The script will place two new files in your desktop directory. You **must** use one of them to start the new Inkscape version (if you don't,
you risk messing up preferences and extensions and also testing the wrong version).
95

96
If your desktop environment allows files in your Desktop directory to appear on the desktop (on Unity, this does not seem to work,
97
but on Xfce, it does), just double-click one of the two new files on your desktop to execute. Else navigate to the folder and double-click the file, or run it via terminal.
98

99 100
#### Step 5a: Start Inkscape for using / general testing

101
If you just want to play around or judge performance, use the one whose name does not start with 'Db' (for 'debug'). Debugging slows Inkscape down, so this one has a better performance.
102 103 104

#### Step 5b: Start Inkscape to gather crash information

Maren Hachmann's avatar
Maren Hachmann committed
105
One of the two desktop files has got its name starting with 'Db'. Use this starter if you want to get a gdb traceback from crashes for sharing with developers. You can find the debug output file in your /tmp directory, as `/tmp/inkscape_debug_trace_<Date>.txt`. Attach this file to bug reports for developers to investigate the crash.
106 107 108 109

### Go!

You can verify the Inkscape version in the 'Help > About' submenu.
110 111 112

And now: have fun playing around with the other versions :) (and please report your findings to the developers).

Maren Hachmann's avatar
Maren Hachmann committed
113 114
### Uninstall branch packages again

115 116
When a branch has been merged into the official Inkscape development branch, and you do not want and need it anymore, your local
build can be uninstalled (they tend to accumulate ;-)). To get a nice list of all the different Inkscape versions that are installed
Maren Hachmann's avatar
Maren Hachmann committed
117 118 119 120 121 122 123 124 125 126 127 128
on your system, do:

```
dpkg --get-selections | grep inkscape
```

To remove one of them, do:

```
sudo dpkg --remove package_name_from_the_list
```

129
Now you can also delete the corresponding 'start button' on your desktop, and the corresponding preferences directory in ~/.config/.