diff options
Diffstat (limited to 'portmidi/pm_java/make.bat')
| -rw-r--r-- | portmidi/pm_java/make.bat | 50 |
1 files changed, 50 insertions, 0 deletions
diff --git a/portmidi/pm_java/make.bat b/portmidi/pm_java/make.bat new file mode 100644 index 0000000..ff15c2b --- /dev/null +++ b/portmidi/pm_java/make.bat | |||
| @@ -0,0 +1,50 @@ | |||
| 1 | @echo off | ||
| 2 | |||
| 3 | rem This is an out-of-date script for Windows to build a Java application | ||
| 4 | rem (PmDefaults) with PortMidi external library.xb | ||
| 5 | |||
| 6 | rem Compile the java PortMidi interface classes. | ||
| 7 | javac jportmidi/*.java | ||
| 8 | |||
| 9 | rem Compile the pmdefaults application. | ||
| 10 | javac -classpath . pmdefaults/*.java | ||
| 11 | |||
| 12 | rem Temporarily copy the portmusic_logo.png file here to add to the jar file. | ||
| 13 | copy pmdefaults\portmusic_logo.png . > nul | ||
| 14 | |||
| 15 | rem Create a directory to hold the distribution. | ||
| 16 | mkdir win32 | ||
| 17 | |||
| 18 | rem Attempt to copy the interface DLL to the distribution directory. | ||
| 19 | |||
| 20 | if exist "..\release\pmjni.dll" goto have-dll | ||
| 21 | |||
| 22 | echo "ERROR: pmjni.dll not found!" | ||
| 23 | exit /b 1 | ||
| 24 | |||
| 25 | :have-dll | ||
| 26 | copy "..\release\pmjni.dll" win32\pmjni.dll > nul | ||
| 27 | |||
| 28 | rem Create a java archive (jar) file of the distribution. | ||
| 29 | jar cmf pmdefaults\manifest.txt win32\pmdefaults.jar pmdefaults\*.class portmusic_logo.png jportmidi\*.class | ||
| 30 | |||
| 31 | rem Clean up the temporary image file now that it is in the jar file. | ||
| 32 | del portmusic_logo.png | ||
| 33 | |||
| 34 | rem Copy the java execution code obtained from | ||
| 35 | rem http://devwizard.free.fr/html/en/JavaExe.html to the distribution | ||
| 36 | rem directory. The copy also renames the file to our desired executable | ||
| 37 | rem name. | ||
| 38 | copy JavaExe.exe win32\pmdefaults.exe > nul | ||
| 39 | |||
| 40 | rem Integrate the icon into the executable using UpdateRsrcJavaExe from | ||
| 41 | rem http://devwizard.free.fr | ||
| 42 | UpdateRsrcJavaExe -run -exe=win32\pmdefaults.exe -ico=pmdefaults\pmdefaults.ico | ||
| 43 | |||
| 44 | rem Copy the 32-bit windows read me file to the distribution directory. | ||
| 45 | copy pmdefaults\readme-win32.txt win32\README.txt > nul | ||
| 46 | |||
| 47 | rem Copy the license file to the distribution directory. | ||
| 48 | copy pmdefaults\pmdefaults-license.txt win32\license.txt > nul | ||
| 49 | |||
| 50 | echo "You can run pmdefaults.exe in win32" | ||
