Permalink
Browse files

Fix linker errors in plugin builds

  • Loading branch information...
nickdowell committed Jul 9, 2017
1 parent 8da37b4 commit 4dd9c293722d7a237f89ccf0235213ff6a832ce2
Showing with 22 additions and 33 deletions.
  1. +6 −0 CMakeLists.txt
  2. +3 −3 Makefile.am
  3. +7 −0 src/GUI/MainWindow.cpp
  4. +2 −4 src/GUI/MainWindow.h
  5. +2 −17 src/GUI/gui_main.cc
  6. +0 −7 src/GUI/gui_main.h
  7. +2 −2 src/main.cc
View
@@ -189,6 +189,8 @@ add_executable(amsynth_dssi_gtk
src/GUI/editor_menus.h
src/GUI/editor_pane.c
src/GUI/editor_pane.h
src/GUI/gui_main.cc
src/GUI/gui_main.h
)
target_link_libraries(amsynth_dssi_gtk
@@ -218,6 +220,8 @@ add_library(amsynth_lv2_gtk MODULE
src/GUI/editor_menus.h
src/GUI/editor_pane.c
src/GUI/editor_pane.h
src/GUI/gui_main.cc
src/GUI/gui_main.h
src/amsynth_lv2_ui_gtk.cpp
)
set_target_properties(amsynth_lv2_gtk PROPERTIES PREFIX "")
@@ -238,6 +242,8 @@ add_library(amsynth_vst MODULE
src/GUI/editor_menus.h
src/GUI/editor_pane.c
src/GUI/editor_pane.h
src/GUI/gui_main.cc
src/GUI/gui_main.h
)
target_compile_options(amsynth_vst PUBLIC -DWITH_GUI)
set_target_properties(amsynth_vst PROPERTIES PREFIX "")
View
@@ -80,7 +80,9 @@ libgui_sources = \
src/GUI/editor_menus.cpp \
src/GUI/editor_menus.h \
src/GUI/editor_pane.c \
src/GUI/editor_pane.h
src/GUI/editor_pane.h \
src/GUI/gui_main.cc \
src/GUI/gui_main.h
#
@@ -122,8 +124,6 @@ if BUILD_GUI
amsynth_SOURCES += $(libgui_sources) \
src/GUI/ConfigDialog.cpp \
src/GUI/ConfigDialog.h \
src/GUI/gui_main.cc \
src/GUI/gui_main.h \
src/GUI/MainMenu.cpp \
src/GUI/MainMenu.h \
src/GUI/MainWindow.cpp \
View
@@ -38,6 +38,7 @@
#include "PresetControllerView.h"
#include <glib/gi18n.h>
#include <gtk/gtk.h>
static MIDILearnDialog *midiLearnDialog;
@@ -297,6 +298,12 @@ main_window_new(Synthesizer *synthesizer, GenericOutput *audio)
return mainWindow->window;
}
void
main_window_show(Synthesizer *synthesizer, GenericOutput *audio)
{
gtk_widget_show_all(main_window_new(synthesizer, audio));
}
void
modal_midi_learn(Param param_index) // called by editor_pane upon right-clicking a control
{
View
@@ -22,9 +22,7 @@
#ifndef _MAINWINDOW_H
#define _MAINWINDOW_H
#include <gtk/gtk.h>
GtkWidget *
main_window_new(class Synthesizer *, class GenericOutput *);
void
main_window_show(class Synthesizer *, class GenericOutput *);
#endif
View
@@ -25,7 +25,7 @@
#include "gui_main.h"
#include "MainWindow.h"
#include <gtk/gtk.h>
static char **_argv = NULL;
@@ -34,6 +34,7 @@ void gui_kit_init(int *argc, char ***argv)
{
_argv = g_strdupv(*argv);
gtk_init(argc, argv);
gtk_window_set_default_icon_name("amsynth");
}
void gui_kit_run(unsigned (*timer_callback)())
@@ -42,22 +43,6 @@ void gui_kit_run(unsigned (*timer_callback)())
gtk_main();
}
void gui_init(Synthesizer *synth, GenericOutput *out)
{
gtk_window_set_default_icon_name("amsynth");
GtkWidget *window = main_window_new(synth, out);
gtk_widget_show_all(window);
}
void gui_dealloc()
{
// if (gui) {
// delete gui;
// gui = NULL;
// }
}
void ShowModalErrorMessage(const std::string & msg, const std::string & secondaryText)
{
GtkWidget *dialog = gtk_message_dialog_new(
View
@@ -21,17 +21,10 @@
#include <string>
class GenericOutput;
class Synthesizer;
void gui_kit_init(int *argc, char ***argv);
void gui_kit_run(unsigned (*timer_callback)());
void gui_init(Synthesizer *, GenericOutput *);
void gui_dealloc();
void ShowModalErrorMessage(const std::string & msg, const std::string & secondaryText = "");
#if defined(__linux)
View
@@ -31,6 +31,7 @@
#include "drivers/OSSMidiDriver.h"
#ifdef WITH_GUI
#include "GUI/gui_main.h"
#include "GUI/MainWindow.h"
#endif
#include "JackOutput.h"
#include "lash.h"
@@ -450,9 +451,8 @@ int main( int argc, char *argv[] )
#ifdef WITH_GUI
if (!no_gui) {
gui_init(s_synthesizer, out);
main_window_show(s_synthesizer, out);
gui_kit_run(&amsynth_timer_callback);
gui_dealloc();
} else {
#endif
printf(_("amsynth running in headless mode, press ctrl-c to exit\n"));

0 comments on commit 4dd9c29

Please sign in to comment.