8000 Builds on MacOS by jminor · Pull Request #2 · rxi/aq · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
< 8000 template class="js-flash-template">

Builds on MacOS #2

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for Git 8000 Hub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
61 changes: 61 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
name: Build

on:
push:
pull_request:
branches: [ master ]

jobs:
linux_and_windows_build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: dependencies
run: |
sudo add-apt-repository -y "deb http://archive.ubuntu.com/ubuntu `lsb_release -sc` main universe restricted multiverse"
sudo apt-get update -y -qq
sudo apt-get install libsdl2-dev
sudo apt-get install gcc-mingw-w64

- name: linux build
run: ./build.py release
- name: check linux product
run: |
file aq
ls -l aq
- name: archive linux product
uses: actions/upload-artifact@v1
with:
name: aq-linux
path: aq

- name: windows build
run: ./build.py windows release
- name: check windows product
run: |
file aq.exe
ls -l aq.exe
- name: archive windows product
uses: actions/upload-artifact@v1
with:
name: aq-windows
path: aq.exe

mac_build:
runs-on: macos-latest
steps:
- uses: actions/checkout@v2
- name: dependencies
run: |
brew install SDL2
- name: build
run: ./build.py release
- name: check mac product
run: |
file aq
ls -l aq
- name: archive mac product
uses: actions/upload-artifact@v1
with:
name: aq-mac
path: aq
8 changes: 7 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@

A lightweight framework for creating audio toys

![Build](https://github.com/jminor/aq/workflows/Build/badge.svg)

## Overview
The project is a lightweight framework for creating small audio toys. The framework binds immediate mode ui, modularly routed audio nodes and midi input to the [fe](https://github.com/rxi/fe) scripting language. A small program that would output a sinewave and change its frequency when a button is clicked would be as follows:
Expand All @@ -21,7 +22,7 @@ The project is a lightweight framework for creating small audio toys. The framew
)
)
```
The demo program pictured in the screenshot at the top of this README file is provided in the `demo` folder. You can run the program on Linux by doing:
The demo program pictured in the screenshot at the top of this README file is provided in the `demo` folder. You can run the program on Linux or MacOS by doing:
```bash
./aq demo
```
Expand All @@ -44,6 +45,11 @@ or, to cross-compile for windows:
./build.py release windows
```

To build on MacOS, you'll need SDL2 (which you can install via Homebrew `brew install sdl2`) then you can build as normal via:
```bash
./build.py release
```
NOTE: Cross compiling does not work on MacOS, nor does MIDI.

## License
This project is free software; you can redistribute it and/or modify it under
Expand Down
5 changes: 5 additions & 0 deletions build.config.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,11 @@
cflags = [ "-g", "-std=gnu11", "-Wall", "-Werror" ]
output = "aq"

# compile on MacOS
if platform == "Darwin":
lflags += [ "-L", "/System/Library/Frameworks/OpenGL.framework/Libraries/" ]

# cross compile from Linux to Windows
if "windows" in opt:
compiler = "x86_64-w64-mingw32-gcc"
output = "aq.exe"
Expand Down
15 changes: 15 additions & 0 deletions src/midi.c
Original file line number Diff line number Diff line change
Expand Up @@ -155,3 +155,18 @@ static void midi_platform_send(MidiMessage msg) {
}

#endif


#ifdef __APPLE__

// TODO: Use CoreMIDI
// https://stackoverflow.com/questions/47660597/using-osx-core-midi-in-a-c-project

static void midi_platform_init(void) {
}

static void midi_platform_send(MidiMessage msg) {
send_message(msg);
}

#endif
0