Skip to content

Commit

Permalink
Modify icon for deb package
Browse files Browse the repository at this point in the history
  • Loading branch information
KangLin committed May 27, 2019
1 parent f8bba8e commit a7c0101
Show file tree
Hide file tree
Showing 8 changed files with 24 additions and 16 deletions.
10 changes: 5 additions & 5 deletions App/App.pro
Original file line number Diff line number Diff line change
Expand Up @@ -128,11 +128,11 @@ win32 {
DESKTOP_FILE.CONFIG += directory no_check_exist

# install icons
icon128.target = icon128
icon128.files = Resource/image/calendar.png
icon128.path = $${PREFIX}/share/icons/hicolor/128x128/apps
icon128.CONFIG = directory no_check_exist
INSTALLS += DESKTOP_FILE icon128
icon.target = icon
icon.files = Resource/image/calendar.png
icon.path = $${PREFIX}/share/pixmaps
icon.CONFIG = directory no_check_exist
INSTALLS += DESKTOP_FILE icon
}

OTHER_FILES += \
Expand Down
1 change: 1 addition & 0 deletions App/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,7 @@ INSTALL(FILES ${OTHER_FILES} DESTINATION ".")

if(UNIX)
INSTALL(FILES ${CMAKE_SOURCE_DIR}/debian/LunarCalendar.desktop DESTINATION "share/applications")
INSTALL(FILES ${CMAKE_SOURCE_DIR}/Resource/image/calendar.png DESTINATION "share/pixmaps")
endif()

IF("Release" STREQUAL CMAKE_BUILD_TYPE AND WIN32)
Expand Down
2 changes: 1 addition & 1 deletion appveyor.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#TODO: Change version
version: '0.0.4.{build}'
version: '0.0..{build}'

environment:
matrix:
Expand Down
6 changes: 3 additions & 3 deletions ci/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -100,8 +100,8 @@ if [ "${BUILD_TARGERT}" = "unix" ]; then
fi
if [ "$TRAVIS_TAG" != "" -a "${QT_VERSION_DIR}" = "512" ]; then
cd debian/lunarcalendar/opt/LunarCalendar
sed -i "s/^\Icon=.*/Icon=calendar/g" share/applications/LunarCalendar.desktop
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:${QT_ROOT}/bin:${QT_ROOT}/lib

export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:${QT_ROOT}/bin:${QT_ROOT}/lib:`pwd`/debian/lunarcalendar/opt/LunarCalendar/bin:`pwd`/debian/lunarcalendar/opt/LunarCalendar/lib
wget -c -nv "https://github.com/probonopd/linuxdeployqt/releases/download/continuous/linuxdeployqt-continuous-x86_64.AppImage"
chmod a+x linuxdeployqt-continuous-x86_64.AppImage
export VERSION="0.0.4"
Expand All @@ -110,7 +110,7 @@ if [ "${BUILD_TARGERT}" = "unix" ]; then

wget -c https://github.com/probonopd/uploadtool/raw/master/upload.sh

bash upload.sh lunarcalendar*.AppImage*
bash upload.sh Lunar*.AppImage
fi
exit 0
fi
Expand Down
8 changes: 4 additions & 4 deletions debian/LunarCalendar.desktop
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@ Type=Application
Name=Lunar calendar
GenericName=Lunar calendar
Comment=Lunar calendar
Comment[zh_CN]=农历日历
GenericName[zh_CN]=农历日历
Comment[zh_CN]=农历日历
Icon=/opt/LunarCalendar/share/icons/hicolor/128x128/apps/calendar.png
Name[zh_CN]=日历
GenericName[zh_CN]=日历
Comment[zh_CN]=日历(包含农历)
Icon=calendar
Exec=/opt/LunarCalendar/bin/LunarCalendarApp
Terminal=false
StartupNotify=true
Expand Down
6 changes: 6 additions & 0 deletions debian/postinst
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,12 @@ case "$1" in
if [ ! -f /usr/share/applications/LunarCalendar.desktop ]; then
ln -s /opt/LunarCalendar/share/applications/LunarCalendar.desktop /usr/share/applications/LunarCalendar.desktop
fi
if [ ! -f /usr/share/pixmaps/calendar.png ]; then
if [ ! -d /usr/share/pixmaps ]; then
mkdir -p /usr/share/pixmaps
fi
ln -s /opt/LunarCalendar/share/pixmaps/calendar.png /usr/share/pixmaps/calendar.png
fi
echo "/opt/LunarCalendar/lib" > /etc/ld.so.conf.d/LunarCalendar.conf
echo "/opt/LunarCalendar/bin" >> /etc/ld.so.conf.d/LunarCalendar.conf
echo "/opt/qt59/lib" >> /etc/ld.so.conf.d/LunarCalendar.conf
Expand Down
5 changes: 3 additions & 2 deletions debian/postrm
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,9 @@ set -e

case "$1" in
purge|remove|upgrade|failed-upgrade|abort-install|abort-upgrade|disappear)
rm -fr /usr/share/applications/LunarCalendar.desktop
rm -fr /etc/ld.so.conf.d/LunarCalendar.conf
rm -f /usr/share/applications/LunarCalendar.desktop
rm -f /usr/share/pixmaps/calendar.png
rm -f /etc/ld.so.conf.d/LunarCalendar.conf
;;

*)
Expand Down
2 changes: 1 addition & 1 deletion tag.sh
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ sed -i "s/^version: '.*{build}'/${APPVERYOR_VERSION}/g" ${SOURCE_DIR}/appveyor.y
sed -i "s/^\ BUILD_VERSION=.*/\ BUILD_VERSION=\"${VERSION}\"/g" ${SOURCE_DIR}/App/App.pro
sed -i "s/^\Standards-Version:.*/\Standards-Version:\"${VERSION}\"/g" ${SOURCE_DIR}/debian/control
sed -i "s/^\ - export VERSION=.*/\ - export VERSION=\"${VERSION}\"/g" ${SOURCE_DIR}/.travis.yml
sed -i "s/rabbitcommon (.*)/rabbitcommon (${VERSION})/g" ${SOURCE_DIR}/debian/changelog
sed -i "s/lunarcalendar (.*)/lunarcalendar (${VERSION})/g" ${SOURCE_DIR}/debian/changelog
sed -i "s/export VERSION=.*/export VERSION=\"${VERSION}\"/g" ${SOURCE_DIR}/ci/build.sh

if [ -n "$1" ]; then
Expand Down

0 comments on commit a7c0101

Please sign in to comment.