macOS-crystal-packaging

An easy and headache free way to create a Crystal executable to run on macOS systems, without having the Crystal Language installed.

Portable Crystal

An easy way to compile applications writen in Crystal for distribution on macOS.

Installation

Clone the repo. Copy the makefile, and optionally the vendor folder to your project's directory. The vendor folder is filled with a few comon libs that are required for Crystal's standard library.

Usage

# Builds the project, and outputs it into the ./bin/ directory.
make build

# Packages all of the libraries into the executable along with crystal's --release flag for optimizations.
make package

# Validates the binary, and will highlight any libraries that may be required by the system that are not standard on macOS.
make validate
#If there are any, run `brew reinstall -s LIBNAME (example: openssl or libgc)` Then copy the the LIBNAME.a from the installation directory on your computer, to the `vendor` folder in your project. Then rebuild your project.

Try it out

  • Clone the project
  • cd into the cloned directory
  • run make package
  • copy ./bin/app to a different computer, and run it!

Note: Zipping the executable is recomended, and running chmod +x app could fix errors if there are any when trying to open the app.

Contributors

Repository

macOS-crystal-packaging

Owner
Statistic
  • 4
  • 1
  • 0
  • 0
  • 0
  • over 5 years ago
  • April 11, 2019
License

MIT License

Links
Synced at

Thu, 07 Nov 2024 23:27:41 GMT

Languages