Skip to content

Commit

Permalink
Fix different bugs
Browse files Browse the repository at this point in the history
  • Loading branch information
ahsand97 committed Nov 11, 2022
1 parent 1d4eb43 commit 42119d2
Show file tree
Hide file tree
Showing 7 changed files with 228 additions and 87 deletions.
8 changes: 3 additions & 5 deletions .github/workflows/build-appimage-on-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,9 @@ jobs:
# uses: AppImageCrafters/build-appimage@master # It uses ubuntu focal (20.04)
with:
recipe: ./generate_appImage/AppImageBuilder_Github_Action.yml
- name: Upload Release Assets
uses: alexellis/[email protected]
env:
GITHUB_TOKEN: ${{ github.token }}
- name: Upload assets to release
uses: ahsand97/[email protected]
with:
asset_paths: '["*AppImage*"]'
files: '["*AppImage*"]'


6 changes: 2 additions & 4 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,5 @@ dmypy.json
.vscode/

# Misc
**/generate_appImage/output/
**/Comando generar appImage
**/AppImageBuilder_Local.yml
config.json
generate_appImage/output/*
synchronizer-for-linux-config.json
11 changes: 5 additions & 6 deletions README.rst
Original file line number Diff line number Diff line change
@@ -1,12 +1,11 @@
**Synchronizer for Linux**
**********************
Synchronizer for Linux
**********************

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.

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

.. image:: https://user-images.githubusercontent.com/32344641/194987463-fe4bbe95-439a-4b5e-84df-62140ec6468e.png
:width: 700

Events reported
---------------

Expand All @@ -32,7 +31,7 @@ Usage
From source
'''''''''''

::
.. code:: bash
git clone https://github.com/ahsand97/Synchronizer-for-Linux.git
cd Synchronizer-for-Linux
Expand All @@ -42,7 +41,7 @@ From source
AppImage
''''''''

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.
An AppImage is provided to use the application. You can download it from the `releases <https://github.com/ahsand97/Synchronizer-for-Linux/releases>`_.

----------------------------------------------------------------------------------------------------------------------------------------------------------------

Expand Down
2 changes: 1 addition & 1 deletion generate_appImage/AppImageBuilder_Github_Action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ script:
- cp synchronizer.png AppDir/usr/share/icons/hicolor/512x512/apps
# Install python3.10 and curl (to install pip)
- apt update
- apt install -y software-properties-common curl squashfs-tools
- apt install -y software-properties-common curl
- add-apt-repository ppa:deadsnakes/ppa -y
- env DEBIAN_FRONTEND=noninteractive apt install -y python3.10 python3.10-dev python3.10-distutils
# Install system dependencies (The ones needed to install pycairo and PyGObject libs for python3.10)
Expand Down
118 changes: 118 additions & 0 deletions generate_appImage/AppImageBuilder_Local.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,118 @@
version: 1
script:
# Remove any previous build
- rm -rf AppDir | true
# Make usr and icons dirs
- mkdir -p AppDir/usr/src
# Copy the python application code into the AppDir
- cp /source/synchronizer.py AppDir/usr/src
- cp /source/synchronizer.png AppDir/usr/src
- cp /source/synchronizer.xml AppDir/usr/src
- mkdir -p AppDir/usr/share/icons/hicolor/512x512/apps
- cp /source/synchronizer.png AppDir/usr/share/icons/hicolor/512x512/apps
# Install python3.10 and curl (to install pip)
- apt update
- apt install -y software-properties-common curl
- add-apt-repository ppa:deadsnakes/ppa -y
- env DEBIAN_FRONTEND=noninteractive apt install -y python3.10 python3.10-dev python3.10-distutils
# Install system dependencies (The ones needed to install pycairo and PyGObject libs for python3.10)
- apt install -y libgirepository1.0-dev libcairo2-dev gir1.2-gtk-3.0
# Install modules requests setuptools pip wheel for python3.10
- python3.10 <(curl https://bootstrap.pypa.io/get-pip.py)
- python3.10 -m pip install --upgrade requests setuptools pip wheel
# Install requirements of the application
- python3.10 -m pip install --ignore-installed --prefix=/usr --root=AppDir -r /source/requirements.txt

AppDir:
path: ./AppDir

app_info:
id: ahsan-appimages.gtk3-synchronizer-for-linux
name: Synchronizer for Linux
icon: synchronizer
version: 1.0.0
# Set the python executable as entry point
exec: /usr/bin/python3.10
# Set the application main script path as argument. Use '$@' to forward CLI parameters
exec_args: '$APPDIR/usr/src/synchronizer.py $@'

apt:
arch: amd64
sources:
- sourceline: 'deb [arch=amd64] http://archive.ubuntu.com/ubuntu/ bionic main restricted universe multiverse' # Default repo of Ubuntu 18.04 (Bionic)
key_url: 'http://keyserver.ubuntu.com/pks/lookup?op=get&search=0x3b4fe6acc0b21f32' # Key id of Ubuntu 18.04 0x3B4FE6ACC0B21F32
- sourceline: 'deb [arch=amd64] http://security.ubuntu.com/ubuntu bionic-security main' # Bionic-Security repo
# - sourceline: 'deb http://archive.ubuntu.com/ubuntu/ focal main restricted universe multiverse' # Default repo of Ubuntu 20.04 (Focal)
# key_url: 'http://keyserver.ubuntu.com/pks/lookup?op=get&search=0x3b4fe6acc0b21f32' # Key id of Ubuntu 20.04
- sourceline: 'deb https://ppa.launchpadcontent.net/deadsnakes/ppa/ubuntu bionic main' # Deadsnake PPA to install python3.10
key_url: 'http://keyserver.ubuntu.com/pks/lookup?op=get&search=0xF23C5A6CF475977595C89F51BA6932366A755776'
include:
# Python 3.10
- python3.10
# Appindicator
- gir1.2-appindicator3-0.1 # This adds the necessary .typelib files for AppIndicator3 when using 'gi.require_version("AppIndicator3", "0.1")' in python
- libappindicator3-1
# GTK
- gir1.2-gtk-3.0 # This adds the necessary .typelib files for Gtk3 when using 'gi.require_version("Gtk", "3.0")' in python
- libgtk-3-0
- libcanberra-gtk3-module
# Common
- libfuse2
- libx11-6
- libxcb-render0
- libbrotli1
- libxau6
- libxdmcp6
- libgraphite2-3
- gvfs
exclude:
- libfontconfig1
- libfontconfig1-dev
- libfreetype6
- libfreetype6-dev
- libharfbuzz0b

runtime:
env:
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'
GIO_MODULE_DIR: '$APPDIR/usr/lib/x86_64-linux-gnu/gio/modules' # Path of gio modules
GI_TYPELIB_PATH: '$APPDIR/usr/lib/x86_64-linux-gnu/girepository-1.0:$APPDIR/usr/lib/girepository-1.0' # Paths of .typelib files
GDK_BACKEND: 'x11' # Necessary on wayland
PATH: '${APPDIR}/usr/bin:${PATH}'
# Set python home
# See https://docs.python.org/3/using/cmdline.html#envvar-PYTHONHOME
PYTHONHOME: '${APPDIR}/usr'
# Path to the site-packages dir or other modules dirs
# See https://docs.python.org/3/using/cmdline.html#envvar-PYTHONPATH
PYTHONPATH: '${APPDIR}/usr/lib/python3.10:${APPDIR}/usr/lib/python3.10/site-packages'
# Set python home
# See https://docs.python.org/3/using/cmdline.html#envvar-PYTHONHOME
# Path to the site-packages dir or other modules dirs
# See https://docs.python.org/3/using/cmdline.html#envvar-PYTHONPATH

test:
fedora:
image: appimagecrafters/tests-env:fedora-30
command: ./AppRun
use_host_x: true
debian:
image: appimagecrafters/tests-env:debian-stable
command: ./AppRun
use_host_x: true
arch:
image: appimagecrafters/tests-env:archlinux-latest
command: ./AppRun
use_host_x: true
centos:
image: appimagecrafters/tests-env:centos-7
command: ./AppRun
use_host_x: true
ubuntu:
image: appimagecrafters/tests-env:ubuntu-xenial
command: ./AppRun
use_host_x: true

AppImage:
update-information: 'None'
sign-key: 'None'
arch: x86_64
8 changes: 8 additions & 0 deletions generate_appImage/how to generate local AppImage
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
Steps:
1. Download docker image:
sudo docker pull appimagecrafters/appimage-builder:latest

2. Open terminal on project folder "generate_appImage"

3. Run command to generate the .AppImage file
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"
Loading

0 comments on commit 42119d2

Please sign in to comment.