2 | *
3 | * Permission is hereby granted, free of charge, to any person obtaining a copy
4 | * of this software and associated documentation files (the "Software"), to deal
5 | * in the Software without restriction, including without limitation the rights
6 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
7 | * copies of the Software, and to permit persons to whom the Software is
8 | * furnished to do so, subject to the following conditions:
9 | *
10 | * The above copyright notice and this permission notice shall be included in all
11 | * copies or substantial portions of the Software.
12 | *
13 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
14 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
15 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
16 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
17 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
18 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
19 | * SOFTWARE.
20 | */
21 | #include "dialogabout.h"
22 |
23 | #include "ui_dialogabout.h"
24 |
25 | DialogAbout::DialogAbout(QWidget *pParent) : XShortcutsDialog(pParent, false), ui(new Ui::DialogAbout)
26 | {
27 | ui->setupUi(this);
28 |
29 | XAboutWidget::DATA _data = {};
30 |
31 | _data.sInfo +=
32 | QString("%1
").arg(XOptions::getTitle(X_APPLICATIONDISPLAYNAME, X_APPLICATIONVERSION, false));
33 | _data.sInfo += QString("Copyright (C) 2006-2008 Hellsp@wn
");
34 | _data.sInfo += QString("Copyright (C) 2012-%1 Hors
").arg(QDate::currentDate().year());
35 | _data.sInfo += QString(
36 | "%1: horsicq@gmail.com
")
38 | .arg(tr("Bugreports"));
39 | _data.sInfo += QString(
40 | "%1: http://ntinfo.biz
")
42 | .arg(tr("Website"));
43 | _data.sInfo +=
44 | QString(
45 | "%1(Paypal): ntinfo.re@gmail.com
")
47 | .arg(tr("Donate"));
48 | _data.sInfo +=
49 | QString(
50 | "%1(BTC): 3DqddVBX9PKqMvNPXZ3gPHBNNRtD9CnmJo
")
52 | .arg(tr("Donate"));
53 | _data.sInfo +=
54 | QString(
55 | "%1: https://github.com/horsicq/DIE-engine
")
57 | .arg(tr("Source code"));
58 |
59 | _data.sLibraries +=
60 | QString(
61 | "QT Library %1 http://qt-project.org
")
63 | .arg(QT_VERSION_STR);
64 | _data.sLibraries +=
65 | QString(
66 | "QWT Library %1 http://qwt.sourceforge.net
")
68 | .arg(QWT_VERSION_STR);
69 | _data.sLibraries += QString(
70 | "Capstone %1.%2.%3 http://www.capstone-engine.org
")
72 | .arg(QString::number(CS_VERSION_MAJOR), QString::number(CS_VERSION_MINOR), QString::number(CS_VERSION_EXTRA));
73 |
74 | _data.sLogoPath = ":/images/about.png";
75 | _data.sUpdatesLink = "https://github.com/horsicq/DIE-engine/releases";
76 | _data.sThanksLink = "https://github.com/horsicq/DIE-engine/blob/master/THANKS.md";
77 |
78 | ui->widgetAbout->setData(_data);
79 | }
80 |
81 | DialogAbout::~DialogAbout()
82 | {
83 | delete ui;
84 | }
85 |
86 | void DialogAbout::adjustView()
87 | {
88 | }
89 |
90 | void DialogAbout::on_pushButtonOK_clicked()
91 | {
92 | this->close();
93 | }
94 |
95 | void DialogAbout::registerShortcuts(bool bState)
96 | {
97 | Q_UNUSED(bState)
98 | }
99 |
--------------------------------------------------------------------------------
/.gitmodules:
--------------------------------------------------------------------------------
1 | [submodule "Detect-It-Easy"]
2 | path = Detect-It-Easy
3 | url = https://github.com/horsicq/Detect-It-Easy.git
4 | [submodule "Formats"]
5 | path = Formats
6 | url = https://github.com/horsicq/Formats.git
7 | [submodule "SpecAbstract"]
8 | path = SpecAbstract
9 | url = https://github.com/horsicq/SpecAbstract.git
10 | [submodule "StaticScan"]
11 | path = StaticScan
12 | url = https://github.com/horsicq/StaticScan.git
13 | [submodule "XArchive"]
14 | path = XArchive
15 | url = https://github.com/horsicq/XArchive.git
16 | [submodule "XQwt"]
17 | path = XQwt
18 | url = https://github.com/horsicq/XQwt.git
19 | [submodule "XOptions"]
20 | path = XOptions
21 | url = https://github.com/horsicq/XOptions.git
22 | [submodule "XStyles"]
23 | path = XStyles
24 | url = https://github.com/horsicq/XStyles.git
25 | [submodule "XTranslation"]
26 | path = XTranslation
27 | url = https://github.com/horsicq/XTranslation.git
28 | [submodule "XDEX"]
29 | path = XDEX
30 | url = https://github.com/horsicq/XDEX.git
31 | [submodule "FormatDialogs"]
32 | path = FormatDialogs
33 | url = https://github.com/horsicq/FormatDialogs.git
34 | [submodule "FormatWidgets"]
35 | path = FormatWidgets
36 | url = https://github.com/horsicq/FormatWidgets.git
37 | [submodule "Controls"]
38 | path = Controls
39 | url = https://github.com/horsicq/Controls.git
40 | [submodule "XMemoryMapWidget"]
41 | path = XMemoryMapWidget
42 | url = https://github.com/horsicq/XMemoryMapWidget.git
43 | [submodule "XEntropyWidget"]
44 | path = XEntropyWidget
45 | url = https://github.com/horsicq/XEntropyWidget.git
46 | [submodule "XCapstone"]
47 | path = XCapstone
48 | url = https://github.com/horsicq/XCapstone.git
49 | [submodule "XHashWidget"]
50 | path = XHashWidget
51 | url = https://github.com/horsicq/XHashWidget.git
52 | [submodule "die_script"]
53 | path = die_script
54 | url = https://github.com/horsicq/die_script.git
55 | [submodule "die_widget"]
56 | path = die_widget
57 | url = https://github.com/horsicq/die_widget.git
58 | [submodule "nfd_widget"]
59 | path = nfd_widget
60 | url = https://github.com/horsicq/nfd_widget.git
61 | [submodule "archive_widget"]
62 | path = archive_widget
63 | url = https://github.com/horsicq/archive_widget.git
64 | [submodule "XMIME"]
65 | path = XMIME
66 | url = https://github.com/horsicq/XMIME.git
67 | [submodule "XSingleApplication"]
68 | path = XSingleApplication
69 | url = https://github.com/horsicq/XSingleApplication.git
70 | [submodule "XMIMEWidget"]
71 | path = XMIMEWidget
72 | url = https://github.com/horsicq/XMIMEWidget.git
73 | [submodule "XHexView"]
74 | path = XHexView
75 | url = https://github.com/horsicq/XHexView.git
76 | [submodule "XDisasmView"]
77 | path = XDisasmView
78 | url = https://github.com/horsicq/XDisasmView.git
79 | [submodule "XGithub"]
80 | path = XGithub
81 | url = https://github.com/horsicq/XGithub.git
82 | [submodule "XShortcuts"]
83 | path = XShortcuts
84 | url = https://github.com/horsicq/XShortcuts.git
85 | [submodule "XHexEdit"]
86 | path = XHexEdit
87 | url = https://github.com/horsicq/XHexEdit.git
88 | [submodule "signatures"]
89 | path = signatures
90 | url = https://github.com/horsicq/signatures.git
91 | [submodule "XDemangle"]
92 | path = XDemangle
93 | url = https://github.com/horsicq/XDemangle.git
94 | [submodule "XDemangleWidget"]
95 | path = XDemangleWidget
96 | url = https://github.com/horsicq/XDemangleWidget.git
97 | [submodule "build_tools"]
98 | path = build_tools
99 | url = https://github.com/horsicq/build_tools
100 | [submodule "XCppfilt"]
101 | path = XCppfilt
102 | url = https://github.com/horsicq/XCppfilt
103 | [submodule "XDynStructs"]
104 | path = XDynStructs
105 | url = https://github.com/horsicq/XDynStructs
106 | [submodule "XDynStructsEngine"]
107 | path = XDynStructsEngine
108 | url = https://github.com/horsicq/XDynStructsEngine
109 | [submodule "XDynStructsWidget"]
110 | path = XDynStructsWidget
111 | url = https://github.com/horsicq/XDynStructsWidget
112 | [submodule "XFileInfo"]
113 | path = XFileInfo
114 | url = https://github.com/horsicq/XFileInfo
115 | [submodule "XPDF"]
116 | path = XPDF
117 | url = https://github.com/horsicq/XPDF
118 | [submodule "XInfoDB"]
119 | path = XInfoDB
120 | url = https://github.com/horsicq/XInfoDB
121 | [submodule "XSymbolsWidget"]
122 | path = XSymbolsWidget
123 | url = https://github.com/horsicq/XSymbolsWidget
124 | [submodule "XOnlineTools"]
125 | path = XOnlineTools
126 | url = https://github.com/horsicq/XOnlineTools
127 | [submodule "XAboutWidget"]
128 | path = XAboutWidget
129 | url = https://github.com/horsicq/XAboutWidget
130 | [submodule "hex_templates"]
131 | path = hex_templates
132 | url = https://github.com/horsicq/hex_templates
133 | [submodule "XExtractorWidget"]
134 | path = XExtractorWidget
135 | url = https://github.com/horsicq/XExtractorWidget
136 | [submodule "XExtractor"]
137 | path = XExtractor
138 | url = https://github.com/horsicq/XExtractor
139 | [submodule "XUpdate"]
140 | path = XUpdate
141 | url = https://github.com/horsicq/XUpdate
142 | [submodule "XVisualizationWidget"]
143 | path = XVisualizationWidget
144 | url = https://github.com/horsicq/XVisualizationWidget
145 | [submodule "XDecompiler"]
146 | path = XDecompiler
147 | url = https://github.com/horsicq/XDecompiler
148 | [submodule "XYara"]
149 | path = XYara
150 | url = https://github.com/horsicq/XYara
151 | [submodule "yara_widget"]
152 | path = yara_widget
153 | url = https://github.com/horsicq/yara_widget
154 | [submodule "XDataConvertorWidget"]
155 | path = XDataConvertorWidget
156 | url = https://github.com/horsicq/XDataConvertorWidget
157 | [submodule "XScanEngine"]
158 | path = XScanEngine
159 | url = https://github.com/horsicq/XScanEngine
160 | [submodule "XDisasmCore"]
161 | path = XDisasmCore
162 | url = https://github.com/horsicq/XDisasmCore.git
163 | [submodule "XRegionsWidget"]
164 | path = XRegionsWidget
165 | url = https://github.com/horsicq/XRegionsWidget.git
166 | [submodule "XStaticUnpacker"]
167 | path = XStaticUnpacker
168 | url = https://github.com/horsicq/XStaticUnpacker
169 |
--------------------------------------------------------------------------------
/lite_source/litemainwindow.cpp:
--------------------------------------------------------------------------------
1 | /* Copyright (c) 2020-2025 hors
2 | *
3 | * Permission is hereby granted, free of charge, to any person obtaining a copy
4 | * of this software and associated documentation files (the "Software"), to deal
5 | * in the Software without restriction, including without limitation the rights
6 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
7 | * copies of the Software, and to permit persons to whom the Software is
8 | * furnished to do so, subject to the following conditions:
9 | *
10 | * The above copyright notice and this permission notice shall be included in all
11 | * copies or substantial portions of the Software.
12 | *
13 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
14 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
15 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
16 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
17 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
18 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
19 | * SOFTWARE.
20 | */
21 | #include "litemainwindow.h"
22 |
23 | #include "ui_litemainwindow.h"
24 |
25 | LiteMainWindow::LiteMainWindow(QWidget *pParent) : QMainWindow(pParent), ui(new Ui::LiteMainWindow)
26 | {
27 | ui->setupUi(this);
28 |
29 | g_bInit = false;
30 |
31 | XOptions::registerCodecs();
32 |
33 | setWindowTitle(XOptions::getTitle(X_APPLICATIONDISPLAYNAME, X_APPLICATIONVERSION));
34 |
35 | g_xOptions.setName(X_OPTIONSFILELITE);
36 |
37 | g_xOptions.addID(XOptions::ID_SCAN_FLAG_RECURSIVE, true);
38 | g_xOptions.addID(XOptions::ID_SCAN_FLAG_DEEP, true);
39 | g_xOptions.addID(XOptions::ID_SCAN_FLAG_HEURISTIC, false);
40 | g_xOptions.addID(XOptions::ID_SCAN_FLAG_VERBOSE, true);
41 | g_xOptions.addID(XOptions::ID_SCAN_FLAG_ALLTYPES, false);
42 | g_xOptions.addID(XOptions::ID_SCAN_DATABASE_MAIN_PATH, "$data/db");
43 | g_xOptions.addID(XOptions::ID_SCAN_DATABASE_EXTRA_PATH, "$data/db_extra");
44 | g_xOptions.addID(XOptions::ID_SCAN_DATABASE_CUSTOM_PATH, "$data/db_custom");
45 |
46 | g_xOptions.load();
47 |
48 | ui->comboBoxFlags->setData(XScanEngine::getScanFlags(), XComboBoxEx::CBTYPE_FLAGS, 0, tr("Flags"));
49 | ui->comboBoxFlags->setValue(XScanEngine::getScanFlagsFromGlobalOptions(&g_xOptions));
50 |
51 | ui->comboBoxDatabases->setData(XScanEngine::getDatabases(), XComboBoxEx::CBTYPE_FLAGS, 0, tr("Databases"));
52 | ui->comboBoxDatabases->setValue(XScanEngine::getDatabasesFromGlobalOptions(&g_xOptions));
53 |
54 | ui->comboBoxDatabases->setItemEnabled(1, false);
55 |
56 | setAcceptDrops(true);
57 | installEventFilter(this);
58 |
59 | XOptions::setMonoFont(ui->plainTextEditResult);
60 |
61 | g_pDieScript = new DiE_Script;
62 |
63 | if (QCoreApplication::arguments().count() > 1) {
64 | QString sFileName = QCoreApplication::arguments().at(1);
65 |
66 | processFile(sFileName);
67 | }
68 | }
69 |
70 | LiteMainWindow::~LiteMainWindow()
71 | {
72 | XScanEngine::setScanFlagsToGlobalOptions(&g_xOptions, ui->comboBoxFlags->getValue().toULongLong());
73 | XScanEngine::setDatabasesToGlobalOptions(&g_xOptions, ui->comboBoxDatabases->getValue().toULongLong());
74 |
75 | g_xOptions.save();
76 |
77 | delete ui;
78 | delete g_pDieScript;
79 | }
80 |
81 | void LiteMainWindow::processFile(const QString &sFileName)
82 | {
83 | QString _sFileName = sFileName;
84 |
85 | ui->plainTextEditResult->clear();
86 |
87 | _sFileName = QDir().toNativeSeparators(_sFileName);
88 |
89 | ui->lineEditFileName->setText(_sFileName);
90 |
91 | XFormats::setFileTypeComboBox(XBinary::FT_UNKNOWN, _sFileName, ui->comboBoxType);
92 |
93 | process();
94 | }
95 |
96 | void LiteMainWindow::on_pushButtonScan_clicked()
97 | {
98 | process();
99 | }
100 |
101 | void LiteMainWindow::on_pushButtonExit_clicked()
102 | {
103 | this->close();
104 | }
105 |
106 | void LiteMainWindow::on_pushButtonOpenFile_clicked()
107 | {
108 | QString sDirectory = ""; // mb TODO
109 |
110 | QString sFileName = QFileDialog::getOpenFileName(this, tr("Open file") + QString("..."), sDirectory, tr("All files") + QString(" (*)"));
111 |
112 | if (!sFileName.isEmpty()) {
113 | processFile(sFileName);
114 | }
115 | }
116 |
117 | void LiteMainWindow::process()
118 | {
119 | QString _sFileName = ui->lineEditFileName->text().trimmed();
120 |
121 | if (_sFileName != "") {
122 | XScanEngine::SCAN_OPTIONS scanOptions = {};
123 |
124 | scanOptions.bUseCustomDatabase = true;
125 | scanOptions.bUseExtraDatabase = true;
126 | scanOptions.bShowType = true;
127 | scanOptions.bShowVersion = true;
128 | scanOptions.bShowInfo = true;
129 | scanOptions.fileType = (XBinary::FT)(ui->comboBoxType->currentData().toInt());
130 |
131 | XScanEngine::setScanFlags(&scanOptions, ui->comboBoxFlags->getValue().toULongLong());
132 | XScanEngine::setDatabases(&scanOptions, ui->comboBoxDatabases->getValue().toULongLong());
133 |
134 | if (!g_bInit) {
135 | g_bInit = g_pDieScript->loadDatabaseFromGlobalOptions(&g_xOptions);
136 | }
137 |
138 | XScanEngine::SCAN_RESULT scanResult = g_pDieScript->scanFile(_sFileName, &scanOptions);
139 |
140 | ScanItemModel model(&scanOptions, &(scanResult.listRecords), 1);
141 |
142 | ui->plainTextEditResult->setPlainText(model.toFormattedString());
143 |
144 | ui->labelScanTime->setText(QString("%1 %2").arg(scanResult.nScanTime).arg(tr("msec")));
145 | }
146 | }
147 |
148 | void LiteMainWindow::dragEnterEvent(QDragEnterEvent *event)
149 | {
150 | event->acceptProposedAction();
151 | }
152 |
153 | void LiteMainWindow::dragMoveEvent(QDragMoveEvent *event)
154 | {
155 | event->acceptProposedAction();
156 | }
157 |
158 | void LiteMainWindow::dropEvent(QDropEvent *event)
159 | {
160 | const QMimeData *mimeData = event->mimeData();
161 |
162 | if (mimeData->hasUrls()) {
163 | QList urlList = mimeData->urls();
164 |
165 | if (urlList.count()) {
166 | QString sFileName = urlList.at(0).toLocalFile();
167 |
168 | sFileName = XBinary::convertFileName(sFileName);
169 |
170 | processFile(sFileName);
171 | }
172 | }
173 | }
174 |
175 | void LiteMainWindow::keyPressEvent(QKeyEvent *pEvent)
176 | {
177 | if (pEvent->key() == Qt::Key_Escape) {
178 | this->close();
179 | }
180 |
181 | QWidget::keyPressEvent(pEvent);
182 | }
183 |
--------------------------------------------------------------------------------
/gui_source/guimainwindow.ui:
--------------------------------------------------------------------------------
1 |
2 |
3 | GuiMainWindow
4 |
5 |
6 |
7 | 0
8 | 0
9 | 720
10 | 500
11 |
12 |
13 |
14 | GuiMainWindow
15 |
16 |
17 |
18 | -
19 |
20 |
21 | File name
22 |
23 |
24 |
25 | 0
26 |
27 |
28 | 0
29 |
30 |
31 | 0
32 |
33 |
34 | 0
35 |
36 |
-
37 |
38 |
39 | >
40 |
41 |
42 |
43 | -
44 |
45 |
46 | -
47 |
48 |
49 |
50 | 0
51 | 0
52 |
53 |
54 |
55 |
56 | 80
57 | 0
58 |
59 |
60 |
61 | ...
62 |
63 |
64 |
65 |
66 |
67 |
68 | -
69 |
70 |
-
71 |
72 |
73 |
74 | 0
75 | 0
76 |
77 |
78 |
79 |
80 | -
81 |
82 |
-
83 |
84 |
85 |
86 | 6
87 |
88 |
89 | 0
90 |
91 |
92 | 0
93 |
94 |
95 | 0
96 |
97 |
98 | 0
99 |
100 |
-
101 |
102 |
103 | Advanced
104 |
105 |
106 |
107 | -
108 |
109 |
110 |
111 | 0
112 | 0
113 |
114 |
115 |
116 | Demangle
117 |
118 |
119 |
120 | -
121 |
122 |
123 | Qt::Vertical
124 |
125 |
126 |
127 | 20
128 | 40
129 |
130 |
131 |
132 |
133 | -
134 |
135 |
136 |
137 | 0
138 | 0
139 |
140 |
141 |
142 | Shortcuts
143 |
144 |
145 |
146 | -
147 |
148 |
149 |
150 | 0
151 | 0
152 |
153 |
154 |
155 | Options
156 |
157 |
158 |
159 | -
160 |
161 |
162 |
163 | 0
164 | 0
165 |
166 |
167 |
168 | About
169 |
170 |
171 |
172 | -
173 |
174 |
175 |
176 | 0
177 | 0
178 |
179 |
180 |
181 | Exit
182 |
183 |
184 |
185 |
186 |
187 |
188 |
189 |
190 |
191 |
192 |
193 |
194 |
195 |
196 |
197 | FormatsWidget
198 | QWidget
199 |
200 | 1
201 |
202 |
203 |
204 |
205 |
206 |
--------------------------------------------------------------------------------
/.github/workflows/builder.yml:
--------------------------------------------------------------------------------
1 | name: Build DIE-engine
2 |
3 | on:
4 | workflow_dispatch:
5 | release:
6 | types: [created]
7 | schedule:
8 | - cron: '0 0 * * *'
9 | pull_request:
10 | types: [opened, synchronize, reopened]
11 |
12 | env:
13 | SRC_PATH: ${{ github.workspace }}/src
14 | SRC_PATH_WIN: ${{ github.workspace }}\src
15 | RELEASE_PATH: ${{ github.workspace }}/src/release
16 |
17 | # the jobs are based on these notes:
18 | # https://github.com/horsicq/Detect-It-Easy/blob/master/docs/BUILD.md
19 | jobs:
20 | build-ubuntu-24:
21 | runs-on: ubuntu-24.04
22 | steps:
23 | - uses: actions/checkout@v4
24 | with:
25 | submodules: 'recursive'
26 | path: ${{ env.SRC_PATH }}
27 |
28 | - name: Install dependencies
29 | run: |
30 | sudo apt-get update
31 | sudo apt-get install qtbase5-dev qtscript5-dev qttools5-dev-tools libqt5svg5-dev qtchooser qt5-qmake build-essential -y
32 |
33 | - name: Build
34 | working-directory: ${{ env.SRC_PATH }}
35 | run: |
36 | bash -x build_dpkg.sh
37 |
38 | - name: Upload Release as Download
39 | if: github.event_name != 'pull_request'
40 | uses: softprops/action-gh-release@v2
41 | env:
42 | RELEASE_TOKEN: ${{ secrets.RELEASE_TOKEN }}
43 | with:
44 | tag_name: Beta
45 | draft: false
46 | prerelease: true
47 | files: |
48 | ${{ env.RELEASE_PATH }}/*.deb
49 |
50 | build-ubuntu-24-arm:
51 | runs-on: ubuntu-24.04-arm
52 | steps:
53 | - uses: actions/checkout@v4
54 | with:
55 | submodules: 'recursive'
56 | path: ${{ env.SRC_PATH }}
57 |
58 | - name: Install dependencies
59 | run: |
60 | sudo apt-get update
61 | sudo apt-get install qtbase5-dev qtscript5-dev qttools5-dev-tools libqt5svg5-dev qtchooser qt5-qmake build-essential -y
62 |
63 | - name: Build
64 | working-directory: ${{ env.SRC_PATH }}
65 | run: |
66 | bash -x build_dpkg.sh
67 |
68 | - name: Upload Release as Download
69 | if: github.event_name != 'pull_request'
70 | uses: softprops/action-gh-release@v2
71 | env:
72 | RELEASE_TOKEN: ${{ secrets.RELEASE_TOKEN }}
73 | with:
74 | tag_name: Beta
75 | draft: false
76 | prerelease: true
77 | files: |
78 | ${{ env.RELEASE_PATH }}/*.deb
79 |
80 | build-ubuntu-22:
81 | runs-on: ubuntu-22.04
82 | steps:
83 | - uses: actions/checkout@v4
84 | with:
85 | submodules: 'recursive'
86 | path: ${{ env.SRC_PATH }}
87 |
88 | - name: Install dependencies
89 | run: |
90 | sudo apt-get update
91 | sudo apt-get install qtbase5-dev qtscript5-dev qttools5-dev-tools libqt5svg5-dev qtchooser qt5-qmake build-essential -y
92 |
93 | - name: Build
94 | working-directory: ${{ env.SRC_PATH }}
95 | run: |
96 | bash -x build_dpkg.sh
97 |
98 | - name: Upload Release as Download
99 | if: github.event_name != 'pull_request'
100 | uses: softprops/action-gh-release@v2
101 | env:
102 | RELEASE_TOKEN: ${{ secrets.RELEASE_TOKEN }}
103 | with:
104 | tag_name: Beta
105 | draft: false
106 | prerelease: true
107 | files: |
108 | ${{ env.RELEASE_PATH }}/*.deb
109 |
110 | build-windows-32:
111 | runs-on: windows-2022
112 | steps:
113 | - uses: actions/checkout@v4
114 | with:
115 | submodules: 'recursive'
116 | path: ${{ env.SRC_PATH }}
117 |
118 | - name: Setup MSVC
119 | uses: ilammy/msvc-dev-cmd@v1
120 | with:
121 | arch: x86
122 |
123 | - name: Install Qt
124 | uses: jurplel/install-qt-action@v4
125 | with:
126 | version: '5.15.2'
127 | host: 'windows'
128 | target: 'desktop'
129 | arch: 'win32_msvc2019'
130 | dir: ${{ github.workspace }}
131 | modules: qtscript
132 |
133 | - name: Build
134 | shell: cmd
135 | working-directory: ${{ env.SRC_PATH }}
136 | run: |
137 | set VSVARS_PATH="C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\VC\Auxiliary\Build\vcvars32.bat"
138 | set QMAKE_PATH="${{ github.workspace }}\Qt\5.15.2\msvc2019\bin\qmake.exe"
139 | set SEVENZIP_PATH="C:\Program Files\7-Zip\7z.exe"
140 | set INNOSETUP_PATH="C:\Program Files (x86)\Inno Setup 6\ISCC.exe"
141 |
142 | set X_BUILD_NAME=die
143 | set X_BUILD_PREFIX=win32
144 | set X_SOURCE_PATH=${{ env.SRC_PATH_WIN }}
145 | for /f "delims=" %%x in ('type "%X_SOURCE_PATH%\release_version.txt"') do set X_RELEASE_VERSION=%%x
146 |
147 | echo on
148 | call "%X_SOURCE_PATH%\build_win_generic_check.cmd"
149 |
150 | dir "%X_SOURCE_PATH%\release\*.zip" >nul 2>&1
151 | if %ERRORLEVEL% neq 0 (
152 | echo "ZIP file does not exist"
153 | exit /b 1
154 | )
155 |
156 | - name: Upload Release as Download
157 | if: github.event_name != 'pull_request'
158 | uses: softprops/action-gh-release@v2
159 | env:
160 | RELEASE_TOKEN: ${{ secrets.RELEASE_TOKEN }}
161 | with:
162 | tag_name: Beta
163 | draft: false
164 | prerelease: true
165 | files: |
166 | ${{ env.RELEASE_PATH }}/*.zip
167 |
168 | build-windows-64:
169 | runs-on: windows-2022
170 | steps:
171 | - uses: actions/checkout@v4
172 | with:
173 | submodules: 'recursive'
174 | path: ${{ env.SRC_PATH }}
175 |
176 | - name: Setup MSVC
177 | uses: ilammy/msvc-dev-cmd@v1
178 | with:
179 | arch: x64
180 |
181 | - name: Install Qt
182 | uses: jurplel/install-qt-action@v4
183 | with:
184 | version: '5.15.2'
185 | host: 'windows'
186 | target: 'desktop'
187 | arch: 'win64_msvc2019_64'
188 | dir: ${{ github.workspace }}
189 | modules: qtscript
190 |
191 | - name: Build
192 | shell: cmd
193 | working-directory: ${{ env.SRC_PATH }}
194 | run: |
195 | set VSVARS_PATH="C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\VC\Auxiliary\Build\vcvars64.bat"
196 | set QMAKE_PATH="${{ github.workspace }}\Qt\5.15.2\msvc2019_64\bin\qmake.exe"
197 | set SEVENZIP_PATH="C:\Program Files\7-Zip\7z.exe"
198 | set INNOSETUP_PATH="C:\Program Files (x86)\Inno Setup 6\ISCC.exe"
199 |
200 | set X_BUILD_NAME=die
201 | set X_BUILD_PREFIX=win64
202 | set X_SOURCE_PATH=${{ env.SRC_PATH_WIN }}
203 | for /f "delims=" %%x in ('type "%X_SOURCE_PATH%\release_version.txt"') do set X_RELEASE_VERSION=%%x
204 |
205 | echo on
206 | call "%X_SOURCE_PATH%\build_win_generic_check.cmd"
207 |
208 | dir "%X_SOURCE_PATH%\release\*.zip" >nul 2>&1
209 | if %ERRORLEVEL% neq 0 (
210 | echo "ZIP file does not exist"
211 | exit /b 1
212 | )
213 |
214 | - name: Upload Release as Download
215 | if: github.event_name != 'pull_request'
216 | uses: softprops/action-gh-release@v2
217 | env:
218 | RELEASE_TOKEN: ${{ secrets.RELEASE_TOKEN }}
219 | with:
220 | tag_name: Beta
221 | draft: false
222 | prerelease: true
223 | files: |
224 | ${{ env.RELEASE_PATH }}/*.zip
225 |
226 | build-windows-64-qt6:
227 | runs-on: windows-2022
228 | steps:
229 | - uses: actions/checkout@v4
230 | with:
231 | submodules: 'recursive'
232 | path: ${{ env.SRC_PATH }}
233 |
234 | - name: Setup MSVC
235 | uses: ilammy/msvc-dev-cmd@v1
236 | with:
237 | arch: x64
238 |
239 | - name: Install Qt
240 | uses: jurplel/install-qt-action@v4
241 | with:
242 | version: '6.8.3'
243 | host: 'windows'
244 | target: 'desktop'
245 | arch: 'win64_msvc2022_64'
246 | dir: ${{ github.workspace }}
247 | modules: qt5compat
248 |
249 | - name: Build
250 | shell: cmd
251 | working-directory: ${{ env.SRC_PATH }}
252 | run: |
253 | set VSVARS_PATH="C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Auxiliary\Build\vcvars64.bat"
254 | set QMAKE_PATH="${{ github.workspace }}\Qt\6.8.3\msvc2022_64\bin\qmake.exe"
255 | set SEVENZIP_PATH="C:\Program Files\7-Zip\7z.exe"
256 | set INNOSETUP_PATH="C:\Program Files (x86)\Inno Setup 6\ISCC.exe"
257 |
258 | set X_BUILD_NAME=die
259 | set X_BUILD_PREFIX=win64_qt6
260 | set X_SOURCE_PATH=${{ env.SRC_PATH_WIN }}
261 | for /f "delims=" %%x in ('type "%X_SOURCE_PATH%\release_version.txt"') do set X_RELEASE_VERSION=%%x
262 |
263 | echo on
264 | call "%X_SOURCE_PATH%\build_win_generic_qt6.cmd"
265 |
266 | dir "%X_SOURCE_PATH%\release\*.zip" >nul 2>&1
267 | if %ERRORLEVEL% neq 0 (
268 | echo "ZIP file does not exist"
269 | exit /b 1
270 | )
271 |
272 | - name: Upload Release as Download
273 | if: github.event_name != 'pull_request'
274 | uses: softprops/action-gh-release@v2
275 | env:
276 | RELEASE_TOKEN: ${{ secrets.RELEASE_TOKEN }}
277 | with:
278 | tag_name: Beta
279 | draft: false
280 | prerelease: true
281 | files: |
282 | ${{ env.RELEASE_PATH }}/*.zip
283 |
284 |
285 | build-arch:
286 | runs-on: ubuntu-latest
287 | container: archlinux:base-devel
288 | steps:
289 | - name: Install dependencies
290 | run: |
291 | pacman -Syu --noconfirm
292 | pacman -S --noconfirm qt5-base qt5-script qt5-svg qt5-tools base-devel git
293 | pacman -S --noconfirm imagemagick
294 |
295 | - name: Create user
296 | run: |
297 | useradd builduser -m
298 | passwd -d builduser
299 | echo 'builduser ALL=(ALL) ALL' | tee -a /etc/sudoers
300 |
301 | - name: Clone DIE-engine
302 | run: |
303 | cd $HOME
304 | pwd
305 | git clone --recursive https://github.com/horsicq/DIE-engine
306 |
307 | - name: Build
308 | run: |
309 | sudo chown -R builduser /__w/DIE-engine/DIE-engine
310 | sudo chown -R builduser /github/home/DIE-engine
311 | cd /github/home/DIE-engine
312 | pwd
313 | sudo -u builduser bash -c 'bash -x build_archpkg.sh'
314 | rm -Rf /__w/DIE-engine/DIE-engine/release/*debug*
315 | rm -Rf /github/home/DIE-engine/release/*debug*
316 |
317 | - name: Upload Release as Download
318 | if: github.event_name != 'pull_request'
319 | uses: softprops/action-gh-release@v2
320 | env:
321 | RELEASE_TOKEN: ${{ secrets.RELEASE_TOKEN }}
322 | with:
323 | tag_name: Beta
324 | draft: false
325 | prerelease: true
326 | files: |
327 | /github/home/DIE-engine/release/*.pkg.tar.zst
328 |
329 | # build-osx:
330 | # runs-on: macos-latest
331 | # steps:
332 | # - uses: actions/checkout@v4
333 | # with:
334 | # submodules: 'recursive'
335 | # path: ${{ env.SRC_PATH }}
336 |
337 | # - name: Install Qt
338 | # uses: jurplel/install-qt-action@v4
339 | # with:
340 | # version: '5.15.2'
341 | # host: 'mac'
342 | # target: 'desktop'
343 | # arch: 'clang_64'
344 | # # I make it match what build_mac.sh expects. Although I could also use Qt5_DIR
345 | # #dir: ${{ env.HOME }}
346 | # dir: /Users/runner
347 | # modules: qtscript
348 |
349 | # - name: Build
350 | # working-directory: ${{ env.SRC_PATH }}
351 | # run: |
352 | # bash -x build_mac.sh
353 |
--------------------------------------------------------------------------------