1
0
mirror of https://github.com/cookiengineer/audacity synced 2026-01-11 23:25:53 +01:00

Update portmidi to SVN r227.

This commit is contained in:
lllucius
2013-10-31 07:33:41 +00:00
parent a30f9e913b
commit bb63fa0d07
118 changed files with 15017 additions and 12291 deletions

View File

@@ -52,8 +52,10 @@ TO COMPILE PORTMIDI:
3) cd to or open the portmidi directory
4) start or click on the portmidi.sln workspace (note, there is also
portmidi-VC9.sln for Visual C++ version 9 users).
4) start or click on the portmidi.sln workspace (note, all Visual Studio
files are built by CMake. If you need a different version or have
problems with paths, try rebuilding the Visual Studio project files
using CMake -- See "Using other versions of visual C++" below.)
5) the following projects exist within this workspace:
- portmidi-static, portmidi-dynamic (versions of the PortMidi library)
@@ -82,7 +84,10 @@ TO COMPILE PORTMIDI:
- similarly, the Linker->Input->Additional Dependencies list has a
path to the jvm.lib file, which needs to be correct(ed).
6) use Build->Batch Build ... to build everything in the project
6) use Build->Batch Build ... to build everything in the project. If a
build fails, try building again. There seem to be some missing
dependencies, so you may have to "ALL_BUILD" several times before
everything builds successfully.
7) The settings for these projects were distributed in the zip file, so
compile should just work.
@@ -115,9 +120,9 @@ TO COMPILE PORTMIDI:
move jportmidi_JPortMidiApi pmjni\jportmidi_JPortMidiApi.h
11) you might wish to move pm_java/win32 to another location; run the
pmdefaults.exe program from the win32 directory to use PmDefaults.
This program let's you select default input/output midi devices
for PortMidi applications.
pmdefaults.exe program from the (entire) win32 directory to use
PmDefaults. This program let's you select default input/output
midi devices for PortMidi applications.
============================================================================
ABOUT CMAKE

View File

@@ -0,0 +1,6 @@
del /Q ..\CMakeFiles
del /Q ..\CMakeCache.txt
del /Q ..\pm_test\CMakeFiles
del /Q ..\pm_common\CMakeFiles
del /Q ..\pm_dylib\CMakeFiles

View File

@@ -0,0 +1,70 @@
# gawk script to convert CMake-generated Visual Studio projects into
# stand-alone project files
#
# Roger Dannenberg, October 2009
#
# the result uses relative path names (so you can install the project on
# any machine and use it)
#
# NOTE: to run this, you must assign base_relative to the relative path
# from the vcproj file to portmidi, e.g. base_relative=.. or base_relative=.
BEGIN {
state = "normal";
#=================IMPORTANT====================
# change the following path to the path in which
# the CMakeLists.txt file resides:
base_path = "C:\\\\Users\\\\rbd\\\\portmedia\\\\portmidi";
#==============================================
base_path_2 = base_path;
gsub("\\\\\\\\", "/", base_path_2)
cmake_stuff = 0; # flag to print <file> ... </file> text
}
# this case removes CMake phases from project
state == "cmakelists" {
# print "IN CMAKELISTS "
file_text = file_text "\n" $0 # collect the <file> ... </file> section
if (index($0, "CMakeLists.txt") > 0) {
cmake_stuff = 1 # remember to delete this <file> ... </file> section
}
if (index($0, "</File>") > 0) {
state = "normal";
if (cmake_stuff == 0) {
gsub(base_path, base_relative, file_text)
gsub(base_path_2, base_relative, file_text)
print file_text;
}
cmake_stuff = 0;
};
next
}
# this is the normal case, not in buildPhases list
state == "normal" {
# print "NOT IN BUILD PHASES"
# take out all the absolute paths
gsub(base_path, base_relative, $0);
gsub(base_path_2, base_relative, $0);
# special processing for <file> ... </file> text:
if ($0 ~ "<File$") {
file_text = $0;
cmake_stuff = 0; # innocent (keep text) until proven guilty
state = "cmakelists";
next # do not print this line
};
# THIS CODE WOULD ALLOW portmidi-static and portmidi-dynamic IN
# pm_commmon. I DECIDED TO TRY PUTTING THEM IN SEPARATE DIRECTORIES
# INSTEAD.
# Use static libraries for everything except portmidi-dynamic
#if (($0 ~ "RuntimeLibrary=") && (base_relative ~ "dynamic")) {
# if ($0 ~ 2) {
# $0 = "\t\t\t\tRuntimeLibrary=\"0\"";
# } else if ($0 ~ 3) {
# $0 = "\t\t\t\tRuntimeLibrary=\"1\"";
# }
print $0;
next
}

View File

@@ -0,0 +1,76 @@
@echo off
rem Start this program in portmidi\pm_win
cd ..\pm_common
rename portmidi-static.vcproj portmidi-static.vcproj-cmake
gawk -f ..\pm_win\clean_up_vcproj.awk -v base_relative=.. portmidi-static.vcproj-cmake > portmidi-static.vcproj
del portmidi-static.vcproj-cmake
echo portmidi-static
rename pmjni.vcproj pmjni.vcproj-cmake
gawk -f ..\pm_win\clean_up_vcproj.awk -v base_relative=.. pmjni.vcproj-cmake > pmjni.vcproj
del pmjni.vcproj-cmake
echo pmjni
cd ../pm_dylib
rename portmidi-dynamic.vcproj portmidi-dynamic.vcproj-cmake
gawk -f ..\pm_win\clean_up_vcproj.awk -v base_relative=.. portmidi-dynamic.vcproj-cmake > portmidi-dynamic.vcproj
del portmidi-dynamic.vcproj-cmake
echo portmidi-dynamic
cd ..\pm_test
rename latency.vcproj latency.vcproj-cmake
gawk -f ..\pm_win\clean_up_vcproj.awk -v base_relative=.. latency.vcproj-cmake > latency.vcproj
del latency.vcproj-cmake
echo latency
rename midiclock.vcproj midiclock.vcproj-cmake
gawk -f ..\pm_win\clean_up_vcproj.awk -v base_relative=.. midiclock.vcproj-cmake > midiclock.vcproj
del midiclock.vcproj-cmake
echo midiclock
rename midithread.vcproj midithread.vcproj-cmake
gawk -f ..\pm_win\clean_up_vcproj.awk -v base_relative=.. midithread.vcproj-cmake > midithread.vcproj
del midithread.vcproj-cmake
echo midithread
rename midithru.vcproj midithru.vcproj-cmake
gawk -f ..\pm_win\clean_up_vcproj.awk -v base_relative=.. midithru.vcproj-cmake > midithru.vcproj
del midithru.vcproj-cmake
echo midithru
rename mm.vcproj mm.vcproj-cmake
gawk -f ..\pm_win\clean_up_vcproj.awk -v base_relative=.. mm.vcproj-cmake > mm.vcproj
del mm.vcproj-cmake
echo mm
rename qtest.vcproj qtest.vcproj-cmake
gawk -f ..\pm_win\clean_up_vcproj.awk -v base_relative=.. qtest.vcproj-cmake > qtest.vcproj
del qtest.vcproj-cmake
echo qtest
rename sysex.vcproj sysex.vcproj-cmake
gawk -f ..\pm_win\clean_up_vcproj.awk -v base_relative=.. sysex.vcproj-cmake > sysex.vcproj
del sysex.vcproj-cmake
echo sysex
rename test.vcproj test.vcproj-cmake
gawk -f ..\pm_win\clean_up_vcproj.awk -v base_relative=.. test.vcproj-cmake > test.vcproj
del test.vcproj-cmake
cd ..
echo test
rename ALL_BUILD.vcproj ALL_BUILD.vcproj-cmake
gawk -f pm_win\clean_up_vcproj.awk -v base_relative=. ALL_BUILD.vcproj-cmake > ALL_BUILD.vcproj
del ALL_BUILD.vcproj-cmake
echo ALL_BUILD
rename ZERO_CHECK.vcproj ZERO_CHECK.vcproj-cmake
gawk -f pm_win\clean_up_vcproj.awk -v base_relative=. ZERO_CHECK.vcproj-cmake > ZERO_CHECK.vcproj
del ZERO_CHECK.vcproj-cmake
echo ZERO_CHECK
cd pm_win

View File

@@ -91,7 +91,8 @@ static PmDeviceID pm_get_default_device_id(int is_input, char *key) {
ERROR_SUCCESS) {
return id;
}
if (RegQueryValueEx(hkey, key, NULL, &dwType, pattern, &pattern_max) !=
if (RegQueryValueEx(hkey, key, NULL, &dwType, (BYTE *) pattern,
(DWORD *) &pattern_max) !=
ERROR_SUCCESS) {
return id;
}

View File

@@ -0,0 +1,16 @@
# static.cmake -- change flags to link with static runtime libraries
if(MSVC)
foreach(flag_var
CMAKE_CXX_FLAGS CMAKE_CXX_FLAGS_DEBUG CMAKE_CXX_FLAGS_RELEASE
CMAKE_CXX_FLAGS_MINSIZEREL CMAKE_CXX_FLAGS_RELWITHDEBINFO
CMAKE_C_FLAGS CMAKE_C_FLAGS_DEBUG CMAKE_C_FLAGS_RELEASE
CMAKE_C_FLAGS_MINSIZEREL CMAKE_C_FLAGS_RELWITHDEBINFO)
if(${flag_var} MATCHES "/MD")
string(REGEX REPLACE "/MD" "/MT" ${flag_var} "${${flag_var}}")
endif(${flag_var} MATCHES "/MD")
endforeach(flag_var)
message(STATUS
"Note: overriding CMAKE_*_FLAGS_* to use Visual C static multithread library")
endif(MSVC)