diff options
Diffstat (limited to '3rdparty/portmidi/pm_java')
16 files changed, 170 insertions, 395 deletions
diff --git a/3rdparty/portmidi/pm_java/CMakeLists.txt b/3rdparty/portmidi/pm_java/CMakeLists.txt index a3506202792..0bec03f04ae 100644 --- a/3rdparty/portmidi/pm_java/CMakeLists.txt +++ b/3rdparty/portmidi/pm_java/CMakeLists.txt @@ -1,47 +1,86 @@ -# pm_java +# pm_java/CMakeLists.txt -- builds pmjni and pmdefaults program +find_package(Java) +message(STATUS "Java_JAVA_EXECUTABLE is " ${Java_JAVA_EXECUTABLE}) + +if(BUILD_PMDEFAULTS) + # Since pmdefaults and pmdefaults.bat are in the source tree and look + # for libpmjni in the same tree, out-of-source build will not create + # a working pmdefaults (without more work): + if(NOT (${CMAKE_SOURCE_DIR} STREQUAL ${CMAKE_BINARY_DIR})) + message(WARNING "PmDefaults only works when run in the pm_java/pmdefaults directory after an in-source build. This is an out-of-source build, so [probably] libpmjni will be built out-of-source, pmdefaults.jar will be built in-source, and the pmdefaults[.bat] script remains in-source. Rebuild in-source to use PmDefaults or adjust the file locations and scripts to suit yourself.") + endif() + + set(JPORTMIDICLASS JPortMidi.class JPortMidiException.class + JPortMidiApi.class) + set(PMDEFAULTSCLASS PmDefaultsFrame.class PmDefaults.class) + prepend_path(JPORTMIDIPATH jportmidi/ ${JPORTMIDICLASS}) + prepend_path(PMDEFAULTSPATH pmdefaults/ ${PMDEFAULTSCLASS}) + set(PMDEFAULTS_ALL ${JPORTMIDIPATH} ${PMDEFAULTSPATH}) + + project(pmdefaults NONE) + include(UseJava) + add_jar(pmdefaults + SOURCES pmdefaults/PmDefaults.java pmdefaults/PmDefaultsFrame.java + jportmidi/JPortMidi.java jportmidi/JPortMidiApi.java + jportmidi/JPortMidiException.java + RESOURCES NAMESPACE "." pmdefaults/portmusic_logo.png + MANIFEST pmdefaults/manifest.txt + OUTPUT_DIR pmdefaults) + if(WIN32) + set(JAVAVM_LIB ${JAVA_INCLUDE_PATH}/../jre/lib/i386/client/libjvm.so) + endif() + add_dependencies(pmdefaults pmjni) +endif(BUILD_PMDEFAULTS) + +# Build pmjni +# this CMakeLists.txt is only loaded if BUILD_JAVA_NATIVE_INTERFACE +# This jni library includes portmidi sources to give just +# one library for JPortMidi users to manage rather than two. if(UNIX) - if(APPLE) - # java not dealt with in CMake -- see pm_mac/pm_mac.xcodeproj - else(APPLE) - # linux - set(JPORTMIDICLASS JPortMidi.class JPortMidiException.class - JPortMidiApi.class) - set(PMDEFAULTSCLASS PmDefaultsFrame.class PmDefaults.class) - prepend_path(JPORTMIDICLASS2 jportmidi/ ${JPORTMIDICLASS}) - prepend_path(PMDEFAULTSCLASS2 pmdefaults/ ${PMDEFAULTSCLASS}) - set(PMDEFAULTS_ALL_CLASSES ${JPORTMIDICLASS2} ${PMDEFAULTSCLASS2}) - # message(STATUS "PMDEFAULTS_ALL_CLASSES is " ${PMDEFAULTS_ALL_CLASSES}) - add_custom_command(OUTPUT pmdefaults/PmDefaultsFrame.class - COMMAND javac -classpath . pmdefaults/PmDefaultsFrame.java - MAIN_DEPENDENCY pmdefaults/PmDefaultsFrame.java - DEPENDS pmdefaults/PmDefaults.java - WORKING_DIRECTORY pm_java) - add_custom_command(OUTPUT pmdefaults/PmDefaults.class - COMMAND javac -classpath . pmdefaults/PmDefaults.java - MAIN_DEPENDENCY pmdefaults/PmDefaults.java - DEPENDS pmdefaults/PmDefaultsFrame.java - WORKING_DIRECTORY pm_java) - add_custom_command(OUTPUT ${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/pmdefaults.jar - COMMAND cp pmdefaults/portmusic_logo.png . - COMMAND jar cmf pmdefaults/manifest.txt pmdefaults.jar - pmdefaults/*.class portmusic_logo.png jportmidi/*.class - COMMAND chmod +x pmdefaults/pmdefaults - COMMAND cp pmdefaults/pmdefaults ${CMAKE_LIBRARY_OUTPUT_DIRECTORY} - COMMAND mv pmdefaults.jar ${CMAKE_LIBRARY_OUTPUT_DIRECTORY} - COMMAND rm portmusic_logo.png - MAIN_DEPENDENCY pmdefaults/PmDefaults.class - DEPENDS ${PMDEFAULTS_ALL_CLASSES} - WORKING_DIRECTORY pm_java) - add_custom_target(pmdefaults_target ALL - DEPENDS ${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/pmdefaults.jar) - # message(STATUS "add_custom_target: pmdefaults.jar") - - # install the libraries (Linux only) - INSTALL(FILES ${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/pmdefaults.jar - DESTINATION /usr/share/java) - INSTALL(PROGRAMS ${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/pmdefaults - DESTINATION /usr/local/bin) - endif(APPLE) -endif(UNIX) -# In windows, use pm_java/make.bat + include(FindJNI) + # message(STATUS "JAVA_JVM_LIB_PATH is " ${JAVA_JVM_LIB_PATH}) + # message(STATUS "JAVA_INCLUDE_PATH is " ${JAVA_INCLUDE_PATH}) + # note: should use JAVA_JVM_LIB_PATH, but it is not set properly + # note: user might need to set JAVA_INCLUDE_PATH manually + # + # this will probably break on BSD and other Unix systems; the fix + # depends on whether FindJNI can find Java or not. If yes, then + # we should try to rely on automatically set JAVA_INCLUDE_PATH and + # JAVA_INCLUDE_PATH2; if no, then we need to make both JAVA_INCLUDE_PATH + # and JAVA_INCLUDE_PATH2 set by user (will need clear documentation + # because JAVA_INCLUDE_PATH2 is pretty obscure) + set(JAVA_INCLUDE_PATH ${JAVA_INCLUDE_PATH-UNKNOWN} + CACHE STRING "where to find Java SDK include directory") + # libjvm.so is found relative to JAVA_INCLUDE_PATH: + if (HAIKU) + set(JAVA_INCLUDE_PATHS ${JAVA_INCLUDE_PATH} ${JAVA_INCLUDE_PATH}/haiku) + else() + set(JAVA_INCLUDE_PATHS ${JAVA_INCLUDE_PATH} ${JAVA_INCLUDE_PATH}/linux) + endif() +elseif(WIN32) + include(FindJNI) + # note: should use JAVA_JVM_LIB_PATH, but it is not set properly + set(JAVAVM_LIB ${JAVA_INCLUDE_PATH}/../lib/jvm.lib) + + set(JAVA_INCLUDE_PATHS ${JAVA_INCLUDE_PATH} ${JAVA_INCLUDE_PATH2}) + # message(STATUS "JAVA_INCLUDE_PATHS: " ${JAVA_INCLUDE_PATHS}) + # message(STATUS "JAVAVM_LIB: " ${JAVAVM_LIB}) +endif() + +add_library(pmjni SHARED pmjni/pmjni.c) +target_sources(pmjni PRIVATE ${PM_LIB_PUBLIC_SRC} ${PM_LIB_PRIVATE_SRC}) +message(STATUS "Java paths ${JAVA_INCLUDE_PATHS}") +# message(STATUS "Java pmjni src: pmjni/pmjni.c ${PM_LIB_SHARED_SRC} " +# "${PM_LIB_PRIVATE_SRC}") +target_include_directories(pmjni PUBLIC ${JAVA_INCLUDE_PATHS}) +target_link_libraries(pmjni ${PM_NEEDED_LIBS}) +set_target_properties(pmjni PROPERTIES + VERSION ${LIBRARY_VERSION} + SOVERSION ${LIBRARY_SOVERSION} + LIBRARY_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}" + RUNTIME_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}" + ARCHIVE_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}" + EXECUTABLE_EXTENSION "jnilib" + MACOSX_RPATH ON) + diff --git a/3rdparty/portmidi/pm_java/JavaExe.exe b/3rdparty/portmidi/pm_java/JavaExe.exe Binary files differdeleted file mode 100644 index 8886d2e8672..00000000000 --- a/3rdparty/portmidi/pm_java/JavaExe.exe +++ /dev/null diff --git a/3rdparty/portmidi/pm_java/README.txt b/3rdparty/portmidi/pm_java/README.txt index 44c6fab4508..bf0d73768b2 100644 --- a/3rdparty/portmidi/pm_java/README.txt +++ b/3rdparty/portmidi/pm_java/README.txt @@ -1,33 +1,70 @@ README.txt Roger B. Dannenberg 16 Jun 2009 +updated 2021 -This directory was created to implement PmDefaults, a program to -set default input and output devices for PortMidi applications. +This directory implements a JNI library so that Java programs can use +the PortMidi API. This was mainly created to implement PmDefaults, a +program to set default input and output devices for PortMidi +applications. -There are three main sub-projects here: - 1) pmjni -- a JNI (Java Native Interface) to access PortMidi - 2) jportmidi -- a Java class to access PortMidi (uses pmjni) - 3) pmdefaults -- the PmDefaults application (uses jportmidi) +PmDefaults never found much use. I recommend you implement +per-application preferences and store default PortMidi device +numbers for input and output there. (Or better yet, store +device *names* since numbers can change if you plug in or +remove USB devices.) -For Mac OS X, you should build the PmDefaults application in Xcode. +Even without PmDefaults, a PortMidi API for Java is probably an +improvement over other Java libraries, but there is very little MIDI +development in Java, so I have not maintained this API. The only thing +probably seriously wrong now is an interface to the +Pm_CreateVirtualInput and Pm_CreateVirtualOutput functions, which are +new additions. -For Win32, an installer for PmDefaults is included in setup/. -To build from sources, you should first build everything including -the portmidi dll (that will be used by the Java application) using -Visual C++ and a provided .sln file in the portmidi home directory. -Then, run make.bat in this directory. The subdirectory win32 will be -created with the application pmdefaults.exe. You can run this application -in the normal way. To move the application, you need to copy *everything* -in win32. To build setup/pmdefaults-setup.exe, I have used both -Setup Generator from Gentee software and Inno Setup from jrsoftware.org. -A script for Inno Setup is included in this directory, but since paths -seem to be absolute, you will have to adjust the paths in the script -before you use it. +I will leave the code here, and if there is a demand, please either +update it or let your needs be known. Perhaps I or someone can help. + +================================================================== ----- implementation notes ---- +BUILDING PmDefaults PROGRAM -For windows, we use the free software JavaExe.exe. The copy here was +You must have a JDK installed (Java development kit including javac +(the Java compiler), jni.h, etc. + +Test java on the command line, e.g., type: javac -version + +Enable these options in the main CMakeLists.txt file (run CMake +from your top-level repository directory): + BUILD_JAVA_NATIVE_INTERFACE + BUILD_PMDEFAULTS +In my Ubuntu linux with jdk-15, ccmake was unable to find my JDK, so +I have to manually set CMake variables as follows (type 't' to see +these in ccmake): + JAVA_AWT_INCLUDE_PATH /usr/lib/jvm/jdk-15/include + JAVA_AWT_LIBRARY /usr/lib/jvm/jdk-15/lib + JAVA_INCLUDE_PATH /usr/lib/jvm/jdk-15/include + JAVA_INCLUDE_PATH2 /usr/lib/jvm/jdk-15/include + JAVA_JVM_LIBRARY /usr/lib/jvm/jdk-15/lib +Of course, your paths may differ. + + +RUNNING PmDefaults PROGRAM + +After building the pmdefaults target with make, Visual Studio, or Xcode: +In Windows: + [from the command line:] + cd portmidi\pm_java\pmdefaults -- change to this directory + pmdefaults -- runs pmdefaults.bat + [or from the finder:] + double-click on pmdefaults.bat +In macOS and Linux: + cd portmidi\pm_java\pmdefaults -- change to this directory + ./pmdefaults -- shell script to invoke java + + +---- old implementation notes ---- + +For Windows, we use the free software JavaExe.exe. The copy here was downloaded from http://software.techrepublic.com.com/abstract.aspx?kw=javaexe&docid=767485 @@ -40,9 +77,3 @@ Java application jar file and then *renaming* JavaExe.exe to the name of the jar file, but keeping the .exe extension. (See make.bat for this step.) Documentation for JavaExe can be obtained by downloading the whole program from the URL(s) above. - - - - - - diff --git a/3rdparty/portmidi/pm_java/UpdateRsrcJavaExe.exe b/3rdparty/portmidi/pm_java/UpdateRsrcJavaExe.exe Binary files differdeleted file mode 100644 index 492ec1679ea..00000000000 --- a/3rdparty/portmidi/pm_java/UpdateRsrcJavaExe.exe +++ /dev/null diff --git a/3rdparty/portmidi/pm_java/jportmidi/JPortMidi.java b/3rdparty/portmidi/pm_java/jportmidi/JPortMidi.java index dd3cc2a1c3a..7116e19640a 100644 --- a/3rdparty/portmidi/pm_java/jportmidi/JPortMidi.java +++ b/3rdparty/portmidi/pm_java/jportmidi/JPortMidi.java @@ -77,7 +77,9 @@ public class JPortMidi { throw new JPortMidiException(pmStreamOpen, "RefreshDeviceLists called while stream is open"); } + if (trace) System.out.println("Pm_Terminate"); checkError(pm.Pm_Terminate()); + if (trace) System.out.println("Pm_Initialize"); checkError(pm.Pm_Initialize()); } diff --git a/3rdparty/portmidi/pm_java/mac-make.sh b/3rdparty/portmidi/pm_java/mac-make.sh deleted file mode 100644 index e5e9592b0a0..00000000000 --- a/3rdparty/portmidi/pm_java/mac-make.sh +++ /dev/null @@ -1,26 +0,0 @@ -# script to build a jar file to run PmDefaults from the command line on OS X -# (This is for debugging. Normally, you would use XCode to build PmDefaults.app.) - -# Compile the java Portidi interface classes. -javac jportmidi/*.java - -# Compile the pmdefaults application. -javac -classpath . pmdefaults/*.java - -# Temporarily copy the portmusic_logo.png file here to add to the jar file. -cp pmdefaults/portmusic_logo.png . - -# Create a directory to hold the distribution. -mkdir mac-osx - -# Copy the interface DLL to the distribution directory. -cp ../Release/libpmjni.dylib mac-osx - -# Create a java archive (jar) file of the distribution. -jar cmf pmdefaults/manifest.txt mac-osx/pmdefaults.jar pmdefaults/*.class portmusic_logo.png jportmidi/*.class - -# Clean up the temporary image file now that it is in the jar file. -rm portmusic_logo.png - -echo "You now have a jar file in mac-osx" - diff --git a/3rdparty/portmidi/pm_java/pmdefaults-setup-script.iss b/3rdparty/portmidi/pm_java/pmdefaults-setup-script.iss deleted file mode 100644 index c7fe5f57e34..00000000000 --- a/3rdparty/portmidi/pm_java/pmdefaults-setup-script.iss +++ /dev/null @@ -1,44 +0,0 @@ -; Script generated by the Inno Setup Script Wizard. -; SEE THE DOCUMENTATION FOR DETAILS ON CREATING INNO SETUP SCRIPT FILES! - -[Setup] -; NOTE: The value of AppId uniquely identifies this application. -; Do not use the same AppId value in installers for other applications. -; (To generate a new GUID, click Tools | Generate GUID inside the IDE.) -AppId={{5094958B-3CD7-4780-A883-69C9E5B95AEF} -AppName=PmDefaults -AppVerName=PmDefaults -AppPublisher=Roger Dannenberg - Carnegie Mellon University -AppPublisherURL=http://portmedia.sourceforge.net/ -AppSupportURL=http://portmedia.sourceforge.net/ -AppUpdatesURL=http://portmedia.sourceforge.net/ -DefaultDirName={pf}\PmDefaults -DefaultGroupName=PmDefaults -LicenseFile=C:\Users\rbd\portmedia\portmidi\pm_java\win32\license.txt -OutputBaseFilename=setup -SetupIconFile=C:\Users\rbd\portmedia\portmidi\pm_java\pmdefaults\pmdefaults.ico -Compression=lzma -SolidCompression=yes - -[Languages] -Name: "english"; MessagesFile: "compiler:Default.isl" - -[Tasks] -Name: "desktopicon"; Description: "{cm:CreateDesktopIcon}"; GroupDescription: "{cm:AdditionalIcons}"; Flags: unchecked -Name: "quicklaunchicon"; Description: "{cm:CreateQuickLaunchIcon}"; GroupDescription: "{cm:AdditionalIcons}"; Flags: unchecked - -[Files] -Source: "C:\Users\rbd\portmedia\portmidi\pm_java\win32\pmdefaults.exe"; DestDir: "{app}"; Flags: ignoreversion -Source: "C:\Users\rbd\portmedia\portmidi\pm_java\win32\pmdefaults.jar"; DestDir: "{app}"; Flags: ignoreversion -Source: "C:\Users\rbd\portmedia\portmidi\pm_java\win32\pmjni.dll"; DestDir: "{app}"; Flags: ignoreversion -Source: "C:\Users\rbd\portmedia\portmidi\pm_java\win32\license.txt"; DestDir: "{app}"; Flags: ignoreversion -; NOTE: Don't use "Flags: ignoreversion" on any shared system files - -[Icons] -Name: "{group}\PmDefaults"; Filename: "{app}\pmdefaults.exe" -Name: "{commondesktop}\PmDefaults"; Filename: "{app}\pmdefaults.exe"; Tasks: desktopicon -Name: "{userappdata}\Microsoft\Internet Explorer\Quick Launch\PmDefaults"; Filename: "{app}\pmdefaults.exe"; Tasks: quicklaunchicon - -[Run] -Filename: "{app}\pmdefaults.exe"; Description: "{cm:LaunchProgram,PmDefaults}"; Flags: nowait postinstall skipifsilent - diff --git a/3rdparty/portmidi/pm_java/pmdefaults/PmDefaults.java b/3rdparty/portmidi/pm_java/pmdefaults/PmDefaults.java index 20708fc9b66..4cfdb9da96a 100644 --- a/3rdparty/portmidi/pm_java/pmdefaults/PmDefaults.java +++ b/3rdparty/portmidi/pm_java/pmdefaults/PmDefaults.java @@ -1,11 +1,15 @@ // PmDefaults -- a small application to set PortMIDI default input/output package pmdefaults; +import javax.swing.SwingUtilities; public class PmDefaults { public static void main(String[] args) { System.out.println("starting main"); - new PmDefaultsFrame("PortMIDI Setup"); + SwingUtilities.invokeLater(new Runnable() { + public void run() { + new PmDefaultsFrame("PortMIDI Setup"); + } + }); } } - diff --git a/3rdparty/portmidi/pm_java/pmdefaults/README.txt b/3rdparty/portmidi/pm_java/pmdefaults/README.txt index e0a4d4b40e8..39fa1fd2c2f 100644 --- a/3rdparty/portmidi/pm_java/pmdefaults/README.txt +++ b/3rdparty/portmidi/pm_java/pmdefaults/README.txt @@ -2,20 +2,19 @@ README.txt Roger B. Dannenberg 2 Jan 2009 -PmDefaults is a program to set default input and output devices for PortMidi -applications. After running the PmDefaults program and choosing devices, -identifiers for these devices will be returned by -Pm_GetDefaultInputDeviceID() and Pm_GetDefaultOutputDeviceID(). +PmDefaults is a program to set default input and output devices for +PortMidi applications. After running the PmDefaults program and +choosing devices, identifiers for these devices will be returned by +calls (within any program) to Pm_GetDefaultInputDeviceID() and +Pm_GetDefaultOutputDeviceID(). Included in this directory are: manifest.txt -- used in pmdefaults.jar -pmdefaults-icon.* -- various icons for applications -pmdefaults-license.txt -- a version of portmidi/license.txt formatted for - the windows installer +pmdefaults-license.txt -- license text +pmdefaults-icon.{bmp,xcf,png,gif} -- icons +pmdefaults.{ico,icns} - icons portmusic_logo.png -- a logo displayed by the pmdefaults application -readme-win32.txt -- this becomes the readme file for the pmdefaults - application. It is copied to win32/README.txt by make.bat -TO BUILD THE APPLICATION: see ../README.txt +TO BUILD AND RUN THE APPLICATION: see ../README.txt diff --git a/3rdparty/portmidi/pm_java/pmdefaults/pmdefaults b/3rdparty/portmidi/pm_java/pmdefaults/pmdefaults index 80162469ae0..fb01fbf0f67 100644 --- a/3rdparty/portmidi/pm_java/pmdefaults/pmdefaults +++ b/3rdparty/portmidi/pm_java/pmdefaults/pmdefaults @@ -1 +1,8 @@ -java -jar /usr/share/java/pmdefaults.jar > /dev/null +#!/bin/sh +# Run PmDefaults, the GUI to select default MIDI input and output for PortMidi +# Due to the locations of the .jar file and libpmjni, this script only runs +# from <portmidi-repo-path>/pm_java/pmdefaults. PmDefaults is minimally +# supported -- if you would like it to appear as an app on your desktop, +# contact the developer(s) and let us know it's actually being used. +# library path here includes directory locations for macOS and Linux. +java -Djava.library.path=../../Release:../../Debug:../.. -jar pmdefaults.jar > /dev/null diff --git a/3rdparty/portmidi/pm_java/pmdefaults/pmdefaults-license.txt b/3rdparty/portmidi/pm_java/pmdefaults/pmdefaults-license.txt index 317f70e0eb6..703923c25b9 100644 --- a/3rdparty/portmidi/pm_java/pmdefaults/pmdefaults-license.txt +++ b/3rdparty/portmidi/pm_java/pmdefaults/pmdefaults-license.txt @@ -3,8 +3,6 @@ LICENSE INFORMATION PmDefaults is a small program to set default MIDI input and output devices for other programs using the PortMidi library. -Latest version available at: http://sourceforge.net/projects/portmedia - Copyright (c) 1999-2000 Ross Bencina and Phil Burk Copyright (c) 2001-2009 Roger B. Dannenberg diff --git a/3rdparty/portmidi/pm_java/pmdefaults/pmdefaults.bat b/3rdparty/portmidi/pm_java/pmdefaults/pmdefaults.bat new file mode 100644 index 00000000000..7ebfdf75e08 --- /dev/null +++ b/3rdparty/portmidi/pm_java/pmdefaults/pmdefaults.bat @@ -0,0 +1 @@ +java -Djava.library.path="../../Release;../../Debug" -jar pmdefaults.jar diff --git a/3rdparty/portmidi/pm_java/pmdefaults/readme-win32.txt b/3rdparty/portmidi/pm_java/pmdefaults/readme-win32.txt deleted file mode 100644 index 5ff168bd715..00000000000 --- a/3rdparty/portmidi/pm_java/pmdefaults/readme-win32.txt +++ /dev/null @@ -1,11 +0,0 @@ -README.txt -Roger B. Dannenberg -1 Jan 2009 - -This directory contains files that implement: - -pmdefaults -- a program to set PortMidi default input/output devices - -You can copy and rename this *whole directory* to move the application -to a convenient place. The application to run is pmdefaults.exe. - diff --git a/3rdparty/portmidi/pm_java/pmjni/pmjni-VC8.vcproj b/3rdparty/portmidi/pm_java/pmjni/pmjni-VC8.vcproj deleted file mode 100644 index 1b42bfac9bd..00000000000 --- a/3rdparty/portmidi/pm_java/pmjni/pmjni-VC8.vcproj +++ /dev/null @@ -1,225 +0,0 @@ -<?xml version="1.0" encoding="Windows-1252"?> -<VisualStudioProject - ProjectType="Visual C++" - Version="8.00" - Name="pmjni" - ProjectGUID="{7AA255C8-48BF-40AC-97BA-F7E7BA4DDAA8}" - RootNamespace="pmjni" - Keyword="Win32Proj" - > - <Platforms> - <Platform - Name="Win32" - /> - </Platforms> - <ToolFiles> - </ToolFiles> - <Configurations> - <Configuration - Name="Debug|Win32" - OutputDirectory="$(SolutionDir)$(ConfigurationName)" - IntermediateDirectory="$(ConfigurationName)" - ConfigurationType="2" - CharacterSet="2" - > - <Tool - Name="VCPreBuildEventTool" - /> - <Tool - Name="VCCustomBuildTool" - /> - <Tool - Name="VCXMLDataGeneratorTool" - /> - <Tool - Name="VCWebServiceProxyGeneratorTool" - /> - <Tool - Name="VCMIDLTool" - /> - <Tool - Name="VCCLCompilerTool" - Optimization="0" - AdditionalIncludeDirectories=""$(SolutionDir)\pm_common";"$(SolutionDir)\porttime";"$(ProjectDir)";"E:\Program Files\Java\jdk1.5.0_14\include";"E:\Program Files\Java\jdk1.5.0_14\include\win32"" - PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_USRDLL;PMJNI_EXPORTS" - MinimalRebuild="true" - BasicRuntimeChecks="3" - RuntimeLibrary="3" - UsePrecompiledHeader="0" - WarningLevel="3" - Detect64BitPortabilityProblems="true" - DebugInformationFormat="4" - /> - <Tool - Name="VCManagedResourceCompilerTool" - /> - <Tool - Name="VCResourceCompilerTool" - /> - <Tool - Name="VCPreLinkEventTool" - /> - <Tool - Name="VCLinkerTool" - AdditionalDependencies="winmm.lib" - LinkIncremental="2" - GenerateDebugInformation="true" - SubSystem="2" - TargetMachine="1" - /> - <Tool - Name="VCALinkTool" - /> - <Tool - Name="VCManifestTool" - /> - <Tool - Name="VCXDCMakeTool" - /> - <Tool - Name="VCBscMakeTool" - /> - <Tool - Name="VCFxCopTool" - /> - <Tool - Name="VCAppVerifierTool" - /> - <Tool - Name="VCWebDeploymentTool" - /> - <Tool - Name="VCPostBuildEventTool" - /> - </Configuration> - <Configuration - Name="Release|Win32" - OutputDirectory="$(SolutionDir)$(ConfigurationName)" - IntermediateDirectory="$(ConfigurationName)" - ConfigurationType="2" - CharacterSet="2" - WholeProgramOptimization="1" - > - <Tool - Name="VCPreBuildEventTool" - /> - <Tool - Name="VCCustomBuildTool" - /> - <Tool - Name="VCXMLDataGeneratorTool" - /> - <Tool - Name="VCWebServiceProxyGeneratorTool" - /> - <Tool - Name="VCMIDLTool" - /> - <Tool - Name="VCCLCompilerTool" - AdditionalIncludeDirectories=""$(SolutionDir)\pm_common";"$(SolutionDir)\porttime";"$(ProjectDir)";"E:\Program Files\Java\jdk1.5.0_14\include";"E:\Program Files\Java\jdk1.5.0_14\include\win32"" - PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_USRDLL;PMJNI_EXPORTS" - RuntimeLibrary="2" - UsePrecompiledHeader="0" - WarningLevel="3" - Detect64BitPortabilityProblems="true" - DebugInformationFormat="3" - /> - <Tool - Name="VCManagedResourceCompilerTool" - /> - <Tool - Name="VCResourceCompilerTool" - /> - <Tool - Name="VCPreLinkEventTool" - /> - <Tool - Name="VCLinkerTool" - AdditionalDependencies="winmm.lib" - LinkIncremental="1" - GenerateDebugInformation="true" - SubSystem="2" - OptimizeReferences="2" - EnableCOMDATFolding="2" - TargetMachine="1" - /> - <Tool - Name="VCALinkTool" - /> - <Tool - Name="VCManifestTool" - /> - <Tool - Name="VCXDCMakeTool" - /> - <Tool - Name="VCBscMakeTool" - /> - <Tool - Name="VCFxCopTool" - /> - <Tool - Name="VCAppVerifierTool" - /> - <Tool - Name="VCWebDeploymentTool" - /> - <Tool - Name="VCPostBuildEventTool" - /> - </Configuration> - </Configurations> - <References> - </References> - <Files> - <Filter - Name="Source Files" - Filter="cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx" - UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}" - > - <File - RelativePath=".\pmjni.c" - > - </File> - <File - RelativePath="..\..\pm_common\pmutil.c" - > - </File> - <File - RelativePath="..\..\pm_win\pmwin.c" - > - </File> - <File - RelativePath="..\..\pm_win\pmwinmm.c" - > - </File> - <File - RelativePath="..\..\pm_common\portmidi.c" - > - </File> - <File - RelativePath="..\..\porttime\porttime.c" - > - </File> - <File - RelativePath="..\..\porttime\ptwinmm.c" - > - </File> - </Filter> - <Filter - Name="Header Files" - Filter="h;hpp;hxx;hm;inl;inc;xsd" - UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}" - > - </Filter> - <Filter - Name="Resource Files" - Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav" - UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}" - > - </Filter> - </Files> - <Globals> - </Globals> -</VisualStudioProject> diff --git a/3rdparty/portmidi/pm_java/pmjni/pmjni.c b/3rdparty/portmidi/pm_java/pmjni/pmjni.c index 95e51dda4c5..c60cffb45eb 100644 --- a/3rdparty/portmidi/pm_java/pmjni/pmjni.c +++ b/3rdparty/portmidi/pm_java/pmjni/pmjni.c @@ -13,11 +13,11 @@ // the size of a pointer. Finally cast int to pointer. All this // is supposed to avoid C compiler warnings and (worse) losing // address bits. -#define PMSTREAM(obj, fid) ((PmStream *) (long) (*env)->GetLongField(env, obj, fid)) +#define PMSTREAM(obj, fid) ((PmStream *) (intptr_t) (*env)->GetLongField(env, obj, fid)) // Cast stream to long to convert integer to pointer, then expand // integer to 64-bit jlong. This avoids compiler warnings. #define SET_PMSTREAM(obj, fid, stream) \ - (*env)->SetLongField(env, obj, fid, (jlong) (long) stream) + (*env)->SetLongField(env, obj, fid, (jlong) (intptr_t) stream) /* diff --git a/3rdparty/portmidi/pm_java/setup/pmdefaults-setup.exe b/3rdparty/portmidi/pm_java/setup/pmdefaults-setup.exe Binary files differdeleted file mode 100644 index 78ef52c3e44..00000000000 --- a/3rdparty/portmidi/pm_java/setup/pmdefaults-setup.exe +++ /dev/null |