An error occurred while loading the file. Please try again.
-
Pierre-Antoine Rouby authoredd418b57f
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
#! /bin/sh
# linux.sh -- Pamhyr
# Copyright (C) 2023 INRAE
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <https://www.gnu.org/licenses/>.
echo " *** RM OLD ENV"
rm dist/ -rf
rm linux-pamhyr-venv -rf
echo " *** SETUP ENV"
python3 -m venv linux-pamhyr-venv
. linux-pamhyr-venv/bin/activate
pip3 install -r ../requirements.txt
echo " *** PYINSTALL"
pyinstaller -y \
--paths linux-pamhyr-venv/lib/python3.8/site-packages \
../src/pamhyr.py
echo " *** MAKE QM"
# Update TS and build QM files
OLD_PWD=$PWD
cd ../src/lang/
./create_ts.sh
cd $OLD_PWD
echo " *** COPY DATA"
mkdir -p dist/pamhyr/View/ui
mkdir -p dist/pamhyr/View/ui/Widgets
cp -r ../src/View/ui/ressources/ dist/pamhyr/View/ui/
cp -r ../src/View/ui/Widgets/*.ui dist/pamhyr/View/ui/Widgets/
cp -r ../src/View/ui/*.ui dist/pamhyr/View/ui/
mkdir -p dist/pamhyr/lang
cp -r ../src/lang/*.qm dist/pamhyr/lang/
cp ../VERSION dist/pamhyr/
cp ../AUTHORS dist/pamhyr/
cp ../LICENSE dist/pamhyr/
mkdir -p dist/pamhyr/mage/
cp ../mage/mage dist/pamhyr/mage/
cp ../mage/mage_extraire dist/pamhyr/mage/
cp ../mage/mailleurPF dist/pamhyr/mage/
mkdir -p dist/pamhyr/tests_cases/
mkdir -p dist/pamhyr/tests_cases/Saar
cp ../tests_cases/Saar/Saar.pamhyr dist/pamhyr/tests_cases/Saar/
echo " *** MAKE SRC PACKAGE"
OLD_PWD=$PWD
cd ../
git archive --format=tar.gz -o pamhyr-src.tar.gz HEAD
cd $OLD_PWD
mv ../pamhyr-src.tar.gz ./
echo " *** MAKE BIN PACKAGE"
OLD_PWD=$PWD
cd dist/
tar --xz -cf pamhyr-gnulinux-amd64.tar.xz pamhyr --checkpoint=.100
cd $OLD_PWD
mv dist/pamhyr-gnulinux-amd64.tar.xz ./
echo " *** DONE"