mirror of
https://github.com/nextcloud/desktop.git
synced 2024-10-22 12:25:45 +03:00
Created wrapper variable LINUX_APPLICATION_ID to clean up code
Signed-off-by: Dominique Fuchs <32204802+DominiqueFuchs@users.noreply.github.com>
This commit is contained in:
parent
a8ecf486d1
commit
3ad1c0e7a8
6 changed files with 14 additions and 15 deletions
|
@ -7,11 +7,12 @@ set( APPLICATION_UPDATE_URL "https://updates.nextcloud.org/client/" CACHE STRING
|
|||
set( APPLICATION_HELP_URL "" CACHE STRING "URL for the help menu" )
|
||||
set( APPLICATION_ICON_NAME "Nextcloud" )
|
||||
set( APPLICATION_SERVER_URL "" CACHE STRING "URL for the server to use. If entered the server can only connect to this instance" )
|
||||
set( APPLICATION_REV_DOMAIN "com.nextcloud.desktopclient" )
|
||||
|
||||
set( LINUX_PACKAGE_SHORTNAME "nextcloud" )
|
||||
set( LINUX_APPLICATION_ID "${APPLICATION_REV_DOMAIN}.${LINUX_PACKAGE_SHORTNAME}")
|
||||
|
||||
set( THEME_CLASS "NextcloudTheme" )
|
||||
set( APPLICATION_REV_DOMAIN "com.nextcloud.desktopclient" )
|
||||
set( WIN_SETUP_BITMAP_PATH "${CMAKE_SOURCE_DIR}/admin/win/nsi" )
|
||||
|
||||
set( MAC_INSTALLER_BACKGROUND_FILE "${CMAKE_SOURCE_DIR}/admin/osx/installer-background.png" CACHE STRING "The MacOSX installer background image")
|
||||
|
|
|
@ -12,6 +12,9 @@ export PATH=$QT_BASE_DIR/bin:$PATH
|
|||
export LD_LIBRARY_PATH=$QT_BASE_DIR/lib/x86_64-linux-gnu:$QT_BASE_DIR/lib:$LD_LIBRARY_PATH
|
||||
export PKG_CONFIG_PATH=$QT_BASE_DIR/lib/pkgconfig:$PKG_CONFIG_PATH
|
||||
|
||||
#Set APPID for .desktop file processing
|
||||
export LINUX_APPLICATION_ID=com.nextcloud.desktopclient.nextcloud.desktop
|
||||
|
||||
#set defaults
|
||||
export SUFFIX=${DRONE_PULL_REQUEST:=master}
|
||||
if [ $SUFFIX != "master" ]; then
|
||||
|
@ -66,7 +69,7 @@ rm -rf ./usr/share/nemo-python/
|
|||
mv ./etc/Nextcloud/sync-exclude.lst ./usr/bin/
|
||||
rm -rf ./etc
|
||||
|
||||
sed -i -e 's|Icon=nextcloud|Icon=Nextcloud|g' usr/share/applications/com.nextcloud.desktopclient.Nextcloud.desktop # Bug in desktop file?
|
||||
sed -i -e 's|Icon=nextcloud|Icon=Nextcloud|g' usr/share/applications/${LINUX_APPLICATION_ID}.desktop # Bug in desktop file?
|
||||
cp ./usr/share/icons/hicolor/512x512/apps/Nextcloud.png . # Workaround for linuxeployqt bug, FIXME
|
||||
|
||||
|
||||
|
@ -87,13 +90,13 @@ chmod a+x linuxdeployqt*.AppImage
|
|||
rm ./linuxdeployqt-continuous-x86_64.AppImage
|
||||
unset QTDIR; unset QT_PLUGIN_PATH ; unset LD_LIBRARY_PATH
|
||||
export LD_LIBRARY_PATH=/app/usr/lib/
|
||||
./squashfs-root/AppRun /app/usr/share/applications/com.nextcloud.desktopclient.Nextcloud.desktop -bundle-non-qt-libs
|
||||
./squashfs-root/AppRun /app/usr/share/applications/${LINUX_APPLICATION_ID}.desktop -bundle-non-qt-libs
|
||||
|
||||
# Set origin
|
||||
./squashfs-root/usr/bin/patchelf --set-rpath '$ORIGIN/' /app/usr/lib/libnextcloudsync.so.0
|
||||
|
||||
# Build AppImage
|
||||
./squashfs-root/AppRun /app/usr/share/applications/com.nextcloud.desktopclient.Nextcloud.desktop -appimage
|
||||
./squashfs-root/AppRun /app/usr/share/applications/${LINUX_APPLICATION_ID}.desktop -appimage
|
||||
|
||||
mv Nextcloud*.AppImage Nextcloud-${SUFFIX}-${DRONE_COMMIT}-x86_64.AppImage
|
||||
|
||||
|
|
|
@ -21,6 +21,7 @@
|
|||
#cmakedefine APPLICATION_HELP_URL "@APPLICATION_HELP_URL@"
|
||||
#cmakedefine APPLICATION_ICON_NAME "@APPLICATION_ICON_NAME@"
|
||||
#cmakedefine APPLICATION_SERVER_URL "@APPLICATION_SERVER_URL@"
|
||||
#cmakedefine LINUX_APPLICATION_ID "@LINUX_APPLICATION_ID@"
|
||||
#cmakedefine APPLICATION_WIZARD_HEADER_BACKGROUND_COLOR "@APPLICATION_WIZARD_HEADER_BACKGROUND_COLOR@"
|
||||
#cmakedefine APPLICATION_WIZARD_HEADER_TITLE_COLOR "@APPLICATION_WIZARD_HEADER_TITLE_COLOR@"
|
||||
#cmakedefine APPLICATION_WIZARD_USE_CUSTOM_LOGO "@APPLICATION_WIZARD_USE_CUSTOM_LOGO@"
|
||||
|
|
|
@ -48,9 +48,7 @@ QString getUserAutostartDir_private()
|
|||
bool hasLaunchOnStartup_private(const QString &appName)
|
||||
{
|
||||
QString desktopFileLocation = getUserAutostartDir_private()
|
||||
+ QLatin1String(APPLICATION_REV_DOMAIN)
|
||||
+ QLatin1Char('.')
|
||||
+ appName
|
||||
+ QLatin1String(LINUX_APPLICATION_ID)
|
||||
+ QLatin1String(".desktop");
|
||||
return QFile::exists(desktopFileLocation);
|
||||
}
|
||||
|
@ -59,9 +57,7 @@ void setLaunchOnStartup_private(const QString &appName, const QString &guiName,
|
|||
{
|
||||
QString userAutoStartPath = getUserAutostartDir_private();
|
||||
QString desktopFileLocation = userAutoStartPath
|
||||
+ QLatin1String(APPLICATION_REV_DOMAIN)
|
||||
+ QLatin1Char('.')
|
||||
+ appName
|
||||
+ QLatin1String(LINUX_APPLICATION_ID)
|
||||
+ QLatin1String(".desktop");
|
||||
if (enable) {
|
||||
if (!QDir().exists(userAutoStartPath) && !QDir().mkpath(userAutoStartPath)) {
|
||||
|
|
|
@ -397,7 +397,7 @@ endif()
|
|||
|
||||
if(NOT BUILD_OWNCLOUD_OSX_BUNDLE AND NOT WIN32)
|
||||
configure_file(${CMAKE_SOURCE_DIR}/mirall.desktop.in
|
||||
${CMAKE_CURRENT_BINARY_DIR}/${APPLICATION_REV_DOMAIN}.${APPLICATION_SHORTNAME}.desktop)
|
||||
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/${APPLICATION_REV_DOMAIN}.${APPLICATION_SHORTNAME}.desktop DESTINATION ${DATADIR}/applications )
|
||||
${CMAKE_CURRENT_BINARY_DIR}/${LINUX_APPLICATION_ID}.desktop)
|
||||
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/${LINUX_APPLICATION_ID}.desktop DESTINATION ${DATADIR}/applications )
|
||||
endif()
|
||||
|
||||
|
|
|
@ -127,9 +127,7 @@ Application::Application(int &argc, char **argv)
|
|||
// setDesktopFilename to provide wayland compatibility (in general: conformance with naming standards)
|
||||
// but only on Qt >= 5.7, where setDesktopFilename was introduced
|
||||
#if (QT_VERSION >= 0x050700)
|
||||
QString desktopFileName = QString(QLatin1String(APPLICATION_REV_DOMAIN)
|
||||
+ QLatin1Char('.')
|
||||
+ QLatin1String(APPLICATION_SHORTNAME)
|
||||
QString desktopFileName = QString(QLatin1String(LINUX_APPLICATION_ID)
|
||||
+ QLatin1String(".desktop"));
|
||||
setDesktopFileName(desktopFileName);
|
||||
#endif
|
||||
|
|
Loading…
Reference in a new issue