From ec392f50f50c6583f09264d6bc134619973c8dfb Mon Sep 17 00:00:00 2001 From: Bumsik Kim Date: Thu, 21 Jun 2018 04:59:05 -0400 Subject: [PATCH] \#10: Added pyopengl, custom shell script for miniconda environment --- .travis.yml | 8 +++++++- MANIFEST.in | 2 +- Makefile | 3 --- launch.sh | 4 ---- launch_env.sh | 13 +++++++++++++ package/archlinux/PKGBUILD | 2 +- package/debian/Makefile.virtualenv | 4 ++-- package/debian/control | 2 +- setup.py | 5 +++-- data/virtscreen.desktop => virtscreen.desktop | 0 10 files changed, 28 insertions(+), 15 deletions(-) delete mode 100755 launch.sh create mode 100755 launch_env.sh rename data/virtscreen.desktop => virtscreen.desktop (100%) diff --git a/.travis.yml b/.travis.yml index e6a8500..3b19ce7 100644 --- a/.travis.yml +++ b/.travis.yml @@ -3,11 +3,17 @@ language: python python: '3.6' services: - docker + install: - make docker-pull - pip3 install . + script: +- echo No test scripts implemented yet. Travis is used only for deploy yet. + +before_deploy: - package/update_version.sh $TRAVIS_TAG + deploy: - provider: releases api_key: @@ -25,4 +31,4 @@ deploy: distributions: "bdist_wheel" on: tags: true - repo: kbumsik/VirtScreen \ No newline at end of file + repo: kbumsik/VirtScreen diff --git a/MANIFEST.in b/MANIFEST.in index 8c6f031..24eaf06 100644 --- a/MANIFEST.in +++ b/MANIFEST.in @@ -6,4 +6,4 @@ include LICENSE.txt # Include data directories include data/virtscreen.png -include data/virtscreen.desktop +include virtscreen.desktop diff --git a/Makefile b/Makefile index 8484037..4a93be4 100644 --- a/Makefile +++ b/Makefile @@ -95,7 +95,4 @@ arch-clean: cd package/archlinux rm -rf pkg src *.tar* -launch: - ./launch.sh - clean: arch-clean deb-clean python-clean diff --git a/launch.sh b/launch.sh deleted file mode 100755 index fb45a18..0000000 --- a/launch.sh +++ /dev/null @@ -1,4 +0,0 @@ -#!/bin/sh -# Script to run virtscreen locally -# This is not intended to be included in the distributed package -virtscreen/virtscreen.py diff --git a/launch_env.sh b/launch_env.sh new file mode 100755 index 0000000..12c9cc3 --- /dev/null +++ b/launch_env.sh @@ -0,0 +1,13 @@ +#!/bin/sh +# This script is only for isolated miniconda environment +# Used in Debian & AppImage package +ENV=/usr/share/virtscreen/env + +export PYTHONPATH=$ENV/lib/python3.6 +export LD_LIBRARY_PATH=$ENV/lib +export QT_PLUGIN_PATH=$ENV/lib/python3.6/site-packages/PyQt5/Qt/plugins +export QML2_IMPORT_PATH=$ENV/lib/python3.6/site-packages/PyQt5/Qt/qml +# export QT_QPA_FONTDIR=/usr/share/fonts +# export QT_XKB_CONFIG_ROOT=/usr/share/X11/xkb + +$ENV/bin/python3 $ENV/bin/virtscreen diff --git a/package/archlinux/PKGBUILD b/package/archlinux/PKGBUILD index bbfc14f..3c4279f 100644 --- a/package/archlinux/PKGBUILD +++ b/package/archlinux/PKGBUILD @@ -8,7 +8,7 @@ arch=("i686" "x86_64") url="https://github.com/kbumsik/VirtScreen" license=('GPL') groups=() -depends=('xorg-xrandr' 'x11vnc' 'python-pyqt5' 'python-twisted' 'python-netifaces' 'python-qt5reactor') +depends=('xorg-xrandr' 'x11vnc' 'python-pyqt5' 'python-twisted' 'python-netifaces' 'python-qt5reactor' 'python-opengl') makedepends=('python-pip') optdepends=( 'arandr: for display settings option' diff --git a/package/debian/Makefile.virtualenv b/package/debian/Makefile.virtualenv index c8a46ab..3f2a32a 100644 --- a/package/debian/Makefile.virtualenv +++ b/package/debian/Makefile.virtualenv @@ -15,12 +15,12 @@ install: # Fix hashbang and move executable sed -i "1s:.*:#!$(prefix)/share/virtscreen/env/bin/python3:" \ $(DESTDIR)$(prefix)/share/virtscreen/env/bin/virtscreen - install -D $(DESTDIR)$(prefix)/share/virtscreen/env/bin/virtscreen \ + install -D launch_env.sh \ $(DESTDIR)$(prefix)/bin/virtscreen # Delete unnecessary installed files done by setup.py rm -rf $(DESTDIR)$(prefix)/share/virtscreen/env/lib/python3.6/site-packages/usr # Copy desktop entry and icon - install -m 644 -D data/virtscreen.desktop \ + install -m 644 -D virtscreen.desktop \ $(DESTDIR)$(prefix)/share/applications/virtscreen.desktop install -m 644 -D data/virtscreen.png \ $(DESTDIR)$(prefix)/share/pixmaps/virtscreen.png diff --git a/package/debian/control b/package/debian/control index 2f87447..0383bf3 100644 --- a/package/debian/control +++ b/package/debian/control @@ -10,7 +10,7 @@ X-Python3-Version: >= 3.6 Package: virtscreen Architecture: all Multi-Arch: foreign -Depends: ${misc:Depends}, ${python3:Depends}, x11vnc, python3-pyqt5, qtbase5-dev, python3-twisted, python3-netifaces +Depends: ${misc:Depends}, ${python3:Depends}, x11vnc, python3-pyqt5, qtbase5-dev, python3-opengl, python3-twisted, python3-netifaces Description: Make your iPad/tablet/computer as a secondary monitor on Linux VirtScreen is an easy-to-use Linux GUI app that creates a virtual secondary screen and shares it through VNC. diff --git a/setup.py b/setup.py index 2300b3d..90a8e8c 100644 --- a/setup.py +++ b/setup.py @@ -147,7 +147,8 @@ setup( install_requires=['PyQt5>=5.10.1', 'Twisted>=17.9.0', 'qt5reactor>=0.5', - 'netifaces>=0.10.6'], # Optional + 'netifaces>=0.10.6', + 'PyOpenGL>=3.1.0'], # Optional # List additional groups of dependencies here (e.g. development # dependencies). Users will be able to install these using the "extras" @@ -180,7 +181,7 @@ setup( data_files=[ # Desktop entries spec: # https://www.freedesktop.org/wiki/Specifications/desktop-entry-spec/ - ('share/applications', ['data/virtscreen.desktop']), + ('share/applications', ['virtscreen.desktop']), # $XDG_DATA_DIRS/icons # https://standards.freedesktop.org/icon-theme-spec/icon-theme-spec-latest.html#directory_layout ('share/icons', ['data/virtscreen.png']), diff --git a/data/virtscreen.desktop b/virtscreen.desktop similarity index 100% rename from data/virtscreen.desktop rename to virtscreen.desktop