not working with gui
This commit is contained in:
parent
5529176322
commit
93d31026d4
|
@ -0,0 +1,22 @@
|
||||||
|
#!/snap/osmocom/current/bin/python3
|
||||||
|
|
||||||
|
import webview
|
||||||
|
import subprocess
|
||||||
|
import time
|
||||||
|
|
||||||
|
""" django = subprocess.Popen(
|
||||||
|
["/snap/osmocom/current/bin/python3", "/snap/osmocom/current/osmo-gui/manage.py", "runserver", "127.0.0.1:8900"], )
|
||||||
|
time.sleep(1) """
|
||||||
|
webview.create_window(
|
||||||
|
"Osmocom",
|
||||||
|
"http://localhost:8900/hlr/",
|
||||||
|
confirm_close=True,
|
||||||
|
width=1366,
|
||||||
|
height=768,
|
||||||
|
min_size=(800, 600),
|
||||||
|
)
|
||||||
|
webview.start()
|
||||||
|
#django.terminate()
|
||||||
|
|
||||||
|
if __name__ == "__main__":
|
||||||
|
pass
|
|
@ -0,0 +1,86 @@
|
||||||
|
name: osmocom
|
||||||
|
version: 1.0.0
|
||||||
|
summary: A graphical user interface for the Osmocom project
|
||||||
|
description: |
|
||||||
|
This is the graphical user interface for the Osmocom project.
|
||||||
|
This program is developed with Django framework.
|
||||||
|
It is a web application that allows to manage the Osmocom network.
|
||||||
|
However, it is not a complete web application.
|
||||||
|
confinement: devmode
|
||||||
|
base: core22
|
||||||
|
grade: devel
|
||||||
|
|
||||||
|
parts:
|
||||||
|
osmo-gui:
|
||||||
|
plugin: python
|
||||||
|
source: .
|
||||||
|
|
||||||
|
build-packages:
|
||||||
|
- gcc
|
||||||
|
- pkg-config
|
||||||
|
- python3-dev
|
||||||
|
|
||||||
|
stage-packages:
|
||||||
|
- python3-pyqt5
|
||||||
|
- build-essential
|
||||||
|
- libfontconfig1
|
||||||
|
- libgirepository1.0-dev
|
||||||
|
- libcairo2-dev
|
||||||
|
- libxt-dev
|
||||||
|
- libgl1-mesa-dev
|
||||||
|
- libnss3-dev
|
||||||
|
- libxcomposite-dev
|
||||||
|
- libxkbcommon-dev
|
||||||
|
- libxcursor-dev
|
||||||
|
- libxcb-xinerama0
|
||||||
|
- libx11-xcb-dev
|
||||||
|
- libqt5gui5
|
||||||
|
- libqt5core5a
|
||||||
|
- libqt5xdg3
|
||||||
|
- libqt5webkit5
|
||||||
|
- libqt5widgets5
|
||||||
|
- libqt5dbus5
|
||||||
|
- libqt5webchannel5
|
||||||
|
- libqt5multimedia5
|
||||||
|
- libqt5opengl5
|
||||||
|
- qtchooser
|
||||||
|
- qtbase5-dev
|
||||||
|
- qtbase5-dev-tools
|
||||||
|
- qt5-qmake
|
||||||
|
- qt5-gtk-platformtheme
|
||||||
|
- libqt5x11extras5
|
||||||
|
- libsoqt520
|
||||||
|
- libxdamage-dev
|
||||||
|
- libxrandr-dev
|
||||||
|
- libxtst-dev
|
||||||
|
- libxss-dev
|
||||||
|
- libdbus-1-dev
|
||||||
|
- libevent-dev
|
||||||
|
- libfontconfig1-dev
|
||||||
|
- libcap-dev
|
||||||
|
- libpulse-dev
|
||||||
|
- libudev-dev
|
||||||
|
- libpci-dev
|
||||||
|
- libasound2-dev
|
||||||
|
- openssl
|
||||||
|
|
||||||
|
python-packages:
|
||||||
|
- django
|
||||||
|
- pywebview
|
||||||
|
- pycairo
|
||||||
|
- gobject
|
||||||
|
- proxy-tools
|
||||||
|
- pycairo
|
||||||
|
- PyGObject
|
||||||
|
|
||||||
|
override-build: |
|
||||||
|
mkdir -p $SNAPCRAFT_PART_INSTALL/osmo-gui
|
||||||
|
cp -r * $SNAPCRAFT_PART_INSTALL/osmo-gui
|
||||||
|
mv $SNAPCRAFT_PART_INSTALL/osmo-gui/gui $SNAPCRAFT_PART_INSTALL/run-program
|
||||||
|
chmod +x $SNAPCRAFT_PART_INSTALL/run-program
|
||||||
|
snapcraftctl build
|
||||||
|
|
||||||
|
apps:
|
||||||
|
osmo-gui:
|
||||||
|
command: run-program
|
||||||
|
plugs: [network]
|
|
@ -0,0 +1,49 @@
|
||||||
|
name: osmocom
|
||||||
|
version: 1.0.0
|
||||||
|
summary: A graphical user interface for the Osmocom project
|
||||||
|
description: |
|
||||||
|
This is the graphical user interface for the Osmocom project.
|
||||||
|
This program is developed with Django framework.
|
||||||
|
It is a web application that allows to manage the Osmocom network.
|
||||||
|
However, it is not a complete web application.
|
||||||
|
confinement: devmode
|
||||||
|
base: core22
|
||||||
|
grade: devel
|
||||||
|
|
||||||
|
parts:
|
||||||
|
osmocom:
|
||||||
|
plugin: dump
|
||||||
|
source: .
|
||||||
|
build-packages:
|
||||||
|
- gcc
|
||||||
|
- pkg-config
|
||||||
|
- python3-dev
|
||||||
|
- python3-venv
|
||||||
|
- build-essential
|
||||||
|
- libxml2-dev
|
||||||
|
- libcurl4-openssl-dev
|
||||||
|
- libicu-dev
|
||||||
|
|
||||||
|
override-build: |
|
||||||
|
snapcraftctl build
|
||||||
|
rm -rf $SNAPCRAFT_PART_INSTALL/snapcraft.yaml
|
||||||
|
rm -rf $SNAPCRAFT_PART_INSTALL/README.md
|
||||||
|
rm -rf $SNAPCRAFT_PART_INSTALL/install.sh
|
||||||
|
rm -rf $SNAPCRAFT_PART_INSTALL/.gitignore
|
||||||
|
rm -rf $SNAPCRAFT_PART_INSTALL/.git
|
||||||
|
rm -rf $SNAPCRAFT_PART_INSTALL/.github
|
||||||
|
mv $SNAPCRAFT_PART_INSTALL/gui $SNAPCRAFT_PART_INSTALL/run-program
|
||||||
|
chmod +x $SNAPCRAFT_PART_INSTALL/run-program
|
||||||
|
python3 -m venv $SNAPCRAFT_PART_INSTALL/env
|
||||||
|
source $SNAPCRAFT_PART_INSTALL/env/bin/activate
|
||||||
|
pip3 install -U pip django PyGObject pycairo pywebview
|
||||||
|
|
||||||
|
stage-packages:
|
||||||
|
- gir1.2-gtk-3.0
|
||||||
|
- gir1.2-appindicator3-0.1
|
||||||
|
- gir1.2-webkit2-4.0
|
||||||
|
|
||||||
|
apps:
|
||||||
|
osmocom:
|
||||||
|
command: run-program
|
||||||
|
plugs: [network, x11]
|
|
@ -0,0 +1,91 @@
|
||||||
|
name: osmocom
|
||||||
|
version: 1.0.0
|
||||||
|
summary: A graphical user interface for the Osmocom project
|
||||||
|
description: |
|
||||||
|
This is the graphical user interface for the Osmocom project.
|
||||||
|
This program is developed with Django framework.
|
||||||
|
It is a web application that allows to manage the Osmocom network.
|
||||||
|
However, it is not a complete web application.
|
||||||
|
confinement: devmode
|
||||||
|
base: core22
|
||||||
|
grade: devel
|
||||||
|
|
||||||
|
parts:
|
||||||
|
osmocom:
|
||||||
|
plugin: python
|
||||||
|
source: .
|
||||||
|
|
||||||
|
build-packages:
|
||||||
|
- gcc
|
||||||
|
- pkg-config
|
||||||
|
- python3-dev
|
||||||
|
- build-essential
|
||||||
|
- libxml2-dev
|
||||||
|
- libcurl4-openssl-dev
|
||||||
|
- libicu-dev
|
||||||
|
|
||||||
|
stage-packages:
|
||||||
|
- gir1.2-gtk-3.0
|
||||||
|
- gir1.2-appindicator3-0.1
|
||||||
|
- gir1.2-webkit2-4.0
|
||||||
|
- gir1.2-ibus-1.0
|
||||||
|
- gobject-introspection
|
||||||
|
- gir1.2-atk-1.0
|
||||||
|
- gir1.2-freedesktop
|
||||||
|
- gir1.2-gdkpixbuf-2.0
|
||||||
|
- gir1.2-glib-2.0
|
||||||
|
- gir1.2-pango-1.0
|
||||||
|
- libgtk-3-0
|
||||||
|
- libgtk-3-dev
|
||||||
|
- libgtk-3-common
|
||||||
|
- libepoxy0
|
||||||
|
- libepoxy-dev
|
||||||
|
- gir1.2-gdkpixbuf-2.0
|
||||||
|
- gir1.2-gudev-1.0
|
||||||
|
- gir1.2-handy-0.0
|
||||||
|
- gir1.2-rsvg-2.0
|
||||||
|
- gir1.2-secret-1
|
||||||
|
- libglib-object-introspection-perl
|
||||||
|
- libglib2.0-dev
|
||||||
|
- libgail-3-0
|
||||||
|
- libgail-common
|
||||||
|
- libgail18
|
||||||
|
- libatk1.0-dev
|
||||||
|
- libatk1.0-0
|
||||||
|
- libatk-wrapper-java
|
||||||
|
- libatk-wrapper-java-jni
|
||||||
|
- libatk-bridge2.0-0
|
||||||
|
- libatk-bridge2.0-dev
|
||||||
|
- libatk-adaptor
|
||||||
|
- eog
|
||||||
|
- libgdk-pixbuf2.0-dev
|
||||||
|
- libgdk-pixbuf2.0-0
|
||||||
|
- libgdk-pixbuf2.0-common
|
||||||
|
- libgdk-pixbuf2.0-bin
|
||||||
|
- gir1.2-pango-1.0
|
||||||
|
- libpango1.0-dev
|
||||||
|
- libpango1.0-0
|
||||||
|
- gstreamer1.0-x
|
||||||
|
- libcogl-pango20
|
||||||
|
- libpangocairo-1.0-0
|
||||||
|
- pango1.0-tools
|
||||||
|
- dbus
|
||||||
|
- gir1.2-dbusmenu-glib-0.4
|
||||||
|
- gir1.2-gck-1
|
||||||
|
python-packages:
|
||||||
|
- django
|
||||||
|
- pywebview
|
||||||
|
- pycairo
|
||||||
|
- pygobject
|
||||||
|
|
||||||
|
override-build: |
|
||||||
|
mkdir -p $SNAPCRAFT_PART_INSTALL/osmo-gui
|
||||||
|
cp -r * $SNAPCRAFT_PART_INSTALL/osmo-gui
|
||||||
|
mv $SNAPCRAFT_PART_INSTALL/osmo-gui/gui $SNAPCRAFT_PART_INSTALL/run-program
|
||||||
|
chmod +x $SNAPCRAFT_PART_INSTALL/run-program
|
||||||
|
snapcraftctl build
|
||||||
|
|
||||||
|
apps:
|
||||||
|
osmocom:
|
||||||
|
command: run-program
|
||||||
|
plugs: [network]
|
|
@ -0,0 +1,50 @@
|
||||||
|
name: osmocom
|
||||||
|
version: 1.0.0
|
||||||
|
summary: A graphical user interface for the Osmocom project
|
||||||
|
description: |
|
||||||
|
This is the graphical user interface for the Osmocom project.
|
||||||
|
This program is developed with Django framework.
|
||||||
|
It is a web application that allows to manage the Osmocom network.
|
||||||
|
However, it is not a complete web application.
|
||||||
|
confinement: devmode
|
||||||
|
base: core22
|
||||||
|
grade: devel
|
||||||
|
|
||||||
|
parts:
|
||||||
|
osmocom:
|
||||||
|
plugin: python
|
||||||
|
source: .
|
||||||
|
|
||||||
|
build-packages:
|
||||||
|
- gcc
|
||||||
|
- pkg-config
|
||||||
|
- python3-dev
|
||||||
|
- build-essential
|
||||||
|
- libxml2-dev
|
||||||
|
- libcurl4-openssl-dev
|
||||||
|
- libicu-dev
|
||||||
|
|
||||||
|
stage-packages:
|
||||||
|
- gir1.2-gtk-3.0
|
||||||
|
- gir1.2-appindicator3-0.1
|
||||||
|
- gir1.2-webkit2-4.0
|
||||||
|
- gir1.2-ibus-1.0
|
||||||
|
- gobject-introspection
|
||||||
|
|
||||||
|
python-packages:
|
||||||
|
- django
|
||||||
|
- pywebview
|
||||||
|
- pycairo
|
||||||
|
- pygobject
|
||||||
|
|
||||||
|
override-build: |
|
||||||
|
mkdir -p $SNAPCRAFT_PART_INSTALL/osmo-gui
|
||||||
|
cp -r * $SNAPCRAFT_PART_INSTALL/osmo-gui
|
||||||
|
mv $SNAPCRAFT_PART_INSTALL/osmo-gui/gui $SNAPCRAFT_PART_INSTALL/run-program
|
||||||
|
chmod +x $SNAPCRAFT_PART_INSTALL/run-program
|
||||||
|
snapcraftctl build
|
||||||
|
|
||||||
|
apps:
|
||||||
|
osmocom:
|
||||||
|
command: run-program
|
||||||
|
plugs: [network]
|
Loading…
Reference in New Issue