Skip to content

Commit

Permalink
V0.55.0.11 - popup closing, updater now launcher
Browse files Browse the repository at this point in the history
  • Loading branch information
rapidslayer101 committed Oct 10, 2022
1 parent 235c675 commit 8c9d83f
Show file tree
Hide file tree
Showing 6 changed files with 43 additions and 45 deletions.
10 changes: 5 additions & 5 deletions updater.py → launcher.py
Original file line number Diff line number Diff line change
Expand Up @@ -172,8 +172,8 @@ def update_system(self):
self.update_text = f"Successfully updated to {file_name[:-4].replace('rdisc', 'Rdisc')}."
if path.exists(f"old_rdisc.kv"):
remove(f"old_rdisc.kv")
rename("rdisc.kv", "old_rdisc.kv")
sleep(1)
if path.exists("rdisc.kv"):
rename("rdisc.kv", "old_rdisc.kv")
remove(f"app/{file_name}")
for file in listdir("app"):
if file.endswith(".exe") and file != f"{file_name[:-4]}.exe":
Expand Down Expand Up @@ -379,14 +379,14 @@ class WindowManager(ScreenManager):
[sm.add_widget(screen) for screen in [Loading(), ChooseDistro(), AttemptConnection(), IpSet(), Update(), CreateDev()]]


class RdiscUpdater(App):
class RdiscLauncher(App):
def build(self):
self.title = f"Rdisc Updater"
self.title = f"Rdisc Launcher"
Window.size = (500, 600)
Config.set('input', 'mouse', 'mouse,disable_multitouch')
Config.set('kivy', 'exit_on_escape', '0')
return sm


if __name__ == "__main__":
RdiscUpdater().run()
RdiscLauncher().run()
2 changes: 1 addition & 1 deletion updater.spec → launcher.spec
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ block_cipher = None


a = Analysis(
['updater.py'],
['launcher.py'],
pathex=["C:/Users/rapid/PycharmProjects/Rdisc-Kivy"],
binaries=[],
datas=[],
Expand Down
7 changes: 0 additions & 7 deletions rdisc-server.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,6 @@ class InvalidClientData(Exception):
pass


class SessionTaken(Exception):
pass


class Users:
def __init__(self):
self.logged_in_users = []
Expand Down Expand Up @@ -258,7 +254,6 @@ def send_update(update_file):
uid, u_ipk = login_request[4:].split("🱫")
if users.check_logged_in(uid, ip):
send_e("SESH_T")
raise SessionTaken
else:
try:
ipk1, ipk2, ipk3, ipk4, u_name, xp, r_coin, d_coin = \
Expand Down Expand Up @@ -391,8 +386,6 @@ def check_ipk(ipk):
print(f"{uid}-{ip}:{port} DC")
if ip in users.logged_in_users:
users.logout(uid, ip, cs)
except SessionTaken:
print(f"{uid}-{ip}:{port} DC - 1 session limit")
except InvalidClientData:
print(f"{uid}-{ip}:{port} DC - modified/invalid client request")
if ip in users.logged_in_users:
Expand Down
49 changes: 22 additions & 27 deletions rdisc.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,11 +44,10 @@

if path.exists("rdisc.exe"):
app_hash = enc.hash_a_file("rdisc.exe")
elif path.exists("rdisc.py"):
app_hash = enc.hash_a_file("rdisc.py")
else:
if path.exists("rdisc.py"):
app_hash = enc.hash_a_file("rdisc.py")
else:
app_hash = f"Unknown distro: {platform}"
app_hash = f"Unknown distro: {platform}"

version_ = None
if path.exists("sha.txt"):
Expand Down Expand Up @@ -124,14 +123,10 @@ def recv_d(self, buf_lim):

s = Server()


class ErrorPopup(Popup):
pass


def error_popup(error_reason):
App.error_reason = error_reason
Factory.ErrorPopup().open()
App.popup = Factory.ErrorPopup()
App.popup.open()


def connect_system():
Expand Down Expand Up @@ -359,20 +354,16 @@ def toggle_button(self):

def start_regeneration(self):
if len(self.name_or_uid.text) == 8 and len(self.pass_code.text) == 15 and self.pin_code.text:
App.path = "login"
App.uid, App.pass_code, App.pin_code = self.name_or_uid.text, self.pass_code.text, self.pin_code.text
App.path, App.uid = "login", self.name_or_uid.text
App.pass_code, App.pin_code = self.pass_code.text, self.pin_code.text
App.sm.switch_to(ReCreateGen(), direction="left")
if 8 < len(self.name_or_uid.text) < 29 and "#" in self.name_or_uid.text and \
len(self.pass_code.text) == 15 and self.pin_code.text:
App.path = "login"
App.uname, App.pass_code, App.pin_code = self.name_or_uid.text, self.pass_code.text, self.pin_code.text
App.path, App.uname = "login", self.name_or_uid.text
App.pass_code, App.pin_code = self.pass_code.text, self.pin_code.text
App.sm.switch_to(ReCreateGen(), direction="left")


def switch_to_captcha():
App.sm.switch_to(Captcha(), direction="left")


class ReCreateGen(Screen):
gen_left_text = StringProperty()

Expand All @@ -393,7 +384,7 @@ def regenerate_master_key(self, master_key, salt, depth_to, current_depth=0):
except ZeroDivisionError:
pass
App.master_key = enc.to_base(96, 16, master_key.hex())
Clock.schedule_once(lambda dt: switch_to_captcha())
Clock.schedule_once(lambda dt: App.sm.switch_to(Captcha(), direction="left"))

def on_enter(self, *args):
self.gen_left_text = f"Generating master key"
Expand Down Expand Up @@ -887,6 +878,7 @@ def build(self):
App.acc_key = None
App.path = None # Make or Login
App.xp = None
App.popup = None
App.reload_text = ""

# app defaults and window manager
Expand All @@ -911,18 +903,21 @@ def build(self):
if platform in ["win32", "linux"]:
Window.size = (1264, 681)

Window.bind(on_keyboard=self.on_keyboard)
Window.bind(on_keyboard=on_keyboard)
Config.set('input', 'mouse', 'mouse,disable_multitouch')
Config.set('kivy', 'exit_on_escape', '0')
return App.sm

def on_keyboard(self, window, key, scancode, text, modifiers):
if 'ctrl' in modifiers and text == 'r':
reload("reload")
if 'ctrl' in modifiers and text == 'x':
App.get_running_app().stop()
if 'ctrl' and 'alt' in modifiers and text == 'c':
App.stop() # Forces a crash
def on_keyboard(window, key, scancode, text, modifiers):
if 'ctrl' in modifiers and text == 'r':
reload("reload")
if 'ctrl' in modifiers and text == 'x':
App.get_running_app().stop()
if 'ctrl' and 'alt' in modifiers and text == 'c':
App.stop() # Forces a crash
if App.popup and key == 8:
App.popup.dismiss()
App.popup = None

def reload(reason):
current_screen = App.sm.current
Expand Down
13 changes: 12 additions & 1 deletion sha.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3373,4 +3373,15 @@ E$Eg4^{mFgY,$/w^DCC.f{J&2<l@&C%97£E^$^tt%$C9q6,$"M7dC;£J8h9rc3LgPxt!ud#]Qre-BO
H#MTLvd{KZmJnDLmNdWGq64y]*|:d8aJ."T3t'#3s£UIzOK.bm4.k>#-h=Lcs0^?E+}r\<y54#cO,f§V0.54.3.246§TME-2022-10-09_19:59:13.74§BLD_NM-140§RUN_NM-3203
:9JG#6A}QT2L AckH-o qCvj.k ~30?<vc£3!@$#9ph}7~4aS1wBhF-.EaGvpml[v Wp@s:v~£CAU8§V0.54.3.247§TME-2022-10-09_19:59:50.67§BLD_NM-140§RUN_NM-3204
-@WOG)"f8tQ|f]$YYJNbc#B-EKgn£>`x¬;ziW}](=T.x|o-*et+Q£w<9y=hm^KVX>B)m1"+BX31&)X§V0.54.3.248§TME-2022-10-09_20:00:56.09§BLD_NM-140§RUN_NM-3205
AkBrD1+TosdJFWFE01ZBEZ:l#8;£,3=yhYv"-*?0IHxWe:X>#|WLC<¬wLloOi]g{R¬MdYOv{ukB7SK§V0.55.0.0§TME-2022-10-09_20:07:23.89§BLD_NM-141§RUN_NM-3205
AkBrD1+TosdJFWFE01ZBEZ:l#8;£,3=yhYv"-*?0IHxWe:X>#|WLC<¬wLloOi]g{R¬MdYOv{ukB7SK§V0.55.0.0§TME-2022-10-09_20:07:23.89§BLD_NM-141§RUN_NM-3205
AOc$c4h2>K>cT{]kuzf676TU#Q\6~q'S5:ko[]%M<PlG<B+-@FT9;08fx]2agZhzQLlF&#a¬ny6kh7§V0.55.0.1§TME-2022-10-10_16:51:17.23§BLD_NM-141§RUN_NM-3206
-=o.$M!3|e@FbC=0+FzH./Y^$pRF,wRDf6A)^6¬1T#Q*fT7sB)F:-7x+jQX[H5]RY<72&ee(yPb6ft§V0.55.0.2§TME-2022-10-10_16:52:17.04§BLD_NM-141§RUN_NM-3207
}'`(th#Cd|;yd6u*>1L#:p).&=f%@V/lE?BUxB[89K*/3L\JI(H9'r¬ 0t '@n wmEM{0b2Owy~#§V0.55.0.3§TME-2022-10-10_16:52:38.75§BLD_NM-141§RUN_NM-3208
2;vmA&PU9"^@2^oJjA4yZIXtjPp#HMw.P]!9j62dg0]c5:n\3Tgb"Yp~L}$"e6dC=KrrmuK6hv^aU;§V0.55.0.4§TME-2022-10-10_16:53:08.08§BLD_NM-141§RUN_NM-3209
EcTT&1%EuL\l=>£bX¬/84TPP(£(/tzL1lS*?n\c.tx)*5kdrsWmZ<^X4lkV/vV;q?;~X8D253D44$|§V0.55.0.5§TME-2022-10-10_16:54:22.28§BLD_NM-141§RUN_NM-3210
@"UIL~uFM#&jtlNn*gh@'^w1Oyny1hv`eo}\xXT2Hag¬!x}+]eGt+£!MOz)n(qEB=aC=6eY+ZA<W!*§V0.55.0.6§TME-2022-10-10_16:54:39.33§BLD_NM-141§RUN_NM-3211
Ax:xtns@d'=jkJ£n£'mi@rS0/"{$5qQI9o~c]d SQov?2?Uw)0\Q%1Za7N#UGy[:KlD`n|a%X£5g;N§V0.55.0.7§TME-2022-10-10_17:16:52.00§BLD_NM-141§RUN_NM-3212
2K:~~Y7mt>\@bilB+>5%R@?uWXd"7py:|UN7MH0\:m~-t"qAl`Ceq]LjZOP\e#'>O;G"?EWN0"~2~f§V0.55.0.8§TME-2022-10-10_17:19:18.78§BLD_NM-141§RUN_NM-3213
IQW£X)Q7~£`£m<lmoe9n8WK!]R'W1<.p*rI$a\6[:9$ 8-I:\mK$}z7 AlKh!kG(1&cJss={7"0 Uv§V0.55.0.9§TME-2022-10-10_17:19:29.74§BLD_NM-141§RUN_NM-3214
NA:1>wv0mjg/;q'eJ?I>\jr.mz\%g#['M{@>gE¬BzfR\,o¬p(r003C*d7`'7Q ":L@RHSFZ^hEyMa§V0.55.0.10§TME-2022-10-10_17:23:33.68§BLD_NM-141§RUN_NM-3215
6z^Wg+iLxL?jqs4BJLwH@]{F5SwX6J2Su[jT*G~Eam?XIW)AW64IR%1z!\d@kX^ Y\DUYKU1Uvm`4L§V0.55.0.11§TME-2022-10-10_17:27:38.72§BLD_NM-141§RUN_NM-3216
7 changes: 3 additions & 4 deletions updates.txt
Original file line number Diff line number Diff line change
Expand Up @@ -54,8 +54,8 @@
0.54 invalid action popups, fixed Rdisc distro popup problems
0.55 reloads, crash handling and coloring backend

0.56 public chat room, color editing, color-blind modes
0.57 gift card buying, code claiming, transaction history with xp leveling
0.56 gift card and d_coin buying, color editing, color-blind modes
0.57 code claiming, transaction history with xp leveling, public chat room
0.58 coinflip, client misinformation logging, user pass changing
0.59 friending
0.60 scratch cards and other inventory items
Expand All @@ -73,8 +73,7 @@
- nfc experiment <- unlikely, mobile support not a priority

known issues:
- after first install the app does not launch, but after a restart it does
- after a crash reload the app cannot be closed with cntl+x and color reloads dont work
- after a crash reload the app cannot be closed with cntl+x and color reloads don't work

# account key + account pin = master key
# MASTER KEY MAY BE SAVED TO USB
Expand Down

0 comments on commit 8c9d83f

Please sign in to comment.