feat: 带符号编译体积优化;UI 小问题调整;
This commit is contained in:
parent
9a3d1c040a
commit
b63cb626d1
|
@ -6,7 +6,7 @@ on:
|
||||||
- release
|
- release
|
||||||
|
|
||||||
env:
|
env:
|
||||||
BUILD_TYPE: RelWithDebInfo
|
BUILD_TYPE: Release
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build-release:
|
build-release:
|
||||||
|
|
|
@ -6,7 +6,7 @@ on:
|
||||||
- release
|
- release
|
||||||
|
|
||||||
env:
|
env:
|
||||||
BUILD_TYPE: RelWithDebInfo
|
BUILD_TYPE: Release
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build-release:
|
build-release:
|
||||||
|
|
|
@ -9,7 +9,7 @@ on:
|
||||||
- main
|
- main
|
||||||
|
|
||||||
env:
|
env:
|
||||||
BUILD_TYPE: RelWithDebInfo
|
BUILD_TYPE: Release
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build-test:
|
build-test:
|
||||||
|
|
|
@ -17,18 +17,7 @@ find_package(
|
||||||
Qt${QT_VERSION_MAJOR} REQUIRED COMPONENTS Widgets Network Concurrent
|
Qt${QT_VERSION_MAJOR} REQUIRED COMPONENTS Widgets Network Concurrent
|
||||||
PrintSupport Xml LinguistTools)
|
PrintSupport Xml LinguistTools)
|
||||||
|
|
||||||
if(CMAKE_BUILD_TYPE STREQUAL "Debug")
|
message("Build ${PROJECT_NAME} with ${CMAKE_BUILD_TYPE}.")
|
||||||
message("Build ${PROJECT_NAME} with ${CMAKE_BUILD_TYPE}.")
|
|
||||||
elseif(CMAKE_BUILD_TYPE STREQUAL "RelWithDebInfo")
|
|
||||||
message("Build ${PROJECT_NAME} with ${CMAKE_BUILD_TYPE}.")
|
|
||||||
elseif(CMAKE_BUILD_TYPE STREQUAL "Release")
|
|
||||||
message(
|
|
||||||
WARNING
|
|
||||||
"${PROJECT_NAME}'s stacktrace won't work built with ${CMAKE_BUILD_TYPE}."
|
|
||||||
)
|
|
||||||
else()
|
|
||||||
message(FATAL_ERROR "Unsupported build type!")
|
|
||||||
endif()
|
|
||||||
|
|
||||||
install(CODE "set(CMAKE_INSTALL_LOCAL_ONLY TRUE)" ALL_COMPONENTS)
|
install(CODE "set(CMAKE_INSTALL_LOCAL_ONLY TRUE)" ALL_COMPONENTS)
|
||||||
|
|
||||||
|
@ -507,6 +496,14 @@ else()
|
||||||
endif()
|
endif()
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
target_compile_options(
|
||||||
|
WingHexExplorer2
|
||||||
|
PRIVATE $<$<AND:$<NOT:$<CXX_COMPILER_ID:MSVC>>,$<CONFIG:Release>>:-g>
|
||||||
|
$<$<CXX_COMPILER_ID:MSVC>:$<$<CONFIG:Release>:/Zi>>)
|
||||||
|
|
||||||
|
target_link_options(WingHexExplorer2 PRIVATE
|
||||||
|
$<$<CXX_COMPILER_ID:MSVC>:$<$<CONFIG:Release>:/DEBUG>>)
|
||||||
|
|
||||||
target_link_libraries(
|
target_link_libraries(
|
||||||
${CMAKE_PROJECT_NAME}
|
${CMAKE_PROJECT_NAME}
|
||||||
PRIVATE Qt${QT_VERSION_MAJOR}::Widgets
|
PRIVATE Qt${QT_VERSION_MAJOR}::Widgets
|
||||||
|
|
|
@ -1 +1 @@
|
||||||
Subproject commit f58ba0b04c7d11c9221386d0aaec44479466c454
|
Subproject commit 8e392b3609f39a987fa2e52e3dcf782eb5a07850
|
|
@ -572,47 +572,47 @@
|
||||||
<translation>内容:</translation>
|
<translation>内容:</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../../src/dialog/finddialog.cpp" line="50"/>
|
<location filename="../../src/dialog/finddialog.cpp" line="51"/>
|
||||||
<source>EncBytes:</source>
|
<source>EncBytes:</source>
|
||||||
<translation>解码:</translation>
|
<translation>解码:</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../../src/dialog/finddialog.cpp" line="96"/>
|
<location filename="../../src/dialog/finddialog.cpp" line="97"/>
|
||||||
<source>Region:</source>
|
<source>Region:</source>
|
||||||
<translation>搜索区域:</translation>
|
<translation>搜索区域:</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../../src/dialog/finddialog.cpp" line="128"/>
|
<location filename="../../src/dialog/finddialog.cpp" line="129"/>
|
||||||
<source>None</source>
|
<source>None</source>
|
||||||
<translation>全局搜索</translation>
|
<translation>全局搜索</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../../src/dialog/finddialog.cpp" line="139"/>
|
<location filename="../../src/dialog/finddialog.cpp" line="140"/>
|
||||||
<source>Region</source>
|
<source>Region</source>
|
||||||
<translation>区域</translation>
|
<translation>区域</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../../src/dialog/finddialog.cpp" line="151"/>
|
<location filename="../../src/dialog/finddialog.cpp" line="152"/>
|
||||||
<source>BeforeCursor</source>
|
<source>BeforeCursor</source>
|
||||||
<translation>光标前搜索</translation>
|
<translation>光标前搜索</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../../src/dialog/finddialog.cpp" line="161"/>
|
<location filename="../../src/dialog/finddialog.cpp" line="162"/>
|
||||||
<source>AfterCursor</source>
|
<source>AfterCursor</source>
|
||||||
<translation>光标后搜索</translation>
|
<translation>光标后搜索</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../../src/dialog/finddialog.cpp" line="171"/>
|
<location filename="../../src/dialog/finddialog.cpp" line="172"/>
|
||||||
<source>Selection</source>
|
<source>Selection</source>
|
||||||
<translation>选区搜索</translation>
|
<translation>选区搜索</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../../src/dialog/finddialog.cpp" line="204"/>
|
<location filename="../../src/dialog/finddialog.cpp" line="205"/>
|
||||||
<source>find</source>
|
<source>find</source>
|
||||||
<translation>查找</translation>
|
<translation>查找</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../../src/dialog/finddialog.cpp" line="218"/>
|
<location filename="../../src/dialog/finddialog.cpp" line="219"/>
|
||||||
<source>InvalidHexSeq</source>
|
<source>InvalidHexSeq</source>
|
||||||
<translation>无效十六进制序列</translation>
|
<translation>无效十六进制序列</translation>
|
||||||
</message>
|
</message>
|
||||||
|
|
|
@ -572,47 +572,47 @@
|
||||||
<translation>內容:</translation>
|
<translation>內容:</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../../src/dialog/finddialog.cpp" line="50"/>
|
<location filename="../../src/dialog/finddialog.cpp" line="51"/>
|
||||||
<source>EncBytes:</source>
|
<source>EncBytes:</source>
|
||||||
<translation>解碼:</translation>
|
<translation>解碼:</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../../src/dialog/finddialog.cpp" line="96"/>
|
<location filename="../../src/dialog/finddialog.cpp" line="97"/>
|
||||||
<source>Region:</source>
|
<source>Region:</source>
|
||||||
<translation>搜索區域:</translation>
|
<translation>搜索區域:</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../../src/dialog/finddialog.cpp" line="128"/>
|
<location filename="../../src/dialog/finddialog.cpp" line="129"/>
|
||||||
<source>None</source>
|
<source>None</source>
|
||||||
<translation>全局搜索</translation>
|
<translation>全局搜索</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../../src/dialog/finddialog.cpp" line="139"/>
|
<location filename="../../src/dialog/finddialog.cpp" line="140"/>
|
||||||
<source>Region</source>
|
<source>Region</source>
|
||||||
<translation>區域</translation>
|
<translation>區域</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../../src/dialog/finddialog.cpp" line="151"/>
|
<location filename="../../src/dialog/finddialog.cpp" line="152"/>
|
||||||
<source>BeforeCursor</source>
|
<source>BeforeCursor</source>
|
||||||
<translation>游標前搜索</translation>
|
<translation>游標前搜索</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../../src/dialog/finddialog.cpp" line="161"/>
|
<location filename="../../src/dialog/finddialog.cpp" line="162"/>
|
||||||
<source>AfterCursor</source>
|
<source>AfterCursor</source>
|
||||||
<translation>游標後搜索</translation>
|
<translation>游標後搜索</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../../src/dialog/finddialog.cpp" line="171"/>
|
<location filename="../../src/dialog/finddialog.cpp" line="172"/>
|
||||||
<source>Selection</source>
|
<source>Selection</source>
|
||||||
<translation>選區搜索</translation>
|
<translation>選區搜索</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../../src/dialog/finddialog.cpp" line="204"/>
|
<location filename="../../src/dialog/finddialog.cpp" line="205"/>
|
||||||
<source>find</source>
|
<source>find</source>
|
||||||
<translation>查找</translation>
|
<translation>查找</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../../src/dialog/finddialog.cpp" line="218"/>
|
<location filename="../../src/dialog/finddialog.cpp" line="219"/>
|
||||||
<source>InvalidHexSeq</source>
|
<source>InvalidHexSeq</source>
|
||||||
<translation>無效十六進位序列</translation>
|
<translation>無效十六進位序列</translation>
|
||||||
</message>
|
</message>
|
||||||
|
|
|
@ -128,16 +128,20 @@ def main():
|
||||||
exemain_src = ""
|
exemain_src = ""
|
||||||
exesym_src = ""
|
exesym_src = ""
|
||||||
exeplg_src = ""
|
exeplg_src = ""
|
||||||
|
exeplg_pdb = ""
|
||||||
|
|
||||||
if (os.path.exists(os.path.join(projectdeb, "WingHexExplorer2.sln"))):
|
if (os.path.exists(os.path.join(projectdeb, "WingHexExplorer2.sln"))):
|
||||||
exemain_src = os.path.join(projectdeb, "RelWithDebInfo", exe_name)
|
exemain_src = os.path.join(projectdeb, "Release", exe_name)
|
||||||
exesym_src = os.path.join(projectdeb, "RelWithDebInfo", sym_name)
|
exesym_src = os.path.join(projectdeb, "Release", sym_name)
|
||||||
exeplg_src = os.path.join(
|
exeplg_src = os.path.join(
|
||||||
projectdeb, "WingPlugin", "RelWithDebInfo", "WingPlugin.dll")
|
projectdeb, "WingPlugin", "Release", "WingPlugin.dll")
|
||||||
|
exeplg_pdb = os.path.join(
|
||||||
|
projectdeb, "WingPlugin", "Release", "WingPlugin.pdb")
|
||||||
else:
|
else:
|
||||||
exemain_src = os.path.join(projectdeb, exe_name)
|
exemain_src = os.path.join(projectdeb, exe_name)
|
||||||
exesym_src = os.path.join(projectdeb, sym_name)
|
exesym_src = os.path.join(projectdeb, sym_name)
|
||||||
exeplg_src = os.path.join(projectdeb, "WingPlugin", "WingPlugin.dll")
|
exeplg_src = os.path.join(projectdeb, "WingPlugin", "WingPlugin.dll")
|
||||||
|
exeplg_pdb = os.path.join(projectdeb, "WingPlugin", "WingPlugin.pdb")
|
||||||
|
|
||||||
if (os.path.exists(exemain_src) == False):
|
if (os.path.exists(exemain_src) == False):
|
||||||
print(
|
print(
|
||||||
|
@ -163,6 +167,7 @@ def main():
|
||||||
shutil.copy2(exesym_src, os.path.join(exeDebPath, sym_name))
|
shutil.copy2(exesym_src, os.path.join(exeDebPath, sym_name))
|
||||||
shutil.copy2(exeplg_src,
|
shutil.copy2(exeplg_src,
|
||||||
os.path.join(exeDebPath, "WingPlugin.dll"))
|
os.path.join(exeDebPath, "WingPlugin.dll"))
|
||||||
|
shutil.copyfile(exeplg_pdb, os.path.join(exeDebPath, "WingPlugin.pdb"))
|
||||||
|
|
||||||
shutil.copytree(os.path.join(buildinstaller, "share"),
|
shutil.copytree(os.path.join(buildinstaller, "share"),
|
||||||
os.path.join(exeDebPath, "share"))
|
os.path.join(exeDebPath, "share"))
|
||||||
|
|
|
@ -56,6 +56,7 @@ void ASObjTreeWidget::setEngine(asIScriptEngine *engine) {
|
||||||
}
|
}
|
||||||
|
|
||||||
setSortingEnabled(true);
|
setSortingEnabled(true);
|
||||||
|
resizeColumnToContents(0);
|
||||||
}
|
}
|
||||||
|
|
||||||
QTreeWidgetItem *ASObjTreeWidget::createObjNode(const CodeInfoTip &node,
|
QTreeWidgetItem *ASObjTreeWidget::createObjNode(const CodeInfoTip &node,
|
||||||
|
|
|
@ -97,13 +97,6 @@ void QHexTextEdit::mousePressEvent(QMouseEvent *event) {
|
||||||
setTextCursor(cursor);
|
setTextCursor(cursor);
|
||||||
}
|
}
|
||||||
|
|
||||||
QSize QHexTextEdit::sizeHint() const {
|
|
||||||
QFont font = this->font();
|
|
||||||
QFontMetrics fontMetrics(font);
|
|
||||||
int lineHeight = fontMetrics.lineSpacing();
|
|
||||||
return QSize(0, lineHeight);
|
|
||||||
}
|
|
||||||
|
|
||||||
bool QHexTextEdit::isHexMode() const { return m_isHexMode; }
|
bool QHexTextEdit::isHexMode() const { return m_isHexMode; }
|
||||||
|
|
||||||
void QHexTextEdit::setIsHexMode(bool newIsHexMode) {
|
void QHexTextEdit::setIsHexMode(bool newIsHexMode) {
|
||||||
|
|
|
@ -32,8 +32,6 @@ protected:
|
||||||
void keyPressEvent(QKeyEvent *event) override;
|
void keyPressEvent(QKeyEvent *event) override;
|
||||||
void mousePressEvent(QMouseEvent *event) override;
|
void mousePressEvent(QMouseEvent *event) override;
|
||||||
|
|
||||||
QSize sizeHint() const override;
|
|
||||||
|
|
||||||
private:
|
private:
|
||||||
QString mText;
|
QString mText;
|
||||||
int mCurserPositionPre;
|
int mCurserPositionPre;
|
||||||
|
|
|
@ -44,6 +44,7 @@ FindDialog::FindDialog(const FindInfo &info, QWidget *parent)
|
||||||
|
|
||||||
layout->addWidget(new QLabel(tr("Content:"), this));
|
layout->addWidget(new QLabel(tr("Content:"), this));
|
||||||
m_lineeditor = new QHexTextEdit(this);
|
m_lineeditor = new QHexTextEdit(this);
|
||||||
|
m_lineeditor->setFixedHeight(m_findMode->height());
|
||||||
layout->addWidget(m_lineeditor);
|
layout->addWidget(m_lineeditor);
|
||||||
layout->addSpacing(3);
|
layout->addSpacing(3);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue