build tools updates
This commit is contained in:
parent
4faaf8d923
commit
26a999de28
10
build.sh
10
build.sh
@ -1,12 +1,20 @@
|
||||
#DEPENDENCIES
|
||||
#Windows, JDK17, Maven, GitBash, 7zip, MinGW, GCC, Make
|
||||
|
||||
#completely clear build directory
|
||||
rm -rf ./build
|
||||
#build directory structure
|
||||
mkdir build
|
||||
mkdir ./build/assets
|
||||
#compile project and copy into build dir
|
||||
mvn package
|
||||
cp ./target/Renderer-0.1.jar ./build/engine.jar
|
||||
#build launcher
|
||||
cd ./launcher/
|
||||
make clean
|
||||
make build
|
||||
cd ..
|
||||
cp ./launcher/launcher.exe ./build/
|
||||
#copy launcher, jdk, and assets into build dir
|
||||
mv ./launcher/launcher.exe ./build/
|
||||
unzip ./launcher/jdk.zip -d ./build/
|
||||
cp -r ./assets/* ./build/assets/
|
||||
@ -1,3 +1,9 @@
|
||||
|
||||
#TODO: make support multiple OSes
|
||||
#detect os: (not that bad)
|
||||
#https://stackoverflow.com/questions/714100/os-detecting-makefile
|
||||
#mingw flags to not have console window
|
||||
#https://stackoverflow.com/questions/4441551/how-to-stop-a-program-compiled-with-mingw-g-from-opening-a-console-window-in
|
||||
build: ./src/main.c
|
||||
gcc ./src/main.c -o launcher
|
||||
|
||||
|
||||
BIN
launcher/jdk.zip
BIN
launcher/jdk.zip
Binary file not shown.
Binary file not shown.
@ -2,13 +2,18 @@
|
||||
#include<stdlib.h>
|
||||
#include<string.h>
|
||||
#include<unistd.h>
|
||||
#include<fcntl.h>
|
||||
#include<sys/types.h>
|
||||
#include<sys/stat.h>
|
||||
|
||||
#define MAX_PATH_SIZE 250
|
||||
#define LOG_HOLDER_SIZE 500
|
||||
|
||||
void logVar(char * message, char * var);
|
||||
void redirectStdout();
|
||||
|
||||
int main(){
|
||||
redirectStdout();
|
||||
char currentWorkingDirectory[MAX_PATH_SIZE];
|
||||
if(getcwd(currentWorkingDirectory,sizeof(currentWorkingDirectory)) != NULL){
|
||||
} else {
|
||||
@ -34,6 +39,17 @@ int main(){
|
||||
return 0;
|
||||
}
|
||||
|
||||
void redirectStdout(){
|
||||
int outfd = open("stdout.txt", O_CREAT|O_WRONLY|O_TRUNC, 0644);
|
||||
if (!outfd)
|
||||
{
|
||||
printf("Error opening stdout redirect");
|
||||
fflush(stdout);
|
||||
}
|
||||
dup2(outfd, 1); // replace stdout
|
||||
close(outfd);
|
||||
}
|
||||
|
||||
|
||||
char logHolder[LOG_HOLDER_SIZE];
|
||||
void logVar(char * message, char * var){
|
||||
|
||||
@ -1,46 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<actions>
|
||||
<action>
|
||||
<actionName>run</actionName>
|
||||
<packagings>
|
||||
<packaging>jar</packaging>
|
||||
</packagings>
|
||||
<goals>
|
||||
<goal>process-classes</goal>
|
||||
<goal>org.codehaus.mojo:exec-maven-plugin:3.0.0:exec</goal>
|
||||
</goals>
|
||||
<properties>
|
||||
<exec.args>-XstartOnFirstThread -classpath %classpath electrosphere.main.Main</exec.args>
|
||||
<exec.executable>java</exec.executable>
|
||||
</properties>
|
||||
</action>
|
||||
<action>
|
||||
<actionName>debug</actionName>
|
||||
<packagings>
|
||||
<packaging>jar</packaging>
|
||||
</packagings>
|
||||
<goals>
|
||||
<goal>process-classes</goal>
|
||||
<goal>org.codehaus.mojo:exec-maven-plugin:3.0.0:exec</goal>
|
||||
</goals>
|
||||
<properties>
|
||||
<exec.args>-agentlib:jdwp=transport=dt_socket,server=n,address=${jpda.address} -XstartOnFirstThread -classpath %classpath electrosphere.main.Main</exec.args>
|
||||
<exec.executable>java</exec.executable>
|
||||
<jpda.listen>true</jpda.listen>
|
||||
</properties>
|
||||
</action>
|
||||
<action>
|
||||
<actionName>profile</actionName>
|
||||
<packagings>
|
||||
<packaging>jar</packaging>
|
||||
</packagings>
|
||||
<goals>
|
||||
<goal>process-classes</goal>
|
||||
<goal>org.codehaus.mojo:exec-maven-plugin:3.0.0:exec</goal>
|
||||
</goals>
|
||||
<properties>
|
||||
<exec.args>-XstartOnFirstThread -classpath %classpath electrosphere.main.Main</exec.args>
|
||||
<exec.executable>java</exec.executable>
|
||||
</properties>
|
||||
</action>
|
||||
</actions>
|
||||
@ -1,46 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<actions>
|
||||
<action>
|
||||
<actionName>run</actionName>
|
||||
<packagings>
|
||||
<packaging>jar</packaging>
|
||||
</packagings>
|
||||
<goals>
|
||||
<goal>process-classes</goal>
|
||||
<goal>org.codehaus.mojo:exec-maven-plugin:1.5.0:exec</goal>
|
||||
</goals>
|
||||
<properties>
|
||||
<exec.args>-classpath %classpath electrosphere.main.Main</exec.args>
|
||||
<exec.executable>java</exec.executable>
|
||||
</properties>
|
||||
</action>
|
||||
<action>
|
||||
<actionName>debug</actionName>
|
||||
<packagings>
|
||||
<packaging>jar</packaging>
|
||||
</packagings>
|
||||
<goals>
|
||||
<goal>process-classes</goal>
|
||||
<goal>org.codehaus.mojo:exec-maven-plugin:3.0.0:exec</goal>
|
||||
</goals>
|
||||
<properties>
|
||||
<exec.args>-agentlib:jdwp=transport=dt_socket,server=n,address=${jpda.address} -classpath %classpath electrosphere.main.Main</exec.args>
|
||||
<exec.executable>java</exec.executable>
|
||||
<jpda.listen>true</jpda.listen>
|
||||
</properties>
|
||||
</action>
|
||||
<action>
|
||||
<actionName>profile</actionName>
|
||||
<packagings>
|
||||
<packaging>jar</packaging>
|
||||
</packagings>
|
||||
<goals>
|
||||
<goal>process-classes</goal>
|
||||
<goal>org.codehaus.mojo:exec-maven-plugin:3.0.0:exec</goal>
|
||||
</goals>
|
||||
<properties>
|
||||
<exec.args>-classpath %classpath electrosphere.main.Main</exec.args>
|
||||
<exec.executable>java</exec.executable>
|
||||
</properties>
|
||||
</action>
|
||||
</actions>
|
||||
156
pom.xml
156
pom.xml
@ -198,75 +198,91 @@
|
||||
</includes>
|
||||
</resource>
|
||||
</resources>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<artifactId>maven-assembly-plugin</artifactId>
|
||||
<configuration>
|
||||
<archive>
|
||||
<manifest>
|
||||
<addClasspath>true</addClasspath>
|
||||
<mainClass>electrosphere.main.Main</mainClass>
|
||||
</manifest>
|
||||
</archive>
|
||||
<descriptorRefs>
|
||||
<descriptorRef>jar-with-dependencies</descriptorRef>
|
||||
</descriptorRefs>
|
||||
</configuration>
|
||||
<executions>
|
||||
<execution>
|
||||
<id>assemble-all</id>
|
||||
<phase>package</phase>
|
||||
<goals>
|
||||
<goal>single</goal>
|
||||
</goals>
|
||||
</execution>
|
||||
</executions>
|
||||
</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>
|
||||
<configuration>
|
||||
<transformers>
|
||||
<transformer implementation="org.apache.maven.plugins.shade.resource.ManifestResourceTransformer">
|
||||
<mainClass>electrosphere.main.Main</mainClass>
|
||||
</transformer>
|
||||
</transformers>
|
||||
</configuration>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>org.codehaus.mojo</groupId>
|
||||
<artifactId>exec-maven-plugin</artifactId>
|
||||
<version>3.0.0</version>
|
||||
<executions>
|
||||
<execution>
|
||||
<goals>
|
||||
<goal>exec</goal>
|
||||
</goals>
|
||||
</execution>
|
||||
</executions>
|
||||
<configuration>
|
||||
<executable>java</executable>
|
||||
<includeProjectDependencies>false</includeProjectDependencies>
|
||||
<includePluginDependencies>true</includePluginDependencies>
|
||||
<mainClass>electrosphere.main.Main</mainClass>
|
||||
<!-- <classpathScope>compile</classpathScope> -->
|
||||
<arguments>
|
||||
<argument>-cp</argument>
|
||||
<argument>target/classes;target/Renderer-0.1-jar-with-dependencies.jar</argument>
|
||||
<argument>electrosphere.main.Main</argument>
|
||||
</arguments>
|
||||
<!-- <classesDirectory>${project.basedir}/target/classes</classesDirectory> -->
|
||||
</configuration>
|
||||
</plugin>
|
||||
</plugins>
|
||||
<pluginManagement>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<artifactId>maven-assembly-plugin</artifactId>
|
||||
<configuration>
|
||||
<archive>
|
||||
<manifest>
|
||||
<addClasspath>true</addClasspath>
|
||||
<mainClass>electrosphere.main.Main</mainClass>
|
||||
</manifest>
|
||||
</archive>
|
||||
<descriptorRefs>
|
||||
<descriptorRef>jar-with-dependencies</descriptorRef>
|
||||
</descriptorRefs>
|
||||
</configuration>
|
||||
<executions>
|
||||
<execution>
|
||||
<id>assemble-all</id>
|
||||
<phase>package</phase>
|
||||
<goals>
|
||||
<goal>single</goal>
|
||||
</goals>
|
||||
</execution>
|
||||
</executions>
|
||||
</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>
|
||||
<configuration>
|
||||
<transformers>
|
||||
<transformer implementation="org.apache.maven.plugins.shade.resource.ManifestResourceTransformer">
|
||||
<mainClass>electrosphere.main.Main</mainClass>
|
||||
</transformer>
|
||||
</transformers>
|
||||
</configuration>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>org.codehaus.mojo</groupId>
|
||||
<artifactId>exec-maven-plugin</artifactId>
|
||||
<version>3.0.0</version>
|
||||
<executions>
|
||||
<execution>
|
||||
<goals>
|
||||
<goal>exec</goal>
|
||||
</goals>
|
||||
<configuration>
|
||||
<executable>java</executable>
|
||||
<includeProjectDependencies>false</includeProjectDependencies>
|
||||
<includePluginDependencies>true</includePluginDependencies>
|
||||
<mainClass>electrosphere.main.Main</mainClass>
|
||||
<!-- <classpathScope>compile</classpathScope> -->
|
||||
<arguments>
|
||||
<argument>-cp</argument>
|
||||
<argument>target/classes;target/Renderer-0.1-jar-with-dependencies.jar</argument>
|
||||
<argument>electrosphere.main.Main</argument>
|
||||
</arguments>
|
||||
<!-- <classesDirectory>${project.basedir}/target/classes</classesDirectory> -->
|
||||
</configuration>
|
||||
</execution>
|
||||
<execution>
|
||||
<id>Telephone</id>
|
||||
<phase>generate-sources</phase>
|
||||
<goals>
|
||||
<goal>java</goal>
|
||||
</goals>
|
||||
<configuration>
|
||||
<executable>java</executable>
|
||||
<arguments>
|
||||
<argument>-jar</argument>
|
||||
<argument>Telephone-0.2.1.jar</argument>
|
||||
</arguments>
|
||||
</configuration>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</pluginManagement>
|
||||
</build>
|
||||
</project>
|
||||
@ -312,8 +312,8 @@ public class Globals {
|
||||
public static boolean RENDER_FLAG_RENDER_SHADOW_MAP = false;
|
||||
public static boolean RENDER_FLAG_RENDER_SCREEN_FRAMEBUFFER_CONTENT = false;
|
||||
public static boolean RENDER_FLAG_RENDER_SCREEN_FRAMEBUFFER = false;
|
||||
public static boolean RENDER_FLAG_RENDER_BLACK_BACKGROUND = false;
|
||||
public static boolean RENDER_FLAG_RENDER_WHITE_BACKGROUND = true;
|
||||
public static boolean RENDER_FLAG_RENDER_BLACK_BACKGROUND = true;
|
||||
public static boolean RENDER_FLAG_RENDER_WHITE_BACKGROUND = false;
|
||||
public static boolean RENDER_FLAG_RENDER_UI = true;
|
||||
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user