app

Version, currently master branch1 version
  • master branchlatestApr 12, 2019

github.com/Iainmon/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.

4 stars
0 dependents
License: MIT

Installation

# Add this to your shard.yml
dependencies:
  app:
    github: Iainmon/macOS-crystal-packaging
    branch: master

master is a branch, not a release, so this tracks it rather than pinning a version.

Then run:

shards install

shard.yml

Crystal
0.27.2
License
MIT
Author
Iain Moncrief
Target
  • app from src/app.cr

Dependencies

This version declares no dependencies.

README

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