Skip to content

Commit

Permalink
Cleanup, set version in custom file
Browse files Browse the repository at this point in the history
Signed-off-by: falkTX <[email protected]>
  • Loading branch information
falkTX committed Oct 28, 2023
1 parent adcb900 commit b063654
Show file tree
Hide file tree
Showing 8 changed files with 289 additions and 67 deletions.
12 changes: 11 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/usr/bin/make -f

VERSION = 0.0.2
VERSION = $(shell cat VERSION)

# ---------------------------------------------------------------------------------------------------------------------
# Auto-detect build target
Expand Down Expand Up @@ -109,6 +109,7 @@ TARGETS += build/mod-app.app/Contents/PlugIns/styles/libqmacstyle.dylib
TARGETS += build/mod-app.app/Contents/Resources/default.pedalboard
TARGETS += build/mod-app.app/Contents/Resources/html
TARGETS += build/mod-app.app/Contents/Resources/mod-logo.icns
TARGETS += build/mod-app.app/Contents/Resources/VERSION
else
TARGETS += build/default.pedalboard
TARGETS += build/html
Expand All @@ -123,6 +124,7 @@ TARGETS += build/mod-screenshot$(APP_EXT)
TARGETS += build/mod-ui$(APP_EXT)
TARGETS += build/mod
TARGETS += build/modtools
TARGETS += build/VERSION
ifeq ($(WINDOWS),true)
TARGETS += build/jack/jack_portaudio.dll
TARGETS += build/jack/jack_winmme.dll
Expand Down Expand Up @@ -360,6 +362,10 @@ build/mod-app.app/Contents/Resources/mod-logo.icns: systray/mod-logo.icns
@mkdir -p build/mod-app.app/Contents/Resources
ln -sf $(abspath $<) $@

build/mod-app.app/Contents/Resources/VERSION: VERSION
@mkdir -p build/mod-app.app/Contents/Resources
ln -sf $(abspath $<) $@

# ---------------------------------------------------------------------------------------------------------------------

build/default.pedalboard: mod-ui/default.pedalboard
Expand Down Expand Up @@ -414,6 +420,10 @@ build/modtools: mod-ui/modtools
@mkdir -p build
ln -sf $(abspath $<) $@

build/VERSION: VERSION
@mkdir -p build
ln -sf $(abspath $<) $@

# ---------------------------------------------------------------------------------------------------------------------

build/jack/alsa_midi.so: $(PAWPAW_PREFIX)/lib/jack/alsa_midi.so
Expand Down
1 change: 1 addition & 0 deletions VERSION
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
0.0.3
2 changes: 1 addition & 1 deletion mod-host
2 changes: 1 addition & 1 deletion mod-ui
2 changes: 2 additions & 0 deletions systray/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -173,6 +173,8 @@ int main(int argc, char* argv[])
mkdir(path, 0777);
setenv("MOD_DATA_DIR", path, 1);

// TODO MOD_KEYS_PATH

std::strcat(lv2path, path);
std::strcat(lv2path, "/lv2");
setenv("MOD_LV2_PATH", lv2path, 1);
Expand Down
26 changes: 2 additions & 24 deletions systray/mod-app.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -483,13 +483,7 @@ class AppWindow : public QMainWindow
startingHost = true;
ui.b_start->setEnabled(false);
ui.b_stop->setEnabled(true);
ui.cb_device->setEnabled(false);
ui.cb_buffersize->setEnabled(false);
ui.cb_input->setEnabled(false);
ui.l_device->setEnabled(false);
ui.l_buffersize->setEnabled(false);
ui.l_input->setEnabled(false);
ui.w_device_io_mode->setEnabled(false);
ui.gb_audio->setEnabled(false);
ui.gb_midi->setEnabled(false);
ui.gb_lv2->setEnabled(false);
}
Expand All @@ -509,16 +503,7 @@ class AppWindow : public QMainWindow
ui.b_start->setEnabled(true);
ui.b_stop->setEnabled(false);
ui.b_opengui->setEnabled(false);
ui.cb_device->setEnabled(true);
ui.cb_buffersize->setEnabled(true);
ui.l_device->setEnabled(true);
ui.l_buffersize->setEnabled(true);
if (ui.cb_input->count() > 0 && ui.rb_device_separate->isChecked())
{
ui.cb_input->setEnabled(true);
ui.l_input->setEnabled(true);
}
ui.w_device_io_mode->setEnabled(true);
ui.gb_audio->setEnabled(true);
ui.gb_midi->setEnabled(true);
ui.gb_lv2->setEnabled(true);
systray->setToolTip(tr("MOD App: Stopped"));
Expand Down Expand Up @@ -816,8 +801,6 @@ private slots:

stopUIIfNeeded();
stopHostIfNeeded();

ui.b_stop->setEnabled(true);
}

void openGui() const
Expand All @@ -842,9 +825,6 @@ private slots:

const DeviceInfo& devInfo(devices[deviceIndex]);

const bool old = ui.w_device_io_mode->isEnabled();
ui.w_device_io_mode->setEnabled(true);

ui.rb_device_duplex->setEnabled(devInfo.canInput);
ui.rb_device_separate->setEnabled(devInfo.canUseSeparateInput);
ui.rb_device_noinput->setEnabled(true);
Expand All @@ -859,8 +839,6 @@ private slots:

if (ui.rb_device_separate->isChecked() && ! ui.rb_device_separate->isEnabled())
ui.rb_device_noinput->setChecked(true);

ui.w_device_io_mode->setEnabled(old);
}

void hostStartError(QProcess::ProcessError error)
Expand Down
Loading

0 comments on commit b063654

Please sign in to comment.