Change desktop file to RDNS formt
[geeqie.git] / scripts / devel-install.sh
1 #!/bin/sh
2
3 #/*
4 # * Copyright (C) 2023 The Geeqie Team
5 # *
6 # * Author: Colin Clark
7 # *
8 # * This program is free software; you can redistribute it and/or modify
9 # * it under the terms of the GNU General Public License as published by
10 # * the Free Software Foundation; either version 2 of the License, or
11 # * (at your option) any later version.
12 # *
13 # * This program is distributed in the hope that it will be useful,
14 # * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 # * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
16 # * GNU General Public License for more details.
17 # *
18 # * You should have received a copy of the GNU General Public License along
19 # * with this program; if not, write to the Free Software Foundation, Inc.,
20 # * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
21 # */
22
23 ## @file
24 ## @brief Install additional files for Geeqie development purposes
25 ##
26
27 if ! { [ -d ".git" ] && [ -d "src" ] && [ -f "geeqie.1" ] && [ -f "doxygen.conf" ]; }
28 then
29         printf "This is not the project root directory\n"
30     exit 1
31 fi
32
33 if ! zenity --title="Install files for Geeqie development" --question --text "This script will install:\n
34 default-jre                     # for doxygen diagrams
35 libdw-dev                       # for devel=enabled
36 libdwarf-dev            # for devel=enabled
37 libunwind-dev           # for devel=enabled
38 shellcheck                      # for meson tests
39 texlive-font-utils      # for doxygen diagrams
40 xvfb                            # for meson tests
41
42 Will download to $HOME/bin/ and make executable:\n
43 https://github.com/plantuml/plantuml/releases/download/v1.2023.8/plantuml-1.2023.8.jar  # for doxygen diagrams
44 https://raw.githubusercontent.com/Anvil/bash-doxygen/master/doxygen-bash.sed                    # for documenting script files\n
45
46 Continue?" --width=300
47 then
48         exit 0
49 fi
50
51 if ! mkdir -p "$HOME"/bin
52 then
53         printf "Cannot create %s\n" "$HOME"/bin
54         exit 1
55 fi
56
57 sudo apt install default-jre
58 sudo apt install libdw-dev
59 sudo apt install libdwarf-dev
60 sudo apt install libunwind-dev
61 sudo apt install shellcheck
62 sudo apt install texlive-font-utils
63 sudo apt install xvfb
64
65 cd "$HOME"/bin || exit 1
66
67 if ! [ -f doxygen-bash.sed ]
68 then
69         wget https://raw.githubusercontent.com/Anvil/bash-doxygen/master/doxygen-bash.sed
70         chmod +x doxygen-bash.sed
71 fi
72
73 ## @FIXME Get latest version
74 if ! [ -f plantuml.jar ]
75 then
76         wget https://github.com/plantuml/plantuml/releases/download/v1.2023.8/plantuml-1.2023.8.jar
77         ln --symbolic --force plantuml-1.2023.8.jar plantuml.jar
78         chmod +x plantuml.jar
79 fi
80
81