pour make a priori non, mais si c'est indispensable pour qmake, autant le laisser, et ne pas utiliser --directory=.
mais pas le dernier, pour retourner au répertoire de départ, je t'ai expliqué que ça ne sert à rien.
Version imprimable
pour make a priori non, mais si c'est indispensable pour qmake, autant le laisser, et ne pas utiliser --directory=.
mais pas le dernier, pour retourner au répertoire de départ, je t'ai expliqué que ça ne sert à rien.
je l'ai bien enlevé (post #18)Citation:
mais pas le dernier, pour retourner au répertoire de départ, je t'ai expliqué que ça ne sert à rien.
Code:
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 #!/bin/sh # installqcad, installeur de qcad # Copyright (C) 2023 Mathieu SERPA # 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/>. if test ${UID:-$(id -u)} -gt 0; then echo "droit root requis"; exit 1; fi apt update apt install qtbase5-dev #pour qmake version="$(qmake --version | tail -1 | cut -d ' ' -f4)" dirinstall=/tmp/qcad apt install gcc make libx11-dev libxext-dev libxrender-dev libglu1-mesa-dev libfreetype6-dev libfontconfig1-dev libssl-dev libdbus-1-dev libsm-dev gcc make libx11-dev libxext-dev libxrender-dev libglu1-mesa-dev libfreetype6-dev libfontconfig1-dev libssl-dev libdbus-1-dev libsm-dev qt5-qmake libqt5svg5-dev libqt5script5 libqt5help5 libqt5designer5 libqt5scripttools5 qtscript5-dev qtxmlpatterns5-dev-tools libqt5xmlpatterns5 libqt5xmlpatterns5-dev libqt5designer5 python3-pyside2.qtuitools libqscintilla2-qt5-designer libqt5designer5 qttools5-dev qt5-image-formats-plugins qtwayland5 qtwayland5-dev-tools libqt5waylandclient5 qtscript5-dev qttools5-dev libqt5xmlpatterns5-dev if [ -d "$dirinstall" ];then echo "$dirinstall" existe déja exit 2 fi mkdir -p "$dirinstall" git clone https://github.com/qcad/qcad.git "$dirinstall" if [ ! -d "$dirinstall"/src/3rdparty/qt-labs-qtscriptgenerator-"$version" ] ;then mkdir -p "$dirinstall"/src/3rdparty/qt-labs-qtscriptgenerator-"$version" cat > "$dirinstall"/src/3rdparty/qt-labs-qtscriptgenerator-"$version"/qt-labs-qtscriptgenerator-"$version".pro <<FIN include( ../../../shared.pri ) SUBDIRS = ../qt-labs-qtscriptgenerator-5.5.0/qtbindings TEMPLATE = subdirs FIN fi cd "$dirinstall" qmake -r CONFIG+=ractivated make release cp -r "$dirinstall" /opt cat > /usr/local/bin/qcad <<FIN XDG_SESSION_TYPE=x11 LD_LIBRARY_PATH=/opt/qcad/release /opt/qcad/release/qcad-bin FIN chmod 755 /usr/local/bin/qcad cp /opt/qcad/qcad.desktop /usr/share/applications if [ ! -d /usr/local/share/icons/hicolor/256x256/apps ];then mkdir -p /usr/local/share/icons/hicolor/256x256/apps fi cp /opt/qcad/scripts/qcad_icon.png /usr/local/share/icons/hicolor/256x256/apps
je ne sortirais pas du script si le dirinstall existe déjà.
je le renommerais avec un horodatage, avec un simple avertissement.
et, c'est toute la chaîne qu'il faut mettre entre guillemets, pas uniquement les variables.Code:[ ! -d "$dirinstall/src/3rdparty/qt-labs-qtscriptgenerator-$version" ]
ça vaut pour toutes les chaînes dans lesquelles il y a une/des variable(s).
comme cela: ?
voir d'ici deux heures si ça marcheCode:
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 #!/bin/sh # installqcad, installeur de qcad # Copyright (C) 2023 Mathieu SERPA # 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/>. if test ${UID:-$(id -u)} -gt 0; then echo "droit root requis"; exit 1; fi apt update apt install qtbase5-dev #pour qmake version="$(qmake --version | tail -1 | cut -d ' ' -f4)" dirinstall=/tmp/qcad maintenant="$(date|cut -d ' ' -f2,3,4,5)" apt install gcc make libx11-dev libxext-dev libxrender-dev libglu1-mesa-dev libfreetype6-dev libfontconfig1-dev libssl-dev libdbus-1-dev libsm-dev gcc make libx11-dev libxext-dev libxrender-dev libglu1-mesa-dev libfreetype6-dev libfontconfig1-dev libssl-dev libdbus-1-dev libsm-dev qt5-qmake libqt5svg5-dev libqt5script5 libqt5help5 libqt5designer5 libqt5scripttools5 qtscript5-dev qtxmlpatterns5-dev-tools libqt5xmlpatterns5 libqt5xmlpatterns5-dev libqt5designer5 python3-pyside2.qtuitools libqscintilla2-qt5-designer libqt5designer5 qttools5-dev qt5-image-formats-plugins qtwayland5 qtwayland5-dev-tools libqt5waylandclient5 qtscript5-dev qttools5-dev libqt5xmlpatterns5-dev if [ -d "$dirinstall" ];then echo "$dirinstall" renommé en "$dirinstall-$maintenant" mv "$dirinstall" "$dirinstall-$maintenant" fi mkdir -p "$dirinstall" git clone https://github.com/qcad/qcad.git "$dirinstall" if [ ! -d "$dirinstall/src/3rdparty/qt-labs-qtscriptgenerator-$version" ] ;then mkdir -p "$dirinstall/src/3rdparty/qt-labs-qtscriptgenerator-$version" cat > "$dirinstall/src/3rdparty/qt-labs-qtscriptgenerator-$version/qt-labs-qtscriptgenerator-$version.pro" <<FIN include( ../../../shared.pri ) SUBDIRS = ../qt-labs-qtscriptgenerator-5.5.0/qtbindings TEMPLATE = subdirs FIN fi cd "$dirinstall" qmake -r CONFIG+=ractivated make release cp -r "$dirinstall" /opt cat > /usr/local/bin/qcad <<FIN XDG_SESSION_TYPE=x11 LD_LIBRARY_PATH=/opt/qcad/release /opt/qcad/release/qcad-bin FIN chmod 755 /usr/local/bin/qcad cp /opt/qcad/qcad.desktop /usr/share/applications if [ ! -d /usr/local/share/icons/hicolor/256x256/apps ];then mkdir -p /usr/local/share/icons/hicolor/256x256/apps fi cp /opt/qcad/scripts/qcad_icon.png /usr/local/share/icons/hicolor/256x256/apps
si on exécute ce script plusieurs fois, ça marche mais ça veut aller lus loin, il veut recommencer avec l'ancienne session
je propose:Code:
1
2
3
4
5
6 make[3]*: on quitte le répertoire «*/tmp/qcad/src/run*» make[2]*: on quitte le répertoire «*/tmp/qcad/src/run*» make[1]*: on quitte le répertoire «*/tmp/qcad/src*» cd ../qcad-26/ && ( test -e Makefile || /usr/lib/qt5/bin/qmake -o Makefile /tmp/qcad-26/qcad-26.pro CONFIG+=ractivated ) && make -f Makefile release Cannot find file: /tmp/qcad-26/qcad-26.pro. make: *** [Makefile:455 : sub----qcad-26-release_ordered] Erreur 2
au lieu de :
faire plutôtCode:mv "$dirinstall" "$dirinstall-$maintenant"
je vais essayer ça et je reviens pour vous dire si ça marcheCode:mv "$dirinstall" "$maintenant-$dirinstall"
non pas comme ça car:
je crois qu'il faut faire:Code:
1
2
3 /tmp/qcad renommé en 26 juin 2023 11:44:21-/tmp/qcad mv: impossible de déplacer '/tmp/qcad' vers '26 juin 2023 11:44:21-/tmp/qcad': Aucun fichier ou dossier de ce type fatal*: le chemin de destination '/tmp/qcad' existe déjà et n'est pas un répertoire vide.
et je reviens dans deux heures pour vous en dire des nouvellesCode:
1
2 echo "$dirinstall" renommé en "/tmp/$maintenant-qcad" mv "$dirinstall" "/tmp/$maintenant-qcad"
et voilà, ça fonctionne
le dossier /tmp/qcad a été renommé en "26 juin 2023 11:51:40-qcad"
il n'est pas allé plus loin comme tout à l'heure
qu'en pensez-vous?Code:
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 #!/bin/sh # installqcad, installeur de qcad # Copyright (C) 2023 Mathieu SERPA # 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/>. if test ${UID:-$(id -u)} -gt 0; then echo "droit root requis"; exit 1; fi apt update apt install qtbase5-dev #pour qmake version="$(qmake --version | tail -1 | cut -d ' ' -f4)" dirinstall=/tmp/qcad maintenant="$(date|cut -d ' ' -f2,3,4,5)" apt install gcc make libx11-dev libxext-dev libxrender-dev libglu1-mesa-dev libfreetype6-dev libfontconfig1-dev libssl-dev libdbus-1-dev libsm-dev gcc make libx11-dev libxext-dev libxrender-dev libglu1-mesa-dev libfreetype6-dev libfontconfig1-dev libssl-dev libdbus-1-dev libsm-dev qt5-qmake libqt5svg5-dev libqt5script5 libqt5help5 libqt5designer5 libqt5scripttools5 qtscript5-dev qtxmlpatterns5-dev-tools libqt5xmlpatterns5 libqt5xmlpatterns5-dev libqt5designer5 python3-pyside2.qtuitools libqscintilla2-qt5-designer libqt5designer5 qttools5-dev qt5-image-formats-plugins qtwayland5 qtwayland5-dev-tools libqt5waylandclient5 qtscript5-dev qttools5-dev libqt5xmlpatterns5-dev if [ -d "$dirinstall" ];then echo "$dirinstall" renommé en "/tmp/$maintenant-qcad" mv "$dirinstall" "/tmp/$maintenant-qcad" fi mkdir -p "$dirinstall" git clone https://github.com/qcad/qcad.git "$dirinstall" if [ ! -d "$dirinstall/src/3rdparty/qt-labs-qtscriptgenerator-$version" ] ;then mkdir -p "$dirinstall/src/3rdparty/qt-labs-qtscriptgenerator-$version" cat > "$dirinstall/src/3rdparty/qt-labs-qtscriptgenerator-$version/qt-labs-qtscriptgenerator-$version.pro" <<FIN include( ../../../shared.pri ) SUBDIRS = ../qt-labs-qtscriptgenerator-5.5.0/qtbindings TEMPLATE = subdirs FIN fi cd "$dirinstall" qmake -r CONFIG+=ractivated make release cp -r "$dirinstall" /opt cat > /usr/local/bin/qcad <<FIN XDG_SESSION_TYPE=x11 LD_LIBRARY_PATH=/opt/qcad/release /opt/qcad/release/qcad-bin FIN chmod 755 /usr/local/bin/qcad cp /opt/qcad/qcad.desktop /usr/share/applications if [ ! -d /usr/local/share/icons/hicolor/256x256/apps ];then mkdir -p /usr/local/share/icons/hicolor/256x256/apps fi cp /opt/qcad/scripts/qcad_icon.png /usr/local/share/icons/hicolor/256x256/apps
les modérateurs m'autoriseront-ils à poster une nouvelle discussion pour savoir comment on upload un code-source pour remplacer une ancienne version?
il suffit d'aller sur a page du code source et cliquer sur "éditer"
et hop! une commande externe de plus en moins :DCode:
1
2
3
4
5
6
7
8 versionPro="$dirinstall/src/3rdparty/qt-labs-qtscriptgenerator-$version/qt-labs-qtscriptgenerator-$version.pro" #... >"$versionPro" echo "include( ../../../shared.pri ) SUBDIRS = ../qt-labs-qtscriptgenerator-5.5.0/qtbindings TEMPLATE = subdirs" #... >/usr/local/bin/qcad echo "XDG_SESSION_TYPE=x11 LD_LIBRARY_PATH=/opt/qcad/release /opt/qcad/release/qcad-bin"
tu veux dire comme cela?
Code:
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 #!/bin/sh # installqcad, installeur de qcad # Copyright (C) 2023 Mathieu SERPA # 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/>. if test ${UID:-$(id -u)} -gt 0; then echo "droit root requis"; exit 1; fi apt update apt install qtbase5-dev #pour qmake version="$(qmake --version | tail -1 | cut -d ' ' -f4)" dirinstall=/tmp/qcad maintenant="$(date|cut -d ' ' -f2,3,4,5)" versionPro="$dirinstall/src/3rdparty/qt-labs-qtscriptgenerator-$version/qt-labs-qtscriptgenerator-$version.pro" #... apt install gcc make libx11-dev libxext-dev libxrender-dev libglu1-mesa-dev libfreetype6-dev libfontconfig1-dev libssl-dev libdbus-1-dev libsm-dev gcc make libx11-dev libxext-dev libxrender-dev libglu1-mesa-dev libfreetype6-dev libfontconfig1-dev libssl-dev libdbus-1-dev libsm-dev qt5-qmake libqt5svg5-dev libqt5script5 libqt5help5 libqt5designer5 libqt5scripttools5 qtscript5-dev qtxmlpatterns5-dev-tools libqt5xmlpatterns5 libqt5xmlpatterns5-dev libqt5designer5 python3-pyside2.qtuitools libqscintilla2-qt5-designer libqt5designer5 qttools5-dev qt5-image-formats-plugins qtwayland5 qtwayland5-dev-tools libqt5waylandclient5 qtscript5-dev qttools5-dev libqt5xmlpatterns5-dev if [ -d "$dirinstall" ];then echo "$dirinstall" renommé en "/tmp/$maintenant-qcad" mv "$dirinstall" "/tmp/$maintenant-qcad" fi mkdir -p "$dirinstall" git clone https://github.com/qcad/qcad.git "$dirinstall" if [ ! -d "$dirinstall/src/3rdparty/qt-labs-qtscriptgenerator-$version" ] ;then mkdir -p "$dirinstall/src/3rdparty/qt-labs-qtscriptgenerator-$version" >"$versionPro" echo "include( ../../../shared.pri ) SUBDIRS = ../qt-labs-qtscriptgenerator-5.5.0/qtbindings TEMPLATE = subdirs" fi cd "$dirinstall" qmake -r CONFIG+=ractivated make release cp -r "$dirinstall" /opt >/usr/local/bin/qcad echo "XDG_SESSION_TYPE=x11 LD_LIBRARY_PATH=/opt/qcad/release /opt/qcad/release/qcad-bin" chmod 755 /usr/local/bin/qcad cp /opt/qcad/qcad.desktop /usr/share/applications if [ ! -d /usr/local/share/icons/hicolor/256x256/apps ];then mkdir -p /usr/local/share/icons/hicolor/256x256/apps fi cp /opt/qcad/scripts/qcad_icon.png /usr/local/share/icons/hicolor/256x256/apps
effectivement, ça fonctionne
Merci à toi.
Bonjour :coucou:
Mais quelle horreur.Citation:
date|cut -d ' ' -f2,3,4,5
Code:date +"%d %b %Y %T"
oui ça marche aussi, merci pour ta contribution