Skip to content

Commit d53652c

Browse files
author
andy
committed
upload server
1 parent 4594232 commit d53652c

File tree

112 files changed

+9727
-2263
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

112 files changed

+9727
-2263
lines changed

Makefile

Lines changed: 21 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,22 @@
11
.PHONY: build-exe
2-
install:
3-
@echo "building"
4-
pyinstaller -F --ico="assets/logo.ico" --name=Productions production_scripts.py
2+
build-exe:
3+
@echo "building exe"
4+
python -m __version__
5+
6+
.PHONY: build-ui
7+
build-ui:
8+
@echo "building ui"
9+
@cd web_ui && npm run build
10+
@echo "Complete! target files -> ${PWD}/dist"
11+
12+
.PHONY: start-server-back
13+
start-server-back:
14+
@echo "start back-end server"
15+
python -m server.start_server
16+
17+
.PHONY: start-server-front
18+
start-server-front:
19+
@echo "start front-end server"
20+
@echo "open web page on http://127.0.0.1:8000"
21+
@cd web_ui/ui && python -m http.server
22+

__start_server__.py

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
from server.start_server import start_server
2+
import subprocess
3+
4+
5+
def start_front_server():
6+
cmd = 'python -m http.server'
7+
process = subprocess.Popen(cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, text=True)
8+
while True:
9+
line = process.stdout.readline()
10+
if not line:
11+
break # 如果没有读取到数据,表示子进程已经结束,退出循环
12+
else:
13+
print(line, end='') # 实时打印输出
14+
process.wait()
15+
16+
17+
if __name__ == '__main__':
18+
# start_front_server()
19+
start_server()
20+
21+
22+

__version__.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import os
22
import subprocess
33

4-
VERSION = '1.2.9'
4+
VERSION = '1.3.0'
55

66

77
def get_version():
@@ -30,7 +30,7 @@ def explore_requirement():
3030

3131

3232
def build():
33-
cmd = f'pyinstaller -F --ico="assets/logo.ico" --name=Productions-{VERSION} production_scripts.py'
33+
cmd = f'pyinstaller -F --ico="source/logo.ico" --name=Productions-{VERSION} production_scripts.py'
3434
process = subprocess.Popen(cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, text=True)
3535
while True:
3636
line = process.stdout.readline()
@@ -39,6 +39,8 @@ def build():
3939
else:
4040
print(line, end='') # 实时打印输出
4141
process.wait()
42+
output_path = os.path.join(os.getcwd(), "dist")
43+
print(f"Complete! target file -> {output_path}")
4244

4345

4446
if __name__ == "__main__":

dist/Productions-1.2.8.exe

-31.4 MB
Binary file not shown.
Binary file not shown.

dist/assets/device_control-BFZomwvp.js

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/assets/device_control-C1yA46-B.js

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)