mirror of
https://github.com/liberatedsystems/openCom-Companion.git
synced 2024-11-24 06:10:36 +01:00
Added user-local config dir on desktop
This commit is contained in:
parent
ad4662efa8
commit
06642c0fda
@ -27,8 +27,11 @@ apk: prepare release postbuild
|
||||
|
||||
devapk: prepare debug postbuild
|
||||
|
||||
version:
|
||||
@(echo $$(python ./gv.py))
|
||||
|
||||
install:
|
||||
adb install bin/sideband-0.1.7-arm64-v8a-release.apk
|
||||
adb install bin/sideband-$$(python ./gv.py)-arm64-v8a-release.apk
|
||||
|
||||
console:
|
||||
(adb logcat | grep python)
|
||||
|
17
sbapp/gv.py
Normal file
17
sbapp/gv.py
Normal file
@ -0,0 +1,17 @@
|
||||
import re
|
||||
import os
|
||||
def gv() -> str:
|
||||
version_file = os.path.join(
|
||||
os.path.dirname(__file__), "main.py"
|
||||
)
|
||||
|
||||
version_file_data = open(version_file, "rt", encoding="utf-8").read()
|
||||
version_regex = r"(?<=^__version__ = ['\"])[^'\"]+(?=['\"]$)"
|
||||
try:
|
||||
version = re.findall(version_regex, version_file_data, re.M)[0]
|
||||
return version
|
||||
except IndexError:
|
||||
raise ValueError(f"Unable to find version string in {version_file}.")
|
||||
|
||||
print(gv(), end="")
|
||||
exit(0)
|
@ -3,8 +3,7 @@ import LXMF
|
||||
import time
|
||||
|
||||
from kivy.logger import Logger, LOG_LEVELS
|
||||
# TODO: Reset
|
||||
# Logger.setLevel(LOG_LEVELS["error"])
|
||||
Logger.setLevel(LOG_LEVELS["error"])
|
||||
|
||||
from kivymd.app import MDApp
|
||||
from kivy.core.window import Window
|
||||
@ -34,7 +33,7 @@ from kivy.metrics import dp
|
||||
from kivymd.uix.button import MDFlatButton
|
||||
from kivymd.uix.dialog import MDDialog
|
||||
|
||||
__version__ = "0.1.7"
|
||||
__version__ = "0.1.8"
|
||||
__variant__ = "beta"
|
||||
|
||||
if RNS.vendor.platformutils.get_platform() == "android":
|
||||
|
@ -70,11 +70,11 @@ class SidebandCore():
|
||||
self.owner_app = owner_app
|
||||
self.reticulum = None
|
||||
|
||||
self.app_dir = plyer.storagepath.get_application_dir()
|
||||
self.app_dir = plyer.storagepath.get_home_dir()+"/.sideband"
|
||||
|
||||
self.rns_configdir = None
|
||||
if RNS.vendor.platformutils.get_platform() == "android":
|
||||
self.app_dir = self.app_dir+"/io.unsigned.sideband/files/"
|
||||
self.app_dir = plyer.storagepath.get_application_dir()+"/io.unsigned.sideband/files/"
|
||||
self.rns_configdir = self.app_dir+"/app_storage/reticulum"
|
||||
|
||||
if not os.path.isdir(self.app_dir+"/app_storage"):
|
||||
|
Loading…
Reference in New Issue
Block a user