/selfext

Selfext is a cross-platform tool that turns any compressed file into a self-extracting file.

Primary LanguageGoMIT LicenseMIT

selfext

Selfext is a cross-platform tool that turns any compressed file into a self-extracting file. It integrates the Golang SDK to generate self-extracting files compatible with multiple platforms.

selfextg

Security Notice!!!

  • Be cautious about running executable files sent by others.
  • Do not run executable files sent by strangers indiscriminately.

Install

Binary release

You can download the precompiled binary release for your platform from the releases page:

Build from Source

To build the selfext tool, you need to have Go installed. Then, run the following commands:

git clone https://github.com/yourusername/selfext.git
cd selfext
make

Usage

To turn example.zip into a self-extracting file, run:

selfext example.zip
selfext --archive example.zip --os darwin --arch arm64
#gui
python selfextg

This will generate example.zip.exe, which extracts example.zip into the example directory when run.

How it works

  • Selfext embeds a specified Golang SDK for different platforms.
  • It embeds assets_generator and wrapper_generator files, along with all required dependency packages.
  • Upon first run, it extracts and unpacks the Golang SDK, the wrapper, and its dependencies into the user's configuration directory.
  • By reading command-line parameters specifying the target archive, os, and architecture, the tool uses the Go SDK to compile wrapper_generator and assets_generator outputs along with the specified archive into a platform-specific self-extracting archive.

License

This project is licensed under the MIT License. See the LICENSE file for details.