Skip to content

Commit a55888b

Browse files
committed
fix: 修复一些问题;移除有缺陷的组件;更新打包脚本;
1 parent 606e55c commit a55888b

20 files changed

+929
-936
lines changed

CMakeLists.txt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -235,8 +235,6 @@ set(CLASS_SRC
235235
src/class/languagemanager.cpp
236236
src/class/settingmanager.h
237237
src/class/settingmanager.cpp
238-
src/class/wingprogressdialog.h
239-
src/class/wingprogressdialog.cpp
240238
src/class/asdebugger.h
241239
src/class/asdebugger.cpp
242240
src/class/scriptconsolemachine.h
@@ -284,7 +282,9 @@ set(CLASS_SRC
284282
src/class/crashhandler.h
285283
src/class/crashhandler.cpp
286284
src/class/pluginsystem.h
287-
src/class/pluginsystem.cpp)
285+
src/class/pluginsystem.cpp
286+
src/class/inspectqtloghelper.h
287+
src/class/inspectqtloghelper.cpp)
288288

289289
set(INTERNAL_PLG_SRC
290290
src/class/wingangelapi.h src/class/wingangelapi.cpp

images/qtloginspect.png

14.3 KB
Loading

lang/zh_CN/winghex_zh_CN.ts

Lines changed: 351 additions & 328 deletions
Large diffs are not rendered by default.

lang/zh_TW/winghex_zh_TW.ts

Lines changed: 351 additions & 328 deletions
Large diffs are not rendered by default.

mkinstaller/deb/mkdeb.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -187,6 +187,8 @@ def main():
187187
os.mkdir(os.path.join(exeBasePath, "aslib"))
188188

189189
shutil.copy2(exemain_src, os.path.join(exeBasePath, package_name))
190+
shutil.copy2(os.path.join(projectdeb, "WingPlugin", "libWingPlugin.so"),
191+
os.path.join(exeBasePath, "libWingPlugin.so"))
190192

191193
desktopPath = os.path.join(exeDebPath, "usr", "share", "applications")
192194
os.makedirs(desktopPath)

mkinstaller/innoSetup/mkinnopak.py

Lines changed: 41 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313

1414
from colorama import Fore, Style
1515

16+
1617
def run_command_interactive(command):
1718
"""
1819
Run a command interactively, printing its stdout in real-time.
@@ -21,8 +22,8 @@ def run_command_interactive(command):
2122
:return: The return code of the command
2223
"""
2324
process = subprocess.Popen(
24-
command,
25-
stdout=subprocess.PIPE,
25+
command,
26+
stdout=subprocess.PIPE,
2627
stderr=subprocess.STDOUT, # Capture both stdout and stderr
2728
text=True # Ensure the output is in text mode
2829
)
@@ -32,15 +33,16 @@ def run_command_interactive(command):
3233
if output == "" and process.poll() is not None:
3334
break
3435
if output:
35-
print(Fore.GREEN + output.strip() + Style.RESET_ALL)
36+
print(Fore.GREEN + output.strip() + Style.RESET_ALL)
3637

3738
return_code = process.wait()
3839
return return_code
3940

41+
4042
def main():
4143
parser = argparse.ArgumentParser(
4244
prog="mkdeb.py", description="A deb installer maker for WingHexExplorer2")
43-
45+
4446
parser.add_argument(
4547
"folder", help="A folder that has contained the binary build", type=str
4648
)
@@ -57,7 +59,7 @@ def main():
5759
"--no-build", dest="build", action="store_false", help="Skip building the installer"
5860
)
5961
parser.set_defaults(build=True)
60-
62+
6163
args = parser.parse_args()
6264

6365
# checking build toolkits
@@ -81,15 +83,15 @@ def main():
8183
print(
8284
Fore.RED + "[Error] This is not a CMake build directory!" + Style.RESET_ALL)
8385
exit(-1)
84-
86+
8587
deploy_exec = ""
86-
88+
8789
with open(cmake_cache, 'r') as cmake_config:
88-
while(True):
90+
while (True):
8991
line = cmake_config.readline()
9092
if not line:
9193
break
92-
if(line.startswith("WINDEPLOYQT_EXECUTABLE:FILEPATH")):
94+
if (line.startswith("WINDEPLOYQT_EXECUTABLE:FILEPATH")):
9395
set = line.split('=', 1)
9496
deploy_exec = set[1].strip('\n')
9597
pass
@@ -124,20 +126,24 @@ def main():
124126

125127
# check
126128
exemain_src = ""
127-
exesym_src = ""
128-
129-
if(os.path.exists(os.path.join(projectdeb, "WingHexExplorer2.sln"))):
130-
exemain_src = os.path.join(projectdeb, "RelWithDebInfo", exe_name)
129+
exesym_src = ""
130+
exeplg_src = ""
131+
132+
if (os.path.exists(os.path.join(projectdeb, "WingHexExplorer2.sln"))):
133+
exemain_src = os.path.join(projectdeb, "RelWithDebInfo", exe_name)
131134
exesym_src = os.path.join(projectdeb, "RelWithDebInfo", sym_name)
135+
exeplg_src = os.path.join(
136+
projectdeb, "WingPlugin", "RelWithDebInfo", "WingPlugin.dll")
132137
else:
133138
exemain_src = os.path.join(projectdeb, exe_name)
134139
exesym_src = os.path.join(projectdeb, sym_name)
135-
140+
exeplg_src = os.path.join(projectdeb, "WingPlugin", "WingPlugin.dll")
141+
136142
if (os.path.exists(exemain_src) == False):
137143
print(
138144
Fore.RED + "[Error] WingHexExplorer2.exe is not found!" + Style.RESET_ALL)
139145
exit(-3)
140-
146+
141147
# calculate the md5 checksum
142148
with open(exemain_src, 'rb') as file_to_check:
143149
data = file_to_check.read()
@@ -155,6 +161,8 @@ def main():
155161

156162
shutil.copy2(exemain_src, os.path.join(exeDebPath, exe_name))
157163
shutil.copy2(exesym_src, os.path.join(exeDebPath, sym_name))
164+
shutil.copy2(exeplg_src,
165+
os.path.join(exeDebPath, "WingPlugin.dll"))
158166

159167
shutil.copytree(os.path.join(buildinstaller, "share"),
160168
os.path.join(exeDebPath, "share"))
@@ -173,23 +181,24 @@ def main():
173181

174182
shutil.copyfile(os.path.join(projectbase, "images", "author.jpg"),
175183
os.path.join(exeDebPath, "author.jpg"))
176-
177-
# deploy the software
184+
185+
# deploy the software
178186

179187
print(Fore.GREEN + ">> Copying finished, deploying the software..." + Style.RESET_ALL)
180188

181189
try:
182-
subprocess.run([deploy_exec, os.path.join(exeDebPath, exe_name) ], check=True,
183-
stdout=subprocess.PIPE, stderr=subprocess.PIPE)
190+
subprocess.run([deploy_exec, os.path.join(exeDebPath, exe_name)], check=True,
191+
stdout=subprocess.PIPE, stderr=subprocess.PIPE)
184192
except subprocess.CalledProcessError as e:
185-
print(Fore.RED + f"[Error] deploy package error: \n{e.stderr.decode('utf-8')}" + Style.RESET_ALL)
193+
print(
194+
Fore.RED + f"[Error] deploy package error: \n{e.stderr.decode('utf-8')}" + Style.RESET_ALL)
186195
exit(-4)
187196
except FileNotFoundError:
188-
exit(-4)
197+
exit(-4)
189198

190199
# generate iss file
191200
print(Fore.GREEN + ">> Copying finished, generate ISCC script..." + Style.RESET_ALL)
192-
201+
193202
iss_content = fr"""
194203
; Script generated by the mkinnopak.py by wingsummer.
195204
@@ -243,8 +252,10 @@ def main():
243252
; NOTE: Don't use "Flags: ignoreversion" on any shared system files
244253
245254
"""
246-
iss_content += fr'Source: "{exeDebPath}\*"; ' + r'DestDir: "{app}"; Flags: ignoreversion recursesubdirs createallsubdirs; Excludes: "*.iss,{#MyOutputBaseFilename}.exe,README.md"' + '\n'
247-
iss_content += fr'Source: "{exeDebPath}\README.md"; ' + r'DestDir: "{app}"; Flags: isreadme'
255+
iss_content += fr'Source: "{exeDebPath}\*"; ' + \
256+
r'DestDir: "{app}"; Flags: ignoreversion recursesubdirs createallsubdirs; Excludes: "*.iss,{#MyOutputBaseFilename}.exe,README.md"' + '\n'
257+
iss_content += fr'Source: "{exeDebPath}\README.md"; ' + \
258+
r'DestDir: "{app}"; Flags: isreadme'
248259

249260
iss_content += """
250261
[Registry]
@@ -271,21 +282,21 @@ def main():
271282
"""
272283

273284
script_src = os.path.join(exeDebPath, "mkiss.iss")
274-
with codecs.open(script_src,'w', "utf-8-sig") as iss:
285+
with codecs.open(script_src, 'w', "utf-8-sig") as iss:
275286
iss.write(iss_content)
276287

277288
if args.build == False:
278289
exit(0)
279-
290+
280291
print(Fore.GREEN + ">> Copying finished, running ISCC building..." + Style.RESET_ALL)
281-
292+
282293
pak_out = ""
283294
if args.output is None:
284-
pak_out = os.path.join(exeDebPath,"..")
295+
pak_out = os.path.join(exeDebPath, "..")
285296
else:
286297
pak_out = args.output
287-
288-
ret = run_command_interactive([args.cc, f'/O{pak_out}', script_src])
298+
299+
ret = run_command_interactive([args.cc, f'/O{pak_out}', script_src])
289300
exit(ret)
290301

291302

mkinstaller/linuxdeploy/deploy.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -161,6 +161,9 @@ def main():
161161
for item in deploy_files:
162162
shutil.copy2(os.path.join(installer_path, item),
163163
os.path.join(installer_path_exec, item))
164+
165+
shutil.copy2(os.path.join(build_path, "WingPlugin", "libWingPlugin.so"),
166+
os.path.join(installer_path_exec, "lib" , "libWingPlugin.so"))
164167

165168
# finally, copy other files
166169
print(Fore.GREEN + ">> Copying License and other materials..." + Style.RESET_ALL)

mkinstaller/pyscript/installer.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -117,6 +117,8 @@ def update(build_path):
117117
print(Fore.GREEN + ">> Installing..." + Style.RESET_ALL)
118118

119119
shutil.copy2(exemain_src, os.path.join(INSTALL_PATH, PACKAGE_NAME))
120+
shutil.copy2(os.path.join(build_path, "WingPlugin", "libWingPlugin.so"),
121+
os.path.join(INSTALL_PATH, "libWingPlugin.so"))
120122

121123
create_dir(os.path.join(INSTALL_PATH, "plugin"))
122124
create_dir(os.path.join(INSTALL_PATH, "scripts"))

resources.qrc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,7 @@
6969
<file>images/plugin.png</file>
7070
<file>images/pro.png</file>
7171
<file>images/qt.png</file>
72+
<file>images/qtloginspect.png</file>
7273
<file>images/readonly.png</file>
7374
<file>images/recent.png</file>
7475
<file>images/redo.png</file>

screenshot.png

-99.9 KB
Loading

0 commit comments

Comments
 (0)