Added kivy for making it run on Desktop and Mobile Clients

This commit is contained in:
surbhi 2018-07-05 19:07:16 +05:30
parent 6b2f82a7cd
commit 4770790597
No known key found for this signature in database
GPG Key ID: 88928762974D3618
3 changed files with 12 additions and 4 deletions

View File

@ -69,7 +69,6 @@ import helper_bootstrap
import helper_generic
import helper_threading
def connectToStream(streamNumber):
state.streamsInWhichIAmParticipating.append(streamNumber)
selfInitiatedConnections[streamNumber] = {}
@ -390,18 +389,22 @@ class Main:
# Populate with hardcoded value (same as connectToStream above)
state.streamsInWhichIAmParticipating.append(1)
if not state.enableGUI:
BMConfigParser().remove_option('bitmessagesettings', 'dontconnect')
elif daemon is False:
if daemon is False and state.enableGUI:
if state.curses:
if not depends.check_curses():
sys.exit()
print('Running with curses')
import bitmessagecurses
bitmessagecurses.runwrapper()
elif state.kivy:
BMConfigParser().remove_option('bitmessagesettings', 'dontconnect')
from mpybit import MainApp
MainApp().run()
else:
import bitmessageqt
bitmessageqt.run()
else:
BMConfigParser().remove_option('bitmessagesettings', 'dontconnect')
if daemon:
if state.testmode:

View File

@ -1,5 +1,8 @@
"""This module is for thread start."""
from bitmessagemain import main
import state
if __name__ == '__main__':
state.kivy = True
print("Kivy Loading......")
main()

View File

@ -68,3 +68,5 @@ resetNetworkProtocolAvailability()
dandelion = 0
testmode = False
kivy = False