Compare commits
260 Commits
v0.0.0-69e
...
v0.4.4
| Author | SHA1 | Date | |
|---|---|---|---|
| 2064184093 | |||
| 2e6ea5eecc | |||
| 0dde64e5fc | |||
| 28a3326a35 | |||
| df6b893171 | |||
| ead577521d | |||
|
|
cc1c76bd47 | ||
| b74f1aedb4 | |||
| 67d1e787ee | |||
| 11ca88ee38 | |||
|
|
ae4e3db0d7 | ||
|
|
4314790271 | ||
| 9c58276119 | |||
| 16380a9752 | |||
| b523d80c25 | |||
| 34d1f504c0 | |||
| d4a64d4e72 | |||
| 44201a0bbb | |||
|
|
1d19cd4c98 | ||
| 4c89c70b05 | |||
|
|
33eb219904 | ||
| 37c44ca462 | |||
| 19bf57143c | |||
| 1005619211 | |||
| af31ba91a4 | |||
| 0e9ae7cc91 | |||
| 702160c1df | |||
| b57c1b5753 | |||
| e22a1ce84a | |||
| 83c728e7c8 | |||
| ed75718d34 | |||
| 75873b9e8c | |||
| 1416f6d632 | |||
| 8a7e070f46 | |||
| 1c953dbf1f | |||
| da3b88e083 | |||
| 13d8dc4612 | |||
| 785a4f1b7b | |||
| 43b0ccd96d | |||
| f6af5ce2e7 | |||
| 577ff9c1eb | |||
| f0ae69d610 | |||
| 7e6a08d64b | |||
| 5f34c57b23 | |||
| 356d95191b | |||
| 903f8eaa91 | |||
| 1b7dd7dfb1 | |||
| ca0a15ba09 | |||
| c52422247c | |||
| c9b65cb315 | |||
| fc3365af62 | |||
| 7c7cd58963 | |||
| aea5a58691 | |||
| fab7f1a91c | |||
| 9b23eb56ce | |||
| 450e80ad21 | |||
| 21d7d9d597 | |||
| 746f47a5fa | |||
| c67e6d6abc | |||
| 1f722f5df3 | |||
| df4eae1d66 | |||
| 4d435b4fc1 | |||
| f95ae10d03 | |||
| 423d840d83 | |||
| 1997b0bf9b | |||
| b206fb33aa | |||
| 11b26e396c | |||
| 94139e6ac6 | |||
| c0cc2432ff | |||
| f86aaa3782 | |||
| 690a8f0c3b | |||
| 1de0ca8d60 | |||
| de149c5d85 | |||
| 7d2b11473b | |||
| 4c25fccc86 | |||
| 5e310b0224 | |||
| 169802ccaf | |||
| 28257e00c0 | |||
| 38c6af7090 | |||
| bdbf4c604d | |||
| 73bcba2c9a | |||
| 90ca84cfbf | |||
| a18ca1ce21 | |||
| b92babb5cd | |||
| e3231ec495 | |||
| 4896ee7a65 | |||
| ce3eb7165a | |||
| 4de00b8fac | |||
| ebe777bdc5 | |||
| 3b5cacb8ad | |||
| db7d297dbc | |||
| 2f9abf7629 | |||
| b6063d2fed | |||
| e1f566f0c8 | |||
| 9fa892a6fd | |||
| 1572e163ef | |||
| 2791691057 | |||
| 575537ae66 | |||
| fde4a597c7 | |||
| e69ae52f50 | |||
| 8bdb06749f | |||
| 0cfd066f4f | |||
| 217ccb915a | |||
| 1dd3e9d86f | |||
| d3d81d71fe | |||
| 80c110afa9 | |||
| 1c08b9a51d | |||
| 4ad30106b6 | |||
| 9100d0e35a | |||
| b8dea19c30 | |||
| 671f2b9270 | |||
| d619fb2f4d | |||
| 3eb6704f2f | |||
| cd24beb8a6 | |||
| fa287305eb | |||
| 3fb656b693 | |||
| f514993525 | |||
| 81787260c9 | |||
| f9ad396228 | |||
| 8976f2e359 | |||
| 187c3edaf6 | |||
| 02e85fb354 | |||
| 289834021f | |||
| 04fea4acb2 | |||
| 54739b0a75 | |||
| ea5520a729 | |||
| 0a19d8d308 | |||
| 4dbe3e23b7 | |||
| c43cfc3b69 | |||
| babd3d2052 | |||
| 9464839b4d | |||
| bcf7875414 | |||
| 732894a0fb | |||
| 146bf5a3c2 | |||
| b05bfde094 | |||
| 37d372b8f5 | |||
| c01fee3b73 | |||
| c907e735c6 | |||
| 7545e33d2f | |||
| ebf961449a | |||
| 45d6882527 | |||
| 2ec370ad61 | |||
| 63d5c4af8e | |||
| 9619fd574e | |||
| adeb42070d | |||
| d207d246bf | |||
| 4dd3a3b874 | |||
| 52b04a754c | |||
| c0efd152e8 | |||
| 9bda80d40d | |||
| 0e12995063 | |||
| 424ebafab5 | |||
| 73d4feb679 | |||
| 887b2a9205 | |||
| 927eb3e1ff | |||
| fd19f5befe | |||
| 382775d6ab | |||
| c41ee27069 | |||
| e5b395ffa5 | |||
| b55f76c855 | |||
| 28a8bd3c51 | |||
| 9adcd89cd5 | |||
| 14e6709c29 | |||
| 024626019d | |||
| c0d86d5753 | |||
| 175281537c | |||
|
|
abb26288c6 | ||
| f5c0d5bbfc | |||
| ff08db3e44 | |||
| 7431550d61 | |||
| 448910b8d7 | |||
| 991c4fbf8e | |||
| ced0aaa597 | |||
| 498247c793 | |||
| ad5c3808cd | |||
| c658dc6a50 | |||
|
|
100adec397 | ||
|
|
f4b793574d | ||
| d8c52575fb | |||
| 1b2945d9c4 | |||
| 1244bd60ed | |||
| b566b9e89e | |||
| 4a4d7f2a38 | |||
| f7848228a2 | |||
| 8c22315b15 | |||
| 718c982578 | |||
| be0f6a9f56 | |||
| 35874f5ca2 | |||
| a7fdfce094 | |||
| 5947c9a020 | |||
| 05408915b1 | |||
| 4635b5af0f | |||
| b362217d75 | |||
| cc48d49b5c | |||
| 391e54b993 | |||
| 49b6a92865 | |||
| fbe05367fa | |||
| eaf3080859 | |||
| 6ceec9ef85 | |||
| ac73711122 | |||
| 3cb0471027 | |||
| 38e7434730 | |||
| d8cd72809c | |||
| 5f5550b166 | |||
| 9bb4492d4d | |||
| 3bba7a2519 | |||
| 6d48f13d1b | |||
| aa6bca412e | |||
| f01704535b | |||
| bc74f2bb5b | |||
| 4e5fb09ba2 | |||
| edc5373e64 | |||
| fde64c5764 | |||
| a91f5e1edb | |||
| 9e42cfa8db | |||
| 2ff885c6f9 | |||
| 981f9bd539 | |||
| fab11f5755 | |||
| c34f909b21 | |||
| 955227e9e3 | |||
| e626da0c5e | |||
| 6adb22b9ac | |||
| a51af45e50 | |||
| 2a52f8ccfb | |||
| 36c8cc0a26 | |||
| c9bada7721 | |||
| 3036ef801b | |||
| c591025b4f | |||
| ae22c8c86d | |||
| eade8ef47d | |||
| c74de99835 | |||
| 1c056c9e7b | |||
| 43d80c00d9 | |||
| 9fb3d1f816 | |||
| 9ee4acfc8d | |||
| 7f4303df40 | |||
| 8170f3c905 | |||
| 12f51bb471 | |||
| 2a8ecf4c8c | |||
| 5e3620c521 | |||
| ec90e5727f | |||
| 6ea1bd22b0 | |||
| f303872bf5 | |||
| a8b8def6ca | |||
| aa9d7993d6 | |||
| 6157eea4da | |||
| 8cc7614a68 | |||
| 4d928a9e26 | |||
| ff0dc30375 | |||
| fab564e0e4 | |||
| 27e72dc2d8 | |||
| 75a684d29f | |||
| b3f57c45af | |||
| fef1d19ddd | |||
| 08408d2ae5 | |||
| 8380128bc8 | |||
| e01bc29ef0 | |||
| 415b93931b | |||
| 3f42a13afd | |||
| 04e4447b39 |
1
.gitattributes
vendored
Normal file
1
.gitattributes
vendored
Normal file
@@ -0,0 +1 @@
|
||||
*.jar filter=lfs diff=lfs merge=lfs -text
|
||||
8
.gitignore
vendored
Normal file
8
.gitignore
vendored
Normal file
@@ -0,0 +1,8 @@
|
||||
.DS_Store
|
||||
._*
|
||||
bin
|
||||
AudiobookRecorder.jar
|
||||
AudiobookRecorder-linux
|
||||
AudiobookRecorder-osx.dmg
|
||||
AudiobookRecorder-win.exe
|
||||
.*.swp
|
||||
3
.gitmodules
vendored
Normal file
3
.gitmodules
vendored
Normal file
@@ -0,0 +1,3 @@
|
||||
[submodule "universalJavaApplicationStub"]
|
||||
path = universalJavaApplicationStub
|
||||
url = ./universalJavaApplicationStub
|
||||
77
ExampleFilters/README.md
Normal file
77
ExampleFilters/README.md
Normal file
@@ -0,0 +1,77 @@
|
||||
Filters are simply XML files with the extension ".eff"
|
||||
|
||||
Place them in a folder called `System` within your recordings folder.
|
||||
|
||||
The format is:
|
||||
|
||||
<effect name="Filter Name">
|
||||
<filter....>
|
||||
[optional sub-components or filters]
|
||||
</filter>
|
||||
[<filter...>]
|
||||
</effect>
|
||||
|
||||
Currently implemented filters:
|
||||
|
||||
<amplifier gain="1.0" />
|
||||
|
||||
Amplify (or attenuate) the sample by the given factor (1 = unity gain, 0 = silence, 2 = double, etc)
|
||||
|
||||
<lfo frequency="10" depth="0.2" />
|
||||
|
||||
Modulate the audio with a low-frequency oscillator. Specify the frequency and a factor of how much to modulate the audio signal. You can also specify an optional `phase="..."` (specified in radians) as an initial phase offset for the modulation.
|
||||
|
||||
<biquad type="..." fc="..." q="..." gain="..." />
|
||||
|
||||
A Biquad filter of the given type with a center frequency `fc` in Hz, a Q `q` and gain in Decibals of `gain`.
|
||||
Valid types are:
|
||||
|
||||
* lowpass
|
||||
* highpass
|
||||
* bandpass
|
||||
* notch
|
||||
* peak
|
||||
* lowshelf
|
||||
* highshelf
|
||||
|
||||
<delay>
|
||||
<delayline samples="..." gain="...">
|
||||
[optional effects to apply to the delay line]
|
||||
</delayline>
|
||||
</delay>
|
||||
|
||||
A multi-tap delay line where each tap can have its own additional filters applied. The delay is given in samples and the gain as
|
||||
a factor where 1.0 is unity gain.
|
||||
|
||||
<group name="Name">
|
||||
effects in the group
|
||||
</group>
|
||||
|
||||
Allows you to group effects together within a chain. Not of any real use yet (except that the outer wrapper of an effect chain is
|
||||
actually an effect group) but may be used in the future.
|
||||
|
||||
|
||||
An example: the "Ethereal Voice" - echoes starting off quiet and getting louder with a variable high-pass filter on the pre-echoes. Also
|
||||
includes a notch filter at 140Hz to cut out a specific annoying hum generated by my computer fans.
|
||||
|
||||
<effect name="Ethereal Voice">
|
||||
<biquad type="notch" fc="140" q="20" gain="-50" />
|
||||
<amplifier gain="0.1" />
|
||||
<delayline>
|
||||
<delay samples="4000" gain="1.0">
|
||||
<biquad type="highpass" fc="400" q="1" gain="0" />
|
||||
</delay>
|
||||
<delay samples="8000" gain="1.5">
|
||||
<biquad type="highpass" fc="300" q="1" gain="0" />
|
||||
</delay>
|
||||
<delay samples="12000" gain="2.0">
|
||||
<biquad type="highpass" fc="200" q="1" gain="0" />
|
||||
</delay>
|
||||
<delay samples="16000" gain="3.0">
|
||||
<biquad type="highpass" fc="100" q="1" gain="0" />
|
||||
</delay>
|
||||
<delay samples="20000" gain="15.0" />
|
||||
</delayline>
|
||||
<biquad type="lowshelf" fc="1000" q="2.2" gain="-10" />
|
||||
<amplifier gain="1.5" />
|
||||
</effect>
|
||||
4
ExampleFilters/alien.eff
Normal file
4
ExampleFilters/alien.eff
Normal file
@@ -0,0 +1,4 @@
|
||||
<effect name="Alien">
|
||||
<!--biquad type="lowpass" fc="10000" q="1" gain="-10" /-->
|
||||
<lfo frequency="50" depth="1.0" waveform="triangle" mode="replace"/>
|
||||
</effect>
|
||||
10
ExampleFilters/bigecho.eff
Normal file
10
ExampleFilters/bigecho.eff
Normal file
@@ -0,0 +1,10 @@
|
||||
<effect name="Big Echo">
|
||||
<delayline>
|
||||
<delay samples="22000" gain="0.2" pan="-0.3">
|
||||
<biquad type="highpass" fc="300" q="1" gain="0" />
|
||||
</delay>
|
||||
<delay samples="44000" gain="0.05" pan="0.3">
|
||||
<biquad type="highpass" fc="600" q="1" gain="0" />
|
||||
</delay>
|
||||
</delayline>
|
||||
</effect>
|
||||
6
ExampleFilters/cuthum.eff
Normal file
6
ExampleFilters/cuthum.eff
Normal file
@@ -0,0 +1,6 @@
|
||||
<effect name="Cut Computer Hum">
|
||||
<biquad type="notch" fc="28" q="20" gain="-50" />
|
||||
<biquad type="notch" fc="91" q="20" gain="-50" />
|
||||
<biquad type="notch" fc="120" q="20" gain="-50" />
|
||||
<biquad type="lowpass" fc="10000" q="1" gain="-10" />
|
||||
</effect>
|
||||
7
ExampleFilters/cuthumagc.eff
Normal file
7
ExampleFilters/cuthumagc.eff
Normal file
@@ -0,0 +1,7 @@
|
||||
<effect name="Cut Computer Hum (with AGC)">
|
||||
<biquad type="notch" fc="28" q="20" gain="-50" />
|
||||
<biquad type="notch" fc="91" q="20" gain="-50" />
|
||||
<biquad type="notch" fc="120" q="20" gain="-50" />
|
||||
<biquad type="lowpass" fc="10000" q="1" gain="-10" />
|
||||
<agc ceiling="0.666" limit="1.5" attack="0.08" decay="0.01" />
|
||||
</effect>
|
||||
15
ExampleFilters/cuthumagcstereo.eff
Normal file
15
ExampleFilters/cuthumagcstereo.eff
Normal file
@@ -0,0 +1,15 @@
|
||||
<effect name="Cut Computer Hum (with AGC and Stereo)">
|
||||
<biquad type="notch" fc="28" q="20" gain="-50" />
|
||||
<biquad type="notch" fc="91" q="20" gain="-50" />
|
||||
<biquad type="notch" fc="120" q="20" gain="-50" />
|
||||
<biquad type="lowpass" fc="10000" q="1" gain="-10" />
|
||||
<delayline wetonly="false">
|
||||
<delay samples="-100" gain="0.1" pan="-1.0">
|
||||
<biquad type="highpass" fc="300" q="1" gain="0" />
|
||||
</delay>
|
||||
<delay samples="100" gain="0.1" pan="1.0">
|
||||
<biquad type="highpass" fc="300" q="1" gain="0" />
|
||||
</delay>
|
||||
</delayline>
|
||||
<agc ceiling="0.666" limit="1.5" attack="0.1" decay="0.01" />
|
||||
</effect>
|
||||
20
ExampleFilters/ethereal.eff
Normal file
20
ExampleFilters/ethereal.eff
Normal file
@@ -0,0 +1,20 @@
|
||||
<effect name="Ethereal Voice">
|
||||
<amplifier gain="0.1" />
|
||||
<delayline>
|
||||
<delay samples="2000" gain="1.0" pan="-0.3">
|
||||
<biquad type="highpass" fc="400" q="1" gain="0" />
|
||||
</delay>
|
||||
<delay samples="4000" gain="1.1" pan="0.3">
|
||||
<biquad type="highpass" fc="800" q="1" gain="0" />
|
||||
</delay>
|
||||
<delay samples="8000" gain="1.2" pan="-0.5">
|
||||
<biquad type="highpass" fc="1000" q="1" gain="0" />
|
||||
</delay>
|
||||
<delay samples="10000" gain="1.3" pan="0.5">
|
||||
<biquad type="highpass" fc="1500" q="1" gain="0" />
|
||||
</delay>
|
||||
<delay samples="12000" gain="15.0" pan="0" />
|
||||
</delayline>
|
||||
<biquad type="lowshelf" fc="2000" q="2.2" gain="-10" />
|
||||
<amplifier gain="1.5" />
|
||||
</effect>
|
||||
2
ExampleFilters/flat.eff
Normal file
2
ExampleFilters/flat.eff
Normal file
@@ -0,0 +1,2 @@
|
||||
<effect name="Flat">
|
||||
</effect>
|
||||
15
ExampleFilters/largeroom.eff
Normal file
15
ExampleFilters/largeroom.eff
Normal file
@@ -0,0 +1,15 @@
|
||||
<effect name="Large Room (quiet)">
|
||||
<biquad type="lowpass" fc="10000" q="1" gain="-10" />
|
||||
<delayline>
|
||||
<delay samples="5500" gain="0.2" pan="-0.3">
|
||||
<biquad type="highpass" fc="300" q="1" gain="0" />
|
||||
</delay>
|
||||
<delay samples="11000" gain="0.05" pan="0.3">
|
||||
<biquad type="highpass" fc="600" q="1" gain="0" />
|
||||
</delay>
|
||||
<delay samples="16500" gain="0.01" pan="0.0">
|
||||
<biquad type="highpass" fc="600" q="1" gain="0" />
|
||||
</delay>
|
||||
</delayline>
|
||||
<amplifier gain="0.3" />
|
||||
</effect>
|
||||
15
ExampleFilters/largeroomloud.eff
Normal file
15
ExampleFilters/largeroomloud.eff
Normal file
@@ -0,0 +1,15 @@
|
||||
<effect name="Large Room (loud)">
|
||||
<biquad type="lowpass" fc="10000" q="1" gain="-10" />
|
||||
<delayline>
|
||||
<delay samples="5500" gain="0.2" pan="-0.3">
|
||||
<biquad type="highpass" fc="300" q="1" gain="0" />
|
||||
</delay>
|
||||
<delay samples="11000" gain="0.05" pan="0.3">
|
||||
<biquad type="highpass" fc="600" q="1" gain="0" />
|
||||
</delay>
|
||||
<delay samples="16500" gain="0.01" pan="0.0">
|
||||
<biquad type="highpass" fc="600" q="1" gain="0" />
|
||||
</delay>
|
||||
</delayline>
|
||||
<amplifier gain="0.9" />
|
||||
</effect>
|
||||
3
ExampleFilters/panleft.eff
Normal file
3
ExampleFilters/panleft.eff
Normal file
@@ -0,0 +1,3 @@
|
||||
<effect name="Pan Left">
|
||||
<pan pan="-0.4" />
|
||||
</effect>
|
||||
3
ExampleFilters/panright.eff
Normal file
3
ExampleFilters/panright.eff
Normal file
@@ -0,0 +1,3 @@
|
||||
<effect name="Pan Right">
|
||||
<pan pan="0.4" />
|
||||
</effect>
|
||||
8
ExampleFilters/phone.eff
Normal file
8
ExampleFilters/phone.eff
Normal file
@@ -0,0 +1,8 @@
|
||||
<effect name="Telephone">
|
||||
<biquad type="lowshelf" fc="400" q="10" gain="-20" />
|
||||
<biquad type="highshelf" fc="8000" q="10" gain="-20" />
|
||||
<delayline>
|
||||
<delay samples="100" gain="0.5" />
|
||||
</delayline>
|
||||
<amplifier gain="1.4" />
|
||||
</effect>
|
||||
12
ExampleFilters/radio.eff
Normal file
12
ExampleFilters/radio.eff
Normal file
@@ -0,0 +1,12 @@
|
||||
<effect name="Radio">
|
||||
<amplifier gain="0.5" />
|
||||
<biquad type="peak" fc="1000" q="10" gain="25" />
|
||||
<lfo frequency="3000" depth="0.3" waveform="sine" mode="add" />
|
||||
<clipping clip="0.9" />
|
||||
<biquad type="highshelf" fc="8000" q="1" gain="-20" />
|
||||
<delayline>
|
||||
<delay samples="100" gain="0.7" />
|
||||
<delay samples="200" gain="0.5" />
|
||||
</delayline>
|
||||
<amplifier gain="0.3" />
|
||||
</effect>
|
||||
10
ExampleFilters/robotic.eff
Normal file
10
ExampleFilters/robotic.eff
Normal file
@@ -0,0 +1,10 @@
|
||||
<effect name="Robotic">
|
||||
<biquad type="lowshelf" fc="100" q="2" gain="-20" />
|
||||
<delayline>
|
||||
<delay samples="400" gain="1" pan="-0.3" />
|
||||
<delay samples="800" gain="1" pan="-0.3" />
|
||||
<delay samples="1200" gain="1" pan="-0.3" />
|
||||
<delay samples="1600" gain="1" pan="-0.3" />
|
||||
<delay samples="2000" gain="1" pan="-0.3" />
|
||||
</delayline>
|
||||
</effect>
|
||||
10
ExampleFilters/stereochorus.eff
Normal file
10
ExampleFilters/stereochorus.eff
Normal file
@@ -0,0 +1,10 @@
|
||||
<effect name="Stereo Chorus">
|
||||
<delayline>
|
||||
<delay samples="2000" gain="0.1" pan="-0.3">
|
||||
<biquad type="highpass" fc="300" q="1" gain="0" />
|
||||
</delay>
|
||||
<delay samples="4000" gain="0.1" pan="0.3">
|
||||
<biquad type="highpass" fc="300" q="1" gain="0" />
|
||||
</delay>
|
||||
</delayline>
|
||||
</effect>
|
||||
@@ -34,4 +34,5 @@ Third party software
|
||||
* CMU Sphinx: https://github.com/mpatric/mp3agic
|
||||
* JAVE ffmpeg wrapper: http://www.sauronsoftware.it/projects/jave/
|
||||
* JTattoo: http://www.sauronsoftware.it/projects/jave/
|
||||
|
||||
* Icons from, or based on, Oxygen: https://github.com/KDE/oxygen-icons
|
||||
* JEQ, the Java Equaliser: https://sourceforge.net/projects/jeq/
|
||||
|
||||
61
README.md
61
README.md
@@ -1,3 +1,5 @@
|
||||

|
||||
|
||||
Audiobook Recorder
|
||||
==================
|
||||
|
||||
@@ -6,6 +8,9 @@ A system for easing the task of recording and editing audiobooks.
|
||||
* Zero editing
|
||||
* MP3 export
|
||||
* Chapter management
|
||||
* Audio effect chains (biquad, delay line, etc)
|
||||
|
||||
# [Manual and Tutorial](https://majenkoprojects.github.io/AudiobookRecorder)
|
||||
|
||||
Usage
|
||||
-----
|
||||
@@ -24,12 +29,15 @@ From here on much is controlled by key presses.
|
||||
|
||||
* Press and hold "R" to record a new phrase - the screen flashes red while it's recording. The phrase is
|
||||
appended to the currently selected chapter, or to the last chapter if none is selected.
|
||||
* Press and hold "T" to record a new phrase that is the start of a new paragraph. This adds the "post paragraph" gap to the previous sentence. Otherwise it does the same as "R".
|
||||
* Press and hold "F" to record a "continuation" phrase. This sets the previous phrase's post-gap to be the "short" gap instead of the normal length gap.
|
||||
* Press and hold "Y" to record a new phrase that is the start of a new section. This add the "post section" gap to the previous sentence. Otherwise it does the same as "R".
|
||||
* Press "D" to delete the last phrase you recorded.
|
||||
* Press "E" to re-record the currently selected phrase.
|
||||
|
||||
Each phrase you record will be briefly analysed using FFT to find the start and end of the audio and set
|
||||
Each phrase you record can be automatically analysed to find the start and end of the audio and set
|
||||
crop marks appropriately. These can be adjusted in the waveform display when a phrase is selected. You can also
|
||||
re-run the analysis using either the default FFT method or using a peak detector method (finding the first and last points
|
||||
re-run the analysis using either FFT or a peak detector method (finding the first and last points
|
||||
where the audio amplitude rises above the backround noise).
|
||||
|
||||
The phrases also have a "post gap" associated with them. This is the amount of room noise (in milliseconds) to place between
|
||||
@@ -48,23 +56,50 @@ edit the text of this ID to identify the recordings. You
|
||||
may, for instance, change it to have the same text as the
|
||||
audio contains.
|
||||
|
||||
To help with this CMU Sphinx (US EN dictionary) is bundled
|
||||
with the system and can be used to try and convert the
|
||||
audio into text. Right clicking on a recording brings
|
||||
up a menu which includes the option to try and convert
|
||||
the audio into text. The detected text is then used to
|
||||
replace the current recording ID / text.
|
||||
|
||||
It's far from perfect (especially for a British English
|
||||
speaker), but it can help you to navigate your way around
|
||||
a chapter.
|
||||
The audio can also be automatically converted to text if you have an suitable command-line
|
||||
executable that will work. One example is (on Linux) [DeepSpeech](https://github.com/mozilla/DeepSpeech) by Mozilla.
|
||||
|
||||
File layout
|
||||
-----------
|
||||
|
||||
All data is stored in your "storage" directory (specified in Options). Each book (which is a directory named after the
|
||||
title of the book) has an associated XML file (audiobook.abk) and a directory "files" where all the audio (stored as WAV
|
||||
title of the book) has an associated XML file (audiobook.abx) and a directory "files" where all the audio (stored as WAV
|
||||
files) is placed.
|
||||
|
||||
When you export the book as MP3 a new folder "export" is created within the book's folder where the MP3 files are placed.
|
||||
MP3 files are all tagged with the book title, chapter title, chapter number and comment.
|
||||
|
||||
|
||||
Building
|
||||
========
|
||||
|
||||
1. Check out this repo
|
||||
2. Install `ant` and `default-jdk`
|
||||
3. Install [git LFS support](https://help.github.com/articles/installing-git-large-file-storage/)
|
||||
4. Pull the large files with `git lfs pull`
|
||||
5. Build with `ant build`
|
||||
6. Run with `java -jar ./AudiobookRecorder.jar`
|
||||
|
||||
|
||||
----
|
||||
|
||||
Extra Resources
|
||||
===============
|
||||
|
||||
* DeepSpeech wrapper script
|
||||
|
||||
This is a small script that will convert the audio into a format DeepSpeech likes and call the `deepspeech` executable, removing any extra rubbish from the output. It
|
||||
also requires `sox` to be installed for the audio conversion.
|
||||
|
||||
```
|
||||
#!/bin/bash
|
||||
|
||||
ID=$$
|
||||
FILE=$1
|
||||
BINPATH=${HOME}/local/bin
|
||||
MODELS=${HOME}/ds/deepspeech-0.6.1-models
|
||||
|
||||
sox "$FILE" -r 16000 -c 1 -b 16 "/tmp/ds-${ID}.wav"
|
||||
${BINPATH}/deepspeech --model ${MODELS}/output_graph.pbmm --lm ${MODELS}/lm.binary --trie ${MODELS}/trie --audio "/tmp/ds-${ID}.wav" 2>/dev/null
|
||||
rm /tmp/ds-${ID}.wav
|
||||
```
|
||||
|
||||
BIN
ant-libs/jarbundler-2.3.2.jar
LFS
Normal file
BIN
ant-libs/jarbundler-2.3.2.jar
LFS
Normal file
Binary file not shown.
130
build.xml
130
build.xml
@@ -1,6 +1,13 @@
|
||||
<?xml version="1.0"?>
|
||||
<project name="Audiobook Recorder" default="build">
|
||||
|
||||
<property file="resources/uk/co/majenko/audiobookrecorder/config.txt"/>
|
||||
|
||||
<taskdef name="jarbundler" classname="com.ultramixer.jarbundler.JarBundler" classpath="ant-libs/jarbundler-2.3.2.jar" />
|
||||
|
||||
<taskdef name="launch4j" classname="net.sf.launch4j.ant.Launch4jTask" classpath="launch4j/launch4j.jar:launch4g/lib/xstream.jar" />
|
||||
|
||||
|
||||
<target name="clean" description="Clean out the build directories">
|
||||
<delete dir="bin" />
|
||||
<delete file="AudiobookRecorder.jar" />
|
||||
@@ -18,7 +25,7 @@
|
||||
debug="true"
|
||||
debuglevel="lines,vars,source"
|
||||
encoding="UTF-8"
|
||||
bootclasspath="${bootclass.path}"
|
||||
bootclasspath="/usr/lib/jvm/java-8-openjdk-amd64/jre/lib/rt.jar"
|
||||
includeAntRuntime="false"
|
||||
deprecation="true"
|
||||
srcdir="src"
|
||||
@@ -36,11 +43,128 @@
|
||||
<manifest>
|
||||
<attribute name="Main-Class" value="uk.co.majenko.audiobookrecorder.AudiobookRecorder" />
|
||||
<attribute name="Class-Path" value="AudiobookRecorder.jar" />
|
||||
<!--attribute name="Version" value="${Version}" />
|
||||
<attribute name="Release" value="${Release}" /-->
|
||||
<attribute name="Version" value="${version}" />
|
||||
</manifest>
|
||||
</jar>
|
||||
<chmod perm="0755" file="uecide.jar" />
|
||||
</target>
|
||||
|
||||
<target name="macapp" depends="build">
|
||||
|
||||
<mkdir dir="tmp"/>
|
||||
|
||||
<jarbundler
|
||||
name="AudiobookRecorder"
|
||||
shortname="AudiobookRecorder"
|
||||
icon="dist/macosx/audiobookrecorder.icns"
|
||||
stubfile="universalJavaApplicationStub/src/universalJavaApplicationStub"
|
||||
dir="tmp"
|
||||
jar="AudiobookRecorder.jar"
|
||||
mainclass="uk.co.majenko.audiobookrecorder.AudiobookRecorder"
|
||||
jvmversion="1.7+"
|
||||
>
|
||||
</jarbundler>
|
||||
|
||||
<symlink link="tmp/Applications" resource="/Applications" overwrite="true" />
|
||||
|
||||
<!--copy file="dist/macosx/dmg.icns" tofile="tmp/.VolumeIcon.icns" /-->
|
||||
|
||||
<exec executable="genisoimage">
|
||||
<arg value="-D" />
|
||||
<arg value="-V" />
|
||||
<arg value="AudiobookRecorder" />
|
||||
<arg value="-no-pad" />
|
||||
<arg value="-r" />
|
||||
<arg value="-apple" />
|
||||
<arg value="-o" />
|
||||
<arg value="AudiobookRecorder-osx.dmg" />
|
||||
<arg value="-dir-mode" />
|
||||
<arg value="0755" />
|
||||
<arg value="-file-mode" />
|
||||
<arg value="0755" />
|
||||
<arg value="tmp" />
|
||||
</exec>
|
||||
|
||||
<delete dir="tmp" />
|
||||
</target>
|
||||
|
||||
<target name="winapp" depends="build">
|
||||
<launch4j configFile="dist/windows/windows.xml" outfile="AudiobookRecorder-win.exe" />
|
||||
</target>
|
||||
|
||||
<target name="linuxapp" depends="build">
|
||||
<concat destfile="AudiobookRecorder-linux" binary="true">
|
||||
<file file="dist/linux/stub" />
|
||||
<file file="AudiobookRecorder.jar" />
|
||||
</concat>
|
||||
<chmod perm="0755" file="AudiobookRecorder-linux" />
|
||||
</target>
|
||||
|
||||
<target name="dist" depends="macapp,winapp,linuxapp" />
|
||||
|
||||
<target name="tag">
|
||||
<exec executable="git">
|
||||
<arg value="tag" />
|
||||
<arg value="-m" />
|
||||
<arg value="Auto generated tag" />
|
||||
<arg value="-s" />
|
||||
<arg value="v${version}" />
|
||||
</exec>
|
||||
<exec executable="git">
|
||||
<arg value="push" />
|
||||
<arg value="--tags" />
|
||||
</exec>
|
||||
</target>
|
||||
|
||||
<target name="release" depends="dist,tag">
|
||||
<echo>Creating release v${version}</echo>
|
||||
<exec executable="./mklog"
|
||||
outputproperty="changelog">
|
||||
<arg value="v${version}"/>
|
||||
</exec>
|
||||
<exec executable="github-release">
|
||||
<arg value="release"/>
|
||||
<arg value="-u"/> <arg value="MajenkoProjects"/>
|
||||
<arg value="-r"/> <arg value="AudiobookRecorder"/>
|
||||
<arg value="-t"/> <arg value="v${version}"/>
|
||||
<arg value="-d"/> <arg value="${changelog}"/>
|
||||
</exec>
|
||||
<echo>Uploading AudiobookRecorder.jar</echo>
|
||||
<exec executable="github-release">
|
||||
<arg value="upload"/>
|
||||
<arg value="-u"/> <arg value="MajenkoProjects"/>
|
||||
<arg value="-r"/> <arg value="AudiobookRecorder"/>
|
||||
<arg value="-t"/> <arg value="v${version}"/>
|
||||
<arg value="-f"/> <arg value="AudiobookRecorder.jar"/>
|
||||
<arg value="-n"/> <arg value="AudiobookRecorder.jar"/>
|
||||
</exec>
|
||||
<echo>Uploading AudiobookRecorder-osx.dmg</echo>
|
||||
<exec executable="github-release">
|
||||
<arg value="upload"/>
|
||||
<arg value="-u"/> <arg value="MajenkoProjects"/>
|
||||
<arg value="-r"/> <arg value="AudiobookRecorder"/>
|
||||
<arg value="-t"/> <arg value="v${version}"/>
|
||||
<arg value="-f"/> <arg value="AudiobookRecorder-osx.dmg"/>
|
||||
<arg value="-n"/> <arg value="AudiobookRecorder-osx.dmg"/>
|
||||
</exec>
|
||||
<echo>Uploading AudiobookRecorder-win.exe</echo>
|
||||
<exec executable="github-release">
|
||||
<arg value="upload"/>
|
||||
<arg value="-u"/> <arg value="MajenkoProjects"/>
|
||||
<arg value="-r"/> <arg value="AudiobookRecorder"/>
|
||||
<arg value="-t"/> <arg value="v${version}"/>
|
||||
<arg value="-f"/> <arg value="AudiobookRecorder-win.exe"/>
|
||||
<arg value="-n"/> <arg value="AudiobookRecorder-win.exe"/>
|
||||
</exec>
|
||||
<echo>Uploading AudiobookRecorder-linux</echo>
|
||||
<exec executable="github-release">
|
||||
<arg value="upload"/>
|
||||
<arg value="-u"/> <arg value="MajenkoProjects"/>
|
||||
<arg value="-r"/> <arg value="AudiobookRecorder"/>
|
||||
<arg value="-t"/> <arg value="v${version}"/>
|
||||
<arg value="-f"/> <arg value="AudiobookRecorder-linux"/>
|
||||
<arg value="-n"/> <arg value="AudiobookRecorder-linux"/>
|
||||
</exec>
|
||||
</target>
|
||||
|
||||
</project>
|
||||
|
||||
BIN
deps/JTattoo-1.6.10.jar
vendored
BIN
deps/JTattoo-1.6.10.jar
vendored
Binary file not shown.
BIN
deps/commons-codec-1.10.jar
LFS
vendored
Normal file
BIN
deps/commons-codec-1.10.jar
LFS
vendored
Normal file
Binary file not shown.
BIN
deps/commons-lang3.jar
LFS
vendored
Normal file
BIN
deps/commons-lang3.jar
LFS
vendored
Normal file
Binary file not shown.
BIN
deps/commons-logging-1.2.jar
LFS
vendored
Normal file
BIN
deps/commons-logging-1.2.jar
LFS
vendored
Normal file
Binary file not shown.
BIN
deps/commons-text.jar
LFS
vendored
Normal file
BIN
deps/commons-text.jar
LFS
vendored
Normal file
Binary file not shown.
BIN
deps/fluent-hc-4.5.6.jar
LFS
vendored
Normal file
BIN
deps/fluent-hc-4.5.6.jar
LFS
vendored
Normal file
Binary file not shown.
BIN
deps/httpclient-4.5.6.jar
LFS
vendored
Normal file
BIN
deps/httpclient-4.5.6.jar
LFS
vendored
Normal file
Binary file not shown.
BIN
deps/httpclient-cache-4.5.6.jar
LFS
vendored
Normal file
BIN
deps/httpclient-cache-4.5.6.jar
LFS
vendored
Normal file
Binary file not shown.
BIN
deps/httpclient-win-4.5.6.jar
LFS
vendored
Normal file
BIN
deps/httpclient-win-4.5.6.jar
LFS
vendored
Normal file
Binary file not shown.
BIN
deps/httpcore-4.4.10.jar
LFS
vendored
Normal file
BIN
deps/httpcore-4.4.10.jar
LFS
vendored
Normal file
Binary file not shown.
BIN
deps/httpmime-4.5.6.jar
LFS
vendored
Normal file
BIN
deps/httpmime-4.5.6.jar
LFS
vendored
Normal file
Binary file not shown.
BIN
deps/jave-1.0.2.jar
vendored
BIN
deps/jave-1.0.2.jar
vendored
Binary file not shown.
BIN
deps/jna-4.4.0.jar
LFS
vendored
Normal file
BIN
deps/jna-4.4.0.jar
LFS
vendored
Normal file
Binary file not shown.
BIN
deps/jna-platform-4.4.0.jar
LFS
vendored
Normal file
BIN
deps/jna-platform-4.4.0.jar
LFS
vendored
Normal file
Binary file not shown.
BIN
deps/json-20180813.jar
LFS
vendored
Normal file
BIN
deps/json-20180813.jar
LFS
vendored
Normal file
Binary file not shown.
BIN
deps/json-20190722.jar
LFS
vendored
Normal file
BIN
deps/json-20190722.jar
LFS
vendored
Normal file
Binary file not shown.
BIN
deps/mp3agic-0.9.1.jar
vendored
BIN
deps/mp3agic-0.9.1.jar
vendored
Binary file not shown.
BIN
deps/sphinx4-core-5prealpha-SNAPSHOT.jar
vendored
BIN
deps/sphinx4-core-5prealpha-SNAPSHOT.jar
vendored
Binary file not shown.
BIN
deps/sphinx4-data-5prealpha-SNAPSHOT.jar
vendored
BIN
deps/sphinx4-data-5prealpha-SNAPSHOT.jar
vendored
Binary file not shown.
13
dist/linux/audiobookrecorder.desktop
vendored
Normal file
13
dist/linux/audiobookrecorder.desktop
vendored
Normal file
@@ -0,0 +1,13 @@
|
||||
[Desktop Entry]
|
||||
Name=AudiobookRecorder
|
||||
GenericName=Audiobook Recorder
|
||||
X-GNOME-FullName=AudiobookRecorder
|
||||
Comment=Record audiobooks with ease
|
||||
Keywords=audio
|
||||
Exec=AudiobookRecorder
|
||||
Terminal=false
|
||||
Type=Application
|
||||
StartupNotify=true
|
||||
Icon=AudiobookRecorder
|
||||
Categories=AudioVideo;Audio;Recorder;
|
||||
X-AppStream-Ignore=true
|
||||
10
dist/linux/stub
vendored
Normal file
10
dist/linux/stub
vendored
Normal file
@@ -0,0 +1,10 @@
|
||||
#!/bin/sh
|
||||
MYSELF=`which "$0" 2>/dev/null`
|
||||
[ $? -gt 0 -a -f "$0" ] && MYSELF="./$0"
|
||||
java=java
|
||||
if test -n "$JAVA_HOME"; then
|
||||
java="$JAVA_HOME/bin/java"
|
||||
fi
|
||||
java_args=-Xmx8g
|
||||
exec "$java" $java_args -jar $MYSELF "$@"
|
||||
exit 1
|
||||
BIN
dist/macosx/audiobookrecorder.icns
vendored
Normal file
BIN
dist/macosx/audiobookrecorder.icns
vendored
Normal file
Binary file not shown.
BIN
dist/macosx/dmg.icns
vendored
Normal file
BIN
dist/macosx/dmg.icns
vendored
Normal file
Binary file not shown.
BIN
dist/windows/audiobookrecorder.ico
vendored
Normal file
BIN
dist/windows/audiobookrecorder.ico
vendored
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 97 KiB |
28
dist/windows/windows.xml
vendored
Normal file
28
dist/windows/windows.xml
vendored
Normal file
@@ -0,0 +1,28 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<launch4jConfig>
|
||||
<dontWrapJar>false</dontWrapJar>
|
||||
<headerType>gui</headerType>
|
||||
<jar>../../AudiobookRecorder.jar</jar>
|
||||
<outfile>AudiobookRecorder.exe</outfile>
|
||||
<errTitle></errTitle>
|
||||
<cmdLine></cmdLine>
|
||||
<chdir>.</chdir>
|
||||
<priority>normal</priority>
|
||||
<downloadUrl>http://java.com/download</downloadUrl>
|
||||
<supportUrl></supportUrl>
|
||||
<stayAlive>false</stayAlive>
|
||||
<restartOnCrash>false</restartOnCrash>
|
||||
<manifest></manifest>
|
||||
<icon>audiobookrecorder.ico</icon>
|
||||
<jre>
|
||||
<path></path>
|
||||
<bundledJre64Bit>false</bundledJre64Bit>
|
||||
<bundledJreAsFallback>false</bundledJreAsFallback>
|
||||
<minVersion>1.7.0</minVersion>
|
||||
<maxVersion></maxVersion>
|
||||
<jdkPreference>preferJre</jdkPreference>
|
||||
<runtimeBits>64/32</runtimeBits>
|
||||
<initialHeapSize>512</initialHeapSize>
|
||||
<maxHeapSize>512</maxHeapSize>
|
||||
</jre>
|
||||
</launch4jConfig>
|
||||
26
installers/linux.sh
Executable file
26
installers/linux.sh
Executable file
@@ -0,0 +1,26 @@
|
||||
#!/bin/bash
|
||||
|
||||
NAME=AudiobookRecorder
|
||||
|
||||
BIN=/usr/bin
|
||||
DESKTOP=/usr/share/applications
|
||||
SHARE=/usr/share
|
||||
ICON=/usr/share/icons
|
||||
|
||||
|
||||
mkdir -p "$BIN"
|
||||
mkdir -p "$SHARE/$NAME"
|
||||
|
||||
cp AudiobookRecorder.jar "$SHARE/$NAME/$NAME.jar"
|
||||
echo "#!/bin/bash" > "$BIN/$NAME"
|
||||
echo "java -jar \"$SHARE/$NAME/$NAME.jar\"" >> "$BIN/$NAME"
|
||||
chmod 755 "$BIN/$NAME"
|
||||
|
||||
echo "[Desktop Entry]" > "$DESKTOP/$NAME.desktop"
|
||||
echo "Version=1.0" >> "$DESKTOP/$NAME.desktop"
|
||||
echo "Name=$NAME" >> "$DESKTOP/$NAME.desktop"
|
||||
echo "Exec=$NAME" >> "$DESKTOP/$NAME.desktop"
|
||||
echo "Icon=$NAME" >> "$DESKTOP/$NAME.desktop"
|
||||
echo "Categories=Multimedia" >> "$DESKTOP/$NAME.desktop"
|
||||
|
||||
cp resources/uk/co/majenko/audiobookrecorder/icons/appIcon.png "$ICON/$NAME.png"
|
||||
18
launch4j/.classpath
Normal file
18
launch4j/.classpath
Normal file
@@ -0,0 +1,18 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<classpath>
|
||||
<classpathentry kind="src" path="src"/>
|
||||
<classpathentry kind="src" output="demo/ExitCodeApp/build" path="demo/ExitCodeApp/src"/>
|
||||
<classpathentry kind="src" output="demo/SimpleApp/build" path="demo/SimpleApp/src"/>
|
||||
<classpathentry kind="src" output="demo/ConsoleApp/build" path="demo/ConsoleApp/src"/>
|
||||
<classpathentry kind="lib" path="lib/formsrt.jar"/>
|
||||
<classpathentry kind="lib" path="lib/xstream.jar"/>
|
||||
<classpathentry kind="lib" path="lib/commons-beanutils.jar"/>
|
||||
<classpathentry kind="lib" path="lib/commons-logging.jar"/>
|
||||
<classpathentry kind="lib" path="lib/foxtrot.jar"/>
|
||||
<classpathentry kind="lib" path="lib/ant.jar"/>
|
||||
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/jdk1.6"/>
|
||||
<classpathentry kind="lib" path="lib/jgoodies-common.jar"/>
|
||||
<classpathentry kind="lib" path="lib/jgoodies-forms.jar"/>
|
||||
<classpathentry kind="lib" path="lib/jgoodies-looks.jar"/>
|
||||
<classpathentry kind="output" path="build"/>
|
||||
</classpath>
|
||||
2
launch4j/.gitignore
vendored
Normal file
2
launch4j/.gitignore
vendored
Normal file
@@ -0,0 +1,2 @@
|
||||
/build
|
||||
/target
|
||||
17
launch4j/.project
Normal file
17
launch4j/.project
Normal file
@@ -0,0 +1,17 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<projectDescription>
|
||||
<name>launch4j</name>
|
||||
<comment></comment>
|
||||
<projects>
|
||||
</projects>
|
||||
<buildSpec>
|
||||
<buildCommand>
|
||||
<name>org.eclipse.jdt.core.javabuilder</name>
|
||||
<arguments>
|
||||
</arguments>
|
||||
</buildCommand>
|
||||
</buildSpec>
|
||||
<natures>
|
||||
<nature>org.eclipse.jdt.core.javanature</nature>
|
||||
</natures>
|
||||
</projectDescription>
|
||||
2
launch4j/.settings/org.eclipse.core.resources.prefs
Normal file
2
launch4j/.settings/org.eclipse.core.resources.prefs
Normal file
@@ -0,0 +1,2 @@
|
||||
eclipse.preferences.version=1
|
||||
encoding/<project>=UTF-8
|
||||
2
launch4j/.settings/org.eclipse.core.runtime.prefs
Normal file
2
launch4j/.settings/org.eclipse.core.runtime.prefs
Normal file
@@ -0,0 +1,2 @@
|
||||
eclipse.preferences.version=1
|
||||
line.separator=\n
|
||||
81
launch4j/.settings/org.eclipse.jdt.core.prefs
Normal file
81
launch4j/.settings/org.eclipse.jdt.core.prefs
Normal file
@@ -0,0 +1,81 @@
|
||||
eclipse.preferences.version=1
|
||||
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
|
||||
org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.6
|
||||
org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
|
||||
org.eclipse.jdt.core.compiler.compliance=1.6
|
||||
org.eclipse.jdt.core.compiler.debug.lineNumber=generate
|
||||
org.eclipse.jdt.core.compiler.debug.localVariable=generate
|
||||
org.eclipse.jdt.core.compiler.debug.sourceFile=generate
|
||||
org.eclipse.jdt.core.compiler.problem.annotationSuperInterface=warning
|
||||
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
|
||||
org.eclipse.jdt.core.compiler.problem.autoboxing=ignore
|
||||
org.eclipse.jdt.core.compiler.problem.comparingIdentical=warning
|
||||
org.eclipse.jdt.core.compiler.problem.deadCode=warning
|
||||
org.eclipse.jdt.core.compiler.problem.deprecation=warning
|
||||
org.eclipse.jdt.core.compiler.problem.deprecationInDeprecatedCode=disabled
|
||||
org.eclipse.jdt.core.compiler.problem.deprecationWhenOverridingDeprecatedMethod=disabled
|
||||
org.eclipse.jdt.core.compiler.problem.discouragedReference=warning
|
||||
org.eclipse.jdt.core.compiler.problem.emptyStatement=ignore
|
||||
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
|
||||
org.eclipse.jdt.core.compiler.problem.fallthroughCase=ignore
|
||||
org.eclipse.jdt.core.compiler.problem.fatalOptionalError=disabled
|
||||
org.eclipse.jdt.core.compiler.problem.fieldHiding=ignore
|
||||
org.eclipse.jdt.core.compiler.problem.finalParameterBound=warning
|
||||
org.eclipse.jdt.core.compiler.problem.finallyBlockNotCompletingNormally=warning
|
||||
org.eclipse.jdt.core.compiler.problem.forbiddenReference=error
|
||||
org.eclipse.jdt.core.compiler.problem.hiddenCatchBlock=warning
|
||||
org.eclipse.jdt.core.compiler.problem.includeNullInfoFromAsserts=disabled
|
||||
org.eclipse.jdt.core.compiler.problem.incompatibleNonInheritedInterfaceMethod=warning
|
||||
org.eclipse.jdt.core.compiler.problem.incompleteEnumSwitch=ignore
|
||||
org.eclipse.jdt.core.compiler.problem.indirectStaticAccess=ignore
|
||||
org.eclipse.jdt.core.compiler.problem.localVariableHiding=ignore
|
||||
org.eclipse.jdt.core.compiler.problem.methodWithConstructorName=warning
|
||||
org.eclipse.jdt.core.compiler.problem.missingDeprecatedAnnotation=ignore
|
||||
org.eclipse.jdt.core.compiler.problem.missingHashCodeMethod=ignore
|
||||
org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotation=ignore
|
||||
org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotationForInterfaceMethodImplementation=enabled
|
||||
org.eclipse.jdt.core.compiler.problem.missingSerialVersion=ignore
|
||||
org.eclipse.jdt.core.compiler.problem.missingSynchronizedOnInheritedMethod=ignore
|
||||
org.eclipse.jdt.core.compiler.problem.noEffectAssignment=warning
|
||||
org.eclipse.jdt.core.compiler.problem.noImplicitStringConversion=warning
|
||||
org.eclipse.jdt.core.compiler.problem.nonExternalizedStringLiteral=ignore
|
||||
org.eclipse.jdt.core.compiler.problem.nullReference=warning
|
||||
org.eclipse.jdt.core.compiler.problem.overridingPackageDefaultMethod=warning
|
||||
org.eclipse.jdt.core.compiler.problem.parameterAssignment=ignore
|
||||
org.eclipse.jdt.core.compiler.problem.possibleAccidentalBooleanAssignment=ignore
|
||||
org.eclipse.jdt.core.compiler.problem.potentialNullReference=ignore
|
||||
org.eclipse.jdt.core.compiler.problem.rawTypeReference=warning
|
||||
org.eclipse.jdt.core.compiler.problem.redundantNullCheck=ignore
|
||||
org.eclipse.jdt.core.compiler.problem.redundantSpecificationOfTypeArguments=ignore
|
||||
org.eclipse.jdt.core.compiler.problem.redundantSuperinterface=ignore
|
||||
org.eclipse.jdt.core.compiler.problem.reportMethodCanBePotentiallyStatic=ignore
|
||||
org.eclipse.jdt.core.compiler.problem.reportMethodCanBeStatic=ignore
|
||||
org.eclipse.jdt.core.compiler.problem.specialParameterHidingField=disabled
|
||||
org.eclipse.jdt.core.compiler.problem.staticAccessReceiver=warning
|
||||
org.eclipse.jdt.core.compiler.problem.suppressOptionalErrors=disabled
|
||||
org.eclipse.jdt.core.compiler.problem.suppressWarnings=enabled
|
||||
org.eclipse.jdt.core.compiler.problem.syntheticAccessEmulation=ignore
|
||||
org.eclipse.jdt.core.compiler.problem.typeParameterHiding=warning
|
||||
org.eclipse.jdt.core.compiler.problem.unavoidableGenericTypeProblems=enabled
|
||||
org.eclipse.jdt.core.compiler.problem.uncheckedTypeOperation=warning
|
||||
org.eclipse.jdt.core.compiler.problem.undocumentedEmptyBlock=ignore
|
||||
org.eclipse.jdt.core.compiler.problem.unhandledWarningToken=warning
|
||||
org.eclipse.jdt.core.compiler.problem.unnecessaryElse=ignore
|
||||
org.eclipse.jdt.core.compiler.problem.unnecessaryTypeCheck=ignore
|
||||
org.eclipse.jdt.core.compiler.problem.unqualifiedFieldAccess=ignore
|
||||
org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownException=ignore
|
||||
org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionExemptExceptionAndThrowable=enabled
|
||||
org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionIncludeDocCommentReference=enabled
|
||||
org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionWhenOverriding=disabled
|
||||
org.eclipse.jdt.core.compiler.problem.unusedImport=warning
|
||||
org.eclipse.jdt.core.compiler.problem.unusedLabel=warning
|
||||
org.eclipse.jdt.core.compiler.problem.unusedLocal=warning
|
||||
org.eclipse.jdt.core.compiler.problem.unusedObjectAllocation=ignore
|
||||
org.eclipse.jdt.core.compiler.problem.unusedParameter=ignore
|
||||
org.eclipse.jdt.core.compiler.problem.unusedParameterIncludeDocCommentReference=enabled
|
||||
org.eclipse.jdt.core.compiler.problem.unusedParameterWhenImplementingAbstract=disabled
|
||||
org.eclipse.jdt.core.compiler.problem.unusedParameterWhenOverridingConcrete=disabled
|
||||
org.eclipse.jdt.core.compiler.problem.unusedPrivateMember=warning
|
||||
org.eclipse.jdt.core.compiler.problem.unusedWarningToken=warning
|
||||
org.eclipse.jdt.core.compiler.problem.varargsArgumentNeedCast=warning
|
||||
org.eclipse.jdt.core.compiler.source=1.6
|
||||
30
launch4j/LICENSE.txt
Normal file
30
launch4j/LICENSE.txt
Normal file
@@ -0,0 +1,30 @@
|
||||
Launch4j (http://launch4j.sourceforge.net/)
|
||||
Cross-platform Java application wrapper for creating Windows native executables.
|
||||
|
||||
Copyright (c) 2004, 2017 Grzegorz Kowal
|
||||
All rights reserved.
|
||||
|
||||
Redistribution and use in source and binary forms, with or without modification,
|
||||
are permitted provided that the following conditions are met:
|
||||
|
||||
1. Redistributions of source code must retain the above copyright notice,
|
||||
this list of conditions and the following disclaimer.
|
||||
|
||||
2. Redistributions in binary form must reproduce the above copyright notice,
|
||||
this list of conditions and the following disclaimer in the documentation
|
||||
and/or other materials provided with the distribution.
|
||||
|
||||
3. Neither the name of the copyright holder nor the names of its contributors
|
||||
may be used to endorse or promote products derived from this software without
|
||||
specific prior written permission.
|
||||
|
||||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
||||
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
|
||||
THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||
ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
|
||||
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
||||
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
||||
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
|
||||
AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
|
||||
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
77
launch4j/build.xml
Normal file
77
launch4j/build.xml
Normal file
@@ -0,0 +1,77 @@
|
||||
<project name="launch4j" default="compile" basedir=".">
|
||||
<property name="src" location="src" />
|
||||
<property name="lib" location="lib" />
|
||||
<property name="build" location="build" />
|
||||
<property name="jar" location="./${ant.project.name}.jar" />
|
||||
<property name="launch4j.dir" location="." />
|
||||
<property name="maven" location="maven" />
|
||||
<property file="${src}/launch4j.properties"/>
|
||||
|
||||
<path id="dist.classpath">
|
||||
<pathelement path="${build}" />
|
||||
<fileset dir="${lib}">
|
||||
<include name="**/*.jar" />
|
||||
</fileset>
|
||||
</path>
|
||||
|
||||
<target name="init">
|
||||
<tstamp />
|
||||
<mkdir dir="${build}" />
|
||||
</target>
|
||||
|
||||
<target name="compile" depends="init" description="compile the source">
|
||||
<javac srcdir="${src}" destdir="${build}" classpathref="dist.classpath" source="1.6" debug="on" includeantruntime="false" />
|
||||
<copy todir="${build}/images">
|
||||
<fileset dir="${src}/images">
|
||||
<include name="**/*" />
|
||||
</fileset>
|
||||
</copy>
|
||||
<copy todir="${build}">
|
||||
<fileset dir="${src}">
|
||||
<include name="**/*.properties" />
|
||||
</fileset>
|
||||
</copy>
|
||||
</target>
|
||||
|
||||
<target name="jar" depends="compile" description="create jar">
|
||||
<fileset dir="${lib}" id="lib.dist.fileset">
|
||||
<include name="**/*.jar" />
|
||||
</fileset>
|
||||
<pathconvert pathsep=" " property="dist.classpath" refid="lib.dist.fileset">
|
||||
<map from="${lib}" to="./lib" />
|
||||
</pathconvert>
|
||||
<!-- Put everything in ${build} into a jar file -->
|
||||
<jar jarfile="${jar}">
|
||||
<fileset dir="${build}" excludes="**/messages_es.properties" />
|
||||
<manifest>
|
||||
<attribute name="Main-Class" value="net.sf.launch4j.Main" />
|
||||
<attribute name="Class-Path" value=". ${dist.classpath}" />
|
||||
</manifest>
|
||||
</jar>
|
||||
</target>
|
||||
|
||||
<target name="demo" depends="jar" description="build the demos">
|
||||
<ant dir="./demo/ConsoleApp" inheritAll="false" />
|
||||
<ant dir="./demo/SimpleApp" inheritAll="false" />
|
||||
</target>
|
||||
|
||||
<target name="clean" description="clean up">
|
||||
<delete dir="${build}" />
|
||||
<delete file="${jar}" />
|
||||
<ant dir="./demo/ConsoleApp" target="clean" inheritAll="false" />
|
||||
<ant dir="./demo/SimpleApp" target="clean" inheritAll="false" />
|
||||
</target>
|
||||
|
||||
<target name="switch-to-maven" description="switch project to maven">
|
||||
<copy todir="." overwrite="true">
|
||||
<fileset dir="${maven}">
|
||||
<include name="**/*" />
|
||||
</fileset>
|
||||
</copy>
|
||||
<replace file="./pom.xml">
|
||||
<replacefilter token="$${launch4j.version}" value="${version}"/>
|
||||
</replace>
|
||||
<delete dir="${lib}" />
|
||||
<mkdir dir="./target" />
|
||||
</target>
|
||||
</project>
|
||||
1
launch4j/demo/ConsoleApp/.gitignore
vendored
Normal file
1
launch4j/demo/ConsoleApp/.gitignore
vendored
Normal file
@@ -0,0 +1 @@
|
||||
/build
|
||||
BIN
launch4j/demo/ConsoleApp/ConsoleApp.jar
LFS
Normal file
BIN
launch4j/demo/ConsoleApp/ConsoleApp.jar
LFS
Normal file
Binary file not shown.
57
launch4j/demo/ConsoleApp/build.xml
Normal file
57
launch4j/demo/ConsoleApp/build.xml
Normal file
@@ -0,0 +1,57 @@
|
||||
<project name="ConsoleApp" default="exe" basedir=".">
|
||||
<property name="src" location="src" />
|
||||
<property name="lib" location="lib" />
|
||||
<property name="build" location="build" />
|
||||
<property name="launch4j.dir" location="../.." />
|
||||
|
||||
<path id="dist.classpath">
|
||||
<pathelement path="${build}" />
|
||||
<fileset dir="${lib}">
|
||||
<include name="**/*.jar" />
|
||||
</fileset>
|
||||
</path>
|
||||
|
||||
<target name="init">
|
||||
<tstamp />
|
||||
<mkdir dir="${build}" />
|
||||
</target>
|
||||
|
||||
<target name="compile" depends="init" description="compile the source">
|
||||
<javac srcdir="${src}" destdir="${build}" classpathref="dist.classpath" source="1.6" debug="on" includeantruntime="false" />
|
||||
</target>
|
||||
|
||||
<target name="jar" depends="compile" description="create the jar">
|
||||
<fileset dir="${lib}" id="lib.dist.fileset">
|
||||
<include name="**/*.jar" />
|
||||
</fileset>
|
||||
<pathconvert pathsep=" " property="dist.classpath" refid="lib.dist.fileset">
|
||||
<map from="${lib}" to=".\lib" />
|
||||
</pathconvert>
|
||||
<!-- Put everything in ${build} into a jar file -->
|
||||
<jar jarfile="${ant.project.name}.jar">
|
||||
<fileset dir="${build}" includes="**/*" />
|
||||
<manifest>
|
||||
<!-- SET YOUR MAIN CLASS HERE -->
|
||||
<attribute name="Main-Class" value="net.sf.launch4j.example.ConsoleApp" />
|
||||
<attribute name="Class-Path" value=". ${dist.classpath}" />
|
||||
</manifest>
|
||||
</jar>
|
||||
</target>
|
||||
|
||||
<target name="exe" depends="jar">
|
||||
<taskdef name="launch4j" classname="net.sf.launch4j.ant.Launch4jTask" classpath="${launch4j.dir}/launch4j.jar
|
||||
:${launch4j.dir}/lib/xstream.jar" />
|
||||
<launch4j>
|
||||
<config headerType="console" jarPath="ConsoleApp.jar" dontWrapJar="true" outfile="ConsoleApp.exe" errTitle="ConsoleApp" chdir="." icon="l4j/ConsoleApp.ico">
|
||||
<singleInstance mutexName="net.sf.launch4j.example.ConsoleApp" />
|
||||
<jre minVersion="1.6.0" />
|
||||
</config>
|
||||
</launch4j>
|
||||
</target>
|
||||
|
||||
<target name="clean" description="clean up">
|
||||
<delete dir="${build}" />
|
||||
<delete file="${ant.project.name}.jar" />
|
||||
<delete file="${ant.project.name}.exe" />
|
||||
</target>
|
||||
</project>
|
||||
BIN
launch4j/demo/ConsoleApp/l4j/ConsoleApp.ico
Normal file
BIN
launch4j/demo/ConsoleApp/l4j/ConsoleApp.ico
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 766 B |
8
launch4j/demo/ConsoleApp/lib/readme.txt
Normal file
8
launch4j/demo/ConsoleApp/lib/readme.txt
Normal file
@@ -0,0 +1,8 @@
|
||||
Put your jar libs here and the build script will include them
|
||||
in the classpath stored inside the jar manifest.
|
||||
In order to run your application move the output exe file from
|
||||
the dist directory to the same level as lib.
|
||||
|
||||
SimpleApp.exe
|
||||
lib/
|
||||
lib/xml.jar
|
||||
1
launch4j/demo/ConsoleApp/readme.txt
Normal file
1
launch4j/demo/ConsoleApp/readme.txt
Normal file
@@ -0,0 +1 @@
|
||||
To build the example application set JAVA_HOME and ANT_HOME environment variables.
|
||||
@@ -0,0 +1,72 @@
|
||||
/*
|
||||
Launch4j (http://launch4j.sourceforge.net/)
|
||||
Cross-platform Java application wrapper for creating Windows native executables.
|
||||
|
||||
Copyright (c) 2004, 2015 Grzegorz Kowal
|
||||
All rights reserved.
|
||||
|
||||
Redistribution and use in source and binary forms, with or without modification,
|
||||
are permitted provided that the following conditions are met:
|
||||
|
||||
1. Redistributions of source code must retain the above copyright notice,
|
||||
this list of conditions and the following disclaimer.
|
||||
|
||||
2. Redistributions in binary form must reproduce the above copyright notice,
|
||||
this list of conditions and the following disclaimer in the documentation
|
||||
and/or other materials provided with the distribution.
|
||||
|
||||
3. Neither the name of the copyright holder nor the names of its contributors
|
||||
may be used to endorse or promote products derived from this software without
|
||||
specific prior written permission.
|
||||
|
||||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
||||
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
|
||||
THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||
ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
|
||||
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
||||
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
||||
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
|
||||
AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
|
||||
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
package net.sf.launch4j.example;
|
||||
|
||||
import java.io.BufferedReader;
|
||||
import java.io.IOException;
|
||||
import java.io.InputStreamReader;
|
||||
|
||||
/**
|
||||
* @author Copyright (C) 2005 Grzegorz Kowal
|
||||
*/
|
||||
public class ConsoleApp {
|
||||
public static void main(String[] args) {
|
||||
StringBuffer sb = new StringBuffer("Hello World!\n\nJava version: ");
|
||||
sb.append(System.getProperty("java.version"));
|
||||
sb.append("\nJava home: ");
|
||||
sb.append(System.getProperty("java.home"));
|
||||
sb.append("\nCurrent dir: ");
|
||||
sb.append(System.getProperty("user.dir"));
|
||||
if (args.length > 0) {
|
||||
sb.append("\nArgs: ");
|
||||
for (int i = 0; i < args.length; i++) {
|
||||
sb.append(args[i]);
|
||||
sb.append(' ');
|
||||
}
|
||||
}
|
||||
sb.append("\n\nEnter a line of text, 'quit' or Ctrl-C to stop.\n\n>");
|
||||
System.out.print(sb.toString());
|
||||
try {
|
||||
BufferedReader is = new BufferedReader(new InputStreamReader(System.in));
|
||||
String line;
|
||||
while ((line = is.readLine()) != null && !line.equalsIgnoreCase("quit")) {
|
||||
System.out.print("You wrote: " + line + "\n\n>");
|
||||
}
|
||||
is.close();
|
||||
System.exit(123);
|
||||
} catch (IOException e) {
|
||||
System.err.print(e);
|
||||
}
|
||||
}
|
||||
}
|
||||
2
launch4j/demo/ExitCodeApp/.gitignore
vendored
Normal file
2
launch4j/demo/ExitCodeApp/.gitignore
vendored
Normal file
@@ -0,0 +1,2 @@
|
||||
/build
|
||||
/target
|
||||
72
launch4j/demo/ExitCodeApp/pom.xml
Normal file
72
launch4j/demo/ExitCodeApp/pom.xml
Normal file
@@ -0,0 +1,72 @@
|
||||
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<groupId>net.sf.launch4j.example</groupId>
|
||||
<artifactId>ExitCodeApp</artifactId>
|
||||
<version>1.0</version>
|
||||
<name>ExitCodeApp</name>
|
||||
<packaging>jar</packaging>
|
||||
|
||||
<properties>
|
||||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||||
</properties>
|
||||
|
||||
<build>
|
||||
<sourceDirectory>src</sourceDirectory>
|
||||
<resources>
|
||||
<resource>
|
||||
<directory>src</directory>
|
||||
<excludes>
|
||||
<exclude>**/*.java</exclude>
|
||||
</excludes>
|
||||
</resource>
|
||||
</resources>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<artifactId>maven-compiler-plugin</artifactId>
|
||||
<version>3.1</version>
|
||||
<configuration>
|
||||
<source>1.6</source>
|
||||
<target>1.6</target>
|
||||
</configuration>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>com.akathist.maven.plugins.launch4j</groupId>
|
||||
<artifactId>launch4j-maven-plugin</artifactId>
|
||||
<version>1.7.6</version>
|
||||
<executions>
|
||||
<execution>
|
||||
<id>l4j</id>
|
||||
<phase>package</phase>
|
||||
<goals><goal>launch4j</goal></goals>
|
||||
<configuration>
|
||||
<headerType>console</headerType>
|
||||
<outfile>target/ExitCodeApp.exe</outfile>
|
||||
<jar>target/ExitCodeApp-1.0.jar</jar>
|
||||
<errTitle>ExitCodeApp</errTitle>
|
||||
<classPath>
|
||||
<mainClass>net.sf.launch4j.example.ExitCodeApp</mainClass>
|
||||
<addDependencies>false</addDependencies>
|
||||
<preCp>anything</preCp>
|
||||
</classPath>
|
||||
<jre>
|
||||
<minVersion>1.5.0</minVersion>
|
||||
</jre>
|
||||
<versionInfo>
|
||||
<fileVersion>1.0.0.0</fileVersion>
|
||||
<txtFileVersion>1.0</txtFileVersion>
|
||||
<fileDescription>Simple app for testing exit code.</fileDescription>
|
||||
<copyright>Copyright (C) 2015 GK</copyright>
|
||||
<productVersion>3.9.0.0</productVersion>
|
||||
<txtProductVersion>3.9</txtProductVersion>
|
||||
<productName>ExitCodeApp</productName>
|
||||
<internalName>ExitCodeApp</internalName>
|
||||
<originalFilename>ExitCodeApp.exe</originalFilename>
|
||||
</versionInfo>
|
||||
</configuration>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
</project>
|
||||
@@ -0,0 +1,47 @@
|
||||
/*
|
||||
Launch4j (http://launch4j.sourceforge.net/)
|
||||
Cross-platform Java application wrapper for creating Windows native executables.
|
||||
|
||||
Copyright (c) 2004, 2015 Grzegorz Kowal
|
||||
All rights reserved.
|
||||
|
||||
Redistribution and use in source and binary forms, with or without modification,
|
||||
are permitted provided that the following conditions are met:
|
||||
|
||||
1. Redistributions of source code must retain the above copyright notice,
|
||||
this list of conditions and the following disclaimer.
|
||||
|
||||
2. Redistributions in binary form must reproduce the above copyright notice,
|
||||
this list of conditions and the following disclaimer in the documentation
|
||||
and/or other materials provided with the distribution.
|
||||
|
||||
3. Neither the name of the copyright holder nor the names of its contributors
|
||||
may be used to endorse or promote products derived from this software without
|
||||
specific prior written permission.
|
||||
|
||||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
||||
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
|
||||
THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||
ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
|
||||
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
||||
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
||||
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
|
||||
AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
|
||||
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
package net.sf.launch4j.example;
|
||||
|
||||
public class ExitCodeApp {
|
||||
public static void main(String[] args) {
|
||||
int exitCode = 0;
|
||||
|
||||
if (args.length > 0) {
|
||||
exitCode = Integer.parseInt(args[0]);
|
||||
}
|
||||
|
||||
System.out.println("Exit code: " + String.valueOf(exitCode));
|
||||
System.exit(exitCode);
|
||||
}
|
||||
}
|
||||
30
launch4j/demo/LICENSE.txt
Normal file
30
launch4j/demo/LICENSE.txt
Normal file
@@ -0,0 +1,30 @@
|
||||
Launch4j (http://launch4j.sourceforge.net/)
|
||||
Cross-platform Java application wrapper for creating Windows native executables.
|
||||
|
||||
Copyright (c) 2004, 2015 Grzegorz Kowal
|
||||
All rights reserved.
|
||||
|
||||
Redistribution and use in source and binary forms, with or without modification,
|
||||
are permitted provided that the following conditions are met:
|
||||
|
||||
1. Redistributions of source code must retain the above copyright notice,
|
||||
this list of conditions and the following disclaimer.
|
||||
|
||||
2. Redistributions in binary form must reproduce the above copyright notice,
|
||||
this list of conditions and the following disclaimer in the documentation
|
||||
and/or other materials provided with the distribution.
|
||||
|
||||
3. Neither the name of the copyright holder nor the names of its contributors
|
||||
may be used to endorse or promote products derived from this software without
|
||||
specific prior written permission.
|
||||
|
||||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
||||
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
|
||||
THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||
ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
|
||||
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
||||
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
||||
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
|
||||
AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
|
||||
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
1
launch4j/demo/SimpleApp/.gitignore
vendored
Normal file
1
launch4j/demo/SimpleApp/.gitignore
vendored
Normal file
@@ -0,0 +1 @@
|
||||
/build
|
||||
BIN
launch4j/demo/SimpleApp/SimpleApp.jar
LFS
Normal file
BIN
launch4j/demo/SimpleApp/SimpleApp.jar
LFS
Normal file
Binary file not shown.
52
launch4j/demo/SimpleApp/build.xml
Normal file
52
launch4j/demo/SimpleApp/build.xml
Normal file
@@ -0,0 +1,52 @@
|
||||
<project name="SimpleApp" default="exe" basedir=".">
|
||||
<property name="src" location="src" />
|
||||
<property name="lib" location="lib" />
|
||||
<property name="build" location="build" />
|
||||
<property name="launch4j.dir" location="../.." />
|
||||
|
||||
<path id="dist.classpath">
|
||||
<pathelement path="${build}" />
|
||||
<fileset dir="${lib}">
|
||||
<include name="**/*.jar" />
|
||||
</fileset>
|
||||
</path>
|
||||
|
||||
<target name="init">
|
||||
<tstamp />
|
||||
<mkdir dir="${build}" />
|
||||
</target>
|
||||
|
||||
<target name="compile" depends="init" description="compile the source">
|
||||
<javac srcdir="${src}" destdir="${build}" classpathref="dist.classpath" source="1.6" debug="on" includeantruntime="false" />
|
||||
</target>
|
||||
|
||||
<target name="jar" depends="compile" description="create the jar">
|
||||
<fileset dir="${lib}" id="lib.dist.fileset">
|
||||
<include name="**/*.jar" />
|
||||
</fileset>
|
||||
<pathconvert pathsep=" " property="dist.classpath" refid="lib.dist.fileset">
|
||||
<map from="${lib}" to=".\lib" />
|
||||
</pathconvert>
|
||||
<!-- Put everything in ${build} into a jar file -->
|
||||
<jar jarfile="${ant.project.name}.jar">
|
||||
<fileset dir="${build}" includes="**/*" />
|
||||
<manifest>
|
||||
<!-- SET YOUR MAIN CLASS HERE -->
|
||||
<attribute name="Main-Class" value="net.sf.launch4j.example.SimpleApp" />
|
||||
<attribute name="Class-Path" value=". ${dist.classpath}" />
|
||||
</manifest>
|
||||
</jar>
|
||||
</target>
|
||||
|
||||
<target name="exe" depends="jar">
|
||||
<taskdef name="launch4j" classname="net.sf.launch4j.ant.Launch4jTask" classpath="${launch4j.dir}/launch4j.jar
|
||||
:${launch4j.dir}/lib/xstream.jar" />
|
||||
<launch4j configFile="./l4j/SimpleApp.xml" />
|
||||
</target>
|
||||
|
||||
<target name="clean" description="clean up">
|
||||
<delete dir="${build}" />
|
||||
<delete file="${ant.project.name}.jar" />
|
||||
<delete file="${ant.project.name}.exe" />
|
||||
</target>
|
||||
</project>
|
||||
BIN
launch4j/demo/SimpleApp/l4j/SimpleApp.ico
Normal file
BIN
launch4j/demo/SimpleApp/l4j/SimpleApp.ico
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 766 B |
19
launch4j/demo/SimpleApp/l4j/SimpleApp.xml
Normal file
19
launch4j/demo/SimpleApp/l4j/SimpleApp.xml
Normal file
@@ -0,0 +1,19 @@
|
||||
<launch4jConfig>
|
||||
<headerType>gui</headerType>
|
||||
<jar>SimpleApp.jar</jar>
|
||||
<dontWrapJar>true</dontWrapJar>
|
||||
<outfile>../SimpleApp.exe</outfile>
|
||||
<errTitle>SimpleApp</errTitle>
|
||||
<chdir>.</chdir>
|
||||
<icon>SimpleApp.ico</icon>
|
||||
<restartOnCrash>true</restartOnCrash>
|
||||
<jre>
|
||||
<minVersion>1.6.0</minVersion>
|
||||
</jre>
|
||||
<splash>
|
||||
<file>splash.bmp</file>
|
||||
<waitForWindow>true</waitForWindow>
|
||||
<timeout>60</timeout>
|
||||
<timeoutErr>true</timeoutErr>
|
||||
</splash>
|
||||
</launch4jConfig>
|
||||
BIN
launch4j/demo/SimpleApp/l4j/splash.bmp
Normal file
BIN
launch4j/demo/SimpleApp/l4j/splash.bmp
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 4.4 KiB |
8
launch4j/demo/SimpleApp/lib/readme.txt
Normal file
8
launch4j/demo/SimpleApp/lib/readme.txt
Normal file
@@ -0,0 +1,8 @@
|
||||
Put your jar libs here and the build script will include them
|
||||
in the classpath stored inside the jar manifest.
|
||||
In order to run your application move the output exe file from
|
||||
the dist directory to the same level as lib.
|
||||
|
||||
SimpleApp.exe
|
||||
lib/
|
||||
lib/xml.jar
|
||||
1
launch4j/demo/SimpleApp/readme.txt
Normal file
1
launch4j/demo/SimpleApp/readme.txt
Normal file
@@ -0,0 +1 @@
|
||||
To build the example application set JAVA_HOME and ANT_HOME environment variables.
|
||||
@@ -0,0 +1,195 @@
|
||||
/*
|
||||
Launch4j (http://launch4j.sourceforge.net/)
|
||||
Cross-platform Java application wrapper for creating Windows native executables.
|
||||
|
||||
Copyright (c) 2004, 2015 Grzegorz Kowal
|
||||
All rights reserved.
|
||||
|
||||
Redistribution and use in source and binary forms, with or without modification,
|
||||
are permitted provided that the following conditions are met:
|
||||
|
||||
1. Redistributions of source code must retain the above copyright notice,
|
||||
this list of conditions and the following disclaimer.
|
||||
|
||||
2. Redistributions in binary form must reproduce the above copyright notice,
|
||||
this list of conditions and the following disclaimer in the documentation
|
||||
and/or other materials provided with the distribution.
|
||||
|
||||
3. Neither the name of the copyright holder nor the names of its contributors
|
||||
may be used to endorse or promote products derived from this software without
|
||||
specific prior written permission.
|
||||
|
||||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
||||
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
|
||||
THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||
ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
|
||||
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
||||
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
||||
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
|
||||
AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
|
||||
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
package net.sf.launch4j.example;
|
||||
|
||||
import java.awt.Dimension;
|
||||
import java.awt.Font;
|
||||
import java.awt.Toolkit;
|
||||
import java.awt.event.ActionEvent;
|
||||
import java.awt.event.WindowAdapter;
|
||||
import java.awt.event.WindowEvent;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
|
||||
import javax.swing.AbstractAction;
|
||||
import javax.swing.JFrame;
|
||||
import javax.swing.JMenu;
|
||||
import javax.swing.JMenuBar;
|
||||
import javax.swing.JMenuItem;
|
||||
import javax.swing.JScrollPane;
|
||||
import javax.swing.JTextArea;
|
||||
import javax.swing.UIManager;
|
||||
|
||||
public class SimpleApp extends JFrame {
|
||||
public SimpleApp(String[] args) {
|
||||
super("Java Application");
|
||||
|
||||
if (args.length == 1 && "throw".equals(args[0])) {
|
||||
throw new IllegalStateException("Exception thrown from SimpleApp.");
|
||||
}
|
||||
|
||||
Dimension screenSize = Toolkit.getDefaultToolkit().getScreenSize();
|
||||
setBounds (screenSize.width / 4, screenSize.height / 4, screenSize.width / 2, screenSize.height / 2);
|
||||
|
||||
addWindowListener(new WindowAdapter() {
|
||||
public void windowClosing(WindowEvent e) {
|
||||
System.exit(0);
|
||||
}});
|
||||
|
||||
initializeMenu();
|
||||
initializeTextArea(args);
|
||||
setVisible(true);
|
||||
}
|
||||
|
||||
public static void setLAF() {
|
||||
JFrame.setDefaultLookAndFeelDecorated(true);
|
||||
Toolkit.getDefaultToolkit().setDynamicLayout(true);
|
||||
System.setProperty("sun.awt.noerasebackground","true");
|
||||
try {
|
||||
UIManager.setLookAndFeel("com.sun.java.swing.plaf.windows.WindowsLookAndFeel");
|
||||
} catch (Exception e) {
|
||||
System.err.println("Failed to set LookAndFeel");
|
||||
}
|
||||
}
|
||||
|
||||
public static void main(String[] args) {
|
||||
setLAF();
|
||||
new SimpleApp(args);
|
||||
}
|
||||
|
||||
private final void initializeMenu() {
|
||||
JMenu menu = new JMenu("Exit with code");
|
||||
|
||||
menu.add(new JMenuItem(new AbstractAction("Exit with code 0") {
|
||||
@Override
|
||||
public void actionPerformed(ActionEvent e) {
|
||||
System.exit(0);
|
||||
}
|
||||
}));
|
||||
|
||||
menu.add(new JMenuItem(new AbstractAction("Exit with code 100 and restart the application") {
|
||||
@Override
|
||||
public void actionPerformed(ActionEvent e) {
|
||||
System.exit(100);
|
||||
}
|
||||
}));
|
||||
|
||||
JMenuBar mb = new JMenuBar();
|
||||
mb.setOpaque(true);
|
||||
mb.add(menu);
|
||||
setJMenuBar(mb);
|
||||
}
|
||||
|
||||
private final void initializeTextArea(String[] args) {
|
||||
JTextArea textArea = new JTextArea();
|
||||
textArea.setFont(new Font(Font.MONOSPACED, Font.PLAIN, 12));
|
||||
textArea.setEditable(false);
|
||||
|
||||
JScrollPane scrollPane = new JScrollPane();
|
||||
scrollPane.setViewportView(textArea);
|
||||
scrollPane.setVerticalScrollBarPolicy(JScrollPane.VERTICAL_SCROLLBAR_AS_NEEDED);
|
||||
scrollPane.setHorizontalScrollBarPolicy(JScrollPane.HORIZONTAL_SCROLLBAR_AS_NEEDED);
|
||||
getContentPane().add(scrollPane);
|
||||
|
||||
textArea.setText(getMainProperties(args));
|
||||
textArea.append(getAllProperties());
|
||||
textArea.append(getEnvironmentVariables());
|
||||
}
|
||||
|
||||
private final String getMainProperties(String[] args) {
|
||||
StringBuffer sb = new StringBuffer("Java version: ");
|
||||
sb.append(System.getProperty("java.version"));
|
||||
sb.append("\nJava home: ");
|
||||
sb.append(System.getProperty("java.home"));
|
||||
sb.append("\nCurrent dir: ");
|
||||
sb.append(System.getProperty("user.dir"));
|
||||
sb.append("\nCommand line args: {");
|
||||
|
||||
for (int i = 0; i < args.length; i++) {
|
||||
if (i > 0)
|
||||
{
|
||||
sb.append(' ');
|
||||
}
|
||||
sb.append(args[i]);
|
||||
}
|
||||
|
||||
sb.append("}\n");
|
||||
|
||||
final int mb = 1024 * 1024;
|
||||
sb.append("Free memory (MB): ");
|
||||
sb.append(Runtime.getRuntime().freeMemory() / mb);
|
||||
sb.append("\nTotal memory (MB): ");
|
||||
sb.append(Runtime.getRuntime().totalMemory() / mb);
|
||||
sb.append("\nMax memory (MB): ");
|
||||
sb.append(Runtime.getRuntime().maxMemory() / mb);
|
||||
sb.append("\n");
|
||||
|
||||
return sb.toString();
|
||||
}
|
||||
|
||||
private final String getAllProperties() {
|
||||
StringBuffer sb = new StringBuffer("\n========== All properties ==========\n");
|
||||
|
||||
List<String> keys = new ArrayList<String>();
|
||||
keys.addAll(System.getProperties().stringPropertyNames());
|
||||
Collections.sort(keys);
|
||||
|
||||
for (String key : keys) {
|
||||
sb.append(key);
|
||||
sb.append(": ");
|
||||
sb.append(System.getProperty(key));
|
||||
sb.append("\n");
|
||||
}
|
||||
|
||||
return sb.toString();
|
||||
}
|
||||
|
||||
private final String getEnvironmentVariables() {
|
||||
StringBuffer sb = new StringBuffer("\n========== Environment variables ==========\n");
|
||||
|
||||
List<String> keys = new ArrayList<String>();
|
||||
keys.addAll(System.getenv().keySet());
|
||||
Collections.sort(keys);
|
||||
|
||||
for (String key : keys) {
|
||||
sb.append(key);
|
||||
sb.append(": ");
|
||||
sb.append(System.getenv(key));
|
||||
sb.append("\n");
|
||||
}
|
||||
|
||||
return sb.toString();
|
||||
}
|
||||
}
|
||||
3
launch4j/demo/readme.txt
Normal file
3
launch4j/demo/readme.txt
Normal file
@@ -0,0 +1,3 @@
|
||||
JRE/SDK 1.6.0 or higher must be installed on your system to run this demo.
|
||||
|
||||
try running it with some command line arguments...
|
||||
26
launch4j/head/LICENSE.txt
Normal file
26
launch4j/head/LICENSE.txt
Normal file
@@ -0,0 +1,26 @@
|
||||
Launch4j (http://launch4j.sourceforge.net/)
|
||||
Cross-platform Java application wrapper for creating Windows native executables.
|
||||
|
||||
Copyright (c) 2004, 2015 Grzegorz Kowal
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in
|
||||
all copies or substantial portions of the Software.
|
||||
|
||||
Except as contained in this notice, the name(s) of the above copyright holders
|
||||
shall not be used in advertising or otherwise to promote the sale, use or other
|
||||
dealings in this Software without prior written authorization.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
THE SOFTWARE.
|
||||
BIN
launch4j/head/consolehead.o
Normal file
BIN
launch4j/head/consolehead.o
Normal file
Binary file not shown.
BIN
launch4j/head/guihead.o
Normal file
BIN
launch4j/head/guihead.o
Normal file
Binary file not shown.
BIN
launch4j/head/head.o
Normal file
BIN
launch4j/head/head.o
Normal file
Binary file not shown.
26
launch4j/head_jni_BETA/LICENSE.txt
Normal file
26
launch4j/head_jni_BETA/LICENSE.txt
Normal file
@@ -0,0 +1,26 @@
|
||||
Launch4j (http://launch4j.sourceforge.net/)
|
||||
Cross-platform Java application wrapper for creating Windows native executables.
|
||||
|
||||
Copyright (c) 2004, 2015 Grzegorz Kowal
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in
|
||||
all copies or substantial portions of the Software.
|
||||
|
||||
Except as contained in this notice, the name(s) of the above copyright holders
|
||||
shall not be used in advertising or otherwise to promote the sale, use or other
|
||||
dealings in this Software without prior written authorization.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
THE SOFTWARE.
|
||||
BIN
launch4j/head_jni_BETA/head.o
Normal file
BIN
launch4j/head_jni_BETA/head.o
Normal file
Binary file not shown.
BIN
launch4j/head_jni_BETA/jniconsolehead.o
Normal file
BIN
launch4j/head_jni_BETA/jniconsolehead.o
Normal file
Binary file not shown.
BIN
launch4j/head_jni_BETA/jniguihead.o
Normal file
BIN
launch4j/head_jni_BETA/jniguihead.o
Normal file
Binary file not shown.
BIN
launch4j/head_jni_BETA/jnihead.o
Normal file
BIN
launch4j/head_jni_BETA/jnihead.o
Normal file
Binary file not shown.
26
launch4j/head_src/LICENSE.txt
Normal file
26
launch4j/head_src/LICENSE.txt
Normal file
@@ -0,0 +1,26 @@
|
||||
Launch4j (http://launch4j.sourceforge.net/)
|
||||
Cross-platform Java application wrapper for creating Windows native executables.
|
||||
|
||||
Copyright (c) 2004, 2015 Grzegorz Kowal
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in
|
||||
all copies or substantial portions of the Software.
|
||||
|
||||
Except as contained in this notice, the name(s) of the above copyright holders
|
||||
shall not be used in advertising or otherwise to promote the sale, use or other
|
||||
dealings in this Software without prior written authorization.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
THE SOFTWARE.
|
||||
2
launch4j/head_src/consolehead/.gitignore
vendored
Normal file
2
launch4j/head_src/consolehead/.gitignore
vendored
Normal file
@@ -0,0 +1,2 @@
|
||||
/consolehead.exe
|
||||
/consolehead.layout
|
||||
33
launch4j/head_src/consolehead/Makefile.win
Normal file
33
launch4j/head_src/consolehead/Makefile.win
Normal file
@@ -0,0 +1,33 @@
|
||||
# Project: consolehead
|
||||
# Makefile created by Dev-C++ 4.9.9.2
|
||||
|
||||
CPP = g++.exe
|
||||
CC = gcc.exe
|
||||
WINDRES = windres.exe
|
||||
RES =
|
||||
OBJ = ../../head/consolehead.o ../../head/head.o $(RES)
|
||||
LINKOBJ = ../../head/consolehead.o ../../head/head.o $(RES)
|
||||
LIBS = -L"C:/Dev-Cpp/lib" -n -s
|
||||
INCS = -I"C:/Dev-Cpp/include"
|
||||
CXXINCS = -I"C:/Dev-Cpp/lib/gcc/mingw32/3.4.2/include" -I"C:/Dev-Cpp/include/c++/3.4.2/backward" -I"C:/Dev-Cpp/include/c++/3.4.2/mingw32" -I"C:/Dev-Cpp/include/c++/3.4.2" -I"C:/Dev-Cpp/include"
|
||||
BIN = consolehead.exe
|
||||
CXXFLAGS = $(CXXINCS) -fexpensive-optimizations -O3
|
||||
CFLAGS = $(INCS) -fexpensive-optimizations -O3
|
||||
RM = rm -f
|
||||
|
||||
.PHONY: all all-before all-after clean clean-custom
|
||||
|
||||
all: all-before consolehead.exe all-after
|
||||
|
||||
|
||||
clean: clean-custom
|
||||
${RM} $(OBJ) $(BIN)
|
||||
|
||||
$(BIN): $(OBJ)
|
||||
# $(CC) $(LINKOBJ) -o "consolehead.exe" $(LIBS)
|
||||
|
||||
../../head/consolehead.o: consolehead.c
|
||||
$(CC) -c consolehead.c -o ../../head/consolehead.o $(CFLAGS)
|
||||
|
||||
../../head/head.o: ../head.c
|
||||
$(CC) -c ../head.c -o ../../head/head.o $(CFLAGS)
|
||||
97
launch4j/head_src/consolehead/consolehead.c
Normal file
97
launch4j/head_src/consolehead/consolehead.c
Normal file
@@ -0,0 +1,97 @@
|
||||
/*
|
||||
Launch4j (http://launch4j.sourceforge.net/)
|
||||
Cross-platform Java application wrapper for creating Windows native executables.
|
||||
|
||||
Copyright (c) 2004, 2007 Grzegorz Kowal
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in
|
||||
all copies or substantial portions of the Software.
|
||||
|
||||
Except as contained in this notice, the name(s) of the above copyright holders
|
||||
shall not be used in advertising or otherwise to promote the sale, use or other
|
||||
dealings in this Software without prior written authorization.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
THE SOFTWARE.
|
||||
*/
|
||||
|
||||
#include "../resource.h"
|
||||
#include "../head.h"
|
||||
|
||||
extern FILE* hLog;
|
||||
|
||||
BOOL restartOnCrash = FALSE;
|
||||
|
||||
int main(int argc, char* argv[])
|
||||
{
|
||||
setConsoleFlag();
|
||||
LPTSTR cmdLine = GetCommandLine();
|
||||
|
||||
if (*cmdLine == '"')
|
||||
{
|
||||
if (*(cmdLine = strchr(cmdLine + 1, '"') + 1))
|
||||
{
|
||||
cmdLine++;
|
||||
}
|
||||
}
|
||||
else if ((cmdLine = strchr(cmdLine, ' ')) != NULL)
|
||||
{
|
||||
cmdLine++;
|
||||
}
|
||||
else
|
||||
{
|
||||
cmdLine = "";
|
||||
}
|
||||
|
||||
int result = prepare(cmdLine);
|
||||
|
||||
if (result == ERROR_ALREADY_EXISTS)
|
||||
{
|
||||
char errMsg[BIG_STR] = {0};
|
||||
loadString(INSTANCE_ALREADY_EXISTS_MSG, errMsg);
|
||||
msgBox(errMsg);
|
||||
closeLogFile();
|
||||
return 2;
|
||||
}
|
||||
|
||||
if (result != TRUE)
|
||||
{
|
||||
signalError();
|
||||
return 1;
|
||||
}
|
||||
|
||||
restartOnCrash = loadBool(RESTART_ON_CRASH);
|
||||
DWORD dwExitCode;
|
||||
|
||||
do
|
||||
{
|
||||
dwExitCode = 0;
|
||||
|
||||
if (!execute(TRUE, &dwExitCode))
|
||||
{
|
||||
signalError();
|
||||
break;
|
||||
}
|
||||
|
||||
if (restartOnCrash && dwExitCode != 0)
|
||||
{
|
||||
debug("Exit code:\t%d, restarting the application!\n", dwExitCode);
|
||||
}
|
||||
} while (restartOnCrash && dwExitCode != 0);
|
||||
|
||||
debug("Exit code:\t%d\n", dwExitCode);
|
||||
closeLogFile();
|
||||
return (int) dwExitCode;
|
||||
}
|
||||
108
launch4j/head_src/consolehead/consolehead.dev
Normal file
108
launch4j/head_src/consolehead/consolehead.dev
Normal file
@@ -0,0 +1,108 @@
|
||||
[Project]
|
||||
FileName=consolehead.dev
|
||||
Name=consolehead
|
||||
UnitCount=4
|
||||
Type=1
|
||||
Ver=1
|
||||
ObjFiles=
|
||||
Includes=
|
||||
Libs=
|
||||
PrivateResource=
|
||||
ResourceIncludes=
|
||||
MakeIncludes=
|
||||
Compiler=
|
||||
CppCompiler=
|
||||
Linker=-n_@@_
|
||||
IsCpp=0
|
||||
Icon=
|
||||
ExeOutput=
|
||||
ObjectOutput=..\..\head
|
||||
OverrideOutput=0
|
||||
OverrideOutputName=consolehead.exe
|
||||
HostApplication=
|
||||
Folders=
|
||||
CommandLine=
|
||||
UseCustomMakefile=1
|
||||
CustomMakefile=Makefile.win
|
||||
IncludeVersionInfo=0
|
||||
SupportXPThemes=0
|
||||
CompilerSet=0
|
||||
CompilerSettings=0000000001001000000100
|
||||
|
||||
[Unit1]
|
||||
FileName=consolehead.c
|
||||
CompileCpp=0
|
||||
Folder=consolehead
|
||||
Compile=1
|
||||
Link=1
|
||||
Priority=1000
|
||||
OverrideBuildCmd=0
|
||||
BuildCmd=
|
||||
|
||||
[VersionInfo]
|
||||
Major=0
|
||||
Minor=1
|
||||
Release=1
|
||||
Build=1
|
||||
LanguageID=1033
|
||||
CharsetID=1252
|
||||
CompanyName=
|
||||
FileVersion=
|
||||
FileDescription=Developed using the Dev-C++ IDE
|
||||
InternalName=
|
||||
LegalCopyright=
|
||||
LegalTrademarks=
|
||||
OriginalFilename=
|
||||
ProductName=
|
||||
ProductVersion=
|
||||
AutoIncBuildNr=0
|
||||
|
||||
[Unit2]
|
||||
FileName=..\resource.h
|
||||
CompileCpp=0
|
||||
Folder=consolehead
|
||||
Compile=1
|
||||
Link=1
|
||||
Priority=1000
|
||||
OverrideBuildCmd=0
|
||||
BuildCmd=
|
||||
|
||||
[Unit3]
|
||||
FileName=..\head.c
|
||||
CompileCpp=0
|
||||
Folder=consolehead
|
||||
Compile=1
|
||||
Link=1
|
||||
Priority=1000
|
||||
OverrideBuildCmd=0
|
||||
BuildCmd=
|
||||
|
||||
[Unit4]
|
||||
FileName=..\head.h
|
||||
CompileCpp=0
|
||||
Folder=consolehead
|
||||
Compile=1
|
||||
Link=1
|
||||
Priority=1000
|
||||
OverrideBuildCmd=0
|
||||
BuildCmd=
|
||||
|
||||
[Unit5]
|
||||
FileName=..\head.rc
|
||||
Folder=consolehead
|
||||
Compile=1
|
||||
Link=0
|
||||
Priority=1000
|
||||
OverrideBuildCmd=0
|
||||
BuildCmd=
|
||||
|
||||
[Unit6]
|
||||
FileName=..\resid.h
|
||||
CompileCpp=0
|
||||
Folder=consolehead
|
||||
Compile=1
|
||||
Link=1
|
||||
Priority=1000
|
||||
OverrideBuildCmd=0
|
||||
BuildCmd=
|
||||
|
||||
2
launch4j/head_src/guihead/.gitignore
vendored
Normal file
2
launch4j/head_src/guihead/.gitignore
vendored
Normal file
@@ -0,0 +1,2 @@
|
||||
/guihead.exe
|
||||
/guihead.layout
|
||||
33
launch4j/head_src/guihead/Makefile.win
Normal file
33
launch4j/head_src/guihead/Makefile.win
Normal file
@@ -0,0 +1,33 @@
|
||||
# Project: guihead
|
||||
# Makefile created by Dev-C++ 4.9.9.2
|
||||
|
||||
CPP = g++.exe
|
||||
CC = gcc.exe
|
||||
WINDRES = windres.exe
|
||||
RES =
|
||||
OBJ = ../../head/guihead.o ../../head/head.o $(RES)
|
||||
LINKOBJ = ../../head/guihead.o ../../head/head.o $(RES)
|
||||
LIBS = -L"C:/Dev-Cpp/lib" -mwindows -n -s
|
||||
INCS = -I"C:/Dev-Cpp/include"
|
||||
CXXINCS = -I"C:/Dev-Cpp/lib/gcc/mingw32/3.4.2/include" -I"C:/Dev-Cpp/include/c++/3.4.2/backward" -I"C:/Dev-Cpp/include/c++/3.4.2/mingw32" -I"C:/Dev-Cpp/include/c++/3.4.2" -I"C:/Dev-Cpp/include"
|
||||
BIN = guihead.exe
|
||||
CXXFLAGS = $(CXXINCS) -fexpensive-optimizations -O3
|
||||
CFLAGS = $(INCS) -fexpensive-optimizations -O3
|
||||
RM = rm -f
|
||||
|
||||
.PHONY: all all-before all-after clean clean-custom
|
||||
|
||||
all: all-before guihead.exe all-after
|
||||
|
||||
|
||||
clean: clean-custom
|
||||
${RM} $(OBJ) $(BIN)
|
||||
|
||||
$(BIN): $(OBJ)
|
||||
# $(CC) $(LINKOBJ) -o "guihead.exe" $(LIBS)
|
||||
|
||||
../../head/guihead.o: guihead.c
|
||||
$(CC) -c guihead.c -o ../../head/guihead.o $(CFLAGS)
|
||||
|
||||
../../head/head.o: ../head.c
|
||||
$(CC) -c ../head.c -o ../../head/head.o $(CFLAGS)
|
||||
241
launch4j/head_src/guihead/guihead.c
Normal file
241
launch4j/head_src/guihead/guihead.c
Normal file
@@ -0,0 +1,241 @@
|
||||
/*
|
||||
Launch4j (http://launch4j.sourceforge.net/)
|
||||
Cross-platform Java application wrapper for creating Windows native executables.
|
||||
|
||||
Copyright (c) 2004, 2015 Grzegorz Kowal
|
||||
Sylvain Mina (single instance patch)
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in
|
||||
all copies or substantial portions of the Software.
|
||||
|
||||
Except as contained in this notice, the name(s) of the above copyright holders
|
||||
shall not be used in advertising or otherwise to promote the sale, use or other
|
||||
dealings in this Software without prior written authorization.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
THE SOFTWARE.
|
||||
*/
|
||||
|
||||
#include "../resource.h"
|
||||
#include "../head.h"
|
||||
#include "guihead.h"
|
||||
|
||||
extern FILE* hLog;
|
||||
extern PROCESS_INFORMATION processInformation;
|
||||
|
||||
HWND hWnd;
|
||||
DWORD dwExitCode = 0;
|
||||
BOOL stayAlive = FALSE;
|
||||
BOOL splash = FALSE;
|
||||
BOOL splashTimeoutErr;
|
||||
BOOL waitForWindow;
|
||||
BOOL restartOnCrash = FALSE;
|
||||
int splashTimeout = DEFAULT_SPLASH_TIMEOUT;
|
||||
|
||||
int APIENTRY WinMain(HINSTANCE hInstance,
|
||||
HINSTANCE hPrevInstance,
|
||||
LPSTR lpCmdLine,
|
||||
int nCmdShow)
|
||||
{
|
||||
int result = prepare(lpCmdLine);
|
||||
|
||||
if (result == ERROR_ALREADY_EXISTS)
|
||||
{
|
||||
HWND handle = getInstanceWindow();
|
||||
ShowWindow(handle, SW_SHOW);
|
||||
SetForegroundWindow(handle);
|
||||
closeLogFile();
|
||||
return 2;
|
||||
}
|
||||
|
||||
if (result != TRUE)
|
||||
{
|
||||
signalError();
|
||||
return 1;
|
||||
}
|
||||
|
||||
splash = loadBool(SHOW_SPLASH)
|
||||
&& strstr(lpCmdLine, "--l4j-no-splash") == NULL;
|
||||
restartOnCrash = loadBool(RESTART_ON_CRASH);
|
||||
|
||||
// if we should restart on crash, we must also stay alive to check for crashes
|
||||
stayAlive = restartOnCrash ||
|
||||
(loadBool(GUI_HEADER_STAYS_ALIVE)
|
||||
&& strstr(lpCmdLine, "--l4j-dont-wait") == NULL);
|
||||
|
||||
if (splash || stayAlive)
|
||||
{
|
||||
hWnd = CreateWindowEx(WS_EX_TOOLWINDOW, "STATIC", "",
|
||||
WS_POPUP | SS_BITMAP,
|
||||
0, 0, CW_USEDEFAULT, CW_USEDEFAULT, NULL, NULL, hInstance, NULL);
|
||||
if (splash)
|
||||
{
|
||||
char timeout[10] = {0};
|
||||
if (loadString(SPLASH_TIMEOUT, timeout))
|
||||
{
|
||||
splashTimeout = atoi(timeout);
|
||||
if (splashTimeout <= 0 || splashTimeout > MAX_SPLASH_TIMEOUT)
|
||||
{
|
||||
splashTimeout = DEFAULT_SPLASH_TIMEOUT;
|
||||
}
|
||||
}
|
||||
splashTimeout = splashTimeout * 1000; // to millis
|
||||
splashTimeoutErr = loadBool(SPLASH_TIMEOUT_ERR)
|
||||
&& strstr(lpCmdLine, "--l4j-no-splash-err") == NULL;
|
||||
waitForWindow = loadBool(SPLASH_WAITS_FOR_WINDOW);
|
||||
HANDLE hImage = LoadImage(hInstance, // handle of the instance containing the image
|
||||
MAKEINTRESOURCE(SPLASH_BITMAP), // name or identifier of image
|
||||
IMAGE_BITMAP, // type of image
|
||||
0, // desired width
|
||||
0, // desired height
|
||||
LR_DEFAULTSIZE);
|
||||
if (hImage == NULL)
|
||||
{
|
||||
signalError();
|
||||
return 1;
|
||||
}
|
||||
SendMessage(hWnd, STM_SETIMAGE, IMAGE_BITMAP, (LPARAM) hImage);
|
||||
RECT rect;
|
||||
GetWindowRect(hWnd, &rect);
|
||||
int x = (GetSystemMetrics(SM_CXSCREEN) - (rect.right - rect.left)) / 2;
|
||||
int y = (GetSystemMetrics(SM_CYSCREEN) - (rect.bottom - rect.top)) / 2;
|
||||
SetWindowPos(hWnd, HWND_TOP, x, y, 0, 0, SWP_NOSIZE);
|
||||
ShowWindow(hWnd, nCmdShow);
|
||||
UpdateWindow (hWnd);
|
||||
}
|
||||
}
|
||||
|
||||
do
|
||||
{
|
||||
if (splash || stayAlive)
|
||||
{
|
||||
if (!SetTimer (hWnd, ID_TIMER, TIMER_PROC_INTERVAL, TimerProc))
|
||||
{
|
||||
signalError();
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
|
||||
if (!execute(FALSE, &dwExitCode))
|
||||
{
|
||||
signalError();
|
||||
return 1;
|
||||
}
|
||||
|
||||
if (!(splash || stayAlive))
|
||||
{
|
||||
debug("Exit code:\t0\n");
|
||||
closeProcessHandles();
|
||||
closeLogFile();
|
||||
return 0;
|
||||
}
|
||||
|
||||
MSG msg;
|
||||
while (GetMessage(&msg, NULL, 0, 0))
|
||||
{
|
||||
TranslateMessage(&msg);
|
||||
DispatchMessage(&msg);
|
||||
}
|
||||
|
||||
if (restartOnCrash && dwExitCode != 0)
|
||||
{
|
||||
debug("Exit code:\t%d, restarting the application!\n", dwExitCode);
|
||||
}
|
||||
|
||||
closeProcessHandles();
|
||||
} while (restartOnCrash && dwExitCode != 0);
|
||||
|
||||
debug("Exit code:\t%d\n", dwExitCode);
|
||||
closeLogFile();
|
||||
return dwExitCode;
|
||||
}
|
||||
|
||||
HWND getInstanceWindow()
|
||||
{
|
||||
char windowTitle[STR];
|
||||
char instWindowTitle[STR] = {0};
|
||||
if (loadString(INSTANCE_WINDOW_TITLE, instWindowTitle))
|
||||
{
|
||||
HWND handle = FindWindowEx(NULL, NULL, NULL, NULL);
|
||||
while (handle != NULL)
|
||||
{
|
||||
GetWindowText(handle, windowTitle, STR - 1);
|
||||
if (strstr(windowTitle, instWindowTitle) != NULL)
|
||||
{
|
||||
return handle;
|
||||
}
|
||||
else
|
||||
{
|
||||
handle = FindWindowEx(NULL, handle, NULL, NULL);
|
||||
}
|
||||
}
|
||||
}
|
||||
return NULL;
|
||||
}
|
||||
|
||||
BOOL CALLBACK enumwndfn(HWND hwnd, LPARAM lParam)
|
||||
{
|
||||
DWORD processId;
|
||||
GetWindowThreadProcessId(hwnd, &processId);
|
||||
if (processInformation.dwProcessId == processId)
|
||||
{
|
||||
LONG styles = GetWindowLong(hwnd, GWL_STYLE);
|
||||
if ((styles & WS_VISIBLE) != 0)
|
||||
{
|
||||
splash = FALSE;
|
||||
ShowWindow(hWnd, SW_HIDE);
|
||||
return FALSE;
|
||||
}
|
||||
}
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
VOID CALLBACK TimerProc(
|
||||
HWND hwnd, // handle of window for timer messages
|
||||
UINT uMsg, // WM_TIMER message
|
||||
UINT idEvent, // timer identifier
|
||||
DWORD dwTime) // current system time
|
||||
{
|
||||
if (splash)
|
||||
{
|
||||
if (splashTimeout == 0)
|
||||
{
|
||||
splash = FALSE;
|
||||
ShowWindow(hWnd, SW_HIDE);
|
||||
if (waitForWindow && splashTimeoutErr)
|
||||
{
|
||||
KillTimer(hwnd, ID_TIMER);
|
||||
signalError();
|
||||
PostQuitMessage(0);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
splashTimeout -= TIMER_PROC_INTERVAL;
|
||||
if (waitForWindow)
|
||||
{
|
||||
EnumWindows(enumwndfn, 0);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
GetExitCodeProcess(processInformation.hProcess, &dwExitCode);
|
||||
if (dwExitCode != STILL_ACTIVE
|
||||
|| !(splash || stayAlive))
|
||||
{
|
||||
KillTimer(hWnd, ID_TIMER);
|
||||
PostQuitMessage(0);
|
||||
}
|
||||
}
|
||||
109
launch4j/head_src/guihead/guihead.dev
Normal file
109
launch4j/head_src/guihead/guihead.dev
Normal file
@@ -0,0 +1,109 @@
|
||||
[Project]
|
||||
FileName=guihead.dev
|
||||
Name=guihead
|
||||
UnitCount=5
|
||||
Type=0
|
||||
Ver=1
|
||||
ObjFiles=
|
||||
Includes=
|
||||
Libs=
|
||||
PrivateResource=
|
||||
ResourceIncludes=
|
||||
MakeIncludes=
|
||||
Compiler=
|
||||
CppCompiler=
|
||||
Linker=-n_@@_
|
||||
IsCpp=0
|
||||
Icon=
|
||||
ExeOutput=
|
||||
ObjectOutput=..\..\head
|
||||
OverrideOutput=0
|
||||
OverrideOutputName=guihead.exe
|
||||
HostApplication=
|
||||
Folders=
|
||||
CommandLine=
|
||||
UseCustomMakefile=1
|
||||
CustomMakefile=Makefile.win
|
||||
IncludeVersionInfo=0
|
||||
SupportXPThemes=0
|
||||
CompilerSet=0
|
||||
CompilerSettings=0000000001001000000100
|
||||
|
||||
[Unit1]
|
||||
FileName=guihead.c
|
||||
CompileCpp=0
|
||||
Folder=guihead
|
||||
Compile=1
|
||||
Link=1
|
||||
Priority=1000
|
||||
OverrideBuildCmd=0
|
||||
BuildCmd=$(CC) -c guihead.c -o ../../head/guihead.o $(CFLAGS)
|
||||
|
||||
[Unit2]
|
||||
FileName=guihead.h
|
||||
CompileCpp=0
|
||||
Folder=guihead
|
||||
Compile=1
|
||||
Link=1
|
||||
Priority=1000
|
||||
OverrideBuildCmd=0
|
||||
BuildCmd=
|
||||
|
||||
[VersionInfo]
|
||||
Major=0
|
||||
Minor=1
|
||||
Release=1
|
||||
Build=1
|
||||
LanguageID=1033
|
||||
CharsetID=1252
|
||||
CompanyName=
|
||||
FileVersion=
|
||||
FileDescription=Developed using the Dev-C++ IDE
|
||||
InternalName=
|
||||
LegalCopyright=
|
||||
LegalTrademarks=
|
||||
OriginalFilename=
|
||||
ProductName=
|
||||
ProductVersion=
|
||||
AutoIncBuildNr=0
|
||||
|
||||
[Unit4]
|
||||
FileName=..\head.h
|
||||
CompileCpp=0
|
||||
Folder=guihead
|
||||
Compile=1
|
||||
Link=1
|
||||
Priority=1000
|
||||
OverrideBuildCmd=0
|
||||
BuildCmd=
|
||||
|
||||
[Unit6]
|
||||
FileName=..\resid.h
|
||||
CompileCpp=0
|
||||
Folder=guihead
|
||||
Compile=1
|
||||
Link=1
|
||||
Priority=1000
|
||||
OverrideBuildCmd=0
|
||||
BuildCmd=
|
||||
|
||||
[Unit3]
|
||||
FileName=..\head.c
|
||||
CompileCpp=0
|
||||
Folder=guihead
|
||||
Compile=1
|
||||
Link=1
|
||||
Priority=1000
|
||||
OverrideBuildCmd=0
|
||||
BuildCmd=
|
||||
|
||||
[Unit5]
|
||||
FileName=..\resource.h
|
||||
CompileCpp=0
|
||||
Folder=guihead
|
||||
Compile=1
|
||||
Link=1
|
||||
Priority=1000
|
||||
OverrideBuildCmd=0
|
||||
BuildCmd=
|
||||
|
||||
44
launch4j/head_src/guihead/guihead.h
Normal file
44
launch4j/head_src/guihead/guihead.h
Normal file
@@ -0,0 +1,44 @@
|
||||
/*
|
||||
Launch4j (http://launch4j.sourceforge.net/)
|
||||
Cross-platform Java application wrapper for creating Windows native executables.
|
||||
|
||||
Copyright (c) 2004, 2007 Grzegorz Kowal
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in
|
||||
all copies or substantial portions of the Software.
|
||||
|
||||
Except as contained in this notice, the name(s) of the above copyright holders
|
||||
shall not be used in advertising or otherwise to promote the sale, use or other
|
||||
dealings in this Software without prior written authorization.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
THE SOFTWARE.
|
||||
*/
|
||||
|
||||
#define ID_TIMER 1
|
||||
#define DEFAULT_SPLASH_TIMEOUT 60 /* 60 seconds */
|
||||
#define MAX_SPLASH_TIMEOUT 60 * 15 /* 15 minutes */
|
||||
#define TIMER_PROC_INTERVAL 100 /* interval in ms between calls to EnumWindows */
|
||||
|
||||
HWND getInstanceWindow();
|
||||
|
||||
BOOL CALLBACK enumwndfn(HWND hwnd, LPARAM lParam);
|
||||
|
||||
VOID CALLBACK TimerProc(
|
||||
HWND hwnd, // handle of window for timer messages
|
||||
UINT uMsg, // WM_TIMER message
|
||||
UINT idEvent, // timer identifier
|
||||
DWORD dwTime // current system time
|
||||
);
|
||||
1335
launch4j/head_src/head.c
Normal file
1335
launch4j/head_src/head.c
Normal file
File diff suppressed because it is too large
Load Diff
146
launch4j/head_src/head.h
Normal file
146
launch4j/head_src/head.h
Normal file
@@ -0,0 +1,146 @@
|
||||
/*
|
||||
Launch4j (http://launch4j.sourceforge.net/)
|
||||
Cross-platform Java application wrapper for creating Windows native executables.
|
||||
|
||||
Copyright (c) 2004, 2015 Grzegorz Kowal,
|
||||
Ian Roberts (jdk preference patch)
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in
|
||||
all copies or substantial portions of the Software.
|
||||
|
||||
Except as contained in this notice, the name(s) of the above copyright holders
|
||||
shall not be used in advertising or otherwise to promote the sale, use or other
|
||||
dealings in this Software without prior written authorization.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
THE SOFTWARE.
|
||||
*/
|
||||
|
||||
#ifndef _WIN32_WINNT
|
||||
#define _WIN32_WINNT 0x0501
|
||||
#endif // _WIN32_WINNT
|
||||
|
||||
#ifndef _LAUNCH4J_HEAD__INCLUDED_
|
||||
#define _LAUNCH4J_HEAD__INCLUDED_
|
||||
|
||||
#define WIN32_LEAN_AND_MEAN // VC - Exclude rarely-used stuff from Windows headers
|
||||
|
||||
// Windows Header Files:
|
||||
#include <windows.h>
|
||||
|
||||
// C RunTime Header Files
|
||||
#include <stdlib.h>
|
||||
#include <malloc.h>
|
||||
#include <memory.h>
|
||||
#include <tchar.h>
|
||||
#include <shellapi.h>
|
||||
#include <direct.h>
|
||||
#include <fcntl.h>
|
||||
#include <stdio.h>
|
||||
#include <sys/stat.h>
|
||||
#include <io.h>
|
||||
#include <process.h>
|
||||
|
||||
#define LAUNCH4j "Launch4j"
|
||||
#define VERSION "3.12"
|
||||
|
||||
#define JRE_VER_MAX_DIGITS_PER_PART 3
|
||||
|
||||
#define NO_JAVA_FOUND 0
|
||||
#define FOUND_JRE 1
|
||||
#define FOUND_SDK 2
|
||||
#define FOUND_BUNDLED 4
|
||||
|
||||
#define JRE_ONLY 0
|
||||
#define PREFER_JRE 1
|
||||
#define PREFER_JDK 2
|
||||
#define JDK_ONLY 3
|
||||
|
||||
#define USE_64_BIT_RUNTIME 1
|
||||
#define USE_64_AND_32_BIT_RUNTIME 2
|
||||
#define USE_32_AND_64_BIT_RUNTIME 3
|
||||
#define USE_32_BIT_RUNTIME 4
|
||||
#define INIT_RUNTIME_BITS 9
|
||||
|
||||
#define KEY_WOW64_64KEY 0x0100
|
||||
|
||||
#define HKEY_STR "HKEY"
|
||||
#define HKEY_CLASSES_ROOT_STR "HKEY_CLASSES_ROOT"
|
||||
#define HKEY_CURRENT_USER_STR "HKEY_CURRENT_USER"
|
||||
#define HKEY_LOCAL_MACHINE_STR "HKEY_LOCAL_MACHINE"
|
||||
#define HKEY_USERS_STR "HKEY_USERS"
|
||||
#define HKEY_CURRENT_CONFIG_STR "HKEY_CURRENT_CONFIG"
|
||||
|
||||
#define STR 128
|
||||
#define BIG_STR 1024
|
||||
#define MAX_VAR_SIZE 32767
|
||||
#define MAX_ARGS 32768
|
||||
|
||||
#define TRUE_STR "true"
|
||||
#define FALSE_STR "false"
|
||||
|
||||
#define ERROR_FORMAT "Error:\t\t%s\n"
|
||||
#define debug(args...) if (hLog != NULL) fprintf(hLog, ## args);
|
||||
#define debugAll(args...) if (debugAll && hLog != NULL) fprintf(hLog, ## args);
|
||||
|
||||
typedef void (WINAPI *LPFN_ISWOW64PROCESS) (HANDLE, PBOOL);
|
||||
|
||||
BOOL initGlobals();
|
||||
FILE* openLogFile(const char* exePath, const int pathLen);
|
||||
void closeLogFile();
|
||||
BOOL initializeLogging(const char *lpCmdLine, const char* exePath, const int pathLen);
|
||||
void msgBox(const char* text);
|
||||
void signalError();
|
||||
BOOL loadString(const int resID, char* buffer);
|
||||
BOOL loadBool(const int resID);
|
||||
int loadInt(const int resID);
|
||||
BOOL regQueryValue(const char* regPath, unsigned char* buffer,
|
||||
unsigned long bufferLength);
|
||||
void formatJavaVersion(char* version, const char* originalVersion);
|
||||
void regSearch(const char* keyName, const int searchType);
|
||||
BOOL isJavaHomeValid(const char* keyName, const int searchType);
|
||||
BOOL isLauncherPathValid(const char* path);
|
||||
void regSearchWow(const char* keyName, const int searchType);
|
||||
void regSearchJreSdk(const char* jreKeyName, const char* sdkKeyName,
|
||||
const int jdkPreference);
|
||||
BOOL findJavaHome(char* path, const int jdkPreference);
|
||||
int getExePath(char* exePath);
|
||||
void appendPath(char* basepath, const char* path);
|
||||
void appendLauncher(char* jrePath);
|
||||
void appendAppClasspath(char* dst, const char* src);
|
||||
BOOL expandVars(char *dst, const char *src, const char *exePath, const int pathLen);
|
||||
void appendHeapSizes(char *dst);
|
||||
void appendHeapSize(char *dst, const int megabytesID, const int percentID,
|
||||
const DWORDLONG availableMemory, const char *option);
|
||||
void setJvmOptions(char *jvmOptions, const char *exePath);
|
||||
BOOL createMutex();
|
||||
void setWorkingDirectory(const char *exePath, const int pathLen);
|
||||
BOOL bundledJreSearch(const char *exePath, const int pathLen);
|
||||
BOOL installedJreSearch();
|
||||
void createJreSearchError();
|
||||
BOOL jreSearch(const char *exePath, const int pathLen);
|
||||
BOOL appendToPathVar(const char* path);
|
||||
BOOL appendJreBinToPathVar();
|
||||
void setEnvironmentVariables(const char *exePath, const int pathLen);
|
||||
void setMainClassAndClassPath(const char *exePath, const int pathLen);
|
||||
void setCommandLineArgs(const char *lpCmdLine);
|
||||
int prepare(const char *lpCmdLine);
|
||||
void closeProcessHandles();
|
||||
BOOL execute(const BOOL wait, DWORD *dwExitCode);
|
||||
const char* getJavaHome();
|
||||
const char* getMainClass();
|
||||
const char* getLauncherArgs();
|
||||
|
||||
#endif // _LAUNCH4J_HEAD__INCLUDED_
|
||||
2
launch4j/head_src/jniconsolehead_BETA/.gitignore
vendored
Normal file
2
launch4j/head_src/jniconsolehead_BETA/.gitignore
vendored
Normal file
@@ -0,0 +1,2 @@
|
||||
/jniconsolehead.exe
|
||||
/jniconsolehead.layout
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user