Compare commits
2 Commits
4e1156d4bc
...
835e5db92f
Author | SHA1 | Date | |
---|---|---|---|
835e5db92f | |||
816b95afb6 |
12
desktop/Makefile
Normal file
12
desktop/Makefile
Normal file
@ -0,0 +1,12 @@
|
||||
PREFIX=~/.local
|
||||
DEST=$(PREFIX)/lib/piecannon
|
||||
COMMAND=$(PREFIX)/bin/piecannon
|
||||
|
||||
target:
|
||||
mvn install
|
||||
|
||||
install: target
|
||||
mkdir -p $(DEST)
|
||||
cp target/piecannon-*.jar $(DEST)/piecannon.jar
|
||||
sed "s#@JAR_PATH@#$(DEST)/piecannon.jar#g" piecannon.in > $(COMMAND)
|
||||
chmod +x $(COMMAND)
|
@ -1,20 +0,0 @@
|
||||
#!/bin/sh
|
||||
PC_GROUP="net.monarchpass"
|
||||
PC_ARTIFACT="piecannon-desktop-app"
|
||||
PC_VERSION="0.0.1-SNAPSHOT"
|
||||
PC_CLASS="net.monarchpass.piecannon.App"
|
||||
|
||||
STUB_POM="<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 https://maven.apache.org/xsd/maven-4.0.0.xsd'> <modelVersion>4.0.0</modelVersion> <groupId>$PC_GROUP</groupId> <artifactId>piecannon-launcher</artifactId> <version>$PC_VERSION</version> <dependencies> <dependency><groupId>$PC_GROUP</groupId><artifactId>$PC_ARTIFACT</artifactId><version>\${project.version}</version></dependency></dependencies></project>"
|
||||
STUB_POM_FILE=/tmp/pc.xml
|
||||
echo $STUB_POM > $STUB_POM_FILE
|
||||
|
||||
OUTPUT=$(mvn -f $STUB_POM_FILE -B exec:java -Dexec.mainClass=$PC_CLASS -Dexec.arguments=$1 -Dorg.slf4j.simpleLogger.defaultLogLevel=WARN)
|
||||
EXEC_RESULT=$?
|
||||
echo "$OUTPUT"
|
||||
|
||||
if [ $EXEC_RESULT != 0 ]; then
|
||||
exit $EXEC_RESULT;
|
||||
fi
|
||||
|
||||
RESULT=$(echo "$OUTPUT" | tail -n 1)
|
||||
xdg-open $RESULT
|
2
desktop/piecannon.in
Normal file
2
desktop/piecannon.in
Normal file
@ -0,0 +1,2 @@
|
||||
#!/bin/sh
|
||||
java -jar @JAR_PATH@ $@
|
@ -57,6 +57,31 @@
|
||||
<artifactId>maven-surefire-plugin</artifactId>
|
||||
<version>2.22.2</version>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-jar-plugin</artifactId>
|
||||
<configuration>
|
||||
<archive>
|
||||
<manifest>
|
||||
<addClasspath>true</addClasspath>
|
||||
<mainClass>net.monarchpass.piecannon.App</mainClass>
|
||||
</manifest>
|
||||
</archive>
|
||||
</configuration>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-shade-plugin</artifactId>
|
||||
<version>3.2.4</version>
|
||||
<executions>
|
||||
<execution>
|
||||
<phase>package</phase>
|
||||
<goals>
|
||||
<goal>shade</goal>
|
||||
</goals>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
</project>
|
||||
|
Loading…
x
Reference in New Issue
Block a user