Skip to content
Snippets Groups Projects
Commit c634cbec authored by aviau's avatar aviau Committed by gerrit2
Browse files

Rename gnome-ring to ring-gnome

- Renamed the gnome-ring binary to ring-gnome so that it fits the package
name.

- Moved Qt ApplicationName to 'ring'

Tuleap: #764
Change-Id: I7d6e2c97ef9d6d40ec8ea19ad40d26fa2c926a59
parent 419414c1
Branches
No related tags found
No related merge requests found
...@@ -337,12 +337,12 @@ ENDIF(GETTEXT_FOUND) ...@@ -337,12 +337,12 @@ ENDIF(GETTEXT_FOUND)
# install and compile glib gsettings schema # install and compile glib gsettings schema
add_schema("cx.ring.RingGnome.gschema.xml" GSCHEMA_RING) add_schema("cx.ring.RingGnome.gschema.xml" GSCHEMA_RING)
ADD_EXECUTABLE(gnome-ring ${GLIB_RESOURCES_RING} ${GSCHEMA_RING} ${SRC_FILES}) ADD_EXECUTABLE(ring-gnome ${GLIB_RESOURCES_RING} ${GSCHEMA_RING} ${SRC_FILES})
ADD_DEPENDENCIES(gnome-ring libqrencode) ADD_DEPENDENCIES(ring-gnome libqrencode)
IF(NOT ${ENABLE_STATIC} MATCHES false) IF(NOT ${ENABLE_STATIC} MATCHES false)
TARGET_LINK_LIBRARIES(gnome-ring TARGET_LINK_LIBRARIES(ring-gnome
${LIB_RING_CLIENT_LIBRARY} ${LIB_RING_CLIENT_LIBRARY}
${GTK3_LIBRARIES} ${GTK3_LIBRARIES}
${Qt5Core_LIBRARIES} ${Qt5Core_LIBRARIES}
...@@ -356,7 +356,7 @@ TARGET_LINK_LIBRARIES(gnome-ring ...@@ -356,7 +356,7 @@ TARGET_LINK_LIBRARIES(gnome-ring
-lqrencode -lqrencode
) )
ELSE() ELSE()
TARGET_LINK_LIBRARIES(gnome-ring TARGET_LINK_LIBRARIES(ring-gnome
${LIB_RING_CLIENT_LIBRARY} ${LIB_RING_CLIENT_LIBRARY}
${GTK3_LIBRARIES} ${GTK3_LIBRARIES}
${Qt5Core_LIBRARIES} ${Qt5Core_LIBRARIES}
...@@ -381,34 +381,34 @@ CONFIGURE_FILE ( ...@@ -381,34 +381,34 @@ CONFIGURE_FILE (
"${PROJECT_BINARY_DIR}/config.h" "${PROJECT_BINARY_DIR}/config.h"
) )
INSTALL(TARGETS gnome-ring INSTALL(TARGETS ring-gnome
RUNTIME DESTINATION bin RUNTIME DESTINATION bin
) )
# install .desktop in XDG desktop dir so that it is recognized by the system # install .desktop in XDG desktop dir so that it is recognized by the system
INSTALL(FILES ${PROJECT_SOURCE_DIR}/gnome-ring.desktop INSTALL(FILES ${PROJECT_SOURCE_DIR}/ring-gnome.desktop
DESTINATION ${CMAKE_INSTALL_PREFIX}/share/applications DESTINATION ${CMAKE_INSTALL_PREFIX}/share/applications
) )
# install .desktop in the gnome-ring data dir, so that it can be copied to the # install .desktop in the ring-gnome data dir, so that it can be copied to the
# autostart dir by the client # autostart dir by the client
INSTALL(FILES ${PROJECT_SOURCE_DIR}/gnome-ring.desktop.autostart INSTALL(FILES ${PROJECT_SOURCE_DIR}/ring-gnome.desktop.autostart
DESTINATION DESTINATION
${CMAKE_INSTALL_PREFIX}/share/gnome-ring/ ${CMAKE_INSTALL_PREFIX}/share/ring-gnome/
PERMISSIONS PERMISSIONS
WORLD_READ WORLD_READ
OWNER_WRITE OWNER_WRITE
OWNER_READ OWNER_READ
GROUP_READ GROUP_READ
RENAME RENAME
gnome-ring.desktop ring-gnome.desktop
) )
INSTALL(FILES pixmaps/ring.svg INSTALL(FILES pixmaps/ring.svg
DESTINATION ${CMAKE_INSTALL_PREFIX}/share/icons/hicolor/scalable/apps DESTINATION ${CMAKE_INSTALL_PREFIX}/share/icons/hicolor/scalable/apps
) )
INSTALL(FILES gnome-ring.appdata.xml INSTALL(FILES ring-gnome.appdata.xml
DESTINATION ${CMAKE_INSTALL_PREFIX}/share/appdata/ DESTINATION ${CMAKE_INSTALL_PREFIX}/share/appdata/
) )
......
...@@ -46,7 +46,7 @@ In the project root dir: ...@@ -46,7 +46,7 @@ In the project root dir:
cmake .. cmake ..
make make
You can then simply run ./gnome-ring from the build directory You can then simply run ./ring-gnome from the build directory
Installing Installing
================== ==================
......
.\" Manpage for gnome-ring. .\" Manpage for ring-gnome.
.TH man 8 "08 April 2016" "1.0" "gnome-ring man page" .TH man 8 "08 April 2016" "1.0" "ring-gnome man page"
.SH NAME .SH NAME
gnome-ring \- Gnome client for Ring.cx ring-gnome \- Gnome client for Ring.cx
.SH SYNOPSIS .SH SYNOPSIS
gnome-ring [options] ring-gnome [options]
.SH DESCRIPTION .SH DESCRIPTION
gnome-ring is a gnome client for Ring.cx ring-gnome is a gnome client for Ring.cx
.SH OPTIONS .SH OPTIONS
.B \-v, \-\-version .B \-v, \-\-version
Display the version and exit. Display the version and exit.
......
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<!-- Copyright 2015 Savoir-faire Linux --> <!-- Copyright 2015 Savoir-faire Linux -->
<component type="desktop"> <component type="desktop">
<id>gnome-ring.desktop</id> <id>ring-gnome.desktop</id>
<metadata_license>CC-BY-SA-3.0</metadata_license> <metadata_license>CC-BY-SA-3.0</metadata_license>
<project_license>GPL-3.0+</project_license> <project_license>GPL-3.0+</project_license>
<name>Ring</name> <name>Ring</name>
......
[Desktop Entry] [Desktop Entry]
Name=Ring Name=Ring
Comment=Ring is a secured and distributed communication software. Comment=Ring is a secured and distributed communication software.
Exec=gnome-ring Exec=ring-gnome
Icon=ring Icon=ring
StartupNotify=true StartupNotify=true
Terminal=false Terminal=false
......
[Desktop Entry] [Desktop Entry]
Name=Ring Name=Ring
Comment=Ring is a secured and distributed communication software. Comment=Ring is a secured and distributed communication software.
Exec=gnome-ring --restore-last-window-state Exec=ring-gnome --restore-last-window-state
Icon=ring Icon=ring
StartupNotify=true StartupNotify=true
Terminal=false Terminal=false
......
...@@ -9,7 +9,7 @@ ...@@ -9,7 +9,7 @@
#define RING_CLIENT_APP_ID "cx.ring.RingGnome" #define RING_CLIENT_APP_ID "cx.ring.RingGnome"
#define RING_CLIENT_INSTALL "@RING_INSTALL_PREFIX@" #define RING_CLIENT_INSTALL "@RING_INSTALL_PREFIX@"
#define RING_DATA_DIR "/share/gnome-ring" #define RING_DATA_DIR "/share/ring-gnome"
#define PACKAGE_NAME "@PROJECT_NAME@" #define PACKAGE_NAME "@PROJECT_NAME@"
#define LOCALEDIR "@RING_INSTALL_PREFIX@/share/locale" #define LOCALEDIR "@RING_INSTALL_PREFIX@/share/locale"
...@@ -26,7 +26,7 @@ if type "ring-kde" > /dev/null 2> /dev/null; then ...@@ -26,7 +26,7 @@ if type "ring-kde" > /dev/null 2> /dev/null; then
HAS_KDE=1 HAS_KDE=1
fi fi
if type "gnome-ring" > /dev/null 2> /dev/null; then if type "ring-gnome" > /dev/null 2> /dev/null; then
HAS_GNOME=1 HAS_GNOME=1
fi fi
...@@ -41,14 +41,14 @@ if [ $HAS_KDE == "1" ] && [ $HAS_GNOME == "0" ]; then ...@@ -41,14 +41,14 @@ if [ $HAS_KDE == "1" ] && [ $HAS_GNOME == "0" ]; then
ring-kde $* ring-kde $*
exit $? exit $?
elif [ $HAS_KDE == "0" ] && [ $HAS_GNOME == "1" ]; then elif [ $HAS_KDE == "0" ] && [ $HAS_GNOME == "1" ]; then
gnome-ring $* ring-gnome $*
exit $? exit $?
fi fi
# Both clients installed: run KDE client if KDE wm is running # Both clients installed: run KDE client if KDE wm is running
# else use the Gnome client. # else use the Gnome client.
if [ -z "$(ps aux | grep kwin | grep -v grep)" ]; then if [ -z "$(ps aux | grep kwin | grep -v grep)" ]; then
gnome-ring $* ring-gnome $*
exit $? exit $?
else else
ring-kde $* ring-kde $*
......
...@@ -295,6 +295,11 @@ ring_client_startup(GApplication *app) ...@@ -295,6 +295,11 @@ ring_client_startup(GApplication *app)
exit(1); /* the g_error above should normally cause the applicaiton to exit */ exit(1); /* the g_error above should normally cause the applicaiton to exit */
} }
/* QCore application settings
We are intentionally not setting OrganizationName and OrganizationDomain,
which would lead to not-so-standard paths when using QStandardPaths */
QCoreApplication::setApplicationName("ring");
/* load translations from LRC */ /* load translations from LRC */
priv->translator.reset(new QTranslator); priv->translator.reset(new QTranslator);
if (priv->translator->load(QLocale::system(), "lrc", "_", RING_CLIENT_INSTALL "/share/libringclient/translations")) { if (priv->translator->load(QLocale::system(), "lrc", "_", RING_CLIENT_INSTALL "/share/libringclient/translations")) {
......
...@@ -29,13 +29,13 @@ ...@@ -29,13 +29,13 @@
void void
autostart_symlink(gboolean autostart) autostart_symlink(gboolean autostart)
{ {
/* autostart is enabled by creating a symlink to gnome-ring.desktop in /* autostart is enabled by creating a symlink to ring-gnome.desktop in
* $XDG_CONFIG_HOME/autostart (by default ~/.config/autostart) * $XDG_CONFIG_HOME/autostart (by default ~/.config/autostart)
* and removing it to disable autostart * and removing it to disable autostart
*/ */
GError *error = NULL; GError *error = NULL;
gchar *autostart_path = g_strconcat(g_get_user_config_dir(), "/autostart/gnome-ring.desktop", NULL); gchar *autostart_path = g_strconcat(g_get_user_config_dir(), "/autostart/ring-gnome.desktop", NULL);
if (autostart) { if (autostart) {
g_debug("enabling autostart"); g_debug("enabling autostart");
...@@ -53,9 +53,9 @@ autostart_symlink(gboolean autostart) ...@@ -53,9 +53,9 @@ autostart_symlink(gboolean autostart)
*/ */
int num_paths = 3; int num_paths = 3;
gchar *desktop_paths[num_paths]; gchar *desktop_paths[num_paths];
desktop_paths[0] = g_strconcat("/usr", RING_DATA_DIR, "/gnome-ring.desktop", NULL); desktop_paths[0] = g_strconcat("/usr", RING_DATA_DIR, "/ring-gnome.desktop", NULL);
desktop_paths[1] = g_strconcat("/usr/local", RING_DATA_DIR, "/gnome-ring.desktop", NULL); desktop_paths[1] = g_strconcat("/usr/local", RING_DATA_DIR, "/ring-gnome.desktop", NULL);
desktop_paths[2] = g_strconcat(RING_CLIENT_INSTALL, RING_DATA_DIR, "/gnome-ring.desktop", NULL); desktop_paths[2] = g_strconcat(RING_CLIENT_INSTALL, RING_DATA_DIR, "/ring-gnome.desktop", NULL);
for (int i = 0; i < num_paths && !desktop_path; ++i) { for (int i = 0; i < num_paths && !desktop_path; ++i) {
g_debug("checking %s", desktop_paths[i]); g_debug("checking %s", desktop_paths[i]);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment