Update from master.
This commit is contained in:
commit
d4bacf444a
115
FL/Makefile
115
FL/Makefile
|
@ -1,115 +0,0 @@
|
||||||
|
|
||||||
###############################################################################
|
|
||||||
# Copyright (C) 2008 Jonathan Moore Liles #
|
|
||||||
# #
|
|
||||||
# This program is free software; you can redistribute it and/or modify it #
|
|
||||||
# under the terms of the GNU General Public License as published by the #
|
|
||||||
# Free Software Foundation; either version 2 of the License, or (at your #
|
|
||||||
# option) any later version. #
|
|
||||||
# #
|
|
||||||
# This program is distributed in the hope that it will be useful, but WITHOUT #
|
|
||||||
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or #
|
|
||||||
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for #
|
|
||||||
# more details. #
|
|
||||||
# #
|
|
||||||
# You should have received a copy of the GNU General Public License along #
|
|
||||||
# with This program; see the file COPYING. If not,write to the Free Software #
|
|
||||||
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. #
|
|
||||||
###############################################################################
|
|
||||||
|
|
||||||
## Makefile for the Non-DAW.
|
|
||||||
|
|
||||||
##
|
|
||||||
## Do not edit this file; run `make config` instead.
|
|
||||||
##
|
|
||||||
|
|
||||||
VERSION := 1.0.0
|
|
||||||
PACKAGE := FL
|
|
||||||
|
|
||||||
all: .config
|
|
||||||
|
|
||||||
.config: configure
|
|
||||||
@ echo '<<< Configuring '$(PACKAGE)
|
|
||||||
@ ./configure
|
|
||||||
|
|
||||||
config:
|
|
||||||
@ echo '<<< Configuring '$(PACKAGE)
|
|
||||||
@ ./configure
|
|
||||||
|
|
||||||
-include .config
|
|
||||||
|
|
||||||
export SYSTEM_PATH:=$(prefix)/share/
|
|
||||||
export DOCUMENT_PATH:=$(prefix)/share/doc/
|
|
||||||
export PIXMAP_PATH:=$(prefix)/share/pixmaps/
|
|
||||||
|
|
||||||
# a bit of a hack to make sure this runs before any rules
|
|
||||||
ifneq ($(CALCULATING),yes)
|
|
||||||
TOTAL := $(shell $(MAKE) CALCULATING=yes -n 2>/dev/null | sed -n 's/^.*Compiling: \([^"]\+\)"/\1/p' > .files )
|
|
||||||
endif
|
|
||||||
|
|
||||||
ifeq ($(USE_DEBUG),yes)
|
|
||||||
CFLAGS := -pipe -ggdb -fno-inline -Wall -Wextra -O0
|
|
||||||
CXXFLAGS := -Wnon-virtual-dtor -Wno-missing-field-initializers -fno-rtti -fno-exceptions
|
|
||||||
else
|
|
||||||
CFLAGS := -pipe -O2 -DNDEBUG
|
|
||||||
CXXFLAGS := -fno-rtti -fno-exceptions
|
|
||||||
endif
|
|
||||||
|
|
||||||
|
|
||||||
CFLAGS+=-DVERSION=\"$(VERSION)\" \
|
|
||||||
-DINSTALL_PREFIX=\"$(prefix)\" \
|
|
||||||
-DSYSTEM_PATH=\"$(SYSTEM_PATH)\" \
|
|
||||||
-DDOCUMENT_PATH=\"$(DOCUMENT_PATH)\" \
|
|
||||||
-DPIXMAP_PATH=\"$(PIXMAP_PATH)\"
|
|
||||||
|
|
||||||
CXXFLAGS += $(SNDFILE_CFLAGS) $(FLTK_CFLAGS) $(JACK_CFLAGS)
|
|
||||||
CXXFLAGS := $(CFLAGS) $(CXXFLAGS)
|
|
||||||
|
|
||||||
INCLUDES := -I. -Iutil -IFL -Inonlib
|
|
||||||
|
|
||||||
include scripts/colors
|
|
||||||
|
|
||||||
ifneq ($(CALCULATING),yes)
|
|
||||||
COMPILING="$(BOLD)$(BLACK)$(PACKAGE) [$(SGR0)$(CYAN)`scripts/percent-complete .files "$<"`$(SGR0)$(BOLD)$(BLACK)]$(SGR0) $(BOLD)$(YELLOW)$<$(SGR0)"
|
|
||||||
else
|
|
||||||
COMPILING="Compiling: $<"
|
|
||||||
endif
|
|
||||||
|
|
||||||
.C.o:
|
|
||||||
@ echo $(COMPILING)
|
|
||||||
@ $(CXX) $(CXXFLAGS) $(INCLUDES) -c $< -o $@
|
|
||||||
|
|
||||||
%.C : %.fl
|
|
||||||
@ cd `dirname $<` && fluid -c ../$<
|
|
||||||
|
|
||||||
DONE := $(BOLD)$(GREEN)done$(SGR0)
|
|
||||||
|
|
||||||
include makefile.inc
|
|
||||||
|
|
||||||
SRCS:=$(FL_SRCS)
|
|
||||||
OBJS:=$(FL_OBJS)
|
|
||||||
|
|
||||||
# FIXME: isn't there a better way?
|
|
||||||
$(OBJS): .config Makefile
|
|
||||||
|
|
||||||
TAGS: $(SRCS)
|
|
||||||
etags $(SRCS)
|
|
||||||
|
|
||||||
.deps: .config $(SRCS)
|
|
||||||
ifneq ($(CALCULATING),yes)
|
|
||||||
@ echo -n Calculating dependencies...
|
|
||||||
@ makedepend -f- -- $(CXXFLAGS) $(INCLUDES) -- $(SRCS) 2>/dev/null > .deps && echo $(DONE)
|
|
||||||
@ # gcc -M $(CXXFLAGS) $(INCLUDES) $(SRCS) > .deps && echo $(DONE)
|
|
||||||
endif
|
|
||||||
|
|
||||||
clean_deps:
|
|
||||||
@ rm -f .deps
|
|
||||||
|
|
||||||
install:
|
|
||||||
@ echo ...
|
|
||||||
|
|
||||||
.PHONEY: clean config depend clean_deps
|
|
||||||
|
|
||||||
clean: FL_clean
|
|
||||||
|
|
||||||
-include .deps
|
|
|
@ -0,0 +1 @@
|
||||||
|
scripts/Makefile
|
|
@ -1,20 +1,26 @@
|
||||||
# -*- mode: makefile; -*-
|
# -*- mode: makefile; -*-
|
||||||
|
|
||||||
|
VERSION := 1.1.0
|
||||||
|
PACKAGE := FL
|
||||||
|
|
||||||
all: FL
|
all: FL
|
||||||
|
|
||||||
FL_SRCS := $(wildcard FL/*.C FL/*.fl)
|
SRCS := $(wildcard FL/*.C FL/*.fl)
|
||||||
|
|
||||||
FL_SRCS:=$(FL_SRCS:.fl=.C)
|
SRCS:=$(SRCS:.fl=.C)
|
||||||
FL_SRCS:=$(sort $(FL_SRCS))
|
SRCS:=$(sort $(SRCS))
|
||||||
FL_OBJS:=$(FL_SRCS:.C=.o)
|
OBJS:=$(SRCS:.C=.o)
|
||||||
|
|
||||||
all: FL/libfl_widgets.a
|
all: FL/libfl_widgets.a
|
||||||
|
|
||||||
FL/libfl_widgets.a: $(FL_OBJS)
|
FL/libfl_widgets.a: $(OBJS)
|
||||||
@ ar rcs $@ $(FL_OBJS)
|
@ ar rcs $@ $(OBJS)
|
||||||
|
|
||||||
.PHONEY: FL
|
.PHONEY: FL
|
||||||
FL: FL/libfl_widgets.a
|
FL: FL/libfl_widgets.a
|
||||||
|
|
||||||
FL_clean:
|
clean:
|
||||||
rm -f $(FL_OBJS) FL/libfl_widgets.a
|
rm -f $(OBJS) FL/libfl_widgets.a
|
||||||
|
|
||||||
|
install:
|
||||||
|
@
|
142
mixer/Makefile
142
mixer/Makefile
|
@ -1,142 +0,0 @@
|
||||||
|
|
||||||
###############################################################################
|
|
||||||
# Copyright (C) 2008 Jonathan Moore Liles #
|
|
||||||
# #
|
|
||||||
# This program is free software; you can redistribute it and/or modify it #
|
|
||||||
# under the terms of the GNU General Public License as published by the #
|
|
||||||
# Free Software Foundation; either version 2 of the License, or (at your #
|
|
||||||
# option) any later version. #
|
|
||||||
# #
|
|
||||||
# This program is distributed in the hope that it will be useful, but WITHOUT #
|
|
||||||
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or #
|
|
||||||
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for #
|
|
||||||
# more details. #
|
|
||||||
# #
|
|
||||||
# You should have received a copy of the GNU General Public License along #
|
|
||||||
# with This program; see the file COPYING. If not,write to the Free Software #
|
|
||||||
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. #
|
|
||||||
###############################################################################
|
|
||||||
|
|
||||||
## Makefile for the Non-DAW.
|
|
||||||
|
|
||||||
##
|
|
||||||
## Do not edit this file; run `make config` instead.
|
|
||||||
##
|
|
||||||
|
|
||||||
VERSION := 1.1.0
|
|
||||||
PACKAGE := MIXER
|
|
||||||
|
|
||||||
all: .config
|
|
||||||
|
|
||||||
.config: configure
|
|
||||||
@ echo '<<< Configuring '$(PACKAGE)
|
|
||||||
@ ./configure
|
|
||||||
|
|
||||||
config:
|
|
||||||
@ echo '<<< Configuring '$(PACKAGE)
|
|
||||||
@ ./configure
|
|
||||||
|
|
||||||
-include .config
|
|
||||||
|
|
||||||
export SYSTEM_PATH:=$(prefix)/share/
|
|
||||||
export DOCUMENT_PATH:=$(prefix)/share/doc/
|
|
||||||
export PIXMAP_PATH:=$(prefix)/share/pixmaps/
|
|
||||||
export ICON_PATH:=$(prefix)/share/icons/
|
|
||||||
export DESKTOP_PATH:=$(prefix)/share/applications/
|
|
||||||
|
|
||||||
|
|
||||||
# a bit of a hack to make sure this runs before any rules
|
|
||||||
ifneq ($(CALCULATING),yes)
|
|
||||||
TOTAL := $(shell $(MAKE) CALCULATING=yes -n 2>/dev/null | sed -n 's/^.*Compiling: \([^"]\+\)"/\1/p' > .files )
|
|
||||||
endif
|
|
||||||
|
|
||||||
ifeq ($(USE_DEBUG),yes)
|
|
||||||
CFLAGS := -pipe -ggdb -fno-inline -Wall -Wextra -O0
|
|
||||||
CXXFLAGS := -Wnon-virtual-dtor -Wno-missing-field-initializers -fno-rtti -fno-exceptions
|
|
||||||
else
|
|
||||||
CFLAGS := -pipe -O2 -DNDEBUG
|
|
||||||
CXXFLAGS := -fno-rtti -fno-exceptions
|
|
||||||
endif
|
|
||||||
|
|
||||||
|
|
||||||
CFLAGS+=-DVERSION=\"$(VERSION)\" \
|
|
||||||
-DINSTALL_PREFIX=\"$(prefix)\" \
|
|
||||||
-DSYSTEM_PATH=\"$(SYSTEM_PATH)\" \
|
|
||||||
-DDOCUMENT_PATH=\"$(DOCUMENT_PATH)\" \
|
|
||||||
-DPIXMAP_PATH=\"$(PIXMAP_PATH)\"
|
|
||||||
|
|
||||||
CXXFLAGS := $(CFLAGS) $(CXXFLAGS)
|
|
||||||
|
|
||||||
INCLUDES := -I. -Iutil -IFL -Inonlib
|
|
||||||
|
|
||||||
include scripts/colors
|
|
||||||
|
|
||||||
ifneq ($(CALCULATING),yes)
|
|
||||||
COMPILING="$(BOLD)$(BLACK)MIXER [$(SGR0)$(CYAN)`scripts/percent-complete .files "$<"`$(SGR0)$(BOLD)$(BLACK)]$(SGR0) $(BOLD)$(YELLOW)$<$(SGR0)"
|
|
||||||
else
|
|
||||||
COMPILING="Compiling: $<"
|
|
||||||
endif
|
|
||||||
|
|
||||||
.C.o:
|
|
||||||
@ echo $(COMPILING)
|
|
||||||
@ $(CXX) $(CXXFLAGS) $(INCLUDES) -c $< -o $@
|
|
||||||
|
|
||||||
%.C : %.fl
|
|
||||||
@ cd `dirname $<` && fluid -c ../$<
|
|
||||||
|
|
||||||
DONE := $(BOLD)$(GREEN)done$(SGR0)
|
|
||||||
|
|
||||||
include FL/makefile.inc
|
|
||||||
#include nonlib/makefile.inc
|
|
||||||
include makefile.inc
|
|
||||||
|
|
||||||
SRCS:=$(Mixer_SRCS)
|
|
||||||
OBJS:=$(Mixer_OBJS)
|
|
||||||
CXXFLAGS += $(Mixer_CFLAGS)
|
|
||||||
|
|
||||||
# FIXME: isn't there a better way?
|
|
||||||
$(OBJS): .config Makefile
|
|
||||||
|
|
||||||
TAGS: $(SRCS)
|
|
||||||
etags $(SRCS)
|
|
||||||
|
|
||||||
.deps: .config $(SRCS)
|
|
||||||
ifneq ($(CALCULATING),yes)
|
|
||||||
@ echo -n Calculating dependencies...
|
|
||||||
@ makedepend -f- -- $(CXXFLAGS) $(INCLUDES) -- $(SRCS) 2>/dev/null > .deps && echo $(DONE)
|
|
||||||
@ # gcc -M $(CXXFLAGS) $(INCLUDES) $(SRCS) > .deps && echo $(DONE)
|
|
||||||
endif
|
|
||||||
|
|
||||||
|
|
||||||
install: all
|
|
||||||
@ echo -n "Installing..."
|
|
||||||
@ install src/mixer "$(DESTDIR)$(prefix)"/bin/non-mixer
|
|
||||||
@ mkdir -p "$(DESTDIR)$(SYSTEM_PATH)"/non-mixer
|
|
||||||
@ $(MAKE) -s -C doc install
|
|
||||||
@ install -d "$(DESTDIR)$(PIXMAP_PATH)/non-mixer"
|
|
||||||
@ install -m 644 icons/hicolor/256x256/apps/non-mixer.png "$(DESTDIR)$(PIXMAP_PATH)"/non-mixer/icon-256x256.png
|
|
||||||
@ install -d "$(DESTDIR)$(ICON_PATH)/hicolor"
|
|
||||||
@ cp -au icons/hicolor/ "$(DESTDIR)$(ICON_PATH)"
|
|
||||||
@ install -d "$(DESTDIR)$(DESKTOP_PATH)"
|
|
||||||
@ sed 's:@BIN_PATH@:$(prefix)/bin:' non-mixer.desktop.in > "$(DESTDIR)$(DESKTOP_PATH)/non-mixer.desktop"
|
|
||||||
@ echo "$(DONE)"
|
|
||||||
ifneq ($(USE_DEBUG),yes)
|
|
||||||
@ echo -n "Stripping..."
|
|
||||||
@ strip $(DESTDIR)$(prefix)/bin/non-mixer
|
|
||||||
@ echo "$(DONE)"
|
|
||||||
endif
|
|
||||||
|
|
||||||
clean_deps:
|
|
||||||
@ rm -f .deps
|
|
||||||
|
|
||||||
.PHONEY: clean config depend clean_deps
|
|
||||||
|
|
||||||
clean: FL_clean Mixer_clean
|
|
||||||
|
|
||||||
dist:
|
|
||||||
git archive --prefix=non-mixer-$(VERSION)/ v$(VERSION) | bzip2 > non-mixer-$(VERSION).tar.bz2
|
|
||||||
|
|
||||||
scan-gpl:
|
|
||||||
@ scripts/scan-gpl $(SRCS) || echo $(BOLD)$(RED)Some source files do not contain proper license information!
|
|
||||||
|
|
||||||
-include .deps
|
|
|
@ -0,0 +1 @@
|
||||||
|
scripts/Makefile
|
|
@ -26,4 +26,17 @@ suggest_package XPM 2.0.0 xpm
|
||||||
|
|
||||||
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"
|
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"
|
||||||
|
|
||||||
|
if ! hostname_resolvable
|
||||||
|
then
|
||||||
|
echo "Your hostname \"$(hostname)\" does not resolve to a valid address."
|
||||||
|
echo "This is a broken configuration and will cause liblo (the"
|
||||||
|
echo "OSC library) to fail to function. Add the line:"
|
||||||
|
echo
|
||||||
|
echo "127.0.0.1 $(hostname)"
|
||||||
|
echo
|
||||||
|
echo "to your /etc/hosts file to fix. And consider switching to a saner distribution."
|
||||||
|
echo
|
||||||
|
fail "Invalid hostname!"
|
||||||
|
fi
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
|
@ -1,22 +1,44 @@
|
||||||
# -*- mode: makefile; -*-
|
# -*- mode: makefile; -*-
|
||||||
|
|
||||||
|
VERSION := 1.1.0
|
||||||
|
PACKAGE := MIXER
|
||||||
|
BIN_NAME := non-mixer
|
||||||
|
|
||||||
all: Mixer
|
all: Mixer
|
||||||
|
|
||||||
Mixer_SRCS := $(wildcard src/*.C src/*.fl src/Engine/*.C)
|
SRCS := $(wildcard src/*.C src/*.fl src/Engine/*.C)
|
||||||
|
|
||||||
Mixer_SRCS:=$(Mixer_SRCS:.fl=.C)
|
SRCS:=$(SRCS:.fl=.C)
|
||||||
Mixer_SRCS:=$(sort $(Mixer_SRCS))
|
SRCS:=$(sort $(SRCS))
|
||||||
Mixer_OBJS:=$(Mixer_SRCS:.C=.o)
|
OBJS:=$(SRCS:.C=.o)
|
||||||
|
|
||||||
Mixer_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)
|
||||||
|
|
||||||
Mixer_CFLAGS := $(FLTK_CFLAGS) $(JACK_CFLAGS) $(LIBLO_CFLAGS) $(SIGCPP_CFLAGS) $(XPM_CFLAGS)
|
CFLAGS := $(FLTK_CFLAGS) $(JACK_CFLAGS) $(LIBLO_CFLAGS) $(SIGCPP_CFLAGS) $(XPM_CFLAGS)
|
||||||
|
|
||||||
src/mixer: $(Mixer_OBJS) FL/libfl_widgets.a nonlib/libnonlib.a
|
src/mixer: $(OBJS) FL/libfl_widgets.a nonlib/libnonlib.a
|
||||||
@ echo -n Linking mixer...
|
@ echo -n Linking mixer...
|
||||||
@ $(CXX) $(CXXFLAGS) $(Mixer_LIBS) $(Mixer_OBJS) -o $@ -LFL -lfl_widgets -Lnonlib -lnonlib -ldl && echo $(DONE)
|
@ $(CXX) $(CXXFLAGS) $(LIBS) $(OBJS) -o $@ -LFL -lfl_widgets -Lnonlib -lnonlib -ldl && echo $(DONE)
|
||||||
|
|
||||||
Mixer: src/mixer
|
Mixer: src/mixer
|
||||||
|
|
||||||
Mixer_clean:
|
clean:
|
||||||
rm -f $(Mixer_OBJS) src/mixer
|
rm -f $(OBJS) src/mixer
|
||||||
|
|
||||||
|
install: all
|
||||||
|
@ echo -n "Installing..."
|
||||||
|
@ install src/mixer "$(DESTDIR)$(prefix)"/bin/non-mixer
|
||||||
|
@ mkdir -p "$(DESTDIR)$(SYSTEM_PATH)"/non-mixer
|
||||||
|
@ $(MAKE) -s -C doc install
|
||||||
|
@ install -d "$(DESTDIR)$(PIXMAP_PATH)/non-mixer"
|
||||||
|
@ install -m 644 icons/hicolor/256x256/apps/non-mixer.png "$(DESTDIR)$(PIXMAP_PATH)"/non-mixer/icon-256x256.png
|
||||||
|
@ install -d "$(DESTDIR)$(ICON_PATH)/hicolor"
|
||||||
|
@ cp -au icons/hicolor/ "$(DESTDIR)$(ICON_PATH)"
|
||||||
|
@ install -d "$(DESTDIR)$(DESKTOP_PATH)"
|
||||||
|
@ sed 's:@BIN_PATH@:$(prefix)/bin:' non-mixer.desktop.in > "$(DESTDIR)$(DESKTOP_PATH)/non-mixer.desktop"
|
||||||
|
@ echo "$(DONE)"
|
||||||
|
ifneq ($(USE_DEBUG),yes)
|
||||||
|
@ echo -n "Stripping..."
|
||||||
|
@ strip $(DESTDIR)$(prefix)/bin/non-mixer
|
||||||
|
@ echo "$(DONE)"
|
||||||
|
endif
|
||||||
|
|
|
@ -382,6 +382,8 @@ Mixer::Mixer ( int X, int Y, int W, int H, const char *L ) :
|
||||||
Fl::scheme( "plastic" );
|
Fl::scheme( "plastic" );
|
||||||
color_scheme( "dark" );
|
color_scheme( "dark" );
|
||||||
|
|
||||||
|
Loggable::dirty_callback( &Mixer::handle_dirty, this );
|
||||||
|
|
||||||
_rows = 1;
|
_rows = 1;
|
||||||
box( FL_NO_BOX );
|
box( FL_NO_BOX );
|
||||||
labelsize( 96 );
|
labelsize( 96 );
|
||||||
|
@ -668,6 +670,19 @@ Mixer::get_unique_track_name ( const char *name )
|
||||||
return strdup( pat );
|
return strdup( pat );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
Mixer::handle_dirty ( int d, void *v )
|
||||||
|
{
|
||||||
|
//Mixer *m = (Mixer*)v;
|
||||||
|
if ( !nsm )
|
||||||
|
return;
|
||||||
|
|
||||||
|
if ( d == 1 )
|
||||||
|
nsm->is_dirty();
|
||||||
|
else if ( d == 0 )
|
||||||
|
nsm->is_clean();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
void
|
void
|
||||||
Mixer::snapshot ( void )
|
Mixer::snapshot ( void )
|
||||||
|
|
|
@ -67,6 +67,8 @@ private:
|
||||||
|
|
||||||
void redraw_windows ( void );
|
void redraw_windows ( void );
|
||||||
|
|
||||||
|
static void handle_dirty ( int, void *v );
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
|
|
||||||
int handle ( int m );
|
int handle ( int m );
|
||||||
|
|
|
@ -290,6 +290,12 @@ Plugin_Module::spawn_discover_thread ( void )
|
||||||
plugin_discover_thread->clone( &Plugin_Module::discover_thread, NULL );
|
plugin_discover_thread->clone( &Plugin_Module::discover_thread, NULL );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
Plugin_Module::join_discover_thread ( void )
|
||||||
|
{
|
||||||
|
plugin_discover_thread->join();
|
||||||
|
}
|
||||||
|
|
||||||
/* return a list of available plugins */
|
/* return a list of available plugins */
|
||||||
Plugin_Module::Plugin_Info *
|
Plugin_Module::Plugin_Info *
|
||||||
Plugin_Module::get_all_plugins ( void )
|
Plugin_Module::get_all_plugins ( void )
|
||||||
|
|
|
@ -91,6 +91,7 @@ private:
|
||||||
public:
|
public:
|
||||||
|
|
||||||
static void spawn_discover_thread ( void );
|
static void spawn_discover_thread ( void );
|
||||||
|
static void join_discover_thread ( void );
|
||||||
|
|
||||||
Plugin_Module ( );
|
Plugin_Module ( );
|
||||||
virtual ~Plugin_Module();
|
virtual ~Plugin_Module();
|
||||||
|
|
|
@ -174,7 +174,7 @@ Project::save ( void )
|
||||||
|
|
||||||
int r = mixer->save();
|
int r = mixer->save();
|
||||||
|
|
||||||
Loggable::clear_dirty();
|
// Loggable::clear_dirty();
|
||||||
|
|
||||||
return r;
|
return r;
|
||||||
// return Loggable::save_unjournaled_state();
|
// return Loggable::save_unjournaled_state();
|
||||||
|
@ -282,7 +282,7 @@ Project::open ( const char *name )
|
||||||
|
|
||||||
// timeline->zoom_fit();
|
// timeline->zoom_fit();
|
||||||
|
|
||||||
Loggable::clear_dirty();
|
// Loggable::clear_dirty();
|
||||||
|
|
||||||
MESSAGE( "Loaded project \"%s\"", name );
|
MESSAGE( "Loaded project \"%s\"", name );
|
||||||
|
|
||||||
|
@ -309,7 +309,10 @@ Project::create ( const char *name, const char *template_name )
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( chdir( name ) )
|
if ( chdir( name ) )
|
||||||
|
{
|
||||||
FATAL( "WTF? Cannot change to new project directory" );
|
FATAL( "WTF? Cannot change to new project directory" );
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
// mkdir( "sources", 0777 );
|
// mkdir( "sources", 0777 );
|
||||||
creat( "snapshot", 0666 );
|
creat( "snapshot", 0666 );
|
||||||
|
|
|
@ -70,6 +70,8 @@
|
||||||
|
|
||||||
const double NSM_CHECK_INTERVAL = 0.25f;
|
const double NSM_CHECK_INTERVAL = 0.25f;
|
||||||
|
|
||||||
|
const char COPYRIGHT[] = "Copyright (c) 2008-2012 Jonathan Moore Liles";
|
||||||
|
|
||||||
char *user_config_dir;
|
char *user_config_dir;
|
||||||
Mixer *mixer;
|
Mixer *mixer;
|
||||||
NSM_Client *nsm;
|
NSM_Client *nsm;
|
||||||
|
@ -120,7 +122,7 @@ check_sigterm ( void * )
|
||||||
if ( got_sigterm )
|
if ( got_sigterm )
|
||||||
{
|
{
|
||||||
MESSAGE( "Got SIGTERM, quitting..." );
|
MESSAGE( "Got SIGTERM, quitting..." );
|
||||||
mixer->command_quit();
|
mixer->quit();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -128,6 +130,8 @@ int
|
||||||
main ( int argc, char **argv )
|
main ( int argc, char **argv )
|
||||||
{
|
{
|
||||||
|
|
||||||
|
printf( "%s %s %s -- %s\n", APP_TITLE, VERSION, "", COPYRIGHT );
|
||||||
|
|
||||||
#ifdef HAVE_XPM
|
#ifdef HAVE_XPM
|
||||||
fl_open_display();
|
fl_open_display();
|
||||||
Pixmap p, mask;
|
Pixmap p, mask;
|
||||||
|
@ -144,6 +148,8 @@ main ( int argc, char **argv )
|
||||||
ensure_dirs();
|
ensure_dirs();
|
||||||
|
|
||||||
signal( SIGTERM, sigterm_handler );
|
signal( SIGTERM, sigterm_handler );
|
||||||
|
signal( SIGHUP, sigterm_handler );
|
||||||
|
signal( SIGINT, sigterm_handler );
|
||||||
|
|
||||||
Fl_Tooltip::color( FL_BLACK );
|
Fl_Tooltip::color( FL_BLACK );
|
||||||
Fl_Tooltip::textcolor( FL_YELLOW );
|
Fl_Tooltip::textcolor( FL_YELLOW );
|
||||||
|
@ -174,8 +180,6 @@ main ( int argc, char **argv )
|
||||||
|
|
||||||
Fl::lock();
|
Fl::lock();
|
||||||
|
|
||||||
Plugin_Module::spawn_discover_thread();
|
|
||||||
|
|
||||||
Fl_Double_Window *main_window;
|
Fl_Double_Window *main_window;
|
||||||
|
|
||||||
{
|
{
|
||||||
|
@ -198,7 +202,7 @@ main ( int argc, char **argv )
|
||||||
#ifdef HAVE_XPM
|
#ifdef HAVE_XPM
|
||||||
o->icon((char *)p);
|
o->icon((char *)p);
|
||||||
#endif
|
#endif
|
||||||
o->show( argc, argv );
|
o->show( 0, 0 );
|
||||||
}
|
}
|
||||||
|
|
||||||
const char *osc_port = NULL;
|
const char *osc_port = NULL;
|
||||||
|
@ -210,6 +214,7 @@ main ( int argc, char **argv )
|
||||||
|
|
||||||
static struct option long_options[] =
|
static struct option long_options[] =
|
||||||
{
|
{
|
||||||
|
{ "help", no_argument, 0, '?' },
|
||||||
{ "instance", required_argument, 0, 'i' },
|
{ "instance", required_argument, 0, 'i' },
|
||||||
{ "osc-port", required_argument, 0, 'p' },
|
{ "osc-port", required_argument, 0, 'p' },
|
||||||
{ 0, 0, 0, 0 }
|
{ 0, 0, 0, 0 }
|
||||||
|
@ -234,12 +239,14 @@ main ( int argc, char **argv )
|
||||||
instance_override = true;
|
instance_override = true;
|
||||||
break;
|
break;
|
||||||
case '?':
|
case '?':
|
||||||
printf( "Usage: %s [--osc-port portnum]\n\n", argv[0] );
|
printf( "\nUsage: %s [--instance instance_name] [--osc-port portnum] [path_to_project]\n\n", argv[0] );
|
||||||
exit(0);
|
exit(0);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Plugin_Module::spawn_discover_thread();
|
||||||
|
|
||||||
mixer->init_osc( osc_port );
|
mixer->init_osc( osc_port );
|
||||||
|
|
||||||
char *nsm_url = getenv( "NSM_URL" );
|
char *nsm_url = getenv( "NSM_URL" );
|
||||||
|
@ -264,6 +271,9 @@ main ( int argc, char **argv )
|
||||||
{
|
{
|
||||||
if ( optind < argc )
|
if ( optind < argc )
|
||||||
{
|
{
|
||||||
|
MESSAGE( "Waiting for plugins..." );
|
||||||
|
Plugin_Module::join_discover_thread();
|
||||||
|
|
||||||
MESSAGE( "Loading \"%s\"", argv[optind] );
|
MESSAGE( "Loading \"%s\"", argv[optind] );
|
||||||
|
|
||||||
if ( ! mixer->command_load( argv[optind] ) )
|
if ( ! mixer->command_load( argv[optind] ) )
|
||||||
|
|
|
@ -59,6 +59,9 @@ void *Loggable::_progress_callback_arg = NULL;
|
||||||
snapshot_func *Loggable::_snapshot_callback = NULL;
|
snapshot_func *Loggable::_snapshot_callback = NULL;
|
||||||
void *Loggable::_snapshot_callback_arg = NULL;
|
void *Loggable::_snapshot_callback_arg = NULL;
|
||||||
|
|
||||||
|
dirty_func *Loggable::_dirty_callback = NULL;
|
||||||
|
void *Loggable::_dirty_callback_arg = NULL;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
Loggable::~Loggable ( )
|
Loggable::~Loggable ( )
|
||||||
|
@ -213,6 +216,8 @@ Loggable::replay ( FILE *fp )
|
||||||
if ( _progress_callback )
|
if ( _progress_callback )
|
||||||
_progress_callback( 0, _progress_callback_arg );
|
_progress_callback( 0, _progress_callback_arg );
|
||||||
|
|
||||||
|
clear_dirty();
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -511,6 +516,8 @@ Loggable::snapshot ( FILE *fp )
|
||||||
|
|
||||||
_fp = ofp;
|
_fp = ofp;
|
||||||
|
|
||||||
|
clear_dirty();
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -712,7 +719,7 @@ Loggable::log_end ( void )
|
||||||
|
|
||||||
log_print( _old_state, new_state );
|
log_print( _old_state, new_state );
|
||||||
|
|
||||||
++_dirty;
|
set_dirty();
|
||||||
}
|
}
|
||||||
|
|
||||||
delete new_state;
|
delete new_state;
|
||||||
|
@ -730,7 +737,7 @@ Loggable::log_end ( void )
|
||||||
void
|
void
|
||||||
Loggable::log_create ( void ) const
|
Loggable::log_create ( void ) const
|
||||||
{
|
{
|
||||||
++_dirty;
|
set_dirty();
|
||||||
|
|
||||||
if ( ! _fp )
|
if ( ! _fp )
|
||||||
/* replaying, don't bother */
|
/* replaying, don't bother */
|
||||||
|
@ -782,7 +789,7 @@ Loggable::log_destroy ( void ) const
|
||||||
/* the unjournaled state may have changed: make a note of it. */
|
/* the unjournaled state may have changed: make a note of it. */
|
||||||
record_unjournaled();
|
record_unjournaled();
|
||||||
|
|
||||||
++_dirty;
|
set_dirty();
|
||||||
|
|
||||||
if ( ! _fp )
|
if ( ! _fp )
|
||||||
/* tearing down... don't bother */
|
/* tearing down... don't bother */
|
||||||
|
|
|
@ -35,6 +35,7 @@
|
||||||
|
|
||||||
typedef void (progress_func)( int, void * );
|
typedef void (progress_func)( int, void * );
|
||||||
typedef void (snapshot_func)( void * );
|
typedef void (snapshot_func)( void * );
|
||||||
|
typedef void (dirty_func)( int, void * );
|
||||||
|
|
||||||
class Log_Entry;
|
class Log_Entry;
|
||||||
class Loggable;
|
class Loggable;
|
||||||
|
@ -87,6 +88,9 @@ class Loggable
|
||||||
static snapshot_func *_snapshot_callback;
|
static snapshot_func *_snapshot_callback;
|
||||||
static void *_snapshot_callback_arg;
|
static void *_snapshot_callback_arg;
|
||||||
|
|
||||||
|
static dirty_func *_dirty_callback;
|
||||||
|
static void *_dirty_callback_arg;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
|
||||||
static unsigned int _relative_id;
|
static unsigned int _relative_id;
|
||||||
|
@ -132,6 +136,10 @@ private:
|
||||||
|
|
||||||
static bool replay ( FILE *fp );
|
static bool replay ( FILE *fp );
|
||||||
|
|
||||||
|
static void signal_dirty ( int v ) { if ( _dirty_callback ) _dirty_callback( v, _dirty_callback_arg ); }
|
||||||
|
static void set_dirty ( void ) { signal_dirty( ++_dirty ); }
|
||||||
|
static void clear_dirty ( void ) { signal_dirty( _dirty = 0 ); }
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
|
||||||
static bool replay ( const char *name );
|
static bool replay ( const char *name );
|
||||||
|
@ -141,6 +149,8 @@ public:
|
||||||
|
|
||||||
static void snapshot_callback ( snapshot_func *p, void *arg ) { _snapshot_callback = p; _snapshot_callback_arg = arg; }
|
static void snapshot_callback ( snapshot_func *p, void *arg ) { _snapshot_callback = p; _snapshot_callback_arg = arg; }
|
||||||
static void progress_callback ( progress_func *p, void *arg ) { _progress_callback = p; _progress_callback_arg = arg;}
|
static void progress_callback ( progress_func *p, void *arg ) { _progress_callback = p; _progress_callback_arg = arg;}
|
||||||
|
static void dirty_callback ( dirty_func *p, void *arg ) { _dirty_callback = p; _dirty_callback_arg = arg;}
|
||||||
|
|
||||||
static const char *escape ( const char *s );
|
static const char *escape ( const char *s );
|
||||||
|
|
||||||
unsigned int id ( void ) const { return _id; }
|
unsigned int id ( void ) const { return _id; }
|
||||||
|
@ -192,7 +202,6 @@ public:
|
||||||
static bool do_this ( const char *s, bool reverse );
|
static bool do_this ( const char *s, bool reverse );
|
||||||
|
|
||||||
static int dirty ( void ) { return _dirty; }
|
static int dirty ( void ) { return _dirty; }
|
||||||
static void clear_dirty ( void ) { _dirty = 0; }
|
|
||||||
|
|
||||||
void log_create ( void ) const;
|
void log_create ( void ) const;
|
||||||
|
|
||||||
|
|
115
nonlib/Makefile
115
nonlib/Makefile
|
@ -1,115 +0,0 @@
|
||||||
|
|
||||||
###############################################################################
|
|
||||||
# Copyright (C) 2008 Jonathan Moore Liles #
|
|
||||||
# #
|
|
||||||
# This program is free software; you can redistribute it and/or modify it #
|
|
||||||
# under the terms of the GNU General Public License as published by the #
|
|
||||||
# Free Software Foundation; either version 2 of the License, or (at your #
|
|
||||||
# option) any later version. #
|
|
||||||
# #
|
|
||||||
# This program is distributed in the hope that it will be useful, but WITHOUT #
|
|
||||||
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or #
|
|
||||||
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for #
|
|
||||||
# more details. #
|
|
||||||
# #
|
|
||||||
# You should have received a copy of the GNU General Public License along #
|
|
||||||
# with This program; see the file COPYING. If not,write to the Free Software #
|
|
||||||
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. #
|
|
||||||
###############################################################################
|
|
||||||
|
|
||||||
## Makefile for the Non-DAW.
|
|
||||||
|
|
||||||
##
|
|
||||||
## Do not edit this file; run `make config` instead.
|
|
||||||
##
|
|
||||||
|
|
||||||
VERSION := 1.0.0
|
|
||||||
PACKAGE := NONLIB
|
|
||||||
|
|
||||||
all: .config
|
|
||||||
|
|
||||||
.config: configure
|
|
||||||
@ echo '<<< Configuring '$(PACKAGE)
|
|
||||||
@ ./configure
|
|
||||||
|
|
||||||
config:
|
|
||||||
@ echo '<<< Configuring '$(PACKAGE)
|
|
||||||
@ ./configure
|
|
||||||
|
|
||||||
-include .config
|
|
||||||
|
|
||||||
export SYSTEM_PATH:=$(prefix)/share/
|
|
||||||
export DOCUMENT_PATH:=$(prefix)/share/doc/
|
|
||||||
export PIXMAP_PATH:=$(prefix)/share/pixmaps/
|
|
||||||
|
|
||||||
# a bit of a hack to make sure this runs before any rules
|
|
||||||
ifneq ($(CALCULATING),yes)
|
|
||||||
TOTAL := $(shell $(MAKE) CALCULATING=yes -n 2>/dev/null | sed -n 's/^.*Compiling: \([^"]\+\)"/\1/p' > .files )
|
|
||||||
endif
|
|
||||||
|
|
||||||
ifeq ($(USE_DEBUG),yes)
|
|
||||||
CFLAGS := -pipe -ggdb -fno-inline -Wall -Wextra -O0
|
|
||||||
CXXFLAGS := -Wnon-virtual-dtor -Wno-missing-field-initializers -fno-rtti -fno-exceptions
|
|
||||||
else
|
|
||||||
CFLAGS := -pipe -O2 -DNDEBUG
|
|
||||||
CXXFLAGS := -fno-rtti -fno-exceptions
|
|
||||||
endif
|
|
||||||
|
|
||||||
|
|
||||||
CFLAGS+=-DVERSION=\"$(VERSION)\" \
|
|
||||||
-DINSTALL_PREFIX=\"$(prefix)\" \
|
|
||||||
-DSYSTEM_PATH=\"$(SYSTEM_PATH)\" \
|
|
||||||
-DDOCUMENT_PATH=\"$(DOCUMENT_PATH)\" \
|
|
||||||
-DPIXMAP_PATH=\"$(PIXMAP_PATH)\"
|
|
||||||
|
|
||||||
CXXFLAGS := $(CFLAGS) $(CXXFLAGS)
|
|
||||||
|
|
||||||
INCLUDES := -I. -Iutil -IFL -Inonlib
|
|
||||||
|
|
||||||
include scripts/colors
|
|
||||||
|
|
||||||
ifneq ($(CALCULATING),yes)
|
|
||||||
COMPILING="$(BOLD)$(BLACK)NONLIB [$(SGR0)$(CYAN)`scripts/percent-complete .files "$<"`$(SGR0)$(BOLD)$(BLACK)]$(SGR0) $(BOLD)$(YELLOW)$<$(SGR0)"
|
|
||||||
else
|
|
||||||
COMPILING="Compiling: $<"
|
|
||||||
endif
|
|
||||||
|
|
||||||
.C.o:
|
|
||||||
@ echo $(COMPILING)
|
|
||||||
@ $(CXX) $(CXXFLAGS) $(INCLUDES) -c $< -o $@
|
|
||||||
|
|
||||||
%.C : %.fl
|
|
||||||
@ cd `dirname $<` && fluid -c ../$<
|
|
||||||
|
|
||||||
DONE := $(BOLD)$(GREEN)done$(SGR0)
|
|
||||||
|
|
||||||
include makefile.inc
|
|
||||||
|
|
||||||
SRCS:=$(nonlib_SRCS)
|
|
||||||
OBJS:=$(nonlib_OBJS)
|
|
||||||
CXXFLAGS += $(nonlib_CFLAGS)
|
|
||||||
|
|
||||||
# FIXME: isn't there a better way?
|
|
||||||
$(OBJS): .config Makefile
|
|
||||||
|
|
||||||
TAGS: $(SRCS)
|
|
||||||
etags $(SRCS)
|
|
||||||
|
|
||||||
.deps: .config $(SRCS)
|
|
||||||
ifneq ($(CALCULATING),yes)
|
|
||||||
@ echo -n Calculating dependencies...
|
|
||||||
@ makedepend -f- -- $(CXXFLAGS) $(INCLUDES) -- $(SRCS) 2>/dev/null > .deps && echo $(DONE)
|
|
||||||
@ # gcc -M $(CXXFLAGS) $(INCLUDES) $(SRCS) > .deps && echo $(DONE)
|
|
||||||
endif
|
|
||||||
|
|
||||||
clean_deps:
|
|
||||||
@ rm -f .deps
|
|
||||||
|
|
||||||
.PHONEY: clean config depend clean_deps
|
|
||||||
|
|
||||||
install:
|
|
||||||
@ echo ...
|
|
||||||
|
|
||||||
clean: nonlib_clean
|
|
||||||
|
|
||||||
-include .deps
|
|
|
@ -0,0 +1 @@
|
||||||
|
scripts/Makefile
|
|
@ -24,6 +24,7 @@
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
|
#include <sys/vfs.h>
|
||||||
|
|
||||||
unsigned long
|
unsigned long
|
||||||
modification_time ( const char *file )
|
modification_time ( const char *file )
|
||||||
|
@ -182,25 +183,25 @@ read_line ( const char *dir, const char *name, char **value )
|
||||||
#include <sys/statvfs.h>
|
#include <sys/statvfs.h>
|
||||||
|
|
||||||
/** return the number of blocks free on filesystem containing file named /file/ */
|
/** return the number of blocks free on filesystem containing file named /file/ */
|
||||||
unsigned long
|
fsblkcnt_t
|
||||||
free_space ( const char *file )
|
free_space ( const char *file )
|
||||||
{
|
{
|
||||||
struct statvfs st;
|
struct statfs st;
|
||||||
memset( &st, 0, sizeof( st ) );
|
memset( &st, 0, sizeof( st ) );
|
||||||
|
|
||||||
statvfs( file, &st );
|
statfs( file, &st );
|
||||||
|
|
||||||
return st.f_bfree;
|
return st.f_bavail;
|
||||||
}
|
}
|
||||||
|
|
||||||
/** return the total number of blocks on filesystem containing file named /file/ */
|
/** return the total number of blocks on filesystem containing file named /file/ */
|
||||||
unsigned long
|
fsblkcnt_t
|
||||||
total_space ( const char *file )
|
total_space ( const char *file )
|
||||||
{
|
{
|
||||||
struct statvfs st;
|
struct statfs st;
|
||||||
memset( &st, 0, sizeof( st ) );
|
memset( &st, 0, sizeof( st ) );
|
||||||
|
|
||||||
statvfs( file, &st );
|
statfs( file, &st );
|
||||||
|
|
||||||
return st.f_blocks;
|
return st.f_blocks;
|
||||||
}
|
}
|
||||||
|
@ -209,7 +210,10 @@ total_space ( const char *file )
|
||||||
int
|
int
|
||||||
percent_used ( const char *file )
|
percent_used ( const char *file )
|
||||||
{
|
{
|
||||||
const size_t ts = total_space( file );
|
const double ts = total_space( file );
|
||||||
|
const double fs = free_space( file );
|
||||||
|
|
||||||
return 100 - ( ts ? free_space( file ) * 100 / ts : 0 );
|
double percent_free = ( ( fs / ts ) * 100.0f );
|
||||||
|
|
||||||
|
return (int) (100.0f - percent_free);
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,19 +1,25 @@
|
||||||
# -*- mode: makefile; -*-
|
# -*- mode: makefile; -*-
|
||||||
|
|
||||||
nonlib_SRCS := $(wildcard nonlib/*.C nonlib/JACK/*.C nonlib/LASH/*.C nonlib/OSC/*.C nonlib/NSM/*.C)
|
VERSION := 1.1.0
|
||||||
|
PACKAGE := NONLIB
|
||||||
|
|
||||||
nonlib_SRCS:=$(sort $(nonlib_SRCS))
|
SRCS := $(wildcard nonlib/*.C nonlib/JACK/*.C nonlib/LASH/*.C nonlib/OSC/*.C nonlib/NSM/*.C)
|
||||||
nonlib_OBJS:=$(nonlib_SRCS:.C=.o)
|
|
||||||
|
|
||||||
nonlib_CFLAGS := $(SIGCPP_CFLAGS) $(LIBLO_CFLAGS) $(JACK_CFLAGS)
|
SRCS:=$(sort $(SRCS))
|
||||||
|
OBJS:=$(SRCS:.C=.o)
|
||||||
|
|
||||||
|
CFLAGS := $(SIGCPP_CFLAGS) $(LIBLO_CFLAGS) $(JACK_CFLAGS)
|
||||||
|
|
||||||
all: nonlib/libnonlib.a
|
all: nonlib/libnonlib.a
|
||||||
|
|
||||||
nonlib/libnonlib.a: $(nonlib_OBJS)
|
nonlib/libnonlib.a: $(OBJS)
|
||||||
@ ar rcs $@ $(nonlib_OBJS)
|
@ ar rcs $@ $(OBJS)
|
||||||
|
|
||||||
.PHONEY: nonlib
|
.PHONEY: nonlib
|
||||||
nonlib: nonlib/libnonlib.a
|
nonlib: nonlib/libnonlib.a
|
||||||
|
|
||||||
nonlib_clean:
|
clean:
|
||||||
rm -f $(nonlib_OBJS) nonlib/libnonlib.a
|
rm -f $(OBJS) nonlib/libnonlib.a
|
||||||
|
|
||||||
|
install:
|
||||||
|
@
|
|
@ -0,0 +1,119 @@
|
||||||
|
|
||||||
|
###############################################################################
|
||||||
|
# Copyright (C) 2008 Jonathan Moore Liles #
|
||||||
|
# #
|
||||||
|
# This program is free software; you can redistribute it and/or modify it #
|
||||||
|
# under the terms of the GNU General Public License as published by the #
|
||||||
|
# Free Software Foundation; either version 2 of the License, or (at your #
|
||||||
|
# option) any later version. #
|
||||||
|
# #
|
||||||
|
# This program is distributed in the hope that it will be useful, but WITHOUT #
|
||||||
|
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or #
|
||||||
|
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for #
|
||||||
|
# more details. #
|
||||||
|
# #
|
||||||
|
# You should have received a copy of the GNU General Public License along #
|
||||||
|
# with This program; see the file COPYING. If not,write to the Free Software #
|
||||||
|
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. #
|
||||||
|
###############################################################################
|
||||||
|
|
||||||
|
## Makefile for the Non-DAW.
|
||||||
|
|
||||||
|
##
|
||||||
|
## Do not edit this file; run `make config` instead.
|
||||||
|
##
|
||||||
|
|
||||||
|
|
||||||
|
all: .config
|
||||||
|
|
||||||
|
.config: configure
|
||||||
|
@ echo '<<< Configuring '$(PACKAGE)
|
||||||
|
@ ./configure
|
||||||
|
|
||||||
|
config:
|
||||||
|
@ echo '<<< Configuring '$(PACKAGE)
|
||||||
|
@ ./configure
|
||||||
|
|
||||||
|
-include .config
|
||||||
|
|
||||||
|
export SYSTEM_PATH:=$(prefix)/share/
|
||||||
|
export DOCUMENT_PATH:=$(prefix)/share/doc/
|
||||||
|
export PIXMAP_PATH:=$(prefix)/share/pixmaps/
|
||||||
|
export ICON_PATH:=$(prefix)/share/icons/
|
||||||
|
export DESKTOP_PATH:=$(prefix)/share/applications/
|
||||||
|
|
||||||
|
# a bit of a hack to make sure this runs before any rules
|
||||||
|
ifneq ($(CALCULATING),yes)
|
||||||
|
TOTAL := $(shell $(MAKE) CALCULATING=yes -n 2>/dev/null | sed -n 's/^.*Compiling: \([^"]\+\)"/\1/p' > .files )
|
||||||
|
endif
|
||||||
|
|
||||||
|
ifeq ($(USE_DEBUG),yes)
|
||||||
|
CFLAGS := -pipe -ggdb -fno-inline -Wall -Wextra -O0
|
||||||
|
CXXFLAGS := -Wnon-virtual-dtor -Wno-missing-field-initializers -fno-rtti -fno-exceptions
|
||||||
|
else
|
||||||
|
CFLAGS := -pipe -O2 -DNDEBUG
|
||||||
|
CXXFLAGS := -fno-rtti -fno-exceptions
|
||||||
|
endif
|
||||||
|
|
||||||
|
# include FL/makefile.inc
|
||||||
|
include makefile.inc
|
||||||
|
|
||||||
|
CFLAGS+=-DVERSION=\"$(VERSION)\" \
|
||||||
|
-DINSTALL_PREFIX=\"$(prefix)\" \
|
||||||
|
-DSYSTEM_PATH=\"$(SYSTEM_PATH)\" \
|
||||||
|
-DDOCUMENT_PATH=\"$(DOCUMENT_PATH)\" \
|
||||||
|
-DPIXMAP_PATH=\"$(PIXMAP_PATH)\"
|
||||||
|
|
||||||
|
CXXFLAGS := $(CFLAGS) $(CXXFLAGS)
|
||||||
|
|
||||||
|
INCLUDES := -I. -Iutil -IFL -Inonlib
|
||||||
|
|
||||||
|
include scripts/colors
|
||||||
|
|
||||||
|
SPACE+="
`tput cuf 20`"
|
||||||
|
|
||||||
|
ifneq ($(CALCULATING),yes)
|
||||||
|
COMPILING="$(BOLD)$(BLACK)$(PACKAGE)$(SPACE)$(SGR0)$(CYAN)`scripts/percent-complete .files "$<"`$(SGR0)$(BOLD)$(BLACK)]$(SGR0) $(BOLD)$(CYAN)$<$(SGR0)"
|
||||||
|
else
|
||||||
|
COMPILING="Compiling: $<"
|
||||||
|
endif
|
||||||
|
|
||||||
|
.C.o:
|
||||||
|
@ echo $(COMPILING)
|
||||||
|
@ $(CXX) $(CXXFLAGS) $(INCLUDES) -c $< -o $@
|
||||||
|
|
||||||
|
%.C : %.fl
|
||||||
|
@ cd `dirname $<` && fluid -c ../$<
|
||||||
|
|
||||||
|
DONE := $(BOLD)$(GREEN)done$(SGR0)
|
||||||
|
|
||||||
|
|
||||||
|
# SRCS:=$(Timeline_SRCS)
|
||||||
|
# OBJS:=$(Timeline_OBJS)
|
||||||
|
# CXXFLAGS += $(Timeline_CFLAGS)
|
||||||
|
|
||||||
|
# FIXME: isn't there a better way?
|
||||||
|
$(OBJS): .config Makefile
|
||||||
|
|
||||||
|
TAGS: $(SRCS)
|
||||||
|
etags $(SRCS)
|
||||||
|
|
||||||
|
.deps: .config $(SRCS)
|
||||||
|
ifneq ($(CALCULATING),yes)
|
||||||
|
@ echo -n Calculating dependencies...
|
||||||
|
@ makedepend -f- -- $(CXXFLAGS) $(INCLUDES) -- $(SRCS) 2>/dev/null > .deps && echo $(DONE)
|
||||||
|
@ # gcc -M $(CXXFLAGS) $(INCLUDES) $(SRCS) > .deps && echo $(DONE)
|
||||||
|
endif
|
||||||
|
|
||||||
|
clean_deps:
|
||||||
|
@ rm -f .deps
|
||||||
|
|
||||||
|
.PHONEY: clean config depend clean_deps
|
||||||
|
|
||||||
|
dist:
|
||||||
|
git archive --prefix=${BIN_NAME}-$(VERSION)/ v$(VERSION) | bzip2 > ${BIN_NAME}-$(VERSION).tar.bz2
|
||||||
|
|
||||||
|
scan-gpl:
|
||||||
|
@ scripts/scan-gpl $(SRCS) || echo $(BOLD)$(RED)Some source files do not contain proper license information!
|
||||||
|
|
||||||
|
-include .deps
|
|
@ -344,6 +344,11 @@ version_of ()
|
||||||
echo `pkg-config --modversion $1`
|
echo `pkg-config --modversion $1`
|
||||||
}
|
}
|
||||||
|
|
||||||
|
hostname_resolvable ()
|
||||||
|
{
|
||||||
|
ping -c1 `hostname` >/dev/null 2>/dev/null
|
||||||
|
}
|
||||||
|
|
||||||
require_FLTK ()
|
require_FLTK ()
|
||||||
{
|
{
|
||||||
local use
|
local use
|
||||||
|
|
|
@ -1,145 +0,0 @@
|
||||||
|
|
||||||
###############################################################################
|
|
||||||
# Copyright (C) 2008 Jonathan Moore Liles #
|
|
||||||
# #
|
|
||||||
# This program is free software; you can redistribute it and/or modify it #
|
|
||||||
# under the terms of the GNU General Public License as published by the #
|
|
||||||
# Free Software Foundation; either version 2 of the License, or (at your #
|
|
||||||
# option) any later version. #
|
|
||||||
# #
|
|
||||||
# This program is distributed in the hope that it will be useful, but WITHOUT #
|
|
||||||
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or #
|
|
||||||
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for #
|
|
||||||
# more details. #
|
|
||||||
# #
|
|
||||||
# You should have received a copy of the GNU General Public License along #
|
|
||||||
# with This program; see the file COPYING. If not,write to the Free Software #
|
|
||||||
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. #
|
|
||||||
###############################################################################
|
|
||||||
|
|
||||||
## Makefile for the Non-DAW.
|
|
||||||
|
|
||||||
##
|
|
||||||
## Do not edit this file; run `make config` instead.
|
|
||||||
##
|
|
||||||
|
|
||||||
VERSION := 1.0.0
|
|
||||||
PACKAGE := SESSION_MANAGER
|
|
||||||
|
|
||||||
all: .config
|
|
||||||
|
|
||||||
.config: configure
|
|
||||||
@ echo '<<< Configuring '$(PACKAGE)
|
|
||||||
@ ./configure
|
|
||||||
|
|
||||||
config:
|
|
||||||
@ echo '<<< Configuring '$(PACKAGE)
|
|
||||||
@ ./configure
|
|
||||||
|
|
||||||
-include .config
|
|
||||||
|
|
||||||
export SYSTEM_PATH:=$(prefix)/share/
|
|
||||||
export DOCUMENT_PATH:=$(prefix)/share/doc/
|
|
||||||
export PIXMAP_PATH:=$(prefix)/share/pixmaps/
|
|
||||||
export ICON_PATH:=$(prefix)/share/icons/
|
|
||||||
export DESKTOP_PATH:=$(prefix)/share/applications/
|
|
||||||
|
|
||||||
# a bit of a hack to make sure this runs before any rules
|
|
||||||
ifneq ($(CALCULATING),yes)
|
|
||||||
TOTAL := $(shell $(MAKE) CALCULATING=yes -n 2>/dev/null | sed -n 's/^.*Compiling: \([^"]\+\)"/\1/p' > .files )
|
|
||||||
endif
|
|
||||||
|
|
||||||
ifeq ($(USE_DEBUG),yes)
|
|
||||||
CFLAGS := -pipe -ggdb -fno-inline -Wall -Wextra -O0
|
|
||||||
CXXFLAGS := -Wnon-virtual-dtor -Wno-missing-field-initializers -fno-rtti -fno-exceptions
|
|
||||||
else
|
|
||||||
CFLAGS := -pipe -O2 -DNDEBUG
|
|
||||||
CXXFLAGS := -fno-rtti -fno-exceptions
|
|
||||||
endif
|
|
||||||
|
|
||||||
|
|
||||||
CFLAGS+=-DVERSION=\"$(VERSION)\" \
|
|
||||||
-DINSTALL_PREFIX=\"$(prefix)\" \
|
|
||||||
-DSYSTEM_PATH=\"$(SYSTEM_PATH)\" \
|
|
||||||
-DDOCUMENT_PATH=\"$(DOCUMENT_PATH)\" \
|
|
||||||
-DPIXMAP_PATH=\"$(PIXMAP_PATH)\"
|
|
||||||
|
|
||||||
CXXFLAGS := $(CFLAGS) $(CXXFLAGS)
|
|
||||||
|
|
||||||
INCLUDES := -I. -Iutil -IFL -Inonlib
|
|
||||||
|
|
||||||
include scripts/colors
|
|
||||||
|
|
||||||
ifneq ($(CALCULATING),yes)
|
|
||||||
COMPILING="$(BOLD)$(BLACK)${PACKAGE} [$(SGR0)$(CYAN)`scripts/percent-complete .files "$<"`$(SGR0)$(BOLD)$(BLACK)]$(SGR0) $(BOLD)$(YELLOW)$<$(SGR0)"
|
|
||||||
else
|
|
||||||
COMPILING="Compiling: $<"
|
|
||||||
endif
|
|
||||||
|
|
||||||
.C.o:
|
|
||||||
@ echo $(COMPILING)
|
|
||||||
@ $(CXX) $(CXXFLAGS) $(INCLUDES) -c $< -o $@
|
|
||||||
|
|
||||||
%.C : %.fl
|
|
||||||
@ cd `dirname $<` && fluid -c ../$<
|
|
||||||
|
|
||||||
DONE := $(BOLD)$(GREEN)done$(SGR0)
|
|
||||||
|
|
||||||
include FL/makefile.inc
|
|
||||||
#include nonlib/makefile.inc
|
|
||||||
include makefile.inc
|
|
||||||
|
|
||||||
SRCS:=$(Session_SRCS)
|
|
||||||
OBJS:=$(Session_OBJS)
|
|
||||||
CXXFLAGS += $(Session_CFLAGS)
|
|
||||||
|
|
||||||
# FIXME: isn't there a better way?
|
|
||||||
$(OBJS): .config Makefile
|
|
||||||
|
|
||||||
TAGS: $(SRCS)
|
|
||||||
etags $(SRCS)
|
|
||||||
|
|
||||||
.deps: .config $(SRCS)
|
|
||||||
ifneq ($(CALCULATING),yes)
|
|
||||||
@ echo -n Calculating dependencies...
|
|
||||||
@ makedepend -f- -- $(CXXFLAGS) $(INCLUDES) -- $(SRCS) 2>/dev/null > .deps && echo $(DONE)
|
|
||||||
@ # gcc -M $(CXXFLAGS) $(INCLUDES) $(SRCS) > .deps && echo $(DONE)
|
|
||||||
endif
|
|
||||||
|
|
||||||
|
|
||||||
install: all
|
|
||||||
@ echo -n "Installing..."
|
|
||||||
@ install src/nsmd "$(DESTDIR)$(prefix)"/bin/nsmd
|
|
||||||
@ install src/session-manager "$(DESTDIR)$(prefix)"/bin/non-session-manager
|
|
||||||
@ install src/jackpatch "$(DESTDIR)$(prefix)"/bin/jackpatch
|
|
||||||
@ mkdir -p "$(DESTDIR)$(SYSTEM_PATH)"/non-session-manager
|
|
||||||
@ $(MAKE) -s -C doc install
|
|
||||||
@ install -d "$(DESTDIR)$(PIXMAP_PATH)/non-session-manager"
|
|
||||||
@ install -m 644 icons/hicolor/256x256/apps/non-session-manager.png "$(DESTDIR)$(PIXMAP_PATH)"/non-session-manager/icon-256x256.png
|
|
||||||
@ install -d "$(DESTDIR)$(ICON_PATH)/hicolor"
|
|
||||||
@ cp -au icons/hicolor/ "$(DESTDIR)$(ICON_PATH)"
|
|
||||||
@ install -d "$(DESTDIR)$(DESKTOP_PATH)"
|
|
||||||
@ sed 's:@BIN_PATH@:$(prefix)/bin:' non-session-manager.desktop.in > "$(DESTDIR)$(DESKTOP_PATH)/non-session-manager.desktop"
|
|
||||||
@ echo "$(DONE)"
|
|
||||||
ifneq ($(USE_DEBUG),yes)
|
|
||||||
@ echo -n "Stripping..."
|
|
||||||
@ strip "$(DESTDIR)$(prefix)"/bin/jackpatch
|
|
||||||
@ strip "$(DESTDIR)$(prefix)"/bin/nsmd
|
|
||||||
@ strip "$(DESTDIR)$(prefix)"/bin/non-session-manager
|
|
||||||
@ echo "$(DONE)"
|
|
||||||
endif
|
|
||||||
|
|
||||||
clean_deps:
|
|
||||||
@ rm -f .deps
|
|
||||||
|
|
||||||
.PHONEY: clean config depend clean_deps
|
|
||||||
|
|
||||||
clean: Session_clean
|
|
||||||
|
|
||||||
dist:
|
|
||||||
git archive --prefix=non-session-$(VERSION)/ v$(VERSION) | bzip2 > non-session-$(VERSION).tar.bz2
|
|
||||||
|
|
||||||
scan-gpl:
|
|
||||||
@ scripts/scan-gpl $(SRCS) || echo $(BOLD)$(RED)Some source files do not contain proper license information!
|
|
||||||
|
|
||||||
-include .deps
|
|
|
@ -0,0 +1 @@
|
||||||
|
scripts/Makefile
|
|
@ -26,3 +26,16 @@ suggest_package XPM 2.0.0 xpm
|
||||||
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"
|
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
|
end
|
||||||
|
|
||||||
|
if ! hostname_resolvable
|
||||||
|
then
|
||||||
|
echo "Your hostname \"$(hostname)\" does not resolve to a valid address."
|
||||||
|
echo "This is a broken configuration and will cause liblo (the"
|
||||||
|
echo "OSC library) to fail to function. Add the line:"
|
||||||
|
echo
|
||||||
|
echo "127.0.0.1 $(hostname)"
|
||||||
|
echo
|
||||||
|
echo "to your /etc/hosts file to fix. And consider switching to a saner distribution."
|
||||||
|
echo
|
||||||
|
fail "Invalid hostname!"
|
||||||
|
fi
|
||||||
|
|
|
@ -1,32 +1,60 @@
|
||||||
# -*- mode: makefile; -*-
|
# -*- mode: makefile; -*-
|
||||||
|
|
||||||
|
VERSION := 1.0.0
|
||||||
|
PACKAGE := SESSION_MANAGER
|
||||||
|
BIN_NAME := non-session-manager
|
||||||
|
|
||||||
all: Session
|
all: Session
|
||||||
|
|
||||||
Session_SRCS := $(wildcard src/*.C src/*.fl)
|
SRCS := $(wildcard src/*.C src/*.fl)
|
||||||
# Session_SRCS += util/debug.C util/Thread.C util/file.C
|
# SRCS += util/debug.C util/Thread.C util/file.C
|
||||||
|
|
||||||
Session_SRCS:=$(Session_SRCS:.fl=.C)
|
SRCS:=$(SRCS:.fl=.C)
|
||||||
Session_SRCS:=$(sort $(Session_SRCS))
|
SRCS:=$(sort $(SRCS))
|
||||||
Session_OBJS:=$(Session_SRCS:.C=.o)
|
OBJS:=$(SRCS:.C=.o)
|
||||||
|
|
||||||
Session_LIBS := $(LIBLO_LIBS) $(SIGCPP_LIBS)
|
LIBS := $(LIBLO_LIBS) $(SIGCPP_LIBS)
|
||||||
Session_CFLAGS := $(LIBLO_CFLAGS) $(SIGCPP_CFLAGS) $(XPM_CFLAGS) $(FLTK_CLFAGS)
|
CFLAGS := $(LIBLO_CFLAGS) $(SIGCPP_CFLAGS) $(XPM_CFLAGS) $(FLTK_CFLAGS)
|
||||||
|
|
||||||
src/nsmd: src/nsmd.o nonlib/libnonlib.a
|
src/nsmd: src/nsmd.o nonlib/libnonlib.a
|
||||||
@ echo -n Linking session handler.
|
@ echo -n Linking session handler.
|
||||||
@ $(CXX) $(CXXFLAGS) $(Session_LIBS) src/nsmd.o -o $@ -Lnonlib -lnonlib && echo $(DONE)
|
@ $(CXX) $(CXXFLAGS) $(LIBS) src/nsmd.o -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
|
||||||
@ echo -n Linking session handler.
|
@ echo -n Linking session handler.
|
||||||
@ $(CXX) $(CXXFLAGS) $(FLTK_LIBS) $(XPM_LIBS) $(Session_LIBS) src/session-manager.o -o $@ -Lnonlib -lnonlib && echo $(DONE)
|
@ $(CXX) $(CXXFLAGS) $(FLTK_LIBS) $(XPM_LIBS) $(LIBS) src/session-manager.o -o $@ -LFL -lfl_widgets -Lnonlib -lnonlib && echo $(DONE)
|
||||||
|
|
||||||
src/send_osc: src/send_osc.o nonlib/libnonlib.a
|
src/send_osc: src/send_osc.o nonlib/libnonlib.a
|
||||||
@ $(CXX) $(CXXFLAGS) $(Session_LIBS) src/send_osc.o -o $@ -Lnonlib -lnonlib && echo $(DONE)
|
@ $(CXX) $(CXXFLAGS) $(LIBS) src/send_osc.o -o $@ -Lnonlib -lnonlib && echo $(DONE)
|
||||||
|
|
||||||
src/jackpatch: src/jackpatch.o
|
src/jackpatch: src/jackpatch.o
|
||||||
@ $(CXX) $(CXXFLAGS) $(JACK_LIBS) $(LIBLO_LIBS) src/jackpatch.o -o $@ && echo $(DONE)
|
@ $(CXX) $(CXXFLAGS) $(JACK_LIBS) $(LIBLO_LIBS) src/jackpatch.o -o $@ && echo $(DONE)
|
||||||
|
|
||||||
Session: src/send_osc src/nsmd src/session-manager src/jackpatch
|
Session: src/send_osc src/nsmd src/session-manager src/jackpatch
|
||||||
|
|
||||||
Session_clean:
|
clean:
|
||||||
rm -f $(Session_OBJS) src/nsmd src/session-manager src/jackpatch
|
rm -f $(OBJS) src/nsmd src/session-manager src/jackpatch
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
install: all
|
||||||
|
@ echo -n "Installing..."
|
||||||
|
@ install src/nsmd "$(DESTDIR)$(prefix)"/bin/nsmd
|
||||||
|
@ install src/session-manager "$(DESTDIR)$(prefix)"/bin/non-session-manager
|
||||||
|
@ install src/jackpatch "$(DESTDIR)$(prefix)"/bin/jackpatch
|
||||||
|
@ mkdir -p "$(DESTDIR)$(SYSTEM_PATH)"/non-session-manager
|
||||||
|
@ $(MAKE) -s -C doc install
|
||||||
|
@ install -d "$(DESTDIR)$(PIXMAP_PATH)/non-session-manager"
|
||||||
|
@ install -m 644 icons/hicolor/256x256/apps/non-session-manager.png "$(DESTDIR)$(PIXMAP_PATH)"/non-session-manager/icon-256x256.png
|
||||||
|
@ install -d "$(DESTDIR)$(ICON_PATH)/hicolor"
|
||||||
|
@ cp -au icons/hicolor/ "$(DESTDIR)$(ICON_PATH)"
|
||||||
|
@ install -d "$(DESTDIR)$(DESKTOP_PATH)"
|
||||||
|
@ sed 's:@BIN_PATH@:$(prefix)/bin:' non-session-manager.desktop.in > "$(DESTDIR)$(DESKTOP_PATH)/non-session-manager.desktop"
|
||||||
|
@ echo "$(DONE)"
|
||||||
|
ifneq ($(USE_DEBUG),yes)
|
||||||
|
@ echo -n "Stripping..."
|
||||||
|
@ strip "$(DESTDIR)$(prefix)"/bin/jackpatch
|
||||||
|
@ strip "$(DESTDIR)$(prefix)"/bin/nsmd
|
||||||
|
@ strip "$(DESTDIR)$(prefix)"/bin/non-session-manager
|
||||||
|
@ echo "$(DONE)"
|
||||||
|
endif
|
||||||
|
|
|
@ -448,7 +448,7 @@ die ( void )
|
||||||
void
|
void
|
||||||
set_traps ( void )
|
set_traps ( void )
|
||||||
{
|
{
|
||||||
// signal( SIGHUP, signal_handler );
|
signal( SIGHUP, signal_handler );
|
||||||
signal( SIGINT, signal_handler );
|
signal( SIGINT, signal_handler );
|
||||||
// signal( SIGQUIT, signal_handler );
|
// signal( SIGQUIT, signal_handler );
|
||||||
// signal( SIGSEGV, signal_handler );
|
// signal( SIGSEGV, signal_handler );
|
||||||
|
|
|
@ -1608,6 +1608,9 @@ OSC_HANDLER( is_dirty )
|
||||||
|
|
||||||
Client *c = get_client_by_address( lo_message_get_source( msg ) );
|
Client *c = get_client_by_address( lo_message_get_source( msg ) );
|
||||||
|
|
||||||
|
if ( ! c )
|
||||||
|
return 0;
|
||||||
|
|
||||||
c->dirty = 1;
|
c->dirty = 1;
|
||||||
|
|
||||||
if ( gui_is_active )
|
if ( gui_is_active )
|
||||||
|
@ -1622,6 +1625,9 @@ OSC_HANDLER( is_clean )
|
||||||
|
|
||||||
Client *c = get_client_by_address( lo_message_get_source( msg ) );
|
Client *c = get_client_by_address( lo_message_get_source( msg ) );
|
||||||
|
|
||||||
|
if ( ! c )
|
||||||
|
return 0;
|
||||||
|
|
||||||
c->dirty = 0;
|
c->dirty = 0;
|
||||||
|
|
||||||
if ( gui_is_active )
|
if ( gui_is_active )
|
||||||
|
@ -1635,6 +1641,9 @@ OSC_HANDLER( message )
|
||||||
{
|
{
|
||||||
Client *c = get_client_by_address( lo_message_get_source( msg ) );
|
Client *c = get_client_by_address( lo_message_get_source( msg ) );
|
||||||
|
|
||||||
|
if ( ! c )
|
||||||
|
return 0;
|
||||||
|
|
||||||
if ( gui_is_active )
|
if ( gui_is_active )
|
||||||
osc_server->send( gui_addr, "/nsm/gui/client/message", c->client_id, argv[0]->i, &argv[1]->s );
|
osc_server->send( gui_addr, "/nsm/gui/client/message", c->client_id, argv[0]->i, &argv[1]->s );
|
||||||
|
|
||||||
|
@ -1650,6 +1659,12 @@ OSC_HANDLER( error )
|
||||||
{
|
{
|
||||||
Client *c = get_client_by_address( lo_message_get_source( msg ) );
|
Client *c = get_client_by_address( lo_message_get_source( msg ) );
|
||||||
|
|
||||||
|
if ( ! c )
|
||||||
|
{
|
||||||
|
WARNING( "Error from unknown client" );
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
// const char *rpath = &argv[0]->s;
|
// const char *rpath = &argv[0]->s;
|
||||||
|
|
||||||
int err_code = argv[1]->i;
|
int err_code = argv[1]->i;
|
||||||
|
|
|
@ -47,6 +47,9 @@
|
||||||
|
|
||||||
#define APP_NAME "Non Session Manager"
|
#define APP_NAME "Non Session Manager"
|
||||||
|
|
||||||
|
#include "FL/Crystal_Boxtypes.H"
|
||||||
|
#include "FL/Gleam_Boxtypes.H"
|
||||||
|
#include "FL/color_scheme.H"
|
||||||
|
|
||||||
#ifdef HAVE_XPM
|
#ifdef HAVE_XPM
|
||||||
#include "FL/Fl.H"
|
#include "FL/Fl.H"
|
||||||
|
@ -127,7 +130,7 @@ public:
|
||||||
{
|
{
|
||||||
_remove_button->show();
|
_remove_button->show();
|
||||||
_restart_button->show();
|
_restart_button->show();
|
||||||
color( FL_RED );
|
color( fl_darker( FL_RED ) );
|
||||||
redraw();
|
redraw();
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
@ -153,14 +156,14 @@ public:
|
||||||
|
|
||||||
if ( ! strcmp( command, "ready" ) )
|
if ( ! strcmp( command, "ready" ) )
|
||||||
{
|
{
|
||||||
color( FL_GREEN );
|
color( fl_darker( FL_GREEN ) );
|
||||||
// _progress->value( 0.0f );
|
// _progress->value( 0.0f );
|
||||||
}
|
}
|
||||||
else if ( ! strcmp( command, "quit" ) ||
|
else if ( ! strcmp( command, "quit" ) ||
|
||||||
! strcmp( command, "kill" ) ||
|
! strcmp( command, "kill" ) ||
|
||||||
! strcmp( command, "error" ) )
|
! strcmp( command, "error" ) )
|
||||||
{
|
{
|
||||||
color( FL_RED );
|
color( fl_darker( FL_RED ) );
|
||||||
}
|
}
|
||||||
else if ( ! strcmp( command, "stopped" ) )
|
else if ( ! strcmp( command, "stopped" ) )
|
||||||
{
|
{
|
||||||
|
@ -168,7 +171,7 @@ public:
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
color( FL_YELLOW );
|
color( fl_darker( FL_YELLOW ) );
|
||||||
}
|
}
|
||||||
|
|
||||||
redraw();
|
redraw();
|
||||||
|
@ -222,7 +225,7 @@ public:
|
||||||
_client_id = NULL;
|
_client_id = NULL;
|
||||||
|
|
||||||
align( FL_ALIGN_LEFT | FL_ALIGN_INSIDE );
|
align( FL_ALIGN_LEFT | FL_ALIGN_INSIDE );
|
||||||
color( FL_RED );
|
color( fl_darker( FL_RED ) );
|
||||||
box( FL_UP_BOX );
|
box( FL_UP_BOX );
|
||||||
|
|
||||||
{ Fl_Progress *o = _progress = new Fl_Progress( ( X + W ) - ( W / 4) - 20, Y + 5, ( W / 4 ), H - 10, NULL );
|
{ Fl_Progress *o = _progress = new Fl_Progress( ( X + W ) - ( W / 4) - 20, Y + 5, ( W / 4 ), H - 10, NULL );
|
||||||
|
@ -355,6 +358,9 @@ public:
|
||||||
|
|
||||||
/* strip out formatting codes */
|
/* strip out formatting codes */
|
||||||
|
|
||||||
|
if ( !name )
|
||||||
|
return;
|
||||||
|
|
||||||
foreach_daemon ( d )
|
foreach_daemon ( d )
|
||||||
{
|
{
|
||||||
osc->send( (*d)->addr, "/nsm/server/open", index( name, ' ' ) + 1 );
|
osc->send( (*d)->addr, "/nsm/server/open", index( name, ' ' ) + 1 );
|
||||||
|
@ -659,6 +665,7 @@ public:
|
||||||
{
|
{
|
||||||
Fl_Pack *o = clients_pack = new Fl_Pack( X + ( W / 3 ), Y + 50, ( W / 3 ) * 2, H - 50 );
|
Fl_Pack *o = clients_pack = new Fl_Pack( X + ( W / 3 ), Y + 50, ( W / 3 ) * 2, H - 50 );
|
||||||
o->align( FL_ALIGN_TOP );
|
o->align( FL_ALIGN_TOP );
|
||||||
|
o->spacing( 2 );
|
||||||
o->type( Fl_Pack::VERTICAL );
|
o->type( Fl_Pack::VERTICAL );
|
||||||
o->end();
|
o->end();
|
||||||
}
|
}
|
||||||
|
@ -937,7 +944,12 @@ main (int argc, char **argv )
|
||||||
(char**)icon_16x16, &p, &mask, NULL);
|
(char**)icon_16x16, &p, &mask, NULL);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
init_crystal_boxtypes();
|
||||||
|
init_gleam_boxtypes();
|
||||||
|
|
||||||
Fl::get_system_colors();
|
Fl::get_system_colors();
|
||||||
|
|
||||||
|
color_scheme( "Dark" );
|
||||||
Fl::scheme( "plastic" );
|
Fl::scheme( "plastic" );
|
||||||
Fl::lock();
|
Fl::lock();
|
||||||
|
|
||||||
|
|
|
@ -1,154 +0,0 @@
|
||||||
|
|
||||||
###############################################################################
|
|
||||||
# Copyright (C) 2008 Jonathan Moore Liles #
|
|
||||||
# #
|
|
||||||
# This program is free software; you can redistribute it and/or modify it #
|
|
||||||
# under the terms of the GNU General Public License as published by the #
|
|
||||||
# Free Software Foundation; either version 2 of the License, or (at your #
|
|
||||||
# option) any later version. #
|
|
||||||
# #
|
|
||||||
# This program is distributed in the hope that it will be useful, but WITHOUT #
|
|
||||||
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or #
|
|
||||||
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for #
|
|
||||||
# more details. #
|
|
||||||
# #
|
|
||||||
# You should have received a copy of the GNU General Public License along #
|
|
||||||
# with This program; see the file COPYING. If not,write to the Free Software #
|
|
||||||
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. #
|
|
||||||
###############################################################################
|
|
||||||
|
|
||||||
## Makefile for the Non-DAW.
|
|
||||||
|
|
||||||
##
|
|
||||||
## Do not edit this file; run `make config` instead.
|
|
||||||
##
|
|
||||||
|
|
||||||
VERSION := 1.1.0
|
|
||||||
PACKAGE := TIMELINE
|
|
||||||
|
|
||||||
all: .config
|
|
||||||
|
|
||||||
.config: configure
|
|
||||||
@ echo '<<< Configuring '$(PACKAGE)
|
|
||||||
@ ./configure
|
|
||||||
|
|
||||||
config:
|
|
||||||
@ echo '<<< Configuring '$(PACKAGE)
|
|
||||||
@ ./configure
|
|
||||||
|
|
||||||
-include .config
|
|
||||||
|
|
||||||
export SYSTEM_PATH:=$(prefix)/share/
|
|
||||||
export DOCUMENT_PATH:=$(prefix)/share/doc/
|
|
||||||
export PIXMAP_PATH:=$(prefix)/share/pixmaps/
|
|
||||||
export ICON_PATH:=$(prefix)/share/icons/
|
|
||||||
export DESKTOP_PATH:=$(prefix)/share/applications/
|
|
||||||
|
|
||||||
# a bit of a hack to make sure this runs before any rules
|
|
||||||
ifneq ($(CALCULATING),yes)
|
|
||||||
TOTAL := $(shell $(MAKE) CALCULATING=yes -n 2>/dev/null | sed -n 's/^.*Compiling: \([^"]\+\)"/\1/p' > .files )
|
|
||||||
endif
|
|
||||||
|
|
||||||
ifeq ($(USE_DEBUG),yes)
|
|
||||||
CFLAGS := -pipe -ggdb -fno-inline -Wall -Wextra -O0
|
|
||||||
CXXFLAGS := -Wnon-virtual-dtor -Wno-missing-field-initializers -fno-rtti -fno-exceptions
|
|
||||||
else
|
|
||||||
CFLAGS := -pipe -O2 -DNDEBUG
|
|
||||||
CXXFLAGS := -fno-rtti -fno-exceptions
|
|
||||||
endif
|
|
||||||
|
|
||||||
|
|
||||||
ifeq ($(USE_UNOPTIMIZED_DRAWING),yes)
|
|
||||||
CFLAGS+=-DUSE_UNOPTIMIZED_DRAWING
|
|
||||||
endif
|
|
||||||
|
|
||||||
ifeq ($(USE_SINGLEBUFFERED_TIMELINE),yes)
|
|
||||||
CFLAGS+=-DUSE_SINGLEBUFFERED_TIMELINE
|
|
||||||
endif
|
|
||||||
|
|
||||||
ifeq ($(USE_WIDGET_FOR_TIMELINE),yes)
|
|
||||||
CFLAGS+=-DUSE_WIDGET_FOR_TIMELINE
|
|
||||||
endif
|
|
||||||
|
|
||||||
CFLAGS+=-DVERSION=\"$(VERSION)\" \
|
|
||||||
-DINSTALL_PREFIX=\"$(prefix)\" \
|
|
||||||
-DSYSTEM_PATH=\"$(SYSTEM_PATH)\" \
|
|
||||||
-DDOCUMENT_PATH=\"$(DOCUMENT_PATH)\" \
|
|
||||||
-DPIXMAP_PATH=\"$(PIXMAP_PATH)\"
|
|
||||||
|
|
||||||
CXXFLAGS := $(CFLAGS) $(CXXFLAGS)
|
|
||||||
|
|
||||||
INCLUDES := -I. -Iutil -IFL -Inonlib
|
|
||||||
|
|
||||||
include scripts/colors
|
|
||||||
|
|
||||||
ifneq ($(CALCULATING),yes)
|
|
||||||
COMPILING="$(BOLD)$(BLACK)$(PACKAGE) [$(SGR0)$(CYAN)`scripts/percent-complete .files "$<"`$(SGR0)$(BOLD)$(BLACK)]$(SGR0) $(BOLD)$(YELLOW)$<$(SGR0)"
|
|
||||||
else
|
|
||||||
COMPILING="Compiling: $<"
|
|
||||||
endif
|
|
||||||
|
|
||||||
.C.o:
|
|
||||||
@ echo $(COMPILING)
|
|
||||||
@ $(CXX) $(CXXFLAGS) $(INCLUDES) -c $< -o $@
|
|
||||||
|
|
||||||
%.C : %.fl
|
|
||||||
@ cd `dirname $<` && fluid -c ../$<
|
|
||||||
|
|
||||||
DONE := $(BOLD)$(GREEN)done$(SGR0)
|
|
||||||
|
|
||||||
include FL/makefile.inc
|
|
||||||
# include nonlib/makefile.inc
|
|
||||||
include makefile.inc
|
|
||||||
|
|
||||||
SRCS:=$(Timeline_SRCS)
|
|
||||||
OBJS:=$(Timeline_OBJS)
|
|
||||||
CXXFLAGS += $(Timeline_CFLAGS)
|
|
||||||
|
|
||||||
# FIXME: isn't there a better way?
|
|
||||||
$(OBJS): .config Makefile
|
|
||||||
|
|
||||||
TAGS: $(SRCS)
|
|
||||||
etags $(SRCS)
|
|
||||||
|
|
||||||
.deps: .config $(SRCS)
|
|
||||||
ifneq ($(CALCULATING),yes)
|
|
||||||
@ echo -n Calculating dependencies...
|
|
||||||
@ makedepend -f- -- $(CXXFLAGS) $(INCLUDES) -- $(SRCS) 2>/dev/null > .deps && echo $(DONE)
|
|
||||||
@ # gcc -M $(CXXFLAGS) $(INCLUDES) $(SRCS) > .deps && echo $(DONE)
|
|
||||||
endif
|
|
||||||
|
|
||||||
|
|
||||||
install: all
|
|
||||||
@ echo -n "Installing..."
|
|
||||||
@ install src/timeline $(prefix)/bin/non-daw
|
|
||||||
@ mkdir -p $(SYSTEM_PATH)/non-daw
|
|
||||||
@ mkdir -p $(PIXMAP_PATH)/non-daw
|
|
||||||
@ $(MAKE) -s -C doc install
|
|
||||||
@ install -d "$(DESTDIR)$(PIXMAP_PATH)/non-daw"
|
|
||||||
@ install -m 644 icons/hicolor/256x256/apps/non-daw.png "$(DESTDIR)$(PIXMAP_PATH)"/non-daw/icon-256x256.png
|
|
||||||
@ install -d "$(DESTDIR)$(ICON_PATH)/hicolor"
|
|
||||||
@ cp -au icons/hicolor/ "$(DESTDIR)$(ICON_PATH)"
|
|
||||||
@ install -d "$(DESTDIR)$(DESKTOP_PATH)"
|
|
||||||
@ sed 's:@BIN_PATH@:$(prefix)/bin:' non-daw.desktop.in > "$(DESTDIR)$(DESKTOP_PATH)/non-daw.desktop"
|
|
||||||
@ echo "$(DONE)"
|
|
||||||
ifneq ($(USE_DEBUG),yes)
|
|
||||||
@ echo -n "Stripping..."
|
|
||||||
@ strip $(prefix)/bin/non-daw
|
|
||||||
@ echo "$(DONE)"
|
|
||||||
endif
|
|
||||||
|
|
||||||
clean_deps:
|
|
||||||
@ rm -f .deps
|
|
||||||
|
|
||||||
.PHONEY: clean config depend clean_deps
|
|
||||||
|
|
||||||
clean: FL_clean Timeline_clean
|
|
||||||
|
|
||||||
dist:
|
|
||||||
git archive --prefix=non-daw-$(VERSION)/ v$(VERSION) | bzip2 > non-daw-$(VERSION).tar.bz2
|
|
||||||
|
|
||||||
scan-gpl:
|
|
||||||
@ scripts/scan-gpl $(SRCS) || echo $(BOLD)$(RED)Some source files do not contain proper license information!
|
|
||||||
|
|
||||||
-include .deps
|
|
|
@ -0,0 +1 @@
|
||||||
|
scripts/Makefile
|
|
@ -31,6 +31,19 @@ require_package liblo 0.23 liblo
|
||||||
require_package sigcpp 2.0.0 sigc++-2.0
|
require_package sigcpp 2.0.0 sigc++-2.0
|
||||||
suggest_package XPM 2.0.0 xpm
|
suggest_package XPM 2.0.0 xpm
|
||||||
|
|
||||||
|
if ! hostname_resolvable
|
||||||
|
then
|
||||||
|
echo "Your hostname \"$(hostname)\" does not resolve to a valid address."
|
||||||
|
echo "This is a broken configuration and will cause liblo (the"
|
||||||
|
echo "OSC library) to fail to function. Add the line:"
|
||||||
|
echo
|
||||||
|
echo "127.0.0.1 $(hostname)"
|
||||||
|
echo
|
||||||
|
echo "to your /etc/hosts file to fix. And consider switching to a saner distribution."
|
||||||
|
echo
|
||||||
|
fail "Invalid hostname!"
|
||||||
|
fi
|
||||||
|
|
||||||
if ! test_version 1.1.10 $FLTK_VERSION
|
if ! test_version 1.1.10 $FLTK_VERSION
|
||||||
then
|
then
|
||||||
warn "*** PERFORMANCE WARNING ***"
|
warn "*** PERFORMANCE WARNING ***"
|
||||||
|
|
|
@ -1,24 +1,57 @@
|
||||||
# -*- mode: makefile; -*-
|
# -*- mode: makefile; -*-
|
||||||
|
|
||||||
|
VERSION := 1.1.0
|
||||||
|
PACKAGE := TIMELINE
|
||||||
|
BIN_NAME := non-daw
|
||||||
|
|
||||||
all: Timeline
|
all: Timeline
|
||||||
|
|
||||||
Timeline_VERSION := 0.5.0
|
SRCS := $(wildcard src/*.C src/*.fl src/Engine/*.C)
|
||||||
|
|
||||||
Timeline_SRCS := $(wildcard src/*.C src/*.fl src/Engine/*.C)
|
SRCS:=$(SRCS:.fl=.C)
|
||||||
|
SRCS:=$(sort $(SRCS))
|
||||||
|
OBJS:=$(SRCS:.C=.o)
|
||||||
|
|
||||||
Timeline_SRCS:=$(Timeline_SRCS:.fl=.C)
|
LIBS := $(FLTK_LIBS) $(JACK_LIBS) $(SNDFILE_LIBS) $(LIBLO_LIBS) $(SIGCPP_LIBS) $(XPM_LIBS)
|
||||||
Timeline_SRCS:=$(sort $(Timeline_SRCS))
|
|
||||||
Timeline_OBJS:=$(Timeline_SRCS:.C=.o)
|
|
||||||
|
|
||||||
Timeline_LIBS := $(FLTK_LIBS) $(JACK_LIBS) $(SNDFILE_LIBS) $(LIBLO_LIBS) $(SIGCPP_LIBS) $(XPM_LIBS)
|
CFLAGS := $(SNDFILE_CFLAGS) $(FLTK_CFLAGS) $(JACK_CFLAGS) $(SIGCPP_CFLAGS) $(XPM_CFLAGS)
|
||||||
|
|
||||||
Timeline_CFLAGS := $(SNDFILE_CFLAGS) $(FLTK_CFLAGS) $(JACK_CFLAGS) $(SIGCPP_CFLAGS) $(XPM_CFLAGS)
|
ifeq ($(USE_UNOPTIMIZED_DRAWING),yes)
|
||||||
|
CFLAGS+=-DUSE_UNOPTIMIZED_DRAWING
|
||||||
|
endif
|
||||||
|
|
||||||
src/timeline: $(Timeline_OBJS) FL/libfl_widgets.a nonlib/libnonlib.a
|
ifeq ($(USE_SINGLEBUFFERED_TIMELINE),yes)
|
||||||
|
CFLAGS+=-DUSE_SINGLEBUFFERED_TIMELINE
|
||||||
|
endif
|
||||||
|
|
||||||
|
ifeq ($(USE_WIDGET_FOR_TIMELINE),yes)
|
||||||
|
CFLAGS+=-DUSE_WIDGET_FOR_TIMELINE
|
||||||
|
endif
|
||||||
|
|
||||||
|
src/timeline: $(OBJS) FL/libfl_widgets.a nonlib/libnonlib.a
|
||||||
@ echo -n Linking timeline...
|
@ echo -n Linking timeline...
|
||||||
@ $(CXX) $(CXXFLAGS) $(INCLUDES) $(Timeline_LIBS) $(Timeline_OBJS) -o $@ -LFL -lfl_widgets -Lnonlib -lnonlib && echo $(DONE)
|
@ $(CXX) $(CXXFLAGS) $(INCLUDES) $(LIBS) $(OBJS) -o $@ -LFL -lfl_widgets -Lnonlib -lnonlib && echo $(DONE)
|
||||||
|
|
||||||
Timeline: src/timeline
|
Timeline: src/timeline
|
||||||
|
|
||||||
Timeline_clean:
|
clean:
|
||||||
rm -f $(Timeline_OBJS) Timeline/timeline
|
rm -f $(OBJS) src/timeline
|
||||||
|
|
||||||
|
install: all
|
||||||
|
@ echo -n "Installing..."
|
||||||
|
@ install src/timeline $(prefix)/bin/non-daw
|
||||||
|
@ mkdir -p $(SYSTEM_PATH)/non-daw
|
||||||
|
@ mkdir -p $(PIXMAP_PATH)/non-daw
|
||||||
|
@ $(MAKE) -s -C doc install
|
||||||
|
@ install -d "$(DESTDIR)$(PIXMAP_PATH)/non-daw"
|
||||||
|
@ install -m 644 icons/hicolor/256x256/apps/non-daw.png "$(DESTDIR)$(PIXMAP_PATH)"/non-daw/icon-256x256.png
|
||||||
|
@ install -d "$(DESTDIR)$(ICON_PATH)/hicolor"
|
||||||
|
@ cp -au icons/hicolor/ "$(DESTDIR)$(ICON_PATH)"
|
||||||
|
@ install -d "$(DESTDIR)$(DESKTOP_PATH)"
|
||||||
|
@ sed 's:@BIN_PATH@:$(prefix)/bin:' non-daw.desktop.in > "$(DESTDIR)$(DESKTOP_PATH)/non-daw.desktop"
|
||||||
|
@ echo "$(DONE)"
|
||||||
|
ifneq ($(USE_DEBUG),yes)
|
||||||
|
@ echo -n "Stripping..."
|
||||||
|
@ strip $(prefix)/bin/non-daw
|
||||||
|
@ echo "$(DONE)"
|
||||||
|
endif
|
||||||
|
|
|
@ -51,6 +51,7 @@ public:
|
||||||
|
|
||||||
static const char *errstr ( int n ) { return _errstr[ ( 0 - n ) - 1 ]; }
|
static const char *errstr ( int n ) { return _errstr[ ( 0 - n ) - 1 ]; }
|
||||||
|
|
||||||
|
static const char * path ( void ) { return Project::_path; }
|
||||||
static const char *name ( void ) { return Project::_name; }
|
static const char *name ( void ) { return Project::_name; }
|
||||||
static void compact ( void );
|
static void compact ( void );
|
||||||
static bool close ( void );
|
static bool close ( void );
|
||||||
|
|
|
@ -717,7 +717,7 @@ ab.run();}
|
||||||
private xywh {921 41 104 14} labelsize 10
|
private xywh {921 41 104 14} labelsize 10
|
||||||
}
|
}
|
||||||
Fl_Box {} {
|
Fl_Box {} {
|
||||||
label {disk:}
|
label {filesystem}
|
||||||
xywh {810 27 55 18} labelsize 10 align 16
|
xywh {810 27 55 18} labelsize 10 align 16
|
||||||
}
|
}
|
||||||
Fl_Progress disk_usage_progress {
|
Fl_Progress disk_usage_progress {
|
||||||
|
@ -838,7 +838,10 @@ update_progress( capture_buffer_progress, cbp, timeline->total_input_buffer_perc
|
||||||
update_progress( playback_buffer_progress, pbp, timeline->total_output_buffer_percent() );
|
update_progress( playback_buffer_progress, pbp, timeline->total_output_buffer_percent() );
|
||||||
update_progress( cpu_load_progress, clp, engine ? engine->cpu_load() : 0 );
|
update_progress( cpu_load_progress, clp, engine ? engine->cpu_load() : 0 );
|
||||||
|
|
||||||
update_progress( disk_usage_progress, dup, percent_used( "." ) );
|
if ( Project::open() )
|
||||||
|
update_progress( disk_usage_progress, dup, percent_used( Project::path() ) );
|
||||||
|
else
|
||||||
|
update_progress( disk_usage_progress, dup, 0 );
|
||||||
|
|
||||||
if ( timeline->total_capture_xruns() )
|
if ( timeline->total_capture_xruns() )
|
||||||
capture_buffer_progress->selection_color( FL_RED );
|
capture_buffer_progress->selection_color( FL_RED );
|
||||||
|
|
|
@ -73,7 +73,7 @@ char *instance_name = NULL;
|
||||||
|
|
||||||
const char APP_NAME[] = "Non-DAW";
|
const char APP_NAME[] = "Non-DAW";
|
||||||
const char APP_TITLE[] = "The Non-DAW";
|
const char APP_TITLE[] = "The Non-DAW";
|
||||||
const char COPYRIGHT[] = "Copyright (C) 2008-2010 Jonathan Moore Liles";
|
const char COPYRIGHT[] = "Copyright (C) 2008-2012 Jonathan Moore Liles";
|
||||||
|
|
||||||
const double NSM_CHECK_INTERVAL = 0.25f;
|
const double NSM_CHECK_INTERVAL = 0.25f;
|
||||||
|
|
||||||
|
@ -155,13 +155,14 @@ main ( int argc, char **argv )
|
||||||
|
|
||||||
Fl::visual(FL_RGB8);
|
Fl::visual(FL_RGB8);
|
||||||
|
|
||||||
|
|
||||||
Thread::init();
|
Thread::init();
|
||||||
|
|
||||||
Thread thread( "UI" );
|
Thread thread( "UI" );
|
||||||
thread.set();
|
thread.set();
|
||||||
|
|
||||||
signal( SIGTERM, sigterm_handler );
|
signal( SIGTERM, sigterm_handler );
|
||||||
|
signal( SIGHUP, sigterm_handler );
|
||||||
|
signal( SIGINT, sigterm_handler );
|
||||||
|
|
||||||
fl_register_images();
|
fl_register_images();
|
||||||
|
|
||||||
|
@ -187,21 +188,16 @@ main ( int argc, char **argv )
|
||||||
|
|
||||||
printf( "%s %s -- %s\n", APP_TITLE, VERSION, COPYRIGHT );
|
printf( "%s %s -- %s\n", APP_TITLE, VERSION, COPYRIGHT );
|
||||||
|
|
||||||
tle = new TLE;
|
|
||||||
|
|
||||||
instance_name = strdup( APP_NAME );
|
instance_name = strdup( APP_NAME );
|
||||||
bool instance_override = false;
|
bool instance_override = false;
|
||||||
|
|
||||||
/* we don't really need a pointer for this */
|
|
||||||
// will be created on project new/open
|
|
||||||
engine = NULL;
|
|
||||||
|
|
||||||
nsm = new NSM_Client;
|
|
||||||
|
|
||||||
const char *osc_port = NULL;
|
const char *osc_port = NULL;
|
||||||
|
|
||||||
static struct option long_options[] =
|
static struct option long_options[] =
|
||||||
{
|
{
|
||||||
|
{ "help", no_argument, 0, '?' },
|
||||||
{ "instance", required_argument, 0, 'i' },
|
{ "instance", required_argument, 0, 'i' },
|
||||||
{ "osc-port", required_argument, 0, 'p' },
|
{ "osc-port", required_argument, 0, 'p' },
|
||||||
{ 0, 0, 0, 0 }
|
{ 0, 0, 0, 0 }
|
||||||
|
@ -214,23 +210,32 @@ main ( int argc, char **argv )
|
||||||
{
|
{
|
||||||
switch ( c )
|
switch ( c )
|
||||||
{
|
{
|
||||||
|
|
||||||
case 'p':
|
case 'p':
|
||||||
DMESSAGE( "Using OSC port %s", optarg );
|
DMESSAGE( "Using OSC port %s", optarg );
|
||||||
osc_port = optarg;
|
osc_port = optarg;
|
||||||
break;
|
break;
|
||||||
case 'i':
|
case 'i':
|
||||||
DMESSAGE( "Using OSC port %s", optarg );
|
DMESSAGE( "Using instance name %s", optarg );
|
||||||
free( instance_name );
|
free( instance_name );
|
||||||
instance_name = strdup( optarg );
|
instance_name = strdup( optarg );
|
||||||
instance_override = true;
|
instance_override = true;
|
||||||
break;
|
break;
|
||||||
case '?':
|
case '?':
|
||||||
printf( "Usage: %s [--osc-port portnum]\n\n", argv[0] );
|
printf( "\nUsage: %s [--instance instance_name] [--osc-port portnum] [path_to_project]\n\n", argv[0] );
|
||||||
exit(0);
|
exit(0);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* we don't really need a pointer for this */
|
||||||
|
// will be created on project new/open
|
||||||
|
engine = NULL;
|
||||||
|
|
||||||
|
tle = new TLE;
|
||||||
|
|
||||||
|
nsm = new NSM_Client;
|
||||||
|
|
||||||
MESSAGE( "Starting GUI" );
|
MESSAGE( "Starting GUI" );
|
||||||
|
|
||||||
tle->run();
|
tle->run();
|
||||||
|
|
Loading…
Reference in New Issue