add build script

This commit is contained in:
Michel Roux 2018-09-29 22:17:02 +02:00
parent ec08d71262
commit 76a0b598b1
3 changed files with 9 additions and 2 deletions

View File

@ -6,7 +6,9 @@
<element id="file-copy" path="$PROJECT_DIR$/META-INF/MANIFEST.MF" /> <element id="file-copy" path="$PROJECT_DIR$/META-INF/MANIFEST.MF" />
</element> </element>
<element id="module-output" name="Symantec" /> <element id="module-output" name="Symantec" />
<element id="dir-copy" path="$PROJECT_DIR$/res" /> <element id="directory" name="res">
<element id="dir-copy" path="$PROJECT_DIR$/res" />
</element>
</root> </root>
</artifact> </artifact>
</component> </component>

5
build.sh Executable file
View File

@ -0,0 +1,5 @@
#!/usr/bin/env bash
mkdir -p out/production/Symantec out/artifacts/Symantec
javac -d out/production/Symantec src/Symantec.java
jar cvfm out/artifacts/Symantec/Symantec.jar META-INF/MANIFEST.MF -C out/production/Symantec Symantec.class res/*

View File

@ -10,7 +10,7 @@ public class Symantec {
private void load() { private void load() {
try { try {
BufferedImage img = ImageIO.read(getClass().getResourceAsStream("Capture.PNG")); BufferedImage img = ImageIO.read(getClass().getResourceAsStream("res/Capture.PNG"));
TrayIcon trayIcon = new TrayIcon(img, "Symantec"); TrayIcon trayIcon = new TrayIcon(img, "Symantec");
SystemTray tray = SystemTray.getSystemTray(); SystemTray tray = SystemTray.getSystemTray();
tray.add(trayIcon); tray.add(trayIcon);