diff --git a/.gitmodules b/.gitmodules new file mode 100644 index 0000000..98d7580 --- /dev/null +++ b/.gitmodules @@ -0,0 +1,3 @@ +[submodule "lib/fltk"] + path = lib/fltk + url = git://git.tuxfamily.org/gitroot/non/fltk.git diff --git a/FL/makefile.inc b/FL/makefile.inc index ff9a84b..51071f9 100644 --- a/FL/makefile.inc +++ b/FL/makefile.inc @@ -20,7 +20,7 @@ FL/libfl_widgets.a: $(OBJS) FL: FL/libfl_widgets.a clean: - rm -f $(OBJS) FL/libfl_widgets.a + rm -f $(OBJS) FL/libfl_widgets.a .deps install: @ \ No newline at end of file diff --git a/lib/fltk b/lib/fltk new file mode 160000 index 0000000..94d392c --- /dev/null +++ b/lib/fltk @@ -0,0 +1 @@ +Subproject commit 94d392ca1789847094d61885e646540846a69c53 diff --git a/mixer/configure b/mixer/configure index 5a6a28d..df6d406 100755 --- a/mixer/configure +++ b/mixer/configure @@ -14,10 +14,9 @@ ask "Build for debugging" USE_DEBUG no begin_tests -require_FLTK 1.1.7 images -require_command FLUID fluid require_command ar ar require_command makedepend makedepend +require_FLTK 1.3.0 images cairo require_package JACK 0.103.0 jack require_package lrdf 0.4.0 lrdf require_package liblo 0.23 liblo diff --git a/mixer/makefile.inc b/mixer/makefile.inc index 3c3d97d..b0e5616 100644 --- a/mixer/makefile.inc +++ b/mixer/makefile.inc @@ -12,18 +12,18 @@ SRCS:=$(SRCS:.fl=.C) SRCS:=$(sort $(SRCS)) OBJS:=$(SRCS:.C=.o) -LIBS := $(FLTK_LIBS) $(JACK_LIBS) $(LASH_LIBS) $(LRDF_LIBS) $(LIBLO_LIBS) $(SIGCPP_LIBS) $(XPM_LIBS) +LIBS += $(FLTK_LIBS) $(JACK_LIBS) $(LASH_LIBS) $(LRDF_LIBS) $(LIBLO_LIBS) $(SIGCPP_LIBS) $(XPM_LIBS) -CFLAGS := $(FLTK_CFLAGS) $(JACK_CFLAGS) $(LIBLO_CFLAGS) $(SIGCPP_CFLAGS) $(XPM_CFLAGS) +CFLAGS += $(FLTK_CFLAGS) $(JACK_CFLAGS) $(LIBLO_CFLAGS) $(SIGCPP_CFLAGS) $(XPM_CFLAGS) -src/mixer: $(OBJS) FL/libfl_widgets.a nonlib/libnonlib.a +src/mixer: $(OBJS) FL/libfl_widgets.a nonlib/libnonlib.a $(STATIC_LIBS) @ echo -n Linking mixer... - @ $(CXX) $(CXXFLAGS) $(LIBS) $(OBJS) -o $@ -LFL -lfl_widgets -Lnonlib -lnonlib -ldl && echo $(DONE) + @ $(CXX) $(CXXFLAGS) $(LIBS) $^ -o $@ -LFL -lfl_widgets -Lnonlib -lnonlib -ldl && echo $(DONE) Mixer: src/mixer clean: - rm -f $(OBJS) src/mixer + rm -f $(OBJS) src/mixer .deps install: all @ echo -n "Installing..." diff --git a/nonlib/makefile.inc b/nonlib/makefile.inc index f8c47cd..2f6a0cd 100644 --- a/nonlib/makefile.inc +++ b/nonlib/makefile.inc @@ -19,7 +19,7 @@ nonlib/libnonlib.a: $(OBJS) nonlib: nonlib/libnonlib.a clean: - rm -f $(OBJS) nonlib/libnonlib.a + rm -f $(OBJS) nonlib/libnonlib.a .deps install: @ \ No newline at end of file diff --git a/scripts/Makefile b/scripts/Makefile index 6887e34..b12f34b 100644 --- a/scripts/Makefile +++ b/scripts/Makefile @@ -55,6 +55,17 @@ else CXXFLAGS := -fno-rtti -fno-exceptions endif + +STATIC_LIBS := lib/fltk/lib/libfltk.a lib/fltk/lib/libfltk_cairo.a lib/fltk/lib/libfltk_images.a lib/fltk/lib/libfltk_forms.a +# FLTK_LIBS := -lfltk -fltk_images -lfltk_gl -lfltk_forms -lfltk_cairo +LIBS += $(FLTK_LIBS) +LIBS += -lpng -lcairo -ljpeg +INCLUDES := -I. -Iutil -IFL -Inonlib +INCLUDES += $(FLTK_CFLAGS) +# INCLUDES += + +// CFLAGS += $(FLTK_CFLAGS) + # include FL/makefile.inc include makefile.inc @@ -66,7 +77,7 @@ CFLAGS+=-DVERSION=\"$(VERSION)\" \ CXXFLAGS := $(CFLAGS) $(CXXFLAGS) -INCLUDES := -I. -Iutil -IFL -Inonlib + include scripts/colors @@ -80,7 +91,7 @@ endif .C.o: @ echo $(COMPILING) - @ $(CXX) $(CXXFLAGS) $(INCLUDES) -c $< -o $@ + $(CXX) $(CXXFLAGS) $(INCLUDES) -c $< -o $@ %.C : %.fl @ cd `dirname $<` && fluid -c `basename $<` diff --git a/scripts/config-funcs b/scripts/config-funcs index 7180243..ef636d0 100644 --- a/scripts/config-funcs +++ b/scripts/config-funcs @@ -185,6 +185,7 @@ begin () echo -n "Checking sanity..." require_command tput tput > /dev/null require_command pkg-config pkg-config > /dev/null + require_command fltk-config ../lib/fltk/fltk-config >/dev/null require_command sed sed > /dev/null ok } @@ -355,7 +356,7 @@ require_FLTK () echo -n "Checking for ${BOLD}FLTK${SGR0}..." - FLTK_VERSION=`fltk-config --version` + FLTK_VERSION=`lib/fltk/fltk-config --version` if ! test_version $FLTK_VERSION $1 then @@ -373,6 +374,6 @@ require_FLTK () use="$use --use-$1" done - append "FLTK_LIBS=`fltk-config $use --ldflags | sed 's/,\\?--as-needed//g'`" - append "FLTK_CFLAGS=`fltk-config $use --cflags`" + append "FLTK_LIBS=`lib/fltk/fltk-config $use --ldflags | sed 's/,\\?--as-needed//g'`" + append "FLTK_CFLAGS=`lib/fltk/fltk-config $use --cflags`" } diff --git a/sequencer/configure b/sequencer/configure index af47c4b..4fe84ac 100755 --- a/sequencer/configure +++ b/sequencer/configure @@ -14,10 +14,9 @@ ask "Build for debugging" USE_DEBUG no begin_tests -require_FLTK 1.1.7 images -require_command FLUID fluid require_package JACK 0.103.0 jack suggest_package XPM 2.0.0 xpm +require_FLTK 1.3.0 images cairo test_version `version_of jack` 0.105.0 || append "JACK_MIDI_PROTO_API=yes" require_package liblo 0.23 liblo diff --git a/sequencer/src/gui/ui.fl b/sequencer/src/gui/ui.fl index 630db5c..1caefc8 100644 --- a/sequencer/src/gui/ui.fl +++ b/sequencer/src/gui/ui.fl @@ -25,9 +25,6 @@ comment {// decl {\#include } {public local } -decl {\#include } {private local -} - decl {\#include "FL/About_Dialog.H"} {private local } @@ -1336,18 +1333,9 @@ else } { code {char pat[256]; -snprintf( pat, 256, "%s%s.html", DOCUMENT_PATH, file ); - -Fl_Help_Dialog *help; // Help dialog - -help = new Fl_Help_Dialog; - -help->load( pat ); - -help->show(); +snprintf( pat, 256, "file://%s/non-sequencer/%s.html", DOCUMENT_PATH, file ); -// FIXME: need to delete it somehow. -// help->show(1, argv);} {} +open_url( pat );} {} } Function {maybe_save_song()} {open return_type bool } { diff --git a/session-manager/configure b/session-manager/configure index 38766a4..539d73c 100755 --- a/session-manager/configure +++ b/session-manager/configure @@ -14,10 +14,9 @@ ask "Build for debugging" USE_DEBUG no begin_tests -require_FLTK 1.1.7 images -require_command FLUID fluid require_command ar ar require_command makedepend makedepend +require_FLTK 1.3.0 images cairo suggest_package JACK 0.103.0 jack require_package liblo 0.23 liblo require_package sigcpp 2.0.0 sigc++-2.0 diff --git a/session-manager/makefile.inc b/session-manager/makefile.inc index a521781..5236dec 100644 --- a/session-manager/makefile.inc +++ b/session-manager/makefile.inc @@ -13,27 +13,27 @@ SRCS:=$(SRCS:.fl=.C) SRCS:=$(sort $(SRCS)) OBJS:=$(SRCS:.C=.o) -LIBS := $(LIBLO_LIBS) $(SIGCPP_LIBS) -CFLAGS := $(LIBLO_CFLAGS) $(SIGCPP_CFLAGS) $(XPM_CFLAGS) $(FLTK_CFLAGS) +LIBS += $(LIBLO_LIBS) $(SIGCPP_LIBS) +CFLAGS += $(LIBLO_CFLAGS) $(SIGCPP_CFLAGS) $(XPM_CFLAGS) $(FLTK_CFLAGS) src/nsmd: src/nsmd.o nonlib/libnonlib.a @ echo -n Linking session handler. - @ $(CXX) $(CXXFLAGS) $(LIBS) src/nsmd.o -o $@ -Lnonlib -lnonlib && echo $(DONE) + @ $(CXX) $(CXXFLAGS) $(LIBS) $^ -o $@ -Lnonlib -lnonlib && echo $(DONE) -src/session-manager: src/session-manager.o nonlib/libnonlib.a +src/session-manager: src/session-manager.o nonlib/libnonlib.a $(STATIC_LIBS) @ echo -n Linking session handler. - @ $(CXX) $(CXXFLAGS) $(FLTK_LIBS) $(XPM_LIBS) $(LIBS) src/session-manager.o -o $@ -LFL -lfl_widgets -Lnonlib -lnonlib && echo $(DONE) + @ $(CXX) $(CXXFLAGS) $(FLTK_LIBS) $(XPM_LIBS) $(LIBS) $^ -o $@ -LFL -lfl_widgets -Lnonlib -lnonlib && echo $(DONE) src/send_osc: src/send_osc.o nonlib/libnonlib.a - @ $(CXX) $(CXXFLAGS) $(LIBS) src/send_osc.o -o $@ -Lnonlib -lnonlib && echo $(DONE) + @ $(CXX) $(CXXFLAGS) $(LIBS) $^ -o $@ -Lnonlib -lnonlib && echo $(DONE) src/jackpatch: src/jackpatch.o - @ $(CXX) $(CXXFLAGS) $(JACK_LIBS) $(LIBLO_LIBS) src/jackpatch.o -o $@ && echo $(DONE) + @ $(CXX) $(CXXFLAGS) $(JACK_LIBS) $(LIBLO_LIBS) $^ -o $@ && echo $(DONE) Session: src/send_osc src/nsmd src/session-manager src/jackpatch clean: - rm -f $(OBJS) src/nsmd src/session-manager src/jackpatch + rm -f $(OBJS) src/nsmd src/session-manager src/jackpatch .deps diff --git a/timeline/configure b/timeline/configure index 6822b72..1c545fa 100755 --- a/timeline/configure +++ b/timeline/configure @@ -21,10 +21,9 @@ using DEBUG && begin_tests -require_FLTK 1.1.7 images -require_command FLUID fluid require_command ar ar require_command makedepend makedepend +require_FLTK 1.3.0 images cairo require_package JACK 0.103.0 jack require_package sndfile 1.0.17 sndfile require_package liblo 0.23 liblo @@ -44,24 +43,6 @@ then fail "Invalid hostname!" fi -if ! test_version 1.1.10 $FLTK_VERSION -then - warn "*** PERFORMANCE WARNING ***" - warn "" - warn "Your FLTK version is $FLTK_VERSION." - warn "" - warn "FLTK version 1.3.0 introduced a bug which slows down the" - warn "drawing of Non-DAW's timeline by a factor of thousands." - warn "" - warn "Install FLTK 1.1.10 and try again." - warn "" - warn "Alternatively, you can rerun configure and answer 'yes' to" - warn "the question 'Use widget for timeline'. It will be fast, but" - warn "you won't be able to see the playhead." - warn "" - warn "Please send any and all complaints to the FLTK developers!" -fi - test_version `version_of liblo` 0.26 || warn "Version $(version_of liblo) of liblo is slow to create servers. Consider upgrading to 0.26 or later" end diff --git a/timeline/makefile.inc b/timeline/makefile.inc index 7073a96..0c06d2d 100644 --- a/timeline/makefile.inc +++ b/timeline/makefile.inc @@ -12,9 +12,9 @@ SRCS:=$(SRCS:.fl=.C) SRCS:=$(sort $(SRCS)) OBJS:=$(SRCS:.C=.o) -LIBS := $(FLTK_LIBS) $(JACK_LIBS) $(SNDFILE_LIBS) $(LIBLO_LIBS) $(SIGCPP_LIBS) $(XPM_LIBS) +LIBS += $(JACK_LIBS) $(SNDFILE_LIBS) $(LIBLO_LIBS) $(SIGCPP_LIBS) $(XPM_LIBS) -CFLAGS := $(SNDFILE_CFLAGS) $(FLTK_CFLAGS) $(JACK_CFLAGS) $(SIGCPP_CFLAGS) $(XPM_CFLAGS) +CFLAGS += $(SNDFILE_CFLAGS) $(FLTK_CFLAGS) $(JACK_CFLAGS) $(SIGCPP_CFLAGS) $(XPM_CFLAGS) ifeq ($(USE_UNOPTIMIZED_DRAWING),yes) CFLAGS+=-DUSE_UNOPTIMIZED_DRAWING @@ -28,14 +28,15 @@ ifeq ($(USE_WIDGET_FOR_TIMELINE),yes) CFLAGS+=-DUSE_WIDGET_FOR_TIMELINE endif -src/timeline: $(OBJS) FL/libfl_widgets.a nonlib/libnonlib.a + +src/timeline: $(OBJS) FL/libfl_widgets.a nonlib/libnonlib.a $(STATIC_LIBS) @ echo -n Linking timeline... - @ $(CXX) $(CXXFLAGS) $(INCLUDES) $(LIBS) $(OBJS) -o $@ -LFL -lfl_widgets -Lnonlib -lnonlib && echo $(DONE) + $(CXX) $(CXXFLAGS) $(INCLUDES) $(LIBS) $^ -o $@ -LFL -lfl_widgets -Lnonlib -lnonlib && echo $(DONE) Timeline: src/timeline clean: - rm -f $(OBJS) src/timeline + rm -f $(OBJS) src/timeline .deps install: all @ echo -n "Installing..."