Follow-up to #128: add XDG info to readme, rename the Maven property.

Signed-off-by: Jeffrey Han <itdelatrisu@gmail.com>
This commit is contained in:
Jeffrey Han 2015-08-29 09:51:10 -05:00
parent 331865c437
commit 9fc00fc3c3
3 changed files with 10 additions and 5 deletions

View File

@ -62,6 +62,7 @@ The following files and folders will be created by opsu! as needed:
* `ReplayImport/`: The replay import directory. The importer moves all .osr * `ReplayImport/`: The replay import directory. The importer moves all .osr
files within this directory to the replay directory and saves the scores in files within this directory to the replay directory and saves the scores in
the scores database. Replays can be imported from osu! as well as opsu!. the scores database. Replays can be imported from osu! as well as opsu!.
* `Natives/`: The native libraries directory.
## Building ## Building
opsu! is distributed as both a [Maven](https://maven.apache.org/) and opsu! is distributed as both a [Maven](https://maven.apache.org/) and
@ -72,14 +73,18 @@ Maven builds are built to the `target` directory.
* To run the project, execute the Maven goal `compile`. * To run the project, execute the Maven goal `compile`.
* To create a single executable jar, execute the Maven goal `package -Djar`. * To create a single executable jar, execute the Maven goal `package -Djar`.
This will compile a jar to `target/opsu-${version}.jar` with the libraries, This will compile a jar to `target/opsu-${version}.jar` with the libraries,
resources and natives packed inside the jar. resources and natives packed inside the jar. Setting the "XDG" property
(`-DXDG=true`) will make the application use XDG folders under Unix-like
operating systems.
### Gradle ### Gradle
Gradle builds are built to the `build` directory. Gradle builds are built to the `build` directory.
* To run the project, execute the Gradle task `run`. * To run the project, execute the Gradle task `run`.
* To create a single executable jar, execute the Gradle task `jar`. * To create a single executable jar, execute the Gradle task `jar`.
This will compile a jar to `build/libs/opsu-${version}.jar` with the libraries, This will compile a jar to `build/libs/opsu-${version}.jar` with the libraries,
resources and natives packed inside the jar. resources and natives packed inside the jar. Setting the "XDG" property
(`-PXDG=true`) will make the application use XDG folders under Unix-like
operating systems.
## Credits ## Credits
This software was created by Jeffrey Han This software was created by Jeffrey Han

View File

@ -13,7 +13,7 @@ mainClassName = 'itdelatrisu.opsu.Opsu'
buildDir = new File(rootProject.projectDir, "build/") buildDir = new File(rootProject.projectDir, "build/")
def useXDG = 'false' def useXDG = 'false'
if(hasProperty('XDG')) { if (hasProperty('XDG')) {
useXDG = XDG useXDG = XDG
} }

View File

@ -9,7 +9,7 @@
<timestamp>${maven.build.timestamp}</timestamp> <timestamp>${maven.build.timestamp}</timestamp>
<maven.build.timestamp.format>yyyy-MM-dd HH:mm</maven.build.timestamp.format> <maven.build.timestamp.format>yyyy-MM-dd HH:mm</maven.build.timestamp.format>
<mainClassName>itdelatrisu.opsu.Opsu</mainClassName> <mainClassName>itdelatrisu.opsu.Opsu</mainClassName>
<useXDG>false</useXDG> <XDG>false</XDG>
</properties> </properties>
<build> <build>
<sourceDirectory>src</sourceDirectory> <sourceDirectory>src</sourceDirectory>
@ -103,7 +103,7 @@
<transformer implementation="org.apache.maven.plugins.shade.resource.ManifestResourceTransformer"> <transformer implementation="org.apache.maven.plugins.shade.resource.ManifestResourceTransformer">
<manifestEntries> <manifestEntries>
<Main-Class>${mainClassName}</Main-Class> <Main-Class>${mainClassName}</Main-Class>
<Use-XDG>${useXDG}</Use-XDG> <Use-XDG>${XDG}</Use-XDG>
</manifestEntries> </manifestEntries>
</transformer> </transformer>
</transformers> </transformers>