1
0
mirror of https://github.com/cookiengineer/audacity synced 2025-10-22 14:32:58 +02:00

Fixed MIDI playback on Linux. Still need configure files for libscorealign and portmidi. (I tweaked makefiles by hand to build and test with EXPERIMENTAL_MIDI_OUT and EXPERIMENTAL_SCOREALIGN.) Also, I updated portmidi files, including some bug fixes from the portmidi project.

This commit is contained in:
rbdannenberg
2010-10-01 17:59:18 +00:00
parent 576dfe6653
commit 6fa857c3ae
39 changed files with 375 additions and 5373 deletions

View File

@@ -1,18 +1,30 @@
README_MAC.txt for PortMidi
Roger Dannenberg
20 nov 2009
revised 20 Sep 2010 for Xcode 3.2.4 and CMake 8.2-2
To build PortMidi for Mac OS X, you must install Xcode, and
if you want to build from the command line, you should install
To build PortMidi for Mac OS X, you must install Xcode and
CMake.
CMake can build either Makefiles or Xcode projects, or you
can use the pre-built Xcode project. These approaches are
described in separate sections below.
CMake can build either command-line Makefiles or Xcode projects.
These approaches are described in separate sections below.
==== CLEANING UP ====
You can remove previously built apps, object code, and libraries by
running "cd pm_mac; sh cleanslate.sh"
(Skip this for now, but later you might want start from a clean
slate.)
Start in the portmedia/portmidi directory.
make -f pm_mac/Makefile.osx clean
will remove .o, CMakeFiles, and other intermediate files.
Using "cleaner" instead of "clean" will also remove jni-related
intermediate files.
Using "cleanest" instead of "clean" or "cleaner" will also remove
application binaries and the portmidi libraries. (It will not
uninstall anything, however.)
==== USING CMAKE (AND COMMAND LINE TOOLS) ====
@@ -50,19 +62,41 @@ You should now make the pmdefaults.app:
make -f pm_mac/Makefile.osx pmdefaults
NOTES: xcode is likely to crash after building pmdefaults, but
pmdefaults should be OK (it will be in Release)
Once you get started, you can run make directly in the
Debug or Release directories
NOTE: pmdefaults.app will be in pm_mac/Release/.
Please copy pmdefaults.app to your Applications folder or wherever
you would normally expect to find it.
==== USING XCODE ====
==== USING CMAKE TO BUILD Xcode PROJECT ====
(1) Open portmidi/portmidi.xcodeproj with Xcode and
Before you can use Xcode, you need a portmidi.xcodeproj file.
CMake builds a location-dependent Xcode project, so unfortunately
it is not easy to provide an Xcode project that is ready to use.
Therefore, you should make your own. Once you have it, you can
use it almost like any other Xcode project, and you will not have
to go back to CMake.
(1) Install CMake if you do not have it already.
(2) Open portmedia/portmidi/CMakeLists.txt with CMake
(3) Use Configure and Generate buttons
(4) This creates portmedia/portmidi/portmidi.xcodeproj.
Note: You will also use pm_mac/pm_mac.xcodeproj, which
is not generated by CMake.
(5) Open portmidi/portmidi.xcodeproj with Xcode and
build what you need. The simplest thing is to build the
ALL_BUILD target. The default will be to build the Debug
version, but you may want to change this to Release.
NOTE: ALL_BUILD may report errors. Try simply building again
or rebuilding specific targets that fail until they build
without errors. There appears to be a race condition or
missing dependencies in the build system.
The Debug version is compiled with PM_CHECK_ERRORS, and the
Release version is not. PM_CHECK_ERRORS will print an error
message and exit your program if any error is returned from
@@ -78,24 +112,25 @@ want to build a Java application using PortMidi. Since I have
not figured out how to use CMake to make an OS X Java application,
use pm_mac/pm_mac.xcodeproj as follows:
(2) open pm_mac/pm_mac.xcodeproj
(6) open pm_mac/pm_mac.xcodeproj
(3) pm_java/pmjni/portmidi_JportmidiApi.h is needed
(7) pm_java/pmjni/portmidi_JportmidiApi.h is needed
by libpmjni.jnilib, the Java native interface library. Since
portmidi_JportmidiApi.h is included with PortMidi, you can skip
to step 4, but if you really want to rebuild everything from
scratch, build the JPortMidiHeaders project.
to step 8, but if you really want to rebuild everything from
scratch, build the JPortMidiHeaders project first, and continue
with step 8:
(4) If you did not build libpmjni.dylib using portmidi.xcodeproj,
(8) If you did not build libpmjni.dylib using portmidi.xcodeproj,
do it now. (It depends on portmidi_JportmidiApi.h, and the
PmDefaults project depends on libpmjni.dylib.)
(5) Returning to pm_mac.xcodeproj, build the PmDefaults program.
(9) Returning to pm_mac.xcodeproj, build the PmDefaults program.
(6) If you wish, copy pm_mac/build/Deployment/PmDefaults.app to
(10) If you wish, copy pm_mac/build/Deployment/PmDefaults.app to
your applications folder.
(7) If you want to install libportmidi.dylib, first make it with
(11) If you want to install libportmidi.dylib, first make it with
Xcode, then
sudo make -f pm_mac/Makefile.osx install
This command will install /usr/local/include/{porttime.h, portmidi.h}
@@ -104,36 +139,11 @@ Note that the "install" function of xcode creates portmidi/Release
and does not install the library to /usr/local/lib, so please use
the command line installer.
==== USING CMAKE TO BUILD Xcode PROJECT ====
(1) Install CMake if you do not have it already.
(2) Open portmedia/portmidi/CMakeLists.txt with CMake
(3) Use Configure and Generate buttons
(4) This creates portmedia/portmidi/portmidi.xcodeproj.
(5) Follow the directions above using Xcode to compile
PortMidi.
Notes:
(1) You will also use pm_mac/pm_mac.xcodeproj, which
is not generated by CMake.
(2) The portmidi.xcodeproj created by CMake will have absolute
paths and depend on CMake, so it will not be very portable to other
machines or even directories. You can cd to pm_mac and run
clean_up_project.sh to convert pm_mac.xcodeproj to use relative
paths and to remove the scripts that run CMake. You'll first have
to modify pm_mac/clean_up_project.awk to contain the particular
absolute path or your portmidi project. Also, this is a pretty simple
and probably fragile hack to make a stand-alone xcode project. I
don't recommend it. Instead, either use CMake all the time, or use
the portmidi.xcodeproj you get with the distribution.
CHANGELOG
20-Sep-2010 Roger B. Dannenberg
Adapted to Xcode 3.2.4
20-Nov-2009 Roger B. Dannenberg
Added some install instructions
26-Sep-2009 Roger B. Dannenberg