Storyyeller / Krakatau

Java decompiler, assembler, and disassembler
GNU General Public License v3.0
1.95k stars 219 forks source link

CLI #156

Open MartinThoma opened 5 years ago

MartinThoma commented 5 years ago

Currently, the scripts are harder to use than necessary. I think the situation would greatly improve by the following:

  1. Adding a setup.py
  2. Putting it on PyPI
  3. Moving most of the functions in the assemble.py, disassemble.py and decompile.py to Krakatau/cli so that one can access the code from the package.
  4. Creating a bin/krakatau CLI script which has assmble, disassemble, and decompile as subcommands

If you are interested in it, I could do it. This would add the dependency click (a commonly used CLI package) in the setup.py and in the bin/krakatau.

What do you think?

Storyyeller commented 5 years ago

In what ways would this make Krakatau easier to use?

MartinThoma commented 5 years ago

Improvements by adding a setup.py, uploading to PyPI and having a single command line tool called like the package:

  1. Discoverable via pip search
  2. Tool can be installed via pip install krakatau - no need to know where the sources are
  3. Functionality can be discovered by krakatau --help
  4. No matter in which directory I am, I can simply execute krakatau disassemble [foobar] - no need to know where on my machine krakatau is.
unoexperto commented 5 years ago

This post was very helpful. Perhaps it's worth including it to readme.txt

Storyyeller commented 2 years ago

I'm currently rewriting Krakatau in Rust, so the PyPI stuff is no longer relevant. But if you have any suggestions on how to best distribute/install it, I'm all ears.

unoexperto commented 1 year ago

@Storyyeller Robert, do you have repo with Rust-based version to share ?

Storyyeller commented 1 year ago

I haven't published the Rust version yet. I was planning to release an initial version for testing once the assembler was done.

Storyyeller commented 1 year ago

do you have repo with Rust-based version to share ?

FYI, the Rust version is now live (it is on the "v2" branch). This only includes the assembler and disassembler for now - I'm still trying to figure out what to do for the new decompiler.