File tree 3 files changed +5
-6
lines changed
3 files changed +5
-6
lines changed Original file line number Diff line number Diff line change @@ -25,15 +25,15 @@ def package_scripts():
25
25
os .remove ('palworld-python-script.zip' )
26
26
print ('已删除原palworld-python-script.zip' )
27
27
28
- scripts = ['src/ task_scheduler.py' , 'src/ backup.py' ]
28
+ scripts = ['task_scheduler.py' , 'backup.py' ]
29
29
print ('正在打包:' , scripts )
30
30
31
31
for script in scripts :
32
32
33
33
command = 'pyinstaller' , '--onefile' , script
34
34
subprocess .run (command )
35
35
36
- shutil .copy ('src/ config.ini' , 'dist' )
36
+ shutil .copy ('config.ini' , 'dist' )
37
37
38
38
shutil .make_archive ('palworld-python-script' , 'zip' , 'dist' )
39
39
print ("palworld-python-script 打包成功!" )
Original file line number Diff line number Diff line change 10
10
def read_config ():
11
11
# 读取配置文件
12
12
config = configparser .ConfigParser ()
13
- config_path = os .path .join (os .path .dirname (__file__ ), 'config.ini' )
14
- with codecs .open (config_path , 'r' , encoding = 'utf-8-sig' ) as f :
13
+ with codecs .open ('config.ini' , 'r' , encoding = 'utf-8-sig' ) as f :
15
14
config .read_file (f )
16
15
main_directory = config .get ('Settings' , 'main_directory' )
17
16
backup_dir = config .get ('Settings' , 'backup_dir' )
Original file line number Diff line number Diff line change 6
6
import time
7
7
import psutil
8
8
import os
9
- import read_conf
9
+ from src import read_conf
10
10
import threading
11
- from utils .log_control import INFO
11
+ from src . utils .log_control import INFO
12
12
from rcon .source import Client
13
13
from rcon .source .proto import Packet
14
14
from rcon .exceptions import WrongPassword
You can’t perform that action at this time.
0 commit comments