diff --git a/.github/workflows/release.yml b/.github/workflows/release-cli.yml similarity index 95% rename from .github/workflows/release.yml rename to .github/workflows/release-cli.yml index 4d38c93..be23f7f 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release-cli.yml @@ -1,9 +1,9 @@ -name: Build release binaries +name: Build CLI release binaries on: push: tags: - - "v*.*.*" + - "cli-v*.*.*" jobs: release-linux: diff --git a/.github/workflows/release-gui.yml b/.github/workflows/release-gui.yml new file mode 100644 index 0000000..59b905c --- /dev/null +++ b/.github/workflows/release-gui.yml @@ -0,0 +1,46 @@ +name: Build GUI release binaries + +on: + push: + tags: + - "gui-v*.*.*" + +jobs: + release-linux: + name: Build release (linux) + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v3 + - name: Install rust stable + uses: actions-rs/toolchain@v1 + with: + toolchain: stable + default: true + profile: minimal + - name: Build release + working-directory: hlbc-gui + run: cargo build --release + - name: Upload release artifact + uses: softprops/action-gh-release@v1 + with: + files: target/release/hlbc-gui + release-windows: + name: Build release (windows) + runs-on: windows-latest + steps: + - name: Checkout + uses: actions/checkout@v3 + - name: Install rust stable + uses: actions-rs/toolchain@v1 + with: + toolchain: stable + default: true + profile: minimal + - name: Build release + working-directory: hlbc-gui + run: cargo build --release + - name: Upload release artifact + uses: softprops/action-gh-release@v1 + with: + files: target/release/hlbc-gui.exe diff --git a/Cargo.lock b/Cargo.lock index e492591..dd56aa2 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -4,9 +4,9 @@ version = 3 [[package]] name = "ab_glyph" -version = "0.2.16" +version = "0.2.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "846ffacb9d0c8b879ef9e565b59e18fb76d6a61013e5bd24ecc659864e6b1a1f" +checksum = "04a9283dace1c41c265496614998d5b9c4a97b3eb770e804f007c5144bf03f2b" dependencies = [ "ab_glyph_rasterizer", "owned_ttf_parser", @@ -14,9 +14,9 @@ dependencies = [ [[package]] name = "ab_glyph_rasterizer" -version = "0.1.5" +version = "0.1.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a13739d7177fbd22bb0ed28badfff9f372f8bef46c863db4e1c6248f6b223b6e" +checksum = "363b9b88fad3af3be80bc8f762c9a3f9dfe906fd0327b8e92f1c12e5ae1b8bbb" [[package]] name = "adler" @@ -24,12 +24,6 @@ version = "1.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f26201604c87b1e01bd3d98f8d5d9a8fcbb815e8cedb41ffccbeb4bf593a35fe" -[[package]] -name = "adler32" -version = "1.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "aae1277d39aeec15cb388266ecc24b11c80469deae6067e17a1a7aa9e5c1f234" - [[package]] name = "ahash" version = "0.3.8" @@ -53,9 +47,9 @@ dependencies = [ [[package]] name = "anyhow" -version = "1.0.63" +version = "1.0.65" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a26fa4d7e3f2eebadf743988fc8aec9fa9a9e82611acafd77c1462ed6262440a" +checksum = "98161a4e3e2184da77bb14f02184cdd111e83bbbcc9979dfee3c44b9a85f5602" [[package]] name = "arboard" @@ -250,9 +244,9 @@ dependencies = [ [[package]] name = "clap" -version = "3.2.20" +version = "3.2.21" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "23b71c3ce99b7611011217b366d923f1d0a7e07a92bb2dbf1e84508c673ca3bd" +checksum = "1ed5341b2301a26ab80be5cbdced622e80ed808483c52e45e3310a877d3b37d7" dependencies = [ "atty", "bitflags", @@ -522,15 +516,6 @@ dependencies = [ "syn", ] -[[package]] -name = "deflate" -version = "1.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c86f7e25f518f4b81808a2cf1c50996a61f5c2eb394b2393bd87f2a4780a432f" -dependencies = [ - "adler32", -] - [[package]] name = "dispatch" version = "0.2.0" @@ -611,14 +596,15 @@ dependencies = [ "instant", "smithay-clipboard", "tracing", - "webbrowser", + "webbrowser 0.7.1", "winit", ] [[package]] name = "egui_dock" -version = "0.1.0" -source = "git+https://github.com/Adanos020/egui_dock#b99818958e728cebcf8080d5ba85aaa14ae7ddd2" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "99738776bf594f50e59322bbbd7879f956445e0a7ddfe3e1ccbf35876d83f121" dependencies = [ "egui", ] @@ -766,11 +752,10 @@ checksum = "aa9a19cbb55df58761df49b23516a86d432839add4af60fc256da840f66ed35b" [[package]] name = "form_urlencoded" -version = "1.0.1" +version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5fc25a87fa4fd2094bffb06925852034d90a17f0d1e05197d4956d3555752191" +checksum = "a9c384f161156f5260c24a097c56119f9be8c798586aecc13afbcbe7b7e26bf8" dependencies = [ - "matches", "percent-encoding", ] @@ -1021,7 +1006,7 @@ dependencies = [ [[package]] name = "hlbc" -version = "0.4.0" +version = "0.5.0" dependencies = [ "byteorder", "fmtools", @@ -1032,7 +1017,7 @@ dependencies = [ [[package]] name = "hlbc-cli" -version = "0.4.0" +version = "0.5.0" dependencies = [ "anyhow", "atty", @@ -1044,12 +1029,12 @@ dependencies = [ "notify-debouncer-mini", "temp-dir", "termcolor", - "webbrowser", + "webbrowser 0.8.0", ] [[package]] name = "hlbc-decompiler" -version = "0.4.0" +version = "0.5.0" dependencies = [ "fmtools", "hlbc", @@ -1066,7 +1051,7 @@ dependencies = [ [[package]] name = "hlbc-gui" -version = "0.4.0" +version = "0.1.0" dependencies = [ "eframe", "egui_dock", @@ -1074,7 +1059,7 @@ dependencies = [ "hlbc-decompiler", "rfd", "syntect", - "webbrowser", + "webbrowser 0.8.0", ] [[package]] @@ -1085,11 +1070,10 @@ checksum = "b9e0384b61958566e926dc50660321d12159025e767c18e043daf26b70104c39" [[package]] name = "idna" -version = "0.2.3" +version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "418a0a6fab821475f634efe3ccc45c013f742efe03d853e8d3355d5cb850ecf8" +checksum = "e14ddfc70884202db2244c223200c204c2bda1bc6e0998d11b5e024d657209e6" dependencies = [ - "matches", "unicode-bidi", "unicode-normalization", ] @@ -1164,9 +1148,9 @@ checksum = "8eaf4bc02d17cbdd7ff4c7438cafcdf7fb9a4613313ad11b4f8fefe7d3fa0130" [[package]] name = "js-sys" -version = "0.3.59" +version = "0.3.60" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "258451ab10b34f8af53416d1fdab72c22e805f0c92a1136d59470ec0b11138b2" +checksum = "49409df3e3bf0856b916e2ceaca09ee28e6871cf7d9ce97a692cacfdb2a25a47" dependencies = [ "wasm-bindgen", ] @@ -1253,12 +1237,6 @@ dependencies = [ "libc", ] -[[package]] -name = "matches" -version = "0.1.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a3e378b66a060d48947b590737b30a1be76706c8dd7b8ba0f2fe3989c68a853f" - [[package]] name = "memchr" version = "2.5.0" @@ -1291,9 +1269,9 @@ checksum = "68354c5c6bd36d73ff3feceb05efa59b6acb7626617f4962be322a825e61f79a" [[package]] name = "miniz_oxide" -version = "0.5.3" +version = "0.5.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6f5c75688da582b8ffc1f1799e9db273f32133c49e048f614d22ec3256773ccc" +checksum = "96590ba8f175222643a85693f33d26e9c8a015f599c216509b1a6894af675d34" dependencies = [ "adler", ] @@ -1466,9 +1444,9 @@ dependencies = [ [[package]] name = "notify-debouncer-mini" -version = "0.2.0" +version = "0.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1c538ea1dd436b41e751922510cfbcaea2def87ed6ed94aa1edc15dc31b4c179" +checksum = "e23e9fa24f094b143c1eb61f90ac6457de87be6987bc70746e0179f7dbc9007b" dependencies = [ "notify", ] @@ -1568,9 +1546,9 @@ dependencies = [ [[package]] name = "owned_ttf_parser" -version = "0.15.1" +version = "0.15.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "07ef1a404ae479dd6906f4fa2c88b3c94028f1284beb42a47c183a7c27ee9a3e" +checksum = "05e6affeb1632d6ff6a23d2cd40ffed138e82f1532571a26f527c8a284bb2fbb" dependencies = [ "ttf-parser", ] @@ -1612,9 +1590,9 @@ dependencies = [ [[package]] name = "percent-encoding" -version = "2.1.0" +version = "2.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d4fd5641d01c8f18a23da7b6fe29298ff4b55afcccdf78973b24cf3175fee32e" +checksum = "478c572c3d73181ff3c2539045f6eb99e5491218eae919370993b890cdbdd98e" [[package]] name = "petgraph" @@ -1640,13 +1618,13 @@ checksum = "1df8c4ec4b0627e53bdf214615ad287367e482558cf84b109250b37464dc03ae" [[package]] name = "png" -version = "0.17.5" +version = "0.17.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dc38c0ad57efb786dd57b9864e5b18bae478c00c824dc55a38bbc9da95dde3ba" +checksum = "8f0e7f4c94ec26ff209cee506314212639d6c91b80afb82984819fafce9df01c" dependencies = [ "bitflags", "crc32fast", - "deflate", + "flate2", "miniz_oxide", ] @@ -1998,18 +1976,18 @@ checksum = "b1141d4d61095b28419e22cb0bbf02755f5e54e0526f97f1e3d1d160e60885fb" [[package]] name = "thiserror" -version = "1.0.33" +version = "1.0.35" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3d0a539a918745651435ac7db7a18761589a94cd7e94cd56999f828bf73c8a57" +checksum = "c53f98874615aea268107765aa1ed8f6116782501d18e53d08b471733bea6c85" dependencies = [ "thiserror-impl", ] [[package]] name = "thiserror-impl" -version = "1.0.33" +version = "1.0.35" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c251e90f708e16c49a16f4917dc2131e75222b72edfa9cb7f7c58ae56aae0c09" +checksum = "f8b463991b4eab2d801e724172285ec4195c650e8ec79b149e6c2a8e6dd3f783" dependencies = [ "proc-macro2", "quote", @@ -2108,9 +2086,9 @@ checksum = "099b7128301d285f79ddd55b9a83d5e6b9e97c92e0ea0daebee7263e932de992" [[package]] name = "unicode-ident" -version = "1.0.3" +version = "1.0.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c4f5b37a154999a8f3f98cc23a628d850e154479cd94decf3414696e12e31aaf" +checksum = "dcc811dc4066ac62f84f11307873c4850cb653bfa9b1719cee2bd2204a4bc5dd" [[package]] name = "unicode-normalization" @@ -2123,13 +2101,12 @@ dependencies = [ [[package]] name = "url" -version = "2.2.2" +version = "2.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a507c383b2d33b5fc35d1861e77e6b383d158b2da5e14fe51b83dfedf6fd578c" +checksum = "0d68c799ae75762b8c3fe375feb6600ef5602c883c5d21eb51c09f22b83c4643" dependencies = [ "form_urlencoded", "idna", - "matches", "percent-encoding", ] @@ -2170,9 +2147,9 @@ checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423" [[package]] name = "wasm-bindgen" -version = "0.2.82" +version = "0.2.83" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fc7652e3f6c4706c8d9cd54832c4a4ccb9b5336e2c3bd154d5cccfbf1c1f5f7d" +checksum = "eaf9f5aceeec8be17c128b2e93e031fb8a4d469bb9c4ae2d7dc1888b26887268" dependencies = [ "cfg-if", "wasm-bindgen-macro", @@ -2180,9 +2157,9 @@ dependencies = [ [[package]] name = "wasm-bindgen-backend" -version = "0.2.82" +version = "0.2.83" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "662cd44805586bd52971b9586b1df85cdbbd9112e4ef4d8f41559c334dc6ac3f" +checksum = "4c8ffb332579b0557b52d268b91feab8df3615f265d5270fec2a8c95b17c1142" dependencies = [ "bumpalo", "log", @@ -2195,9 +2172,9 @@ dependencies = [ [[package]] name = "wasm-bindgen-futures" -version = "0.4.32" +version = "0.4.33" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fa76fb221a1f8acddf5b54ace85912606980ad661ac7a503b4570ffd3a624dad" +checksum = "23639446165ca5a5de86ae1d8896b737ae80319560fbaa4c2887b7da6e7ebd7d" dependencies = [ "cfg-if", "js-sys", @@ -2207,9 +2184,9 @@ dependencies = [ [[package]] name = "wasm-bindgen-macro" -version = "0.2.82" +version = "0.2.83" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b260f13d3012071dfb1512849c033b1925038373aea48ced3012c09df952c602" +checksum = "052be0f94026e6cbc75cdefc9bae13fd6052cdcaf532fa6c45e7ae33a1e6c810" dependencies = [ "quote", "wasm-bindgen-macro-support", @@ -2217,9 +2194,9 @@ dependencies = [ [[package]] name = "wasm-bindgen-macro-support" -version = "0.2.82" +version = "0.2.83" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5be8e654bdd9b79216c2929ab90721aa82faf65c48cdf08bdc4e7f51357b80da" +checksum = "07bc0c051dc5f23e307b13285f9d75df86bfdf816c5721e573dec1f9b8aa193c" dependencies = [ "proc-macro2", "quote", @@ -2230,9 +2207,9 @@ dependencies = [ [[package]] name = "wasm-bindgen-shared" -version = "0.2.82" +version = "0.2.83" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6598dd0bd3c7d51095ff6531a5b23e02acdc81804e30d8f07afb77b7215a140a" +checksum = "1c38c045535d93ec4f0b4defec448e4291638ee608530863b1e2ba115d4fff7f" [[package]] name = "wayland-client" @@ -2319,9 +2296,9 @@ dependencies = [ [[package]] name = "web-sys" -version = "0.3.59" +version = "0.3.60" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ed055ab27f941423197eb86b2035720b1a3ce40504df082cac2ecc6ed73335a1" +checksum = "bcda906d8be16e728fd5adc5b729afad4e444e106ab28cd1c7256e54fa61510f" dependencies = [ "js-sys", "wasm-bindgen", @@ -2337,7 +2314,23 @@ dependencies = [ "ndk-glue 0.6.2", "url", "web-sys", - "widestring", + "widestring 0.5.1", + "winapi", +] + +[[package]] +name = "webbrowser" +version = "0.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "01d62aa75495ab67cdc273d0b95cc76bcedfea2ba28338a4cf9b4137949dfac5" +dependencies = [ + "jni", + "ndk-glue 0.7.0", + "objc", + "raw-window-handle 0.5.0", + "url", + "web-sys", + "widestring 1.0.2", "winapi", ] @@ -2347,6 +2340,12 @@ version = "0.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "17882f045410753661207383517a6f62ec3dbeb6a4ed2acce01f0728238d1983" +[[package]] +name = "widestring" +version = "1.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "653f141f39ec16bba3c5abe400a0c60da7468261cc2cbf36805022876bc721a8" + [[package]] name = "winapi" version = "0.3.9" @@ -2475,9 +2474,9 @@ checksum = "f4dd6dc7df2d84cf7b33822ed5b86318fb1781948e9663bacd047fc9dd52259d" [[package]] name = "winit" -version = "0.27.2" +version = "0.27.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "83a8f3e9d742401efcfe833b8f84960397482ff049cb7bf59a112e14a4be97f7" +checksum = "a22e94ba35ca3ff11820044bfa0dc48b95a3a15569c0068555566a12ef41c9e5" dependencies = [ "bitflags", "cocoa", diff --git a/hlbc-cli/CHANGELOG.md b/hlbc-cli/CHANGELOG.md index 1810ec3..948dbe1 100644 --- a/hlbc-cli/CHANGELOG.md +++ b/hlbc-cli/CHANGELOG.md @@ -6,7 +6,13 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). -## [Unreleased](https://github.com/Gui-Yom/hlbc/compare/v0.4.0...HEAD) +## [Unreleased](https://github.com/Gui-Yom/hlbc/compare/cli-v0.5.0...HEAD) + +## [0.5.0](https://github.com/Gui-Yom/hlbc/compare/v0.4.0...cli-v0.5.0) - 2021-09-15 + +### New + +- Updated to latest `hlbc-decompiler` ## [0.4.0](https://github.com/Gui-Yom/hlbc/compare/v0.3.0...v0.4.0) - 2021-08-03 diff --git a/hlbc-cli/Cargo.toml b/hlbc-cli/Cargo.toml index ebebe67..615c178 100644 --- a/hlbc-cli/Cargo.toml +++ b/hlbc-cli/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "hlbc-cli" -version = "0.4.0" +version = "0.5.0" authors = ["Guillaume Anthouard <25181283+Gui-Yom@users.noreply.github.com>"] edition = "2021" rust-version = "1.56" @@ -8,6 +8,7 @@ description = "Hashlink bytecode disassembler, analyzer and decompiler cli" repository = "https://github.com/Gui-Yom/hlbc" license = "MIT" categories = ["command-line-utilities", "parser-implementations", "visualization", "compilers"] +keywords = ["hashlink", "bytecode", "disassembler", "analysis", "decompiler"] include = ["src/**/*", "README.md", "CHANGELOG.md"] # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html @@ -26,9 +27,9 @@ chumsky = { version = "0.8" } # CLI args clap = { version = "3", features = ["derive"] } # Core functionnality -hlbc = { version = "0.4", path = "../hlbc", default-features = false } +hlbc = { version = "0.5", path = "../hlbc", default-features = false } # Decompiler -hlbc-decompiler = { version = "0.4", path = "../hlbc-decompiler" } +hlbc-decompiler = { version = "0.5", path = "../hlbc-decompiler" } # File system watching notify = { version = "5", optional = true, default-features = false, features = ["macos_fsevent"] } notify-debouncer-mini = { version = "0.2", optional = true, default-features = false } @@ -36,7 +37,7 @@ notify-debouncer-mini = { version = "0.2", optional = true, default-features = f termcolor = "1" # Temporary directory for compilation temp-dir = "0.1" -webbrowser = "0.7" +webbrowser = "0.8" [features] default = ["graph", "watch"] diff --git a/hlbc-decompiler/CHANGELOG.md b/hlbc-decompiler/CHANGELOG.md index 115edff..dc741c8 100644 --- a/hlbc-decompiler/CHANGELOG.md +++ b/hlbc-decompiler/CHANGELOG.md @@ -6,7 +6,15 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). -## [Unreleased](https://github.com/Gui-Yom/hlbc/compare/v0.4.0...HEAD) +## [Unreleased](https://github.com/Gui-Yom/hlbc/compare/v0.5.0...HEAD) + +## [0.5.0](https://github.com/Gui-Yom/hlbc/compare/v0.4.0...v0.5.0) - 2021-09-15 + +### Changed + +- AST visitor now makes a single pass +- Restore `trace` calls +- Do not show object ids (findex and type index) in decompilation output ## [0.4.0](https://github.com/Gui-Yom/hlbc/compare/v0.3.0...v0.4.0) - 2021-08-03 diff --git a/hlbc-decompiler/Cargo.toml b/hlbc-decompiler/Cargo.toml index e062821..e607b0c 100644 --- a/hlbc-decompiler/Cargo.toml +++ b/hlbc-decompiler/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "hlbc-decompiler" -version = "0.4.0" +version = "0.5.0" authors = ["Guillaume Anthouard <25181283+Gui-Yom@users.noreply.github.com>"] edition = "2021" rust-version = "1.56" @@ -15,7 +15,7 @@ categories = ["visualization", "compilers"] [dependencies] # Advanced formatting functionalities fmtools = "0.1" -hlbc = { version = "0.4", path = "../hlbc" } +hlbc = { version = "0.5", path = "../hlbc" } # Graph utilities petgraph = { version = "0.6", default-features = false, features = ["graphmap"], optional = true } diff --git a/hlbc-decompiler/src/lib.rs b/hlbc-decompiler/src/lib.rs index e69dbf8..7cfe7af 100644 --- a/hlbc-decompiler/src/lib.rs +++ b/hlbc-decompiler/src/lib.rs @@ -117,7 +117,7 @@ impl<'c> DecompilerState<'c> { /// Expands the expression of many registers fn args_expr(&self, args: &[Reg]) -> Vec { - args.into_iter().map(|&r| self.expr(r)).collect() + args.iter().map(|&r| self.expr(r)).collect() } /// Push a call to a function, which might be a constructor call. @@ -143,16 +143,12 @@ impl<'c> DecompilerState<'c> { call( Expr::Field( Box::new(self.expr(args[0])), - func.name - .clone() - .unwrap() - .resolve(&self.code.strings) - .to_owned(), + func.name.unwrap().resolve(&self.code.strings).to_owned(), ), self.args_expr(&args[1..]), ) } else { - call_fun(fun, self.args_expr(&args)) + call_fun(fun, self.args_expr(args)) }; if fun.ty(self.code).ret.is_void() { self.push_stmt(stmt(call)); @@ -703,7 +699,7 @@ pub fn decompile_code(code: &Bytecode, f: &Function) -> Vec { state.push_expr( i, *dst, - Expr::EnumConstr(f.regtype(*dst), *construct, state.args_expr(&args)), + Expr::EnumConstr(f.regtype(*dst), *construct, state.args_expr(args)), ); } &Opcode::EnumIndex { dst, value } => { diff --git a/hlbc-gui/CHANGELOG.md b/hlbc-gui/CHANGELOG.md index 6737346..1b27820 100644 --- a/hlbc-gui/CHANGELOG.md +++ b/hlbc-gui/CHANGELOG.md @@ -6,6 +6,6 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). -## [Unreleased](https://github.com/Gui-Yom/hlbc/compare/v0.4.0...HEAD) - +## [Unreleased](https://github.com/Gui-Yom/hlbc/compare/gui-v0.1.0...HEAD) +## [0.1.0](https://github.com/Gui-Yom/hlbc/compare/v0.4.0...gui-v0.1.0) - 2021-09-15 diff --git a/hlbc-gui/Cargo.toml b/hlbc-gui/Cargo.toml index 18e354c..3b38983 100644 --- a/hlbc-gui/Cargo.toml +++ b/hlbc-gui/Cargo.toml @@ -1,35 +1,31 @@ [package] name = "hlbc-gui" -version = "0.4.0" +version = "0.1.0" authors = ["Guillaume Anthouard <25181283+Gui-Yom@users.noreply.github.com>"] edition = "2021" rust-version = "1.62" -description = "Hashlink bytecode disassembler, analyzer and decompiler cli" +description = "Hashlink bytecode disassembler, analyzer and decompiler gui" repository = "https://github.com/Gui-Yom/hlbc" license = "MIT" categories = ["command-line-utilities", "parser-implementations", "visualization", "compilers"] -include = ["src/**/*", "README.md", "CHANGELOG.md"] +keywords = ["hashlink", "bytecode", "disassembler", "analysis", "decompiler"] +include = ["src/**/*", "README.md", "CHANGELOG.md", "assets/Haxe.sublime-syntax"] # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html -[[bin]] -name = "hlbcw" -path = "src/main.rs" - [dependencies] # AIO GUI framework eframe = { version = "0.19" } # Docking tabs -egui_dock = { version = "0.1", git = "https://github.com/Adanos020/egui_dock" } -#egui_dock = { version = "0.1", path = "../../egui_dock" } +egui_dock = { version = "0.2" } #, git = "https://github.com/Adanos020/egui_dock" } # Core library -hlbc = { version = "0.4", path = "../hlbc", default-features = false } +hlbc = { version = "0.5", path = "../hlbc", default-features = false } # Decompiler -hlbc-decompiler = { version = "0.4", path = "../hlbc-decompiler", default-features = false } +hlbc-decompiler = { version = "0.5", path = "../hlbc-decompiler", default-features = false } # Open file dialogs rfd = "0.10" syntect = { version = "5", default-features = false, features = ["parsing", "yaml-load", "default-themes", "regex-onig"] } -webbrowser = "0.7" +webbrowser = "0.8" [features] diff --git a/hlbc-gui/assets/hlbc.sublime-syntax b/hlbc-gui/assets/hlbc.sublime-syntax new file mode 100644 index 0000000..20a9956 --- /dev/null +++ b/hlbc-gui/assets/hlbc.sublime-syntax @@ -0,0 +1,14 @@ +%YAML 1.2 +--- +# Custom syntax for hlbc instruction dump +name: hlbc +file_extensions: + - hl +scope: source.hl +contexts: + main: + - match: ^\s*(\d+):\s+(\w+)\s*?(.*)$ + captures: + 1: entity.name.label.hl + 2: keyword.data.hl + 3: punctuation.definition.string.begin.asm \ No newline at end of file diff --git a/hlbc/CHANGELOG.md b/hlbc/CHANGELOG.md index 3efe55a..e9d0243 100644 --- a/hlbc/CHANGELOG.md +++ b/hlbc/CHANGELOG.md @@ -6,7 +6,23 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). -## [Unreleased](https://github.com/Gui-Yom/hlbc/compare/v0.4.0...HEAD) +## [Unreleased](https://github.com/Gui-Yom/hlbc/compare/v0.5.0...HEAD) + +## [0.5.0](https://github.com/Gui-Yom/hlbc/compare/v0.4.0...v0.5.0) - 2021-09-15 + +### Added + +- Helper methods to access entrypoint and main functions and get a function by its name +- Analysis helper functions are now methods +- IsStdFn trait implemented on functions and natives +- More methods for `FunPtr` +- Implement `Eq` on many types where `PartialEq` was already implemented +- Infallible methods to get a function name (defaults to `_`) +- Rename many `display` methods + +### Changed + +- Made `Callgraph` type public and reexport the `petgraph` crate ## [0.4.0](https://github.com/Gui-Yom/hlbc/compare/v0.3.0...v0.4.0) - 2021-08-03 diff --git a/hlbc/Cargo.toml b/hlbc/Cargo.toml index 5339c90..ffdcaee 100644 --- a/hlbc/Cargo.toml +++ b/hlbc/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "hlbc" -version = "0.4.0" +version = "0.5.0" authors = ["Guillaume Anthouard <25181283+Gui-Yom@users.noreply.github.com>"] edition = "2021" rust-version = "1.56"