MAJ terminée. Nous sommes passés en version 14.6.2 . Pour consulter les "releases notes" associées c'est ici :

https://about.gitlab.com/releases/2022/01/11/security-release-gitlab-14-6-2-released/
https://about.gitlab.com/releases/2022/01/04/gitlab-14-6-1-released/

__main__.py 2.25 KB
Newer Older
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
# -*- coding: utf-8 -*-
# Copyright (C) 2010-2017  IRISA
#
# 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 2
# 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, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
#
# The original code contained here was initially developed by:
#
#     Geoffroy Andrieux.
#     IRISA/IRSET
#     Symbiose team
#     IRISA  Campus de Beaulieu
#     35042 RENNES Cedex, FRANCE
#
#
# Contributor(s): Michel Le Borgne, Nolwenn Le Meur, Pierre Vignet
"""
Created on Nov 2016

..sectionauthor:: Pierre Vignet <pierre.vignet@irisa.fr>
"""
33
34
35
36
37
38
import sys
import os
import pkg_resources
import gtk
from cadbiom_gui.gt_gui.charter import Charter
from cadbiom import commons as cm
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
LOGGER = cm.logger()


def build_desktop_shortcut(executable_path):
    """Install a .desktop launcher file in ~/.local/share/applications"""

    if sys.platform != "linux2":
        LOGGER.error("This option is only supported on GNU/Linux platforms.")
        exit(1)

    favicon_path = pkg_resources.resource_filename(
        __name__, "gt_gui/images/favicon.ico"
    )

    desktop_content = """[Desktop Entry]
Comment=Cadbiom GUI launcher
Encoding=UTF-8
Exec={}
Icon={}
Categories=Science;
Name=Cadbiom
Type=Application
Terminal=false
""".format(
        executable_path, favicon_path
    )
66

67
68
69
70
71
72
73
74
75
    desktop_path = "%s/.local/share/applications/" % os.path.expanduser("~")
    with open(desktop_path + "Cadbiom.desktop", "w") as f_d:
        f_d.write(desktop_content)

    LOGGER.info("Desktop file created in <%s>", desktop_path)
    exit(0)


def main():
76
    """Launch Cadbiom gui"""
77
78
79

    if "--install_desktop_shortcut" in sys.argv:
        build_desktop_shortcut(sys.argv[0])
80
81
82
83

    charter = Charter(None)
    charter.show()
    gtk.main()