Skip to content

Commit

Permalink
Update README: Added basic instructions for running projects on unix …
Browse files Browse the repository at this point in the history
…_and_ windows
  • Loading branch information
cyberarm committed Oct 6, 2023
1 parent aebbaec commit c38e36e
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,9 +47,16 @@ Window.new.show
Where possible gosu.cr imitates the [Ruby gem](https://rubydoc.info/gems/gosu).

## Development

### Unix
1. Install [gosu](https://github.com/gosu/gosu) as a system library, [see wiki](https://github.com/gosu/gosu/wiki/Getting-Started-on-Linux#compiling-gosu-for-c).
(Note: may need to edit `gosu/cmake/build/cmake_install.cmake` to change `set(CMAKE_INSTALL_PREFIX "/usr/local")` to `set(CMAKE_INSTALL_PREFIX "/usr")`)
2. Run your project: `crystal run --link-flags -lgosu-ffi YOU_PROGRAM.cr`

### Windows
1. Build [gosu](https://github.com/gosu/gosu) using Visual Studio or MSBuild (GosuFFI project)
2. Copy `Gosu.lib` and `gosu-ffi.lib` into the /lib directory of your crystal-lang install
3. Copy `SDL2.dll` and `gosu-ffi.dll` into your project directory
4. Run your project: `crystal run YOUR_PROGRAM.cr`

## Contributing

Expand Down

0 comments on commit c38e36e

Please sign in to comment.