Replace custom build system with WAF.

pull/3/head
Jonathan Moore Liles 2012-11-14 01:54:03 -08:00
parent afd354a5b8
commit d86b71cb2c
61 changed files with 610 additions and 1315 deletions

28
.gitignore vendored
View File

@ -4,28 +4,6 @@
*.[ao]
TAGS
.nfs*
make.conf
.deps
.config
.files
FL/About_Dialog.C
FL/About_Dialog.H
FL/Fl_Text_Edit_Window.C
FL/Fl_Text_Edit_Window.H
FL/New_Project_Dialog.C
FL/New_Project_Dialog.H
mixer/src/mixer
sequencer/src/gui/event_edit.C
sequencer/src/gui/event_edit.H
sequencer/src/gui/ui.C
sequencer/src/gui/ui.H
sequencer/src/gui/widgets.C
sequencer/src/gui/widgets.H
sequencer/src/sequencer
session-manager/src/jackpatch
session-manager/src/nsmd
session-manager/src/send_osc
session-manager/src/session-manager
timeline/src/TLE.C
timeline/src/TLE.H
timeline/src/timeline
.waf*
build
attic

View File

@ -1 +0,0 @@
scripts/Makefile

View File

@ -1,37 +0,0 @@
# -*- mode: makefile; -*-
VERSION := 1.1.0
PACKAGE := FL
all: FL
SRCS := $(wildcard FL/*.C FL/*.fl)
SRCS:=$(SRCS:.fl=.C)
SRCS:=$(sort $(SRCS))
OBJS:=$(SRCS:.C=.o)
all: FL/libfl_widgets.a util/ntk-perf
FL/libfl_widgets.a: $(OBJS)
@ ar rcs $@ $(OBJS)
.PHONEY: FL
FL: FL/libfl_widgets.a
# ntk-chtheme: ntk-chtheme.o $(FLTK_LIBS) FL/libfl_widgets.a
# @ echo -n Linking session handler.
# @ $(CXX) $(CXXFLAGS) $(FLTK_LDFLAGS) $(LIBS) $^ -o $@ -LFL -lfl_widgets && echo $(DONE)
util/ntk-perf.o: util/ntk-perf.C
util/ntk-perf: util/ntk-perf.o $(FLTK_LIBS) FL/libfl_widgets.a
@ echo -n Linking session handler.
@ $(CXX) $(CXXFLAGS) $^ -o $@ $(FLTK_LDFLAGS) $(LIBS) -LFL -lfl_widgets && echo $(DONE)
clean:
rm -f $(OBJS) FL/libfl_widgets.a .deps
install:
@

View File

@ -1 +0,0 @@
../scripts

View File

@ -18,8 +18,7 @@
/*******************************************************************************/
#include "FL/themes.H"
#include "FL/Fl_Theme_Chooser.C"
#include <FL/Fl_Theme_Chooser.H>
int
main ( int argc, char **argv )

26
FL/wscript Normal file
View File

@ -0,0 +1,26 @@
#!/usr/bin/env python
def options(opt):
pass
def configure(conf):
pass
def build(bld):
bld.stlib(
source =
'''
About_Dialog.fl
Fl_Menu_Settings.C
Fl_Scalepack.C
Fl_Text_Edit_Window.fl
Fl_Value_SliderX.C
New_Project_Dialog.fl
event_name.C
menu_popup.C
test_press.C
''',
includes = '.',
export_incdirs = [ '.' 'FL' ],
uselib = 'NTK',
target = 'fl_widgets')

View File

@ -1,45 +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. #
###############################################################################
include scripts/colors
SUBDIRS=nonlib FL timeline mixer session-manager sequencer
.config: configure
@ echo $(BOLD)$(YELLOW)Hey! You need to run 'configure' first.
@ echo If that fails because of NTK stuff, then you need to run 'make ntk' first.$(SGR0)
@ exit 1
all: .config
@ echo '!!! If you have any trouble here try reading README.build !!!'
@ for dir in $(SUBDIRS); do echo Building $$dir; $(MAKE) -s -C $$dir; done
ntk: lib/.built lib/ntk/configure
lib/ntk/configure:
@ git submodule update --init
lib/.built:
@ make -C lib
clean:
@ for dir in $(SUBDIRS); do $(MAKE) -s -C $$dir clean; done
install:
@ for dir in $(SUBDIRS); do $(MAKE) -s -C $$dir install; done

View File

@ -1,12 +1,39 @@
# -*- mode: org -*-
* Non-things build instructions
This repository contains all of the non-* software.
If you don't have NTK packages installed (which isn't very likely yet)
you *MUST* begin by typing:
If you don't have NTK installed system-wide (which isn't very likely
yet) you *MUST* begin the build process by typing:
make ntk
cd lib/ntk
./waf configure
./waf
Once NTK has been built you must install it system-wide before
attempting to build the non-* programs.
To install NTK type:
su -c './waf install'
** Build all projects
Typing:
./waf configure
./waf
./waf su -c './waf install'
from the base of the checkout of the Non git repository will build and
install all of the non-* programs together.
** Build a single project
Typing:
./waf configure --project=[timline|sequencer|mixer|session-manager]
./waf
./waf su -c './waf install'
Then, run './configure' (use the '-i' option if you want to interactively
configure) Then, to build everything else, just type 'make'. Stuff will happen.
Don't make things harder on yourself by trying to build everything individually. Just
type 'make'. I'm serious. It's that simple.

View File

@ -1,8 +1,10 @@
# -*- mode: org -*-
Notes to packagers: Non-Mixer, Non-DAW, and Non-Session-Manager,
although stored in the same repository, are completely independent
programs which can be built and packaged separately by descending into
their respective sub-directories.
* Notes to Packagers
Non-Mixer, Non-DAW, and Non-Session-Manager, although stored in the
same repository, are completely independent programs which can be
built and packaged separately (see README.build)
If you're having trouble adapting to Non's build system, please
contact me directly or post to one of the Non mailing lists with your
@ -23,3 +25,4 @@ Thanks,
Jonathan Moore Liles <male@tuxfamily.net>
P.S. Furthermore, please quit listing crazy random stuff as dependencies.

58
configure vendored
View File

@ -1,58 +0,0 @@
#!/bin/sh
#
# Copyright (C) 2008 Jonathan Moore Liles
# This file is licensed under version 2 of the GPL.
. scripts/config-funcs
begin
begin_options
echo "Master configuration"
ask "Installation prefix" prefix /usr/local
ask "Build for debugging" USE_DEBUG no
begin_tests
# should require everything all of the subprojects require
require_command ar ar
require_command makedepend makedepend
require_NTK 1.3.0 images
require_package JACK 0.103.0 jack
test_version `version_of jack` 0.105.0 || append "JACK_MIDI_PROTO_API=yes"
require_package sndfile 1.0.17 sndfile
require_package lrdf 0.4.0 lrdf
require_package liblo 0.23 liblo
suggest_package XPM 2.0.0 xpm
require_package sigcpp 2.0.0 sigc++-2.0
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
# installing configuration
echo -n "Copying configuration to modules..."
for i in nonlib FL timeline mixer sequencer session-manager
do
echo -n "$i "
cp .config "$i"
done
echo

View File

@ -1,21 +0,0 @@
OBJS:= ntk/lib/libntk.a ntk/lib/libntk_images.a
SRCS:= $(wildcard ntk/src/*.cxx ntk/FL/*.H)
$(SRCS): ntk/config.h
@ echo Building NTK
$(MAKE) -C ntk
@ touch .built
$(OBJS): $(SRCS)
ntk/config.h: Makefile
@ echo Configuring NTK
cd ntk && ./configure --prefix=/usr/local --enable-debug --enable-shared --disable-gl --enable-threads --enable-xft --enable-cairo --enable-cairoext --enable-xinerama
@ touch ntk/config.h
config: ntk/config.h
clean:
all: $(OBJS)

@ -1 +1 @@
Subproject commit 9fdf8b4fd9d12d1cc88b283fe00079a2324f2055
Subproject commit a41e8769a3543ef237470482488c62dba92ded2c

View File

@ -1 +0,0 @@
../FL

View File

@ -1 +0,0 @@
scripts/Makefile

40
mixer/configure vendored
View File

@ -1,40 +0,0 @@
#!/bin/sh
#
# Copyright (C) 2008 Jonathan Moore Liles
# This file is licensed under version 2 of the GPL.
. scripts/config-funcs
begin
begin_options
ask "Installation prefix" prefix /usr/local
ask "Build for debugging" USE_DEBUG no
begin_tests
require_command ar ar
require_command makedepend makedepend
require_NTK 1.3.0 images
require_package JACK 0.103.0 jack
require_package lrdf 0.4.0 lrdf
require_package liblo 0.23 liblo
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"
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

View File

@ -1 +0,0 @@
../lib

View File

@ -1,45 +0,0 @@
# -*- mode: makefile; -*-
VERSION := 1.1.0
PACKAGE := MIXER
BIN_NAME := non-mixer
all: Mixer
SRCS := $(wildcard src/*.C src/*.fl src/Engine/*.C)
SRCS:=$(SRCS:.fl=.C)
SRCS:=$(sort $(SRCS))
OBJS:=$(SRCS:.C=.o)
LIBS += $(FLTK_LDFLAGS) $(JACK_LIBS) $(LRDF_LIBS) $(LIBLO_LIBS) $(XPM_LIBS)
CFLAGS += $(FLTK_CFLAGS) $(JACK_CFLAGS) $(LRDF_CFLAGS) $(LIBLO_CFLAGS) $(XPM_CFLAGS)
src/mixer: $(OBJS) FL/libfl_widgets.a nonlib/libnonlib.a $(FLTK_LIBS)
@ echo -n Linking mixer...
@ $(CXX) $(CXXFLAGS) $^ -o $@ $(LIBS) -LFL -lfl_widgets -Lnonlib -lnonlib -ldl && echo $(DONE)
Mixer: src/mixer
clean:
rm -f $(OBJS) src/mixer .deps
install: all
@ echo -n "Installing..."
@ install -Dm755 src/mixer "$(DESTDIR)$(prefix)"/bin/non-mixer
@ ln -sf "$(DESTDIR)$(prefix)"/bin/non-mixer "$(DESTDIR)$(prefix)"/bin/non-mixer-noui
@ install -d "$(DESTDIR)$(SYSTEM_PATH)"/non-mixer
@ $(MAKE) -s -C doc install
@ install -d "$(DESTDIR)$(PIXMAP_PATH)/non-mixer"
@ install -Dm644 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

View File

@ -1 +0,0 @@
../nonlib

View File

@ -1 +0,0 @@
../scripts/

View File

@ -28,14 +28,15 @@
#include <FL/Fl_Menu_Bar.H>
#include <FL/fl_ask.H>
#include <FL/Fl.H>
#include "New_Project_Dialog.H"
#include <New_Project_Dialog.H>
#include "Engine/Engine.H"
#include "FL/Fl_Flowpack.H"
#include <Fl_Flowpack.H>
#include "Project.H"
#include "FL/Fl_Menu_Settings.H"
#include "About_Dialog.H"
#include <Fl_Menu_Settings.H>
#include <About_Dialog.H>
#include <FL/Fl_File_Chooser.H>
#include "FL/Fl_Theme_Chooser.H"
#include <FL/Fl_Theme_Chooser.H>
#include <Fl_Value_SliderX.H>
#include "file.h"
@ -44,7 +45,6 @@
#include <unistd.h>
#include <sys/types.h>
#include "FL/Fl_Value_SliderX.H"
#include "OSC/Endpoint.H"
#include <lo/lo.h>

80
mixer/wscript Normal file
View File

@ -0,0 +1,80 @@
#!/usr/bin/env python
import subprocess
import waflib.Options as Options
import string
import os
# Version of this package (even if built as a child)
PACKAGE_VERSION = '1.2.0'
# Variables for 'waf dist'
APPNAME = 'non-mixer'
VERSION = PACKAGE_VERSION
# Mandatory variables
top = '.'
out = 'build'
def options(opt):
opt.load('compiler_c')
opt.load('compiler_cxx')
opt.load('gnu_dirs')
def configure(conf):
conf.load('compiler_c')
conf.load('compiler_cxx')
conf.load('gnu_dirs')
conf.check_cfg(package='lrdf', uselib_store='LRDF',args="--cflags --libs",
atleast_version='0.4.0', mandatory=True)
conf.define('VERSION', PACKAGE_VERSION)
conf.define('SYSTEM_PATH', string.join( [ conf.env.DATADIR, APPNAME ], '/' ) )
conf.define('DOCUMENT_PATH', string.join( [ conf.env.DATADIR, 'doc' ], '/' ) )
conf.define('PIXMAP_PATH', string.join( [ conf.env.DATADIR, 'pixmaps' ], '/' ) )
conf.write_config_header('config.h', remove=False)
print('')
def build(bld):
libs = ''
bld.program( source = '''
src/Chain.C
src/Controller_Module.C
src/DPM.C
src/Engine/Engine.C
src/Gain_Module.C
src/JACK_Module.C
src/LADSPAInfo.C
src/Meter_Indicator_Module.C
src/Meter_Module.C
src/Mixer.C
src/Mixer_Strip.C
src/Module.C
src/Module_Parameter_Editor.C
src/Mono_Pan_Module.C
src/NSM.C
src/Panner.C
src/Plugin_Module.C
src/Project.C
src/main.C
''',
target = 'non-mixer',
includes = ['.', 'src', '../FL', '../nonlib'],
use = ['nonlib', 'fl_widgets'],
uselib = [ 'JACK', 'LIBLO', 'LRDF', 'XPM', 'NTK', 'NTK_IMAGES' ],
install_path = '${BINDIR}')
start_dir = bld.path.find_dir( 'icons/hicolor' )
bld.install_files('${DATADIR}/icons/hicolor', start_dir.ant_glob('**/*.png'),
cwd=start_dir, relative_trick=True)
bld.install_as('${DATADIR}/pixmaps/' + APPNAME + '/icon-256x256.png', 'icons/hicolor/256x256/apps/' + APPNAME + '.png')
bld.install_files( string.join( [ '${DATADIR}/doc', APPNAME ], '/' ), bld.path.ant_glob( 'doc/*.html doc/*.png' ) )
bld.symlink_as( '${BINDIR}/' + APPNAME + '-noui', APPNAME )

View File

@ -1 +0,0 @@
scripts/Makefile

View File

@ -1,25 +0,0 @@
# -*- mode: makefile; -*-
VERSION := 1.1.0
PACKAGE := NONLIB
SRCS := $(wildcard nonlib/*.C nonlib/JACK/*.C nonlib/LASH/*.C nonlib/OSC/*.C nonlib/NSM/*.C)
SRCS:=$(sort $(SRCS))
OBJS:=$(SRCS:.C=.o)
CFLAGS := $(SIGCPP_CFLAGS) $(LIBLO_CFLAGS) $(JACK_CFLAGS)
all: nonlib/libnonlib.a
nonlib/libnonlib.a: $(OBJS)
@ ar rcs $@ $(OBJS)
.PHONEY: nonlib
nonlib: nonlib/libnonlib.a
clean:
rm -f $(OBJS) nonlib/libnonlib.a .deps
install:
@

View File

@ -1 +0,0 @@
../scripts

27
nonlib/wscript Normal file
View File

@ -0,0 +1,27 @@
#!/usr/bin/env python
def options(opt):
pass
def configure(conf):
pass
def build(bld):
bld.stlib(
source = '''
JACK/Client.C
JACK/Port.C
Log_Entry.C
Loggable.C
NSM/Client.C
OSC/Endpoint.C
Thread.C
debug.C
dsp.C
file.C
string_util.C
''',
includes = '.',
export_incdirs = [ '.', 'nonlib'],
uselib = 'LIBLO JACK',
target = 'nonlib')

View File

@ -1,127 +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.
##
include scripts/colors
.config: configure
@ echo $(BOLD)$(YELLOW)Hey! You need to run 'configure' first.$(SGR0)
@ exit 1
#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
# LIBS := "$(FLTK_LIBS) $(LIBS)"
INCLUDES := -I. -Iutil -IFL -Inonlib
INCLUDES += $(FLTK_CFLAGS)
# INCLUDES +=
# CFLAGS += $(FLTK_CFLAGS)
# 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)
SPACE:=" `tput cuf 20`"
ifneq ($(CALCULATING),yes)
COMPILING="$(BOLD)$(BLACK)[$(SGR0) $(PACKAGE)$(SPACE)$(SGR0)$(CYAN)`scripts/percent-complete .files "$<"` $(SGR0)$(BOLD)$(BLACK)]$(SGR0) $(BOLD)$(CYAN)$<$(SGR0)"
else
COMPILING="Compiling: $<"
endif
.C.o:
@ echo $(COMPILING)
@ $(CXX) $(INCLUDES) $(CXXFLAGS) -c $< -o $@
%.C : %.fl
@ cd `dirname $<` && $(FLUID) -c `basename $<`
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
all: .config

View File

@ -1,40 +0,0 @@
#!/bin/sh
# 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. #
if [ "$#" = 0 ]
then
echo "Usage: $0 [output_file.h] [version]"
fi
if [ -d ../.git ]
then
ID=`git log -1 --format=%h -- .`
# ID="`[ \`git rev-parse HEAD\` = \`git rev-parse v${2}\` ] || git rev-parse --short HEAD`"
if [ -n "$ID" ]
then
ID="git {$ID}"
else
ID="git"
fi
else
ID="dist"
fi
echo "/* generated file */" > "$1"
echo "const char *BUILD_ID = \"${ID}\";" >> "$1"
echo "const char *VERSION = \"${2}\";" >> "$1"

View File

@ -1,25 +0,0 @@
# Include this file to use terminal colors from shell scripts and
# makefiles.
# john moore liles - 12/30/2002
BLACK=`tput setaf 0`
RED=`tput setaf 1`
GREEN=`tput setaf 2`
YELLOW=`tput setaf 3`
BLUE=`tput setaf 4`
MAGENTA=`tput setaf 5`
CYAN=`tput setaf 6`
WHITE=`tput setaf 7`
BG_BLACK=`tput setab 0`
BG_RED=`tput setab 1`
BG_GREEN=`tput setab 2`
BG_YELLOW=`tput setab 3`
BG_BLUE=`tput setab 4`
BG_MAGENTA=`tput setab 5`
BG_CYAN=`tput setab 6`
BG_WHITE=`tput setab 7`
BOLD=`tput bold`
SGR0=`tput sgr0`

View File

@ -1,414 +0,0 @@
#!/bin/sh
# 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. #
#
. scripts/colors
#####
## support functions for 'configure' scripts.
fatal ()
{
echo "$BOLD$RED$*$SGR0" > /dev/stderr
exit 255
}
HELP=no
INTERACTIVE=no
split ()
{
while [ $# -gt 0 ]
do
echo $1
shift 1
done
}
if [ $# -gt 0 ]
then
case "$1" in
--help|-h)
HELP=yes
shift 1
;;
--interactive|-i)
INTERACTIVE=yes
shift 1
;;
*)
# fatal "This is not an autoconf script. Run it without any options and you will be prompted."
;;
esac
if [ $# -gt 0 ]
then
echo "## options" > .config
split "$@" | sed '
s/--\(enable\|disable\)-\([^ =]\+\)/--\1-\U\2/g;
s/--enable-\([^ =]\+\)=\(.*\)/USE_\1=\2/g;
s/--enable-\([^ =]\+\)/USE_\1=yes/g;
s/--disable-\([^ =]\+\)/USE_\1=no/g;
s/--\([^ =]\+\)/\1/g;
' | sed -n '/^[^ =]\+=./p' >> .config
INTERACTIVE=no;
fi
fi
if [ $HELP != yes ] && [ $INTERACTIVE != no ]
then
if ! ( [ -t 0 ] && [ -t 1 ] )
then
fatal "not a terminal!"
fi
fi
ask ()
{
local A D O
D="`eval echo \\$$2`"
D=${D:-$3}
if [ $HELP = yes ]
then
if [ "$3" = yes ] || [ "$3" = no ]
then
O=`echo -n "$2" | sed s/^USE_/--enable-/ | tr '[[:upper:]]' '[[:lower:]]'`
else
O=`echo -n "--$2" | tr '[[:upper:]]' '[[:lower:]]'`
fi
printf " ${BOLD}${GREEN}%-15s${SGR0}\t%-40s (currently: ${BOLD}%s${SGR0})\n" "$O" "$1" "$D"
return
fi
echo -n "$BLACK$BOLD::$SGR0 ${1}? [$BOLD${D}$SGR0] "
if [ $INTERACTIVE = no ]
then
A="$D"
echo
else
read A
A=${A:-$D}
fi
if [ "$3" = yes ] || [ "$3" = no ]
then
case "$A" in
no | n | N) A=no ;;
yes | y | Y) A=yes ;;
* ) fatal "Invalid response. Must be 'yes' or 'no'" ;;
esac
fi
append "${2}=${A:-$D}"
eval "${2}='${A:-$D}'"
}
ok ()
{
echo ' '`tput cuf 30`"$BOLD${GREEN}ok${SGR0} ${*:+${BOLD}${BLACK}($*)${SGR0}}"
}
failed ()
{
echo ' '`tput cuf 30`"$BOLD${RED}failed!${SGR0}" > /dev/stderr
rm -f .config
}
missing ()
{
echo ' '`tput cuf 30`"$BOLD${YELLOW}missing!${SGR0}" > /dev/stderr
}
using ()
{
[ "`eval echo \\$USE_$1`" = yes ]
return $?
}
upcase ()
{
echo "$*" | tr '[[:lower:]]' '[[:upper:]]'
}
extract_options ()
{
local line name value
if [ -f .config ]
then
{
while read line
do
[ "$line" = "## options" ] && break
done
while read line
do
if [ "$line" = "## libs" ]
then
break
else
name=${line%=*}
value=${line#*=}
eval "$name='$value'"
fi
done
} < .config
fi
}
begin ()
{
echo -n "Checking sanity..."
require_command tput tput > /dev/null
require_command pkg_config pkg-config > /dev/null
require_command sed sed > /dev/null
ok
}
warn ()
{
echo " ${BOLD}${YELLOW}* ${SGR0}${BOLD}$*"
}
info ()
{
echo "${BOLD}${CYAN}--- ${SGR0}$*"
}
begin_options ()
{
# get the old values
extract_options
if [ $HELP = yes ]
then
echo
warn "This is a ${BOLD}non-configure${SGR0} script. Run with ${BOLD}--interactive${SGR0} argument and you will be prompted"
warn "with configuration choices. Alternatively, you may use the following autoconf style"
warn "arguments for non-interactive configuration."
echo
echo " Available options:"
echo
else
echo > .config
append "# This file was automatically generated on `date`. Any changes may be lost!"
append "## options"
if [ $INTERACTIVE = no ]
then
info "Non-interactively updating configuration"
else
info "Interactive configuration requested"
fi
fi
}
begin_tests ()
{
if [ $HELP = yes ]
then
echo
exit 0;
fi
append "## libs"
extract_options
}
append ()
{
echo "$1" >> .config
}
end ()
{
info "Configuration complete. You may now run 'make'"
touch .config
}
require_command ()
{
echo -n "Checking for ${BOLD}$1${SGR0}..."
local name;
if [ -x "$2" ]
then
name="$PWD/$2"
ok "$name"
elif [ -x "`which "$2"`" ]
then
name="`which "$2"`"
ok "$name"
else
failed
fatal "Command $1 not found."
fi
append "$1=$name"
eval "${1}='${name}'"
}
require_package ()
{
local name
echo -n "Checking for $BOLD$1$SGR0..."
if ! pkg-config --exists $3
then
failed
fatal "Required package $1 doesn't appear to be installed."
elif ! pkg-config --atleast-version $2 $3
then
failed
fatal "The installed version of $1 (`pkg-config --mod-version $3`) is too old."
fi
name="`upcase \"$1\"`"
append "${name}_LIBS=`pkg-config --libs $3 | sed 's/,\\?--as-needed//g'`"
append "${name}_CFLAGS=-DHAVE_${1} `pkg-config --cflags $3`"
ok `pkg-config --modversion "$3"`
return 0
}
suggest_package ()
{
local name
echo -n "Checking for $BOLD$1$SGR0..."
if ! pkg-config --exists $3
then
missing
warn "Suggested package $1 doesn't appear to be installed. Some functionality may be missing from your build."
warn "Continuing without $1...\n"
return 1;
elif ! pkg-config --atleast-version $2 $3
then
missing
warn "The installed version of suggested package $1 (`pkg-config --mod-version $3`) is too old."
warn "Continuing without $1..."
return 1;
fi
name="`upcase \"$1\"`"
append "${name}_LIBS=`pkg-config --libs $3 | sed 's/,\\?--as-needed//g'`"
append "${name}_CFLAGS=-DHAVE_${1} `pkg-config --cflags $3`"
ok `pkg-config --modversion "$3"`
return 0
}
_test_version ()
{
if [ $# = 6 ]
then
[ $1 -gt $4 ] && return 0
[ $1 -eq $4 ] && [ $2 -gt $5 ] && return 0
[ $1 -eq $4 ] && [ $2 -eq $5 ] && [ $3 -gt $6 ] && return 0
[ $1 -eq $4 ] && [ $2 -eq $5 ] && [ $3 -eq $6 ] && return 0
return 1
elif [ $# = 4 ]
then
[ $1 -gt $3 ] && return 0
[ $1 -eq $3 ] && [ $2 -eq $4 ] && return 0
return 1
fi
}
# return true if #1 is greater than or equal to $2
test_version ()
{
local IFS
IFS='.'
_test_version $1 $2
}
version_of ()
{
echo `pkg-config --modversion $1`
}
hostname_resolvable ()
{
ping -c1 `hostname` >/dev/null 2>/dev/null
}
require_NTK ()
{
local use
local appendflags
local is_local
is_local=
echo -n "Checking for ${BOLD}NTK${SGR0}..."
if [ -n "`which ntk-config`" ]
then
echo "found system NTK..."
require_command ntk_config ntk-config
else
echo "no system NTK found... checking for bundled version..."
require_command ntk_config lib/ntk/ntk-config
is_local=yes
fi
FLTK_VERSION=`${ntk_config} --version`
if ! test_version $FLTK_VERSION $1
then
failed
fatal "The installed FLTK version ($FLTK_VERSION) is too old."
else
ok $FLTK_VERSION
fi
if [ "x$is_local" = "xyes" ]
then
require_command FLUID lib/ntk/fluid/ntk-fluid
else
require_command FLUID ntk-fluid
fi
use=
appendflags=
while [ $# -gt 1 ]
do
shift 1
[ "$1" = 'cairo' ] && appendflags="-DFLTK_HAVE_CAIRO=1 -DUSE_X11=1"
use="$use --use-$1"
done
append "FLTK_LIBS=`${ntk_config} $use --libs | sed 's/,\\?--as-needed//g'`"
append "FLTK_LDFLAGS=`${ntk_config} $use --ldflags | sed 's/,\\?--as-needed//g'`"
append "FLTK_CFLAGS=`${ntk_config} $use --cflags` $appendflags"
}

View File

@ -1,20 +0,0 @@
#!/bin/sh
# May 2008 Jonathan Moore Liles
#
# Given the name of a file containing a list of files and a filename
# from that list, return the percentage of the distance from the
# beginning of the list.
[ $# -ne 2 ] && exit
MATCH="`grep -nFx \"$2\" \"$1\"`"
MATCH=${MATCH%%:*}
TOTAL="`cat \"$1\" | wc -l`"
if [ -z "$MATCH" ]
then
echo "0%"
else
printf "%3s%%" $(( $MATCH * 100 / $TOTAL ))
fi

View File

@ -1,63 +0,0 @@
#!/bin/sh
# 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. #
#####
## Simple script to scan source files for GPL headers.
##
R=0
for i in "$@"
do
HEAD="`head $i`"
S=
if echo "$HEAD" | grep -q Copyright
then
if echo "$HEAD" | grep -q 'GNU General Public License'
then
S="GPL"
if echo "$HEAD" | grep -q 'version 2'
then
S="${S}v2"
elif echo "$HEAD" | grep -q 'version 3'
then
S="${S}v3"
fi
if echo "$HEAD" | grep -q 'any later version'
then
S="${S}+"
fi
else
S="Not GPL!"
R=255
fi
else
S="No Copyright!"
R=255
fi
printf "%-60s %s\n" "${i}:" "$S"
done
exit $R

View File

@ -1 +0,0 @@
../FL

View File

@ -1 +0,0 @@
scripts/Makefile

View File

@ -1 +0,0 @@
../lib

View File

@ -1,57 +0,0 @@
# -*- mode: makefile; -*-
# Makefile for the Non Sequencer.
#
# Do not edit this file; run `make config` instead.
#
VERSION := 1.9.4
PACKAGE := SEQUENCER
BIN_NAME := non-sequencer
all: Sequencer
SRCS := $(wildcard src/*.C src/*.fl src/gui/*.C src/gui/*.fl src/NSM/*.C)
SRCS:=$(SRCS:.fl=.C)
SRCS:=$(sort $(SRCS))
OBJS:=$(SRCS:.C=.o)
CFLAGS += $(CFLAGS) $(CXXFLAGS) $(FLTK_CFLAGS) $(SIGCPP_CFLAGS) $(LIBLO_CFLAGS) $(XPM_CFLAGS)
LIBS += $(FLTK_LDFLAGS) $(JACK_LIBS) $(SIGCPP_LIBS) $(LIBLO_LIBS) $(XPM_LIBS)
Sequencer: src/sequencer
clean:
rm -f src/sequencer .deps $(OBJS)
src/sequencer: $(OBJS) FL/libfl_widgets.a nonlib/libnonlib.a $(FLTK_LIBS)
@ echo -n Linking sequencer...
$(CXX) $(CXXFLAGS) $^ -o $@ $(LIBS) -LFL -lfl_widgets -Lnonlib -lnonlib -ldl && echo $(DONE)
ifeq ($(JACK_MIDI_PROTO_API),yes)
CXXFLAGS+=-DJACK_MIDI_PROTO_API
endif
install: all
@ echo -n "Installing..."
@ install -Dm755 src/sequencer "$(DESTDIR)$(prefix)"/bin/non-sequencer
@ install -d "$(DESTDIR)$(SYSTEM_PATH)/instruments"
@ install -m 644 instruments/* "$(DESTDIR)$(SYSTEM_PATH)/instruments"
@ $(MAKE) -s -C doc install
@ install -d "$(DESTDIR)$(PIXMAP_PATH)"
@ install -m 644 icons/hicolor/256x256/apps/non-sequencer.png "$(DESTDIR)$(PIXMAP_PATH)"/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-sequencer.desktop.in > "$(DESTDIR)$(DESKTOP_PATH)/non-sequencer.desktop"
@ echo "$(DONE)"
ifneq ($(USE_DEBUG),yes)
@ echo -n "Stripping..."
@ strip "$(DESTDIR)$(prefix)"/bin/non-sequencer
@ echo "$(DONE)"
endif

View File

@ -1 +0,0 @@
../nonlib

View File

@ -1 +0,0 @@
../scripts

View File

@ -25,7 +25,7 @@ comment {//
decl {\#include <FL/Fl_Dial.H>} {public local
}
decl {\#include "FL/About_Dialog.H"} {private local
decl {\#include <About_Dialog.H>} {private local
}
decl {class Fl_Scalepack;} {public local
@ -34,16 +34,16 @@ decl {class Fl_Scalepack;} {public local
decl {class Fl_Sometimes_Input;} {public local
}
decl {\#include "FL/Fl_Theme_Chooser.H"} {private local
decl {\#include <FL/Fl_Theme_Chooser.H>} {private local
}
decl {\#include "FL/Fl_Scalepack.H"} {private local
decl {\#include <Fl_Scalepack.H>} {private local
}
decl {\#include "FL/Fl_Sometimes_Input.H"} {private local
decl {\#include <Fl_Sometimes_Input.H>} {private local
}
decl {\#include "FL/Fl_Menu_Settings.H"} {private local
decl {\#include <Fl_Menu_Settings.H>} {private local
}
decl {\#include <FL/Fl_Shared_Image.H>} {private local

84
sequencer/wscript Normal file
View File

@ -0,0 +1,84 @@
#!/usr/bin/env python
import subprocess
import waflib.Options as Options
import string
import os
# Version of this package (even if built as a child)
PACKAGE_VERSION = '1.9.5'
# Variables for 'waf dist'
APPNAME = 'non-sequencer'
VERSION = PACKAGE_VERSION
# Mandatory variables
top = '.'
out = 'build'
def options(opt):
opt.load('compiler_c')
opt.load('compiler_cxx')
opt.load('gnu_dirs')
def configure(conf):
conf.load('compiler_c')
conf.load('compiler_cxx')
conf.load('gnu_dirs')
conf.check_cfg(package='sigc++-2.0', uselib_store='SIGCPP',
atleast_version='2.0.0', args="--cflags --libs", mandatory=True)
conf.define('VERSION', PACKAGE_VERSION)
conf.define('SYSTEM_PATH', string.join( [ conf.env.DATADIR, APPNAME ], '/' ) )
conf.define('DOCUMENT_PATH', string.join( [ conf.env.DATADIR, 'doc' ], '/' ) )
conf.define('PIXMAP_PATH', string.join( [ conf.env.DATADIR, 'pixmaps' ], '/' ) )
conf.write_config_header('config.h', remove=False)
print('')
def build(bld):
libs = ''
bld.program( source = '''
src/NSM.C
src/NSM/Client.C
src/canvas.C
src/debug.C
src/event.C
src/event_list.C
src/grid.C
src/gui/draw.C
src/gui/event_edit.fl
src/gui/input.C
src/gui/ui.fl
src/gui/widgets.fl
src/instrument.C
src/jack.C
src/main.C
src/mapping.C
src/midievent.C
src/pattern.C
src/phrase.C
src/scale.C
src/sequence.C
src/smf.C
src/transport.C
''',
target = 'non-sequencer',
includes = ['.', 'src', 'src/gui', '../FL', '../nonlib'],
use = ['nonlib', 'fl_widgets'],
uselib = [ 'JACK', 'SIGCPP', 'LIBLO', 'XPM', 'NTK', 'NTK_IMAGES'],
install_path = '${BINDIR}')
bld.install_files(string.join( [ '${DATADIR}', APPNAME, 'instruments'], '/' ), bld.path.ant_glob('instruments/*'))
start_dir = bld.path.find_dir( 'icons/hicolor' )
bld.install_files('${DATADIR}/icons/hicolor', start_dir.ant_glob('**/*.png'),
cwd=start_dir, relative_trick=True)
bld.install_as('${DATADIR}/pixmaps/' + APPNAME + '/icon-256x256.png', 'icons/hicolor/256x256/apps/' + APPNAME + '.png')
bld.install_files( string.join( [ '${DATADIR}/doc', APPNAME ], '/' ), bld.path.ant_glob( 'doc/*.html doc/*.png' ) )

View File

@ -1 +0,0 @@
../FL

View File

@ -1 +0,0 @@
scripts/Makefile

View File

@ -1,39 +0,0 @@
#!/bin/sh
#
# Copyright (C) 2008 Jonathan Moore Liles
# This file is licensed under version 2 of the GPL.
. scripts/config-funcs
begin
begin_options
ask "Installation prefix" prefix /usr/local
ask "Build for debugging" USE_DEBUG no
begin_tests
require_command ar ar
require_command makedepend makedepend
require_NTK 1.3.0 images
suggest_package JACK 0.103.0 jack
require_package liblo 0.23 liblo
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"
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

View File

@ -1 +0,0 @@
../lib

View File

@ -1,72 +0,0 @@
# -*- mode: makefile; -*-
VERSION := 1.0.0
PACKAGE := SESSION_MANAGER
BIN_NAME := non-session-manager
all: Session
SRCS := $(wildcard src/*.C src/*.fl)
# SRCS += util/debug.C util/Thread.C util/file.C
SRCS:=$(SRCS:.fl=.C)
SRCS:=$(sort $(SRCS))
OBJS:=$(SRCS:.C=.o)
LIBS += $(LIBLO_LIBS)
CFLAGS += $(LIBLO_CFLAGS) $(XPM_CFLAGS) $(FLTK_CFLAGS) -D_GNU_SOURCE
src/nsmd: src/nsmd.o nonlib/libnonlib.a
@ echo -n Linking session handler.
@ $(CXX) $(CXXFLAGS) $^ -o $@ $(LIBS) -Lnonlib -lnonlib && echo $(DONE)
src/session-manager: src/session-manager.o nonlib/libnonlib.a $(FLTK_LIBS)
@ echo -n Linking session handler.
@ $(CXX) $(CXXFLAGS) $^ -o $@ $(FLTK_LDFLAGS) $(XPM_LIBS) $(LIBS) -LFL -lfl_widgets -Lnonlib -lnonlib && echo $(DONE)
src/nsm-proxy: src/nsm-proxy.o nonlib/libnonlib.a
@ echo -n Linking NSM Proxy.
@ $(CXX) $(CXXFLAGS) $^ -o $@ $(LIBLO_LIBS) -Lnonlib -lnonlib && echo $(DONE)
# src/NSM_Proxy_UI.o:
# @ cd src && $(FLUID) -c NSM_Proxy_UI.fl
src/nsm-proxy-gui: src/NSM_Proxy_UI.o src/nsm-proxy-gui.o $(FLTK_LIBS)
@ echo -n Linking NSM Proxy...
@ $(CXX) $(CXXFLAGS) $^ -o $@ $(FLTK_LDFLAGS) $(XPM_LIBS) $(LIBLO_LIBS) $(FLTK_LIBS) -LFL -lfl_widgets && echo $(DONE)
src/send_osc: src/send_osc.o nonlib/libnonlib.a
@ $(CXX) $(CXXFLAGS) $^ -o $@ $(LIBS) -Lnonlib -lnonlib && echo $(DONE)
src/jackpatch: src/jackpatch.o
@ $(CXX) $(CXXFLAGS) $^ -o $@ $(JACK_LIBS) $(LIBLO_LIBS) && echo $(DONE)
Session: src/send_osc src/nsmd src/session-manager src/jackpatch src/nsm-proxy src/nsm-proxy-gui
clean:
rm -f $(OBJS) src/nsmd src/session-manager src/jackpatch src/nsm-proxy src/nsm-proxy-gui .deps
install: all
@ echo -n "Installing..."
@ install -Dm755 src/nsmd "$(DESTDIR)$(prefix)"/bin/nsmd
@ install -Dm755 src/session-manager "$(DESTDIR)$(prefix)"/bin/non-session-manager
@ install -Dm755 src/nsm-proxy "$(DESTDIR)$(prefix)"/bin/nsm-proxy
@ install -Dm755 src/nsm-proxy-gui "$(DESTDIR)$(prefix)"/bin/nsm-proxy-gui
@ install -Dm755 src/jackpatch "$(DESTDIR)$(prefix)"/bin/jackpatch
@ install -d "$(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

View File

@ -1 +0,0 @@
../nonlib/

View File

@ -1 +0,0 @@
../scripts

View File

@ -1 +0,0 @@
../../FL

103
session-manager/wscript Normal file
View File

@ -0,0 +1,103 @@
#!/usr/bin/env python
import subprocess
import waflib.Options as Options
import string
import os
# Version of this package (even if built as a child)
PACKAGE_VERSION = '1.2.0'
# Variables for 'waf dist'
APPNAME = 'non-session-manager'
VERSION = PACKAGE_VERSION
# Mandatory variables
top = '.'
out = 'build'
def options(opt):
opt.load('compiler_c')
opt.load('compiler_cxx')
opt.load('gnu_dirs')
def configure(conf):
conf.load('compiler_c')
conf.load('compiler_cxx')
conf.load('gnu_dirs')
conf.define('VERSION', PACKAGE_VERSION)
conf.define('SYSTEM_PATH', string.join( [ conf.env.DATADIR, APPNAME ], '/' ) )
conf.define('DOCUMENT_PATH', string.join( [ conf.env.DATADIR, 'doc' ], '/' ) )
conf.define('PIXMAP_PATH', string.join( [ conf.env.DATADIR, 'pixmaps' ], '/' ) )
conf.write_config_header('config.h', remove=False)
print('')
def build(bld):
libs = ''
bld.program( source = '''
src/session-manager.C
''',
target = 'non-session-manager',
includes = ['.', 'src', '../nonlib', '../FL' ],
uselib = [ 'LIBLO', 'XPM', 'NTK', 'NTK_IMAGES' ],
use = [ 'fl_widgets', 'nonlib'],
install_path = '${BINDIR}')
bld.program( source = '''
src/nsmd.C
''',
target = 'nsmd',
includes = ['.', 'src', '../nonlib'],
uselib = [ 'LIBLO' ],
use = [ 'nonlib'],
install_path = '${BINDIR}')
bld.program( source = '''
src/nsm-proxy.C
''',
target = 'nsm-proxy',
includes = ['.', 'src', '../nonlib', '../FL' ],
uselib = [ 'LIBLO' ],
use = [ 'nonlib'],
install_path = '${BINDIR}')
bld.program( source = '''
src/nsm-proxy-gui.C
src/NSM_Proxy_UI.fl
''',
target = 'nsm-proxy-gui',
includes = ['.', 'src'],
uselib = [ 'LIBLO', 'XPM', 'NTK', 'NTK_IMAGES ' ],
install_path = '${BINDIR}')
bld.program( source = '''
src/jackpatch.c
''',
target = 'jackpatch',
includes = ['.', 'src'],
uselib = [ 'LIBLO', 'JACK' ],
install_path = '${BINDIR}')
bld.program( source = '''
src/send_osc.C
''',
target = 'send_osc',
includes = ['.', 'src', '../nonlib' ],
uselib = [ 'LIBLO' ],
use = [ 'nonlib'],
install_path = '${BINDIR}')
start_dir = bld.path.find_dir( 'icons/hicolor' )
bld.install_files('${DATADIR}/icons/hicolor', start_dir.ant_glob('**/*.png'),
cwd=start_dir, relative_trick=True)
bld.install_as('${DATADIR}/pixmaps/' + APPNAME + '/icon-256x256.png', 'icons/hicolor/256x256/apps/' + APPNAME + '.png')
bld.install_files( string.join( [ '${DATADIR}/doc', APPNAME ], '/' ), bld.path.ant_glob( 'doc/*.html doc/*.png' ) )

View File

@ -1 +0,0 @@
../FL

View File

@ -1 +0,0 @@
scripts/Makefile

47
timeline/configure vendored
View File

@ -1,47 +0,0 @@
#!/bin/sh
#
# Copyright (C) 2008 Jonathan Moore Liles
# This file is licensed under version 2 of the GPL.
. scripts/config-funcs
begin
begin_options
ask "Installation prefix" prefix /usr/local
ask "Build for debugging" USE_DEBUG no
using DEBUG &&
{
ask "Use unoptimized drawing routines" USE_UNOPTIMIZED_DRAWING no
ask "Use widget for timeline" USE_WIDGET_FOR_TIMELINE no
using WIDGET_FOR_TIMELINE || ask "Use singlebuffered timeline" USE_SINGLEBUFFERED_TIMELINE no
}
begin_tests
require_command ar ar
require_command makedepend makedepend
require_NTK 1.3.0 images
require_package JACK 0.103.0 jack
require_package sndfile 1.0.17 sndfile
require_package liblo 0.23 liblo
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
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

View File

@ -1 +0,0 @@
../lib

View File

@ -1,57 +0,0 @@
# -*- mode: makefile; -*-
VERSION := 1.1.0
PACKAGE := TIMELINE
BIN_NAME := non-daw
all: Timeline
SRCS := $(wildcard src/*.C src/*.fl src/Engine/*.C)
SRCS:=$(SRCS:.fl=.C)
SRCS:=$(sort $(SRCS))
OBJS:=$(SRCS:.C=.o)
LIBS += $(FLTK_LDFLAGS) $(JACK_LIBS) $(SNDFILE_LIBS) $(LIBLO_LIBS) $(SIGCPP_LIBS) $(XPM_LIBS)
CFLAGS += $(SNDFILE_CFLAGS) $(FLTK_CFLAGS) $(JACK_CFLAGS) $(SIGCPP_CFLAGS) $(XPM_CFLAGS) -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64
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
src/timeline: $(OBJS) FL/libfl_widgets.a nonlib/libnonlib.a $(FLTK_LIBS)
@ echo -n Linking timeline...
$(CXX) $(CXXFLAGS) $(INCLUDES) $^ -o $@ $(LIBS) -LFL -lfl_widgets -Lnonlib -lnonlib && echo $(DONE)
Timeline: src/timeline
clean:
rm -f $(OBJS) src/timeline .deps
install: all
@ echo -n "Installing..."
@ install -Dm755 src/timeline "$(DESTDIR)$(prefix)"/bin/non-daw
@ install -d "$(DESTDIR)$(SYSTEM_PATH)"/non-daw
@ $(MAKE) -s -C doc install
@ install -d "$(DESTDIR)$(PIXMAP_PATH)/non-daw"
@ install -Dm644 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 "$(DESTDIR)$(prefix)"/bin/non-daw
@ echo "$(DONE)"
endif

View File

@ -1 +0,0 @@
../nonlib

View File

@ -1 +0,0 @@
../scripts/

View File

@ -91,8 +91,8 @@ Annotation_Region::draw ( void )
draw_label( _label, (Fl_Align)(FL_ALIGN_LEFT | FL_ALIGN_INSIDE | FL_ALIGN_TOP | FL_ALIGN_CLIP ) );
}
#include "FL/Fl_Text_Edit_Window.H"
#include "FL/test_press.H"
#include <Fl_Text_Edit_Window.H>
#include <test_press.H>
int
Annotation_Region::handle ( int m )

View File

@ -119,8 +119,8 @@ Cursor_Region::draw ( void )
draw_label( _label, (Fl_Align)(FL_ALIGN_LEFT | FL_ALIGN_INSIDE | FL_ALIGN_TOP | FL_ALIGN_CLIP ) );
}
#include "FL/Fl_Text_Edit_Window.H"
#include "FL/test_press.H"
#include <Fl_Text_Edit_Window.H>
#include <test_press.H>
int
Cursor_Region::handle ( int m )

View File

@ -31,7 +31,7 @@ decl {class Fl_Flowpack;} {public global
decl {\#include <FL/Fl_Overlay_Window.H>} {private local
}
decl {\#include "Fl_Menu_Settings.H"} {private local
decl {\#include <Fl_Menu_Settings.H>} {private local
}
decl {\#include "Timeline.H"} {private local
@ -49,10 +49,10 @@ decl {\#include "Project.H"} {private local
decl {\#include "Clock.H"} {public local
}
decl {\#include "FL/Fl_Flowpack.H"} {private local
decl {\#include <Fl_Flowpack.H>} {private local
}
decl {\#include "New_Project_Dialog.H"} {private local
decl {\#include <New_Project_Dialog.H>} {private local
}
decl {\#include "Track.H" // for capture_format} {private local
@ -85,7 +85,7 @@ decl {\#include "Engine/Engine.H"} {private local
decl {\#include "Engine/Audio_File.H" // for supported formats} {private local
}
decl {\#include "FL/About_Dialog.H"} {private local
decl {\#include <About_Dialog.H>} {private local
}
decl {extern char project_display_name[256];} {private global

105
timeline/wscript Normal file
View File

@ -0,0 +1,105 @@
#!/usr/bin/env python
import subprocess
import waflib.Options as Options
import string
import os;
# Version of this package (even if built as a child)
PACKAGE_VERSION = '1.2.0'
# Variables for 'waf dist'
APPNAME = 'non-daw'
VERSION = PACKAGE_VERSION
# Mandatory variables
top = '.'
out = 'build'
def options(opt):
opt.load('compiler_c')
opt.load('compiler_cxx')
opt.load('gnu_dirs')
def configure(conf):
conf.load('compiler_c')
conf.load('compiler_cxx')
conf.load('gnu_dirs')
conf.env.append_value('CFLAGS', '-D_LARGEFILE64_SOURCE')
conf.env.append_value('CFLAGS', '-D_FILE_OFFSET_BITS=64')
conf.env.append_value('CXXFLAGS', '-D_LARGEFILE64_SOURCE')
conf.env.append_value('CXXFLAGS', '-D_FILE_OFFSET_BITS=64')
conf.check_cfg(package='sndfile', uselib_store='SNDFILE',args="--cflags --libs",
atleast_version='1.0.17', mandatory=True)
conf.define('VERSION', PACKAGE_VERSION)
conf.define('SYSTEM_PATH', string.join( [ conf.env.DATADIR, APPNAME ], '/' ) )
conf.define('DOCUMENT_PATH', string.join( [ conf.env.DATADIR, 'doc' ], '/' ) )
conf.define('PIXMAP_PATH', string.join( [ conf.env.DATADIR, 'pixmaps' ], '/' ) )
conf.write_config_header('config.h', remove=False)
print('')
def build(bld):
# libs = 'LILV SUIL JACK SERD SRATOM LV2'
libs = ''
obj = bld(features = 'cxx cxxprogram',
source = '''
src/Annotation_Region.C
src/Audio_Region.C
src/Audio_Sequence.C
src/Control_Point.C
src/Control_Sequence.C
src/Cursor_Point.C
src/Cursor_Region.C
src/Cursor_Sequence.C
src/Engine/Audio_File.C
src/Engine/Audio_File_Dummy.C
src/Engine/Audio_File_SF.C
src/Engine/Audio_Region.C
src/Engine/Audio_Sequence.C
src/Engine/Control_Sequence.C
src/Engine/Disk_Stream.C
src/Engine/Engine.C
src/Engine/Peaks.C
src/Engine/Playback_DS.C
src/Engine/Record_DS.C
src/Engine/Timeline.C
src/Engine/Track.C
src/NSM.C
src/OSC_Thread.C
src/Project.C
src/Sequence.C
src/Sequence_Point.C
src/Sequence_Region.C
src/Sequence_Widget.C
src/TLE.fl
src/Tempo_Point.C
src/Tempo_Sequence.C
src/Time_Point.C
src/Time_Sequence.C
src/Timeline.C
src/Track.C
src/Transport.C
src/Waveform.C
src/main.C
''',
target = 'non-daw',
includes = ['.', 'src', '../FL', '../nonlib'],
uselib = [ 'JACK', 'LIBLO', 'SNDFILE', 'XPM', 'NTK', 'NTK_IMAGES'],
use = [ 'fl_widgets', 'nonlib'],
install_path = '${BINDIR}')
start_dir = bld.path.find_dir( 'icons/hicolor' )
bld.install_files('${DATADIR}/icons/hicolor', start_dir.ant_glob('**/*.png'),
cwd=start_dir, relative_trick=True)
bld.install_as('${DATADIR}/pixmaps/' + APPNAME + '/icon-256x256.png', 'icons/hicolor/256x256/apps/' + APPNAME + '.png')
bld.install_files( string.join( [ '${DATADIR}/doc', APPNAME ], '/' ), bld.path.ant_glob( 'doc/*.html doc/*.png' ) )

BIN
waf vendored Executable file

Binary file not shown.

120
wscript Normal file
View File

@ -0,0 +1,120 @@
#!/usr/bin/env python
import os
import subprocess
import waflib.Logs as Logs, waflib.Options as Options
import string
VERSION = 'xxx'
APPNAME = 'non-things'
top = '.'
out = 'build'
common = [ 'nonlib', 'FL' ]
projects = [ 'timeline', 'mixer', 'sequencer', 'session-manager' ]
def options(opt):
# opt.add_option('--use-system-ntk', action='store_true', default=False,
# dest='use_system_ntk',
# help="Link to system-installed shared NTK instead of bundled version")
opt.add_option('--enable-debug', action='store_true', default=False, dest='debug',
help='Build for debugging')
opt.add_option('--project', action='store', default=False, dest='project',
help='Limit build to a single project (' + string.join( projects, ', ' ) + ')')
for i in projects:
opt.recurse(i)
def configure(conf):
conf.load('compiler_c')
conf.load('compiler_cxx')
conf.load('gnu_dirs')
conf.load('ntk_fluid')
conf.line_just = 52
optimization_flags = [
"-O3",
"-fomit-frame-pointer",
"-ffast-math",
# "-fstrength-reduce",
"-pipe"
]
debug_flags = [ '-g' ]
if Options.options.debug:
conf.env.append_value('CFLAGS', debug_flags )
conf.env.append_value('CXXFLAGS', debug_flags )
else:
conf.env.append_value('CFLAGS', optimization_flags )
conf.env.append_value('CXXFLAGS', optimization_flags )
conf.define( 'NDEBUG', 1 )
conf.env.append_value('CFLAGS',['-Wall'])
# conf.env.append_value('CXXFLAGS',['-Wall','-fno-exceptions', '-fno-rtti'])
conf.env.append_value('CXXFLAGS',['-Wall','-fno-rtti'])
# NTK_EXTRA_FLAGS=''
# if not Options.options.use_system_ntk:
# print 'Using bundled NTK'
# os.environ['PKG_CONFIG_PATH'] = 'lib/ntk/build/:' + os.environ.get('PKG_CONFIG_PATH','')
# NTK_EXTRA_FLAGS='--static'
# PWD = os.environ.get('PWD','')
# os.environ['PATH'] = PWD + '/lib/ntk/build/fluid:' + os.environ.get('PATH','')
conf.check_cfg(package='ntk', uselib_store='NTK', args='--cflags --libs',
atleast_version='1.3.0', mandatory=True)
conf.check_cfg(package='ntk_images', uselib_store='NTK_IMAGES', args=' --cflags --libs',
atleast_version='1.3.0', mandatory=True)
conf.find_program('ntk-fluid', var='NTK_FLUID')
conf.check_cfg(package='jack', uselib_store='JACK', args="--cflags --libs",
atleast_version='0.103.0', mandatory=True)
conf.check_cfg(package='xpm', uselib_store='XMP',args="--cflags --libs",
atleast_version='2.0.0', mandatory=True)
conf.check_cfg(package='liblo', uselib_store='LIBLO',args="--cflags --libs",
atleast_version='0.26', mandatory=True)
###
for i in common:
conf.recurse(i)
conf.env.PROJECT = conf.options.project
if conf.env.PROJECT:
pl = [ conf.env.PROJECT ]
else:
pl = projects;
for i in pl:
Logs.pprint('YELLOW', 'Configuring %s' % i)
conf.recurse(i);
def run(ctx):
if not Options.options.cmd:
Logs.error("missing --cmd option for run command")
return
cmd = Options.options.cmd
Logs.pprint('GREEN', 'Running %s' % cmd)
subprocess.call(cmd, shell=True, env=source_tree_env())
def build(bld):
for i in common:
bld.recurse(i)
if bld.env.PROJECT:
pl = [ bld.env.PROJECT ]
else:
pl = projects;
for i in pl:
bld.recurse(i);