Skip to content

Commit

Permalink
emulator version message
Browse files Browse the repository at this point in the history
  • Loading branch information
aWZHY0yQH81uOYvH committed Apr 22, 2024
1 parent 94b7c44 commit e23ddad
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 3 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/release-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ jobs:
sudo apt update
sudo apt install -y portaudio19-dev libasound2-dev
- name: Build
run: make -C Emulator -j`nproc`
run: make -C Emulator -j`nproc` RELEASE_BUILD=1
- name: Upload
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
Expand Down Expand Up @@ -84,7 +84,7 @@ jobs:
jq -r ".bottle.stable.files.$ARM_VERSION.url" portaudio.json | xargs curl -sLH "Authorization: Bearer QQ==" | tar xf - -C Emulator/static/arm64 --strip-components=3 '*/libportaudio*.a'
jq -r ".bottle.stable.files.$X64_VERSION.url" portaudio.json | xargs curl -sLH "Authorization: Bearer QQ==" | tar xf - -C Emulator/static/x64 --strip-components=3 '*/libportaudio*.a'
- name: Build
run: make -C Emulator -j`nproc` tcsynth_universal
run: make -C Emulator -j`nproc` RELEASE_BUILD=1 tcsynth_universal
- name: Upload
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
Expand Down Expand Up @@ -121,7 +121,7 @@ jobs:
git config core.symlinks true
git restore .
- name: Build
run: make -C Emulator -j`nproc`
run: make -C Emulator -j`nproc` RELEASE_BUILD=1
- name: Upload
shell: bash
env:
Expand Down
5 changes: 5 additions & 0 deletions Emulator/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,11 @@ ifneq (,$(findstring NT,$(UNAME)))
CXXFLAGS+=-static
endif

# Check for release build
ifdef RELEASE_BUILD
CXXFLAGS+=-DRELEASE_BUILD
endif

# Link final executable
$(BIN): main.cpp $(OBJS) $(HEADERS)
$(CXX) $(CXXFLAGS) -o $@ main.cpp $(OBJS) $(LIBS)
Expand Down
7 changes: 7 additions & 0 deletions Emulator/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@

#include "Coil.h"
#include "AudioEngine.h"
#include "Version.h"

using namespace std;

Expand Down Expand Up @@ -42,8 +43,14 @@ int main(int argc, char **argv) {
string arg(argv[x]);
if(arg == "--stereo") ncoils = 2;
else {
cout << "UCSB IEEE Tesla Coil Interrupter Emulator " VERSION
#ifndef RELEASE_BUILD
"-dev"
#endif
<< endl;
cout << "Usage: " << argv[0] << " [--stereo]" << endl;
cout << "\t--stereo: Emulate two coils, one on each audio channel. The right coil responds to MIDI channels 5+." << endl;
return 1;
}
}

Expand Down

0 comments on commit e23ddad

Please sign in to comment.