Skip to content

Commit

Permalink
made LMMS build for win32, coding-style fixes
Browse files Browse the repository at this point in the history
git-svn-id: https://lmms.svn.sf.net/svnroot/lmms/trunk/lmms@1038 0778d3d1-df1d-0410-868b-ea421aaaa00d
  • Loading branch information
tobydox committed Jun 1, 2008
1 parent 8618b14 commit d3516cd
Show file tree
Hide file tree
Showing 48 changed files with 291 additions and 107 deletions.
82 changes: 81 additions & 1 deletion ChangeLog
Original file line number Diff line number Diff line change
@@ -1,3 +1,83 @@
2008-06-01 Tobias Doerffel <tobydox/at/users/dot/sourceforge/dot/net>

* plugins/ladspa_effect/caps/basics.h:
* plugins/ladspa_effect/caps/interface.cc:
win32-build fixes

* plugins/triple_oscillator/Makefile.am:
* plugins/triple_oscillator/triple_oscillator.cpp:
* plugins/audio_file_processor/audio_file_processor.cpp:
* plugins/audio_file_processor/Makefile.am:
made ready for building plugins as DLLs

* plugins/kicker/kicker.h:
include QtCore/QObject rather than QObject

* include/mmp.h:
* include/knob.h:
* include/track.h:
* include/engine.h:
* include/note.h:
* include/embed.h:
* include/instrument_view.h:
* include/config_mgr.h:
* include/automatable_model.h:
* include/mixer.h:
* include/instrument_track.h:
* include/instrument.h:
* include/sample_buffer.h:
* include/plugin.h:
* include/note_play_handle.h:
* include/song.h:
* include/string_pair_drag.h:
* include/oscillator.h:
* include/automatable_button.h:
* include/tooltip.h:
* include/journalling_object.h:
* include/pixmap_button.h:
* include/automatable_model_view.h:
* include/mv_base.h:
* include/volume_knob.h:
* include/plugin_view.h:
export according classes for making them accessibly by plugins

* src/core/main.cpp:
dont set opacity for splashscreen

* src/core/config_mgr.cpp:
customized paths for win32 (plugins in same directory as executable)

* src/core/song.cpp:
initialize m_length member to 0

* src/core/plugin.cpp:
under win32 filter for DLL-files

* include/types.h:
added macros for export-declaration

* src/gui/plugin_browser.cpp:
* src/gui/effect_select_dialog.cpp:
* src/gui/main_window.cpp:
* src/core/track.cpp:
minor coding style issues

* build_mingw32:
* acinclude.m4:
* Makefile.am:
better support for win32-builds

* buildtools/bin2res.cpp:
open files in binary mode - fixes win32-build

* configure.in:
* Makefile.am:
* include/audio_pulseaudio.h:
* src/core/audio/audio_pulseaudio.cpp:
* src/core/mixer.cpp:
* src/gui/setup_dialog.cpp:
added PulseAudio-support

2008-06-01 Paul Giblock <drfaygo/at/gmail/dot/com>

* src/tracks/pattern.cpp:
Expand All @@ -7,7 +87,7 @@
Display floating text underneith the current track so you can actually see
what you are doing

2008-05-27 Paul Giblock <drfaygo/at/gmail/dot/com>
2008-05-30 Paul Giblock <drfaygo/at/gmail/dot/com>

* src/gui/piano_roll.cpp:
- Improve selection of volume-bars on a chord. Select closest note
Expand Down
17 changes: 15 additions & 2 deletions Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -138,9 +138,11 @@ lmms_UIC = \
ui_export_project.uic



BUILT_SOURCES = $(lmms_MOC) $(lmms_UIC)



lmms_EMBEDDED_RESOURCES = $(srcdir)/AUTHORS $(srcdir)/COPYING

./embedded_resources.h: $(lmms_EMBEDDED_RESOURCES)
Expand Down Expand Up @@ -222,6 +224,7 @@ lmms_SOURCES = \
$(srcdir)/src/core/audio/audio_jack.cpp \
$(srcdir)/src/core/audio/audio_oss.cpp \
$(srcdir)/src/core/audio/audio_port.cpp \
$(srcdir)/src/core/audio/audio_pulseaudio.cpp \
$(srcdir)/src/core/audio/audio_sample_recorder.cpp \
$(srcdir)/src/core/audio/audio_sdl.cpp \
$(srcdir)/src/core/midi/midi_alsa_raw.cpp \
Expand Down Expand Up @@ -307,6 +310,7 @@ lmms_SOURCES = \
$(srcdir)/include/audio_file_wave.h \
$(srcdir)/include/audio_jack.h \
$(srcdir)/include/audio_oss.h \
$(srcdir)/include/audio_pulseaudio.h \
$(srcdir)/include/audio_sample_recorder.h \
$(srcdir)/include/audio_sdl.h \
$(srcdir)/include/automation_editor.h \
Expand Down Expand Up @@ -466,7 +470,7 @@ lmms_SOURCES = \
EXTRA_DIST = $(lmms_EMBEDDED_RESOURCES) lmms.1


CLEANFILES = $(lmms_MOC) ./embedded_resources.h
CLEANFILES = $(lmms_MOC) ./embedded_resources.h liblmms-imp.a

if HAVE_LIBSDL
LIB_SDL_LDADD = -lSDL
Expand Down Expand Up @@ -497,11 +501,20 @@ if HAVE_LIBSF
LIB_SF_LDADD = -lsndfile
endif

lmms_LDADD = $(QT_LDADD) $(LIB_SDL_LDADD) $(LIB_ASOUND_LDADD) $(LIB_JACK_LDADD) $(LIB_SDL_SOUND_LDADD) $(LIB_VORBIS_LDADD) $(LIB_SRC_LDADD) $(LIB_SF_LDADD)
if HAVE_LIBPULSE
LIB_PA_LDADD = -lpulse
endif

lmms_LDADD = $(QT_LDADD) $(LIB_SDL_LDADD) $(LIB_ASOUND_LDADD) $(LIB_JACK_LDADD) $(LIB_SDL_SOUND_LDADD) $(LIB_VORBIS_LDADD) $(LIB_SRC_LDADD) $(LIB_SF_LDADD) $(LIB_PA_LDADD)

if BUILD_LINUX
lmms_LDFLAGS = -rdynamic
endif

if BUILD_WIN32
lmms_LDFLAGS = -Wl,-out-implib=liblmms-imp.a
endif

single-binary:
$(CXX) $(CXXFLAGS) -DHAVE_CONFIG_H -combine -pipe -O2 -g $(INCLUDES) $(AM_CXXFLAGS) $(lmms_LDADD) $(lmms_LDFLAGS) $(lmms_SOURCES) -o lmms-single

Expand Down
12 changes: 9 additions & 3 deletions acinclude.m4
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,13 @@ AC_DEFUN([gw_CHECK_QT],
AC_REQUIRE([AC_PROG_CXX])
AC_REQUIRE([AC_PATH_X])
AC_PATH_PROG([PKGCONFIG], [pkg-config])
case "${prefix}" in
/opt/mingw*)
;;
*)
AC_PATH_PROG([PKGCONFIG], [pkg-config])
;;
esac
# Only search manually if no pkgconfig
if test -z "$PKGCONFIG" ; then
Expand All @@ -13,7 +19,7 @@ if test -z "$PKGCONFIG" ; then
# Check that QTDIR is defined or that --with-qtdir given
if test x"$QTDIR" = x ; then
# some usual Qt-locations
QT_SEARCH="/usr /usr/lib/qt4 /usr/share/qt4 /usr/local/Trolltech/Qt-4.3.0 /usr/local/Trolltech/Qt-4.3.1 /usr/local/Trolltech/Qt-4.3.2 /usr/local/Trolltech/Qt-4.1.0"
QT_SEARCH="/usr /usr/lib/qt4 /usr/share/qt4 /usr/local/Trolltech/Qt-4.3.0 /usr/local/Trolltech/Qt-4.3.1 /usr/local/Trolltech/Qt-4.3.2 /usr/local/Trolltech/Qt-4.3.3 /usr/local/Trolltech/Qt-4.3.4"
else
QT_SEARCH=$QTDIR
QTDIR=""
Expand Down Expand Up @@ -155,7 +161,7 @@ if test -z "$QT_LIB" ; then
if test "x$QT_LIBS" = x; then
AC_MSG_ERROR([*** Couldn't find any Qt4 libraries])
fi
QT_LIB="-L$QTDIR/bin -lQtCore4 -lQtXml4 -lQtNetwork4 -lQtGui4 -lws2_32"
QT_LIB="-L$QTDIR/bin -lQtCore4 -lQtXml4 -lQtNetwork4 -lQtGui4"
# Check that windres is in path
AC_PATH_PROGS([WINDRES],[i586-mingw32-windres windres],,[${prefix}/bin:$PATH])
if test x$WINDRES = x ; then
Expand Down
4 changes: 4 additions & 0 deletions build_mingw32
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
MINGW=/opt/mingw
export PATH=$PATH:$MINGW/bin
./configure --prefix=$MINGW --host=i586-mingw32 CC=$MINGW/bin/i586-mingw32-gcc CXX=$MINGW/bin/i586-mingw32-g++ DLLTOOL=$MINGW/bin/i586-mingw32-dlltool OBJDUMP=$MINGW/bin/i586-mingw32-objdump RANLIB=$MINGW/bin/i586-mingw32-ranlib AR=$MINGW/bin/i586-mingw32-ar AS=$MINGW/bin/i586-mingw32-as STRIP=$MINGW/bin/i586-mingw32-strip --with-qtdir=$MINGW --with-win32 CFLAGS="-mtune=generic -mmmx -fno-strict-aliasing" CXXFLAGS="-mtune=generic -mmmx -fno-strict-aliasing"
#./configure --prefix=$MINGW --host=i586-mingw32 --build=i586-mingw32 CC=$MINGW/bin/i586-mingw32-gcc CXX=$MINGW/bin/i586-mingw32-g++ --with-qtdir=$MINGW --with-win32
2 changes: 1 addition & 1 deletion buildtools/bin2res.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ int main( int argc, char * * argv )
}
for( stringlist::iterator it = files.begin(); it != files.end(); ++it )
{
std::ifstream f( it->c_str() );
std::ifstream f( it->c_str(), std::ios::binary );
if( f.fail() )
{
std::cerr << "Cannot open file " << *it <<
Expand Down
37 changes: 18 additions & 19 deletions configure.in
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
# Process this file with autoconf to produce a configure script.

AC_PREREQ(2.50)
AC_INIT(lmms, 0.4.0-svn20080530, lmms-devel/at/lists/dot/sf/dot/net)
AM_INIT_AUTOMAKE(lmms, 0.4.0-svn20080530)
AC_INIT(lmms, 0.4.0-svn20080601, lmms-devel/at/lists/dot/sf/dot/net)
AM_INIT_AUTOMAKE(lmms, 0.4.0-svn20080601)

AM_CONFIG_HEADER(config.h)

Expand Down Expand Up @@ -208,6 +208,22 @@ fi
AM_CONDITIONAL(HAVE_LIBJACK, test ! -z "$HAVE_JACK_JACK_H")


# check for PulseAudio
AC_ARG_WITH(pulseaudio,
AS_HELP_STRING([--without-pulseaudio],
[disable support for PulseAudio-sound-output]), ,
[ with_pulseaudio=yes ])
AH_TEMPLATE(HAVE_PULSE_PULSEAUDIO_H, [Define to 1 if you have the <pulse/pulseaudio.h> header file.])
if test "x$with_pulseaudio" = "xyes" ; then
AC_CHECK_HEADER(pulse/pulseaudio.h, HAVE_PULSE_PULSEAUDIO_H="true")
AC_CHECK_LIB([pulse], [pa_mainloop_new], HAVE_LIBPULSE="true", HAVE_PULSE_PULSEAUDIO_H="")
fi
if test ! -z "$HAVE_PULSE_PULSEAUDIO_H" ; then
AC_DEFINE(HAVE_PULSE_PULSEAUDIO_H)
fi
AM_CONDITIONAL(HAVE_LIBPULSE, test ! -z "$HAVE_PULSE_PULSEAUDIO_H")


# check for proper WINE-installation and existing Steinberg headers
AC_ARG_WITH(vst,
AS_HELP_STRING([--without-vst],
Expand Down Expand Up @@ -691,23 +707,6 @@ AC_CONFIG_FILES([Makefile
plugins/singerbot/Makefile
plugins/stk/Makefile
plugins/stk/mallets/Makefile
plugins/stk/voices/Makefile
plugins/stk/voices/b3/Makefile
plugins/stk/voices/bandedwg/Makefile
plugins/stk/voices/blow_bottle/Makefile
plugins/stk/voices/blow_hole/Makefile
plugins/stk/voices/bowed/Makefile
plugins/stk/voices/brass/Makefile
plugins/stk/voices/clarinet/Makefile
plugins/stk/voices/flute/Makefile
plugins/stk/voices/fmvoices/Makefile
plugins/stk/voices/metal/Makefile
plugins/stk/voices/moog/Makefile
plugins/stk/voices/percflute/Makefile
plugins/stk/voices/resonate/Makefile
plugins/stk/voices/rhodey/Makefile
plugins/stk/voices/tubebell/Makefile
plugins/stk/voices/wurley/Makefile
plugins/triple_oscillator/Makefile
plugins/vestige/Makefile
plugins/vibed/Makefile
Expand Down
4 changes: 2 additions & 2 deletions include/automatable_button.h
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
class automatableButtonGroup;


class automatableButton : public QPushButton, public boolModelView
class EXPORT automatableButton : public QPushButton, public boolModelView
{
Q_OBJECT
public:
Expand Down Expand Up @@ -78,7 +78,7 @@ public slots:



class automatableButtonGroup : public QWidget, public intModelView
class EXPORT automatableButtonGroup : public QWidget, public intModelView
{
Q_OBJECT
public:
Expand Down
2 changes: 1 addition & 1 deletion include/automatable_model.h
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ class track;



class automatableModel : public model, public journallingObject
class EXPORT automatableModel : public model, public journallingObject
{
Q_OBJECT
public:
Expand Down
4 changes: 2 additions & 2 deletions include/automatable_model_view.h
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ class QMenu;



class automatableModelView : public modelView
class EXPORT automatableModelView : public modelView
{
public:
automatableModelView( ::model * _model ) :
Expand Down Expand Up @@ -94,7 +94,7 @@ class automatableModelView : public modelView


#define generateTypedModelView(type) \
class type##ModelView : public automatableModelView \
class EXPORT type##ModelView : public automatableModelView \
{\
public:\
type##ModelView( ::model * _model ) :\
Expand Down
4 changes: 3 additions & 1 deletion include/config_mgr.h
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,8 @@
#include <QtCore/QVector>
#include <QtCore/QPair>

#include "types.h"


class engine;

Expand All @@ -47,7 +49,7 @@ const QString TRACK_ICON_PATH = "track_icons/";
const QString LOCALE_PATH = "locale/";


class configManager
class EXPORT configManager
{
public:
static inline configManager * inst( void )
Expand Down
7 changes: 5 additions & 2 deletions include/embed.h
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,9 @@
#include <QtCore/QString>


#include "types.h"


#define STRINGIFY_PLUGIN_NAME(s) STR(s)
#define STR(PN) #PN

Expand All @@ -45,8 +48,8 @@ struct descriptor
} ;


QPixmap getIconPixmap( const char * _name, int _w = -1, int _h = -1 );
QString getText( const char * _name );
QPixmap EXPORT getIconPixmap( const char * _name, int _w = -1, int _h = -1 );
QString EXPORT getText( const char * _name );

}

Expand Down
4 changes: 3 additions & 1 deletion include/engine.h
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,8 @@

#include <QtCore/QMap>

#include "types.h"

class automationEditor;
class bbEditor;
class bbTrackContainer;
Expand All @@ -49,7 +51,7 @@ class ladspa2LMMS;
class controllerRackView;


class engine
class EXPORT engine
{
public:
static void init( const bool _has_gui = true );
Expand Down
2 changes: 1 addition & 1 deletion include/instrument.h
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ class notePlayHandle;
class track;


class instrument : public plugin
class EXPORT instrument : public plugin
{
public:
instrument( instrumentTrack * _instrument_track,
Expand Down
2 changes: 1 addition & 1 deletion include/instrument_track.h
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ class presetPreviewPlayHandle;
class volumeKnob;


class instrumentTrack : public track, public midiEventProcessor
class EXPORT instrumentTrack : public track, public midiEventProcessor
{
Q_OBJECT
mapPropertyFromModel(int,getVolume,setVolume,m_volumeModel);
Expand Down
2 changes: 1 addition & 1 deletion include/instrument_view.h
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
class instrumentTrackWindow;


class instrumentView : public pluginView
class EXPORT instrumentView : public pluginView
{
public:
instrumentView( instrument * _instrument, QWidget * _parent );
Expand Down
2 changes: 1 addition & 1 deletion include/journalling_object.h
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ class journalEntry
typedef QVector<journalEntry> journalEntryVector;


class journallingObject
class EXPORT journallingObject
{
public:
journallingObject( void );
Expand Down
Loading

0 comments on commit d3516cd

Please sign in to comment.