-
Notifications
You must be signed in to change notification settings - Fork 139
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
87 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
#!/bin/bash | ||
APP="syncthing-gtk" | ||
EXEC="syncthing-gtk" | ||
[ x"$BUILD_APPDIR" == "x" ] && BUILD_APPDIR=$(pwd)/appimage | ||
|
||
set -ex # display commands, terminate after 1st failure | ||
|
||
# Prepare & build | ||
mkdir -p ${BUILD_APPDIR}/usr | ||
python2 setup.py build | ||
python2 setup.py install --prefix ${BUILD_APPDIR}/usr | ||
|
||
# Move & patch desktop file | ||
mv ${BUILD_APPDIR}/usr/share/applications/${APP}.desktop ${BUILD_APPDIR}/ | ||
sed -i "s/Icon=.*/Icon=${APP}/g" ${BUILD_APPDIR}/${APP}.desktop | ||
|
||
# Copy | ||
cp -H icons/${APP}.png ${BUILD_APPDIR}/${APP}.png | ||
|
||
# Copy appdata.xml | ||
mkdir -p ${BUILD_APPDIR}/usr/share/metainfo/ | ||
cp scripts/${APP}.appdata.xml ${BUILD_APPDIR}/usr/share/metainfo/${APP}.appdata.xml | ||
|
||
# Copy AppRun script | ||
cp scripts/appimage-AppRun.sh ${BUILD_APPDIR}/AppRun | ||
chmod +x ${BUILD_APPDIR}/AppRun | ||
|
||
echo "Run appimagetool ${BUILD_APPDIR} to finish prepared appimage" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
#!/bin/bash | ||
export PATH=${APPDIR}:${APPDIR}/usr/bin:$PATH | ||
export LD_LIBRARY_PATH=${APPDIR}/usr/lib:$LD_LIBRARY_PATH | ||
export LD_LIBRARY_PATH=${APPDIR}/usr/lib64:$LD_LIBRARY_PATH | ||
export PYTHONPATH=${APPDIR}/usr/lib/python2.7/site-packages:$PYTHONPATH | ||
export PYTHONPATH=${APPDIR}/usr/lib64/python2.7/site-packages:$PYTHONPATH | ||
export SCC_SHARED=${APPDIR}/usr/share/scc | ||
|
||
function dependency_check_failed() { | ||
# This checks 4 different ways to open error message in addition to | ||
# throwing it to screen directly | ||
echo "$1" >&2 | ||
|
||
[ -e /usr/bin/zenity ] && run_and_die /usr/bin/zenity --no-wrap --error --text "$1" | ||
[ -e /usr/bin/yad ] && run_and_die /usr/bin/yad --error --text "$1" | ||
echo "$1" > /tmp/depcheck.$$.txt | ||
[ -e /usr/bin/Xdialog ] && run_and_die /usr/bin/Xdialog --textbox /tmp/depcheck.$$.txt 10 100 | ||
[ -e /usr/bin/xdg ] && run_and_die /usr/bin/xdg-open /tmp/depcheck.$$.txt | ||
exit 1 | ||
} | ||
|
||
function run_and_die() { | ||
"$@" | ||
exit 1 | ||
} | ||
|
||
# Check dependencies 1st | ||
python2 -c 'import gi' \ | ||
|| dependency_check_failed "Please, install python-gobject package using your package manager" | ||
python2 -c 'import gi; gi.require_version("Gtk", "3.0")' \ | ||
|| dependency_check_failed "Syncthing-GTK requires GTK. Please, install GTK3 package using your package manager" | ||
python2 -c 'import bcrypt' || dependency_check_failed "Please, install python-bcrypt package using your package manager" | ||
python2 -c 'import dateutil' || dependency_check_failed "Please, install python-dateutil package using your package manager" | ||
|
||
# Start | ||
python2 ${APPDIR}/usr/bin/syncthing-gtk $@ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<component type="desktop"> | ||
<id>syncthing-gtk.desktop</id> | ||
<name>Syncthing GTK</name> | ||
<summary>GUI for Syncthing</summary> | ||
<developer_name>kozec</developer_name> | ||
<description> | ||
<p> | ||
GTK3 & Python based GUI and notification area icon for Syncthing | ||
</p> | ||
</description> | ||
<metadata_license>CC0-1.0</metadata_license> | ||
<project_license>GPL-2.0</project_license> | ||
<url type="bugtracker">https://github.com/syncthing/syncthing-gtk/issues</url> | ||
<url type="donation">https://www.paypal.com/cgi-bin/webscr?cmd=_donations&business=77DQD3L9K8RPU&lc=SK&item_name=kozec&item_number=scc&currency_code=EUR&bn=PP%2dDonationsBF%3abtn_donate_LG%2egif%3aNonHosted</url> | ||
<url type="homepage">https://github.com/syncthing/syncthing-gtk/</url> | ||
<screenshots> | ||
<screenshot type="default"> | ||
<caption>Main Application Window</caption> | ||
<image width="987" height="483">http://i.imgur.com/RTRgRdC.png</image> | ||
</screenshot> | ||
</screenshots> | ||
</component> |