You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -47,27 +47,108 @@ check the issue tracker for their status.
47
47
Source code and binaries were publicly released at
48
48
[DistrictCon](https://www.districtcon.org/) on Feb 21, 2025.
49
49
50
-
## Building
51
-
52
-
For GUI development, install the [Qt Dev
53
-
Kit](https://www.qt.io/download-qt-installer-oss) and then open
54
-
`CMakefile.txt` in Qt Creator. On Windows, you must also install the
55
-
[Git](https://git-scm.com/downloads/win) client; Github Desktop is not
56
50
enough on its own.
57
-
58
-
To build in Linux, first install `qt6-declarative-dev`, `qml6-module-\*`, `git`
59
51
and `cmake`, then run the following:
52
+
53
+
54
+
## Building and Automation
55
+
56
+
This project supports robust, cross-platform build and test automation using both a top-level `Makefile` (for Linux/macOS and advanced users) and a [Taskfile.yml](https://taskfile.dev) for [Go Task](https://taskfile.dev) (especially recommended for Windows users). The automation ensures all dependencies are installed, including CMake, Qt, Git, NASM, unidasm, and YARA-X (`yr`).
57
+
58
+
### Recommended: Go Task (Windows & Cross-Platform)
59
+
60
+
The preferred way to build and test GoodASM on Windows (and optionally on Linux/macOS) is via Go Task:
61
+
62
+
### Ensuring Go Task is Installed
63
+
64
+
If you do not already have [Go Task](https://taskfile.dev) installed:
65
+
66
+
-**On Windows:**
67
+
- Since `make` is not available by default, run the script directly:
68
+
```cmd
69
+
ensure_task.cmd
70
+
```
71
+
- **On Linux/macOS:**
72
+
- Run:
73
+
```sh
74
+
make ensure_task
75
+
```
76
+
77
+
The scripts are located at:
78
+
- `ensure_task.cmd` (Windows)
79
+
- `ensure_task.sh` (Linux/macOS)
80
+
81
+
These scripts will attempt to install Go Task if it is missing, ensuring that all automation commands are available.
82
+
83
+
84
+
### Recommended: Go Task (Windows & Cross-Platform)
85
+
86
+
The preferred way to build and test GoodASM on Windows (and optionally on Linux/macOS) is via Go Task:
87
+
88
+
1. In a terminal, run:
89
+
```cmd
90
+
task all
91
+
```
92
+
This will:
93
+
- Install CMake, Qt, Git, NASM, unidasm, and YARA-X (`yr`) if not already present
94
+
- Build the project (using CMake or Makefile as appropriate)
95
+
- Run all self-tests
96
+
97
+
You can also run individual tasks, e.g. `task build:cmake` or `task run:repl`. Run `task --list` to see all available tasks.
98
+
99
+
### Makefile (Linux/macOS & Advanced)
100
+
101
+
The top-level `Makefile` is the single source of truth for build and test logic on POSIX systems. It:
102
+
103
+
- Installs all required dependencies (Qt5, pkg-config, SDL2_ttf, unidasm, YARA-X)
104
+
- Builds the project and runs all tests
105
+
- Builds and installs the MAME unidasm tool and YARA-X (`yr`) automatically
106
+
107
+
To build and test on Linux/macOS:
108
+
109
+
```sh
110
+
make qt5deps # Installs all dependencies, including YARA-X (yr)
You can also use `make unidasm` to build and install the MAME unidasm tool, or `make clean` to remove build artifacts.
115
+
116
+
#### Note on YARA-X
117
+
118
+
The test infrastructure uses [YARA-X](https://github.com/VirusTotal/yara-x) (`yr`), not classic YARA. The Makefile will automatically build and install YARA-X if it is not present.
119
+
120
+
#### Windows Manual Build
121
+
122
+
For GUI development, install the [Qt Dev Kit](https://www.qt.io/download-qt-installer-oss) and open `CMakeLists.txt` in Qt Creator. You must also install [Git](https://git-scm.com/downloads/win); Github Desktop is not enough.
123
+
124
+
You can also run individual tasks, e.g. `task build:cmake` or `task run:repl`. Run `task --list` to see all available tasks.
125
+
126
+
### Makefile (Linux/macOS & Advanced)
127
+
128
+
The top-level `Makefile` is the single source of truth for build and test logic on POSIX systems. It:
129
+
130
+
- Installs all required dependencies (Qt5, pkg-config, SDL2_ttf, unidasm, YARA-X)
131
+
- Builds the project and runs all tests
132
+
- Builds and installs the MAME unidasm tool and YARA-X (`yr`) automatically
133
+
134
+
To build and test on Linux/macOS:
135
+
136
+
```sh
137
+
make qt5deps # Installs all dependencies, including YARA-X (yr)
138
+
make # Builds and runs all tests
67
139
```
68
140
69
-
The preferred executable is `goodasm`. The GUI for iOS and Android is
70
-
more of a fun toy than a tool.
141
+
You can also use `make unidasm` to build and install the MAME unidasm tool, or `make clean` to remove build artifacts.
142
+
143
+
#### Note on YARA-X
144
+
145
+
The test infrastructure uses [YARA-X](https://github.com/VirusTotal/yara-x) (`yr`), not classic YARA. The Makefile will automatically build and install YARA-X if it is not present.
146
+
147
+
#### Windows Manual Build
148
+
149
+
For GUI development, install the [Qt Dev Kit](https://www.qt.io/download-qt-installer-oss) and open `CMakeLists.txt` in Qt Creator. You must also install [Git](https://git-scm.com/downloads/win); Github Desktop is not enough.
150
+
151
+
---
71
152
72
153
## Examples
73
154
@@ -304,6 +385,16 @@ interactive mode for iOS and Android. Please don't do real work this
304
385
way, but it's handy when studying an instruction set with pen and
305
386
paper, away from a real laptop.
306
387
388
+
### Exiting the REPL
389
+
390
+
To exit the GoodASM interactive REPL:
391
+
392
+
- On **Windows**: Press `Ctrl+Z` then Enter
393
+
- On **Linux/macOS**: Press `Ctrl+D`
394
+
- Or use `Ctrl+C` to interrupt/terminate the REPL
395
+
396
+
There are no built-in `.exit` or `.quit` commands; only EOF or interrupt will exit the REPL.
397
+
307
398
## Identification and Grading
308
399
309
400
It's a frequent problem in embedded systems reverse engineering that
@@ -510,7 +601,6 @@ source of examples for using the library.
510
601
languages, so that someday the parser can be rewritten without
0 commit comments