Skip to content
This repository has been archived by the owner on Jan 26, 2025. It is now read-only.

Commit

Permalink
Add dev_tool
Browse files Browse the repository at this point in the history
  • Loading branch information
dobabaophuc1706 committed Jun 15, 2024
1 parent 588f986 commit 4ce2790
Show file tree
Hide file tree
Showing 67 changed files with 2,582 additions and 0 deletions.
Binary file added misaka_devtool_v4.1/Install.zip
Binary file not shown.
17 changes: 17 additions & 0 deletions misaka_devtool_v4.1/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
[PhucDo's Misaka Repo](https://github.com/dobabaophuc1706/misakarepo)
=============
<p align="center">
<img src="https://raw.githubusercontent.com/dobabaophuc1706/dobabaophuc1706/main/README/Avt.png" alt="Avt" width="Avt" height="200"/>
<p/>

<h3 align="left">How to use</h3>


<li>Updating more tweaks...</li>
<li>Be careful, everything in my repo is free, don't be fooled by scamers!</li>

[Visit my repo to see more...](https://phucdo-repo.pages.dev/)
=============

[About Misaka](https://straight-tamago.github.io/misaka/Misaka/)
=============
188 changes: 188 additions & 0 deletions misaka_devtool_v4.1/main.pyw
Original file line number Diff line number Diff line change
@@ -0,0 +1,188 @@
import tkinter as tk
import socketio
import eventlet
import tkinter as tk
import shutil
import os



current = os.path.dirname(os.path.abspath(__file__))
sio = socketio.Server()
command = ""
packagedata = ""

@sio.on('connect')
def connect(sid, environ):
print('client connected')

@sio.on('disconnect')
def disconnect(sid):
print('client disconnected')

@sio.on('command_request')
def receive(sid, data):
global command
sio.emit('command_response', command, room=sid)
command = ""

@sio.on('data_request')
def receive(sid, data):
global packagedata
sio.emit('data_response', packagedata, room=sid)
packagedata = ""

@sio.on('data_request_respring')
def receive(sid, data):
global packagedata
sio.emit('data_response_respring', packagedata, room=sid)
packagedata = ""

@sio.on('Log')
def receive(sid, data):
NewNameInput.insert(tk.END, f"{data}\n")
NewNameInput.see('end')

def respring():
global command
command = "Respring"

def makeinstall():
shutil.make_archive(current+"/Install", 'zip', root_dir=current+"/package")
f = open(current+"/Install.zip", 'rb')
global packagedata
packagedata = f.read()
f.close()
global command
command = "MakeInstall"

def makeinstallandrespring():
shutil.make_archive(current+"/Install", 'zip', root_dir=current+"/package")
f = open(current+"/Install.zip", 'rb')
global packagedata
packagedata = f.read()
f.close()
global command
command = "MakeInstall_Respring"

def server_startup_b():
import threading
t = threading.Thread(target=server_startup)
t.start()
NewNameInput.insert(tk.END, "misaka devtool 4.1\n")
NewNameInput.insert(tk.END, "Background execution must be enabled in the settings of the misaka app.\n")
NewNameInput.insert(tk.END, "by しまりん\n")
def server_startup():
app = socketio.WSGIApp(sio)
eventlet.wsgi.server(eventlet.listen(('0.0.0.0', 8080)), app)


root = tk.Tk()
root.title(u"misaka devtool")
root.geometry("900x600")

root.columnconfigure(1, weight=1)
root.rowconfigure(1, weight=1)

EditFrame = tk.Frame(
root,
bg="#161616",
)
EditFrame.grid(
column=1,
row=0,
sticky="NSEW",
rowspan=2
)
EditFrame.columnconfigure(0, weight=1)
EditFrame.rowconfigure(1, weight=1)


## AppNameLabel =====================
AppNameLabel = tk.Label(
EditFrame,
text="misaka devtool 4.1",
bg="#eb077f",
fg="white"
)
AppNameLabel.grid(
column=0,
row=0,
ipadx=10,
ipady=10,
sticky="NEW"
)

## NewNameInput =====================
NewNameInput = tk.Text(
EditFrame,
bg="#161616",
fg="white",
highlightthickness=0
)
NewNameInput.grid(
column=0,
sticky="NEW",
)
NewNameInput.config(height=root.winfo_height())

## Button Frame =====================
ButtonFrame = tk.Frame(
EditFrame,
bg="#161616",
)
ButtonFrame.grid(
column=0,
row=2,
sticky="NSEW",
)
ButtonFrame.columnconfigure(0, weight=1)
ButtonFrame.columnconfigure(1, weight=1)

## Button ===========================
UnSetButton2 = tk.Button(
ButtonFrame,
bg="#eb077f",
fg="#eb077f",
text="Make & Install",
command=makeinstall
)
UnSetButton2.grid(
column=1,
row=0,
ipadx=10,
ipady=10,
sticky="NSEW",
)
SetButton = tk.Button(
ButtonFrame,
bg="#eb077f",
fg="#eb077f",
text="Make & Install & Respring",
command=makeinstallandrespring
)
SetButton.grid(
column=2,
row=0,
ipadx=10,
ipady=10,
sticky="NSEW",
)
UnSetButton = tk.Button(
ButtonFrame,
bg="#eb077f",
fg="#eb077f",
text="Respring",
command=respring
)
UnSetButton.grid(
column=0,
row=0,
ipadx=10,
ipady=10,
sticky="NSEW",
)

if __name__ == '__main__':
root.after(1000, server_startup_b)
root.mainloop()
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -0,0 +1,100 @@
<?xml version="1.0" encoding="UTF-8"?>
<caml xmlns="http://www.apple.com/CoreAnimation/1.0">
<CALayer position="-0.5 0">
<sublayers>
<CALayer id="#1" bounds="0 0 40 40" position="0 0">
<contents type="CGImage"
src="/var/mobile/Documents/PhucDo/PhucDoUI/dark.png"/>
</CALayer>
<CALayer id="#2" bounds="0 0 40 40" position="0 0">
<contents type="CGImage"
src="/var/mobile/Documents/PhucDo/PhucDoUI/light.png"/>
</CALayer>
</sublayers>
<states>
<LKState name="light">
<elements>
<LKStateSetValue targetId="#1" keyPath="opacity">
<value type="integer" value="1"/>
</LKStateSetValue>
<LKStateSetValue targetId="#2" keyPath="opacity">
<value type="integer" value="0"/>
</LKStateSetValue>
<LKStateSetValue targetId="#1" keyPath="transform.rotation.z">
<value type="integer" value="0" />
</LKStateSetValue>
</elements>
</LKState>
<LKState name="dark">
<elements>
<LKStateSetValue targetId="#1" keyPath="opacity">
<value type="integer" value="0"/>
</LKStateSetValue>
<LKStateSetValue targetId="#2" keyPath="opacity">
<value type="integer" value="1"/>
</LKStateSetValue>
<LKStateSetValue targetId="#2" keyPath="transform.rotation.z">
<value type="integer" value="0" />
</LKStateSetValue>
</elements>
</LKState>
</states>
<stateTransitions>
<LKStateTransition fromState="*" toState="light">
<elements>
<LKStateTransitionElement key="transform.rotation.z" targetId="#1">
<animation type="CABasicAnimation" keyPath="transform.rotation.z"
duration="3" fillMode="backwards" repeatCount="Inf">
<fromValue type="integer" value="0" />
<toValue type="real" value="-6.283185482025" />
</animation>
</LKStateTransitionElement>
</elements>
</LKStateTransition>
<LKStateTransition fromState="light" toState="*">
<elements>
<LKStateTransitionElement key="transform" targetId="#1">
<animation type="CASpringAnimation" keyPath="transform" duration="1" />
</LKStateTransitionElement>
<LKStateTransitionElement key="transform" targetId="#2">
<animation type="CASpringAnimation" keyPath="transform" duration="1" />
</LKStateTransitionElement>
<LKStateTransitionElement key="opacity" targetId="#1">
<animation type="CABasicAnimation" keyPath="opacity" duration="0.1" />
</LKStateTransitionElement>
<LKStateTransitionElement key="opacity" targetId="#2">
<animation type="CABasicAnimation" keyPath="opacity" duration="0.1" />
</LKStateTransitionElement>
</elements>
</LKStateTransition>
<LKStateTransition fromState="*" toState="dark">
<elements>
<LKStateTransitionElement key="transform.rotation.z" targetId="#2">
<animation type="CABasicAnimation" keyPath="transform.rotation.z"
duration="3" fillMode="backwards" repeatCount="Inf">
<fromValue type="integer" value="0" />
<toValue type="real" value="-6.283185482025" />
</animation>
</LKStateTransitionElement>
</elements>
</LKStateTransition>
<LKStateTransition fromState="dark" toState="*">
<elements>
<LKStateTransitionElement key="transform" targetId="#1">
<animation type="CASpringAnimation" keyPath="transform" duration="1" />
</LKStateTransitionElement>
<LKStateTransitionElement key="transform" targetId="#2">
<animation type="CASpringAnimation" keyPath="transform" duration="1" />
</LKStateTransitionElement>
<LKStateTransitionElement key="opacity" targetId="#1">
<animation type="CABasicAnimation" keyPath="opacity" duration="0.1" />
</LKStateTransitionElement>
<LKStateTransitionElement key="opacity" targetId="#2">
<animation type="CABasicAnimation" keyPath="opacity" duration="0.1" />
</LKStateTransitionElement>
</elements>
</LKStateTransition>
</stateTransitions>
<animations />
</CALayer>
</caml>
Binary file not shown.
Binary file not shown.
Binary file not shown.
Loading

0 comments on commit 4ce2790

Please sign in to comment.