Moved to package prefixes and added src split for resouces
This commit is contained in:
parent
58264ebe4c
commit
45caf26987
45 changed files with 22 additions and 24 deletions
38
demo4d-gdxapp-desktop/build.gradle
Normal file
38
demo4d-gdxapp-desktop/build.gradle
Normal file
|
|
@ -0,0 +1,38 @@
|
|||
sourceCompatibility = appJvmCode
|
||||
[compileJava, compileTestJava]*.options*.encoding = appEncoding
|
||||
|
||||
sourceSets.main.java.srcDirs = [ "src/main/"]
|
||||
sourceSets.main.resources.srcDirs = ["../demo4d-gdxapp/assets"]
|
||||
|
||||
project.ext.mainClassName = "love.distributedrebirth.demo4d.desktop.DesktopLauncher"
|
||||
project.ext.assetsDir = new File("../demo4d-gdxapp/assets")
|
||||
|
||||
task run(dependsOn: classes, type: JavaExec) {
|
||||
main = project.mainClassName
|
||||
classpath = sourceSets.main.runtimeClasspath
|
||||
standardInput = System.in
|
||||
workingDir = project.assetsDir
|
||||
ignoreExitValue = true
|
||||
}
|
||||
|
||||
task debug(dependsOn: classes, type: JavaExec) {
|
||||
main = project.mainClassName
|
||||
classpath = sourceSets.main.runtimeClasspath
|
||||
standardInput = System.in
|
||||
workingDir = project.assetsDir
|
||||
ignoreExitValue = true
|
||||
debug = true
|
||||
}
|
||||
|
||||
task dist(type: Jar) {
|
||||
manifest {
|
||||
attributes 'Main-Class': project.mainClassName
|
||||
}
|
||||
dependsOn configurations.runtimeClasspath
|
||||
from {
|
||||
configurations.runtimeClasspath.collect { it.isDirectory() ? it : zipTree(it) }
|
||||
}
|
||||
with jar
|
||||
}
|
||||
|
||||
dist.dependsOn classes
|
||||
|
|
@ -0,0 +1,29 @@
|
|||
package love.distributedrebirth.demo4d.desktop;
|
||||
|
||||
import love.distributedrebirth.bassboonyd.BãßBȍőnAuthorInfoʸᴰ;
|
||||
|
||||
/**
|
||||
* Desktop game app base config.
|
||||
*/
|
||||
@BãßBȍőnAuthorInfoʸᴰ(name = "willemtsade", copyright = "©Δ∞ 仙上主天")
|
||||
public final class DesktopConfig {
|
||||
|
||||
public static int WINDOW_WIDTH = 1024;
|
||||
public static int WINDOW_HEIGHT = 768;
|
||||
public static String WINDOW_TITLE = "demo⁴ᴰ";
|
||||
public static String[] WINDOW_ICONS = {
|
||||
"icon/window-128.png",
|
||||
"icon/window-32.png",
|
||||
"icon/window-16.png"
|
||||
};
|
||||
|
||||
public static void printBootMessage() {
|
||||
System.out.println("==========================");
|
||||
System.out.println(" @Ω\u4ed9⁴ ˧꜏⋇꜊꜔ ⁴ﷲΩ@ ");
|
||||
System.out.println(" ©Δ∞ 仙上主天 ");
|
||||
System.out.println("בְּרֵאשִׁית :o: יְסוֺד :o: יִשְׂרָאֵל");
|
||||
System.out.println("==========================");
|
||||
System.out.println("Welcome to the matrix;");
|
||||
System.out.println("Starting demo⁴ᴰ now...");
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,34 @@
|
|||
package love.distributedrebirth.demo4d.desktop;
|
||||
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
|
||||
import com.badlogic.gdx.Files.FileType;
|
||||
import com.badlogic.gdx.Game;
|
||||
import com.badlogic.gdx.backends.lwjgl3.Lwjgl3Application;
|
||||
import com.badlogic.gdx.backends.lwjgl3.Lwjgl3ApplicationConfiguration;
|
||||
|
||||
import love.distributedrebirth.bassboonyd.BãßBȍőnAuthorInfoʸᴰ;
|
||||
import love.distributedrebirth.demo4d.Demo4DMain;
|
||||
import net.spookygames.gdx.nativefilechooser.desktop.DesktopFileChooser;
|
||||
|
||||
/**
|
||||
* Desktop game app launcher.
|
||||
*/
|
||||
@BãßBȍőnAuthorInfoʸᴰ(name = "willemtsade", copyright = "©Δ∞ 仙上主天")
|
||||
public class DesktopLauncher {
|
||||
|
||||
public static void main(String[] arg) {
|
||||
DesktopConfig.printBootMessage();
|
||||
Lwjgl3ApplicationConfiguration config = new Lwjgl3ApplicationConfiguration();
|
||||
config.setMaxNetThreads(Runtime.getRuntime().availableProcessors());
|
||||
config.setTitle(DesktopConfig.WINDOW_TITLE);
|
||||
config.setWindowIcon(FileType.Internal, DesktopConfig.WINDOW_ICONS);
|
||||
config.setWindowedMode(DesktopConfig.WINDOW_WIDTH, DesktopConfig.WINDOW_HEIGHT);
|
||||
List<String> args = Arrays.asList(arg);
|
||||
DesktopFileChooser aop0 = new DesktopFileChooser();
|
||||
Game app = new Demo4DMain(args, DesktopConfig.WINDOW_WIDTH, DesktopConfig.WINDOW_HEIGHT, aop0);
|
||||
Lwjgl3Application launcher = new Lwjgl3Application(app, config);
|
||||
launcher.exit();
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue