Skip to content

Commit 42119d2

Browse files
committed
Fix different bugs
1 parent 1d4eb43 commit 42119d2

File tree

7 files changed

+228
-87
lines changed

7 files changed

+228
-87
lines changed

.github/workflows/build-appimage-on-release.yml

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -20,11 +20,9 @@ jobs:
2020
# uses: AppImageCrafters/build-appimage@master # It uses ubuntu focal (20.04)
2121
with:
2222
recipe: ./generate_appImage/AppImageBuilder_Github_Action.yml
23-
- name: Upload Release Assets
24-
uses: alexellis/[email protected]
25-
env:
26-
GITHUB_TOKEN: ${{ github.token }}
23+
- name: Upload assets to release
24+
uses: ahsand97/[email protected]
2725
with:
28-
asset_paths: '["*AppImage*"]'
26+
files: '["*AppImage*"]'
2927

3028

.gitignore

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,5 @@ dmypy.json
132132
.vscode/
133133

134134
# Misc
135-
**/generate_appImage/output/
136-
**/Comando generar appImage
137-
**/AppImageBuilder_Local.yml
138-
config.json
135+
generate_appImage/output/*
136+
synchronizer-for-linux-config.json

README.rst

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,11 @@
1-
**Synchronizer for Linux**
1+
**********************
2+
Synchronizer for Linux
3+
**********************
24

35
Synchronizer for Linux is a python3 application that allows you to keep multiple pairs of folders synchronized. Events reported on source folders are replicated on target folder.
46

57
.. image:: https://user-images.githubusercontent.com/32344641/194986551-d8ecc14e-9cbf-4dca-89c9-3a0ec0a88b6f.png
68

7-
.. image:: https://user-images.githubusercontent.com/32344641/194987463-fe4bbe95-439a-4b5e-84df-62140ec6468e.png
8-
:width: 700
9-
109
Events reported
1110
---------------
1211

@@ -32,7 +31,7 @@ Usage
3231
From source
3332
'''''''''''
3433

35-
::
34+
.. code:: bash
3635
3736
git clone https://github.com/ahsand97/Synchronizer-for-Linux.git
3837
cd Synchronizer-for-Linux
@@ -42,7 +41,7 @@ From source
4241
AppImage
4342
''''''''
4443

45-
An AppImage is provided to use the application. You can download it from the `releases <https://github.com/ahsand97/Synchronizer-for-Linux/releases>`_, just give it execution permissions and execute it.
44+
An AppImage is provided to use the application. You can download it from the `releases <https://github.com/ahsand97/Synchronizer-for-Linux/releases>`_.
4645

4746
----------------------------------------------------------------------------------------------------------------------------------------------------------------
4847

generate_appImage/AppImageBuilder_Github_Action.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ script:
1212
- cp synchronizer.png AppDir/usr/share/icons/hicolor/512x512/apps
1313
# Install python3.10 and curl (to install pip)
1414
- apt update
15-
- apt install -y software-properties-common curl squashfs-tools
15+
- apt install -y software-properties-common curl
1616
- add-apt-repository ppa:deadsnakes/ppa -y
1717
- env DEBIAN_FRONTEND=noninteractive apt install -y python3.10 python3.10-dev python3.10-distutils
1818
# Install system dependencies (The ones needed to install pycairo and PyGObject libs for python3.10)
Lines changed: 118 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,118 @@
1+
version: 1
2+
script:
3+
# Remove any previous build
4+
- rm -rf AppDir | true
5+
# Make usr and icons dirs
6+
- mkdir -p AppDir/usr/src
7+
# Copy the python application code into the AppDir
8+
- cp /source/synchronizer.py AppDir/usr/src
9+
- cp /source/synchronizer.png AppDir/usr/src
10+
- cp /source/synchronizer.xml AppDir/usr/src
11+
- mkdir -p AppDir/usr/share/icons/hicolor/512x512/apps
12+
- cp /source/synchronizer.png AppDir/usr/share/icons/hicolor/512x512/apps
13+
# Install python3.10 and curl (to install pip)
14+
- apt update
15+
- apt install -y software-properties-common curl
16+
- add-apt-repository ppa:deadsnakes/ppa -y
17+
- env DEBIAN_FRONTEND=noninteractive apt install -y python3.10 python3.10-dev python3.10-distutils
18+
# Install system dependencies (The ones needed to install pycairo and PyGObject libs for python3.10)
19+
- apt install -y libgirepository1.0-dev libcairo2-dev gir1.2-gtk-3.0
20+
# Install modules requests setuptools pip wheel for python3.10
21+
- python3.10 <(curl https://bootstrap.pypa.io/get-pip.py)
22+
- python3.10 -m pip install --upgrade requests setuptools pip wheel
23+
# Install requirements of the application
24+
- python3.10 -m pip install --ignore-installed --prefix=/usr --root=AppDir -r /source/requirements.txt
25+
26+
AppDir:
27+
path: ./AppDir
28+
29+
app_info:
30+
id: ahsan-appimages.gtk3-synchronizer-for-linux
31+
name: Synchronizer for Linux
32+
icon: synchronizer
33+
version: 1.0.0
34+
# Set the python executable as entry point
35+
exec: /usr/bin/python3.10
36+
# Set the application main script path as argument. Use '$@' to forward CLI parameters
37+
exec_args: '$APPDIR/usr/src/synchronizer.py $@'
38+
39+
apt:
40+
arch: amd64
41+
sources:
42+
- sourceline: 'deb [arch=amd64] http://archive.ubuntu.com/ubuntu/ bionic main restricted universe multiverse' # Default repo of Ubuntu 18.04 (Bionic)
43+
key_url: 'http://keyserver.ubuntu.com/pks/lookup?op=get&search=0x3b4fe6acc0b21f32' # Key id of Ubuntu 18.04 0x3B4FE6ACC0B21F32
44+
- sourceline: 'deb [arch=amd64] http://security.ubuntu.com/ubuntu bionic-security main' # Bionic-Security repo
45+
# - sourceline: 'deb http://archive.ubuntu.com/ubuntu/ focal main restricted universe multiverse' # Default repo of Ubuntu 20.04 (Focal)
46+
# key_url: 'http://keyserver.ubuntu.com/pks/lookup?op=get&search=0x3b4fe6acc0b21f32' # Key id of Ubuntu 20.04
47+
- sourceline: 'deb https://ppa.launchpadcontent.net/deadsnakes/ppa/ubuntu bionic main' # Deadsnake PPA to install python3.10
48+
key_url: 'http://keyserver.ubuntu.com/pks/lookup?op=get&search=0xF23C5A6CF475977595C89F51BA6932366A755776'
49+
include:
50+
# Python 3.10
51+
- python3.10
52+
# Appindicator
53+
- gir1.2-appindicator3-0.1 # This adds the necessary .typelib files for AppIndicator3 when using 'gi.require_version("AppIndicator3", "0.1")' in python
54+
- libappindicator3-1
55+
# GTK
56+
- gir1.2-gtk-3.0 # This adds the necessary .typelib files for Gtk3 when using 'gi.require_version("Gtk", "3.0")' in python
57+
- libgtk-3-0
58+
- libcanberra-gtk3-module
59+
# Common
60+
- libfuse2
61+
- libx11-6
62+
- libxcb-render0
63+
- libbrotli1
64+
- libxau6
65+
- libxdmcp6
66+
- libgraphite2-3
67+
- gvfs
68+
exclude:
69+
- libfontconfig1
70+
- libfontconfig1-dev
71+
- libfreetype6
72+
- libfreetype6-dev
73+
- libharfbuzz0b
74+
75+
runtime:
76+
env:
77+
APPDIR_LIBRARY_PATH: '$APPDIR/lib/x86_64:$APPDIR/lib/x86_64-linux-gnu:$APPDIR/usr/lib:$APPDIR/usr/lib/x86_64-linux-gnu:$APPDIR/usr/lib/x86_64-linux-gnu/gdk-pixbuf-2.0/2.10.0/loaders:$APPDIR/usr/lib/x86_64-linux-gnu/gvfs'
78+
GIO_MODULE_DIR: '$APPDIR/usr/lib/x86_64-linux-gnu/gio/modules' # Path of gio modules
79+
GI_TYPELIB_PATH: '$APPDIR/usr/lib/x86_64-linux-gnu/girepository-1.0:$APPDIR/usr/lib/girepository-1.0' # Paths of .typelib files
80+
GDK_BACKEND: 'x11' # Necessary on wayland
81+
PATH: '${APPDIR}/usr/bin:${PATH}'
82+
# Set python home
83+
# See https://docs.python.org/3/using/cmdline.html#envvar-PYTHONHOME
84+
PYTHONHOME: '${APPDIR}/usr'
85+
# Path to the site-packages dir or other modules dirs
86+
# See https://docs.python.org/3/using/cmdline.html#envvar-PYTHONPATH
87+
PYTHONPATH: '${APPDIR}/usr/lib/python3.10:${APPDIR}/usr/lib/python3.10/site-packages'
88+
# Set python home
89+
# See https://docs.python.org/3/using/cmdline.html#envvar-PYTHONHOME
90+
# Path to the site-packages dir or other modules dirs
91+
# See https://docs.python.org/3/using/cmdline.html#envvar-PYTHONPATH
92+
93+
test:
94+
fedora:
95+
image: appimagecrafters/tests-env:fedora-30
96+
command: ./AppRun
97+
use_host_x: true
98+
debian:
99+
image: appimagecrafters/tests-env:debian-stable
100+
command: ./AppRun
101+
use_host_x: true
102+
arch:
103+
image: appimagecrafters/tests-env:archlinux-latest
104+
command: ./AppRun
105+
use_host_x: true
106+
centos:
107+
image: appimagecrafters/tests-env:centos-7
108+
command: ./AppRun
109+
use_host_x: true
110+
ubuntu:
111+
image: appimagecrafters/tests-env:ubuntu-xenial
112+
command: ./AppRun
113+
use_host_x: true
114+
115+
AppImage:
116+
update-information: 'None'
117+
sign-key: 'None'
118+
arch: x86_64
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
Steps:
2+
1. Download docker image:
3+
sudo docker pull appimagecrafters/appimage-builder:latest
4+
5+
2. Open terminal on project folder "generate_appImage"
6+
7+
3. Run command to generate the .AppImage file
8+
mkdir output ; sudo docker run -it --rm -v "$(pwd)/output":/project -v "$(cd ../ && pwd)":/source appimagecrafters/appimage-builder /bin/bash -c "useradd -u $(id -u) $USER && cd /project && appimage-builder --recipe /source/generate_appImage/AppImageBuilder_Local.yml --skip-tests && chown -R $USER:$(id -u) /project"

0 commit comments

Comments
 (0)