Skip to content

Commit 60363bb

Browse files
committed
Restructure project and add UI
Signed-off-by: Emerson Pinter <[email protected]>
1 parent a334751 commit 60363bb

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

72 files changed

+3219
-209
lines changed

Diff for: .idea/artifacts/tqrespec.xml

+34
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Diff for: .idea/artifacts/tqrespec_jar.xml

-16
This file was deleted.

Diff for: .idea/misc.xml

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Diff for: .idea/modules/tqrespec.iml

+2-3
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Diff for: LICENSE

+674
Large diffs are not rendered by default.

Diff for: build.gradle

+7-5
Original file line numberDiff line numberDiff line change
@@ -3,22 +3,24 @@
33
*/
44

55
group 'br.com.pinter.tqrespec'
6-
version '0.1'
76

87
apply plugin: 'java'
98

10-
sourceCompatibility = 1.8
9+
sourceCompatibility = 1.9
1110

1211
repositories {
1312
mavenCentral()
1413
}
1514

1615
dependencies {
1716
testCompile group: 'junit', name: 'junit', version: '4.12'
18-
// https://mvnrepository.com/artifact/net.java.dev.jna/platform
1917
compile group: 'net.java.dev.jna', name: 'platform', version: '3.5.0'
20-
// https://mvnrepository.com/artifact/net.java.dev.jna/platform
21-
// https://mvnrepository.com/artifact/org.apache.commons/commons-lang3
2218
compile group: 'org.apache.commons', name: 'commons-lang3', version: '3.7'
19+
}
2320

21+
jar {
22+
manifest {
23+
attributes 'Class-Path': configurations.compile.collect { it.getName() }.join(' ')
24+
}
2425
}
26+

Diff for: dist/create_dist.cmd

+43
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
@echo off
2+
3+
setlocal
4+
5+
set SCRIPT_DIR=%~dp0
6+
7+
echo ------ CREATING CUSTOM JRE
8+
call "%SCRIPT_DIR%\jlink.cmd"
9+
10+
echo ------ DELETING DIRECTORY "%SCRIPT_DIR%\..\out\dist"
11+
rd /s "%SCRIPT_DIR%\..\out\dist"
12+
13+
echo ------ CREATING DIRECTORIES
14+
mkdir "%SCRIPT_DIR%\..\out"
15+
mkdir "%SCRIPT_DIR%\..\out\dist"
16+
mkdir "%SCRIPT_DIR%\..\out\dist\withjre"
17+
mkdir "%SCRIPT_DIR%\..\out\dist\withjre\app"
18+
mkdir "%SCRIPT_DIR%\..\out\dist\withjre\runtime"
19+
mkdir "%SCRIPT_DIR%\..\out\dist\tqrespec"
20+
mkdir "%SCRIPT_DIR%\..\out\dist\tqrespec\app"
21+
mkdir "%SCRIPT_DIR%\..\out\dist\jar"
22+
23+
echo COPYING FILES
24+
xcopy /y /s /i "%SCRIPT_DIR%\..\out\jre-image\*" "%SCRIPT_DIR%\..\out\dist\withjre\runtime\"
25+
echo deleting legal files
26+
rd /q /s "%SCRIPT_DIR%\..\out\dist\withjre\runtime\legal"
27+
xcopy /y /i "%SCRIPT_DIR%\..\out\artifacts\tqrespec\tqrespec\app\*" "%SCRIPT_DIR%\..\out\dist\withjre\app\"
28+
xcopy /y /i "%SCRIPT_DIR%\..\out\artifacts\tqrespec\tqrespec\*" "%SCRIPT_DIR%\..\out\dist\withjre\"
29+
xcopy /y /i "%SCRIPT_DIR%\..\out\artifacts\tqrespec\tqrespec\*" "%SCRIPT_DIR%\..\out\dist\tqrespec\"
30+
xcopy /y /i "%SCRIPT_DIR%\..\out\artifacts\tqrespec\tqrespec\app\*" "%SCRIPT_DIR%\..\out\dist\tqrespec\app\"
31+
xcopy /y /i "%SCRIPT_DIR%\..\out\artifacts\tqrespec\*" "%SCRIPT_DIR%\..\out\dist\jar\"
32+
del /q /f "%SCRIPT_DIR%\..\out\dist\jar\tqrespec.html"
33+
del /q /f "%SCRIPT_DIR%\..\out\dist\jar\tqrespec.jnlp"
34+
35+
echo CREATING APPONLY .CFG
36+
type "%SCRIPT_DIR%\..\out\artifacts\tqrespec\tqrespec\app\tqrespec.cfg" | findstr /v app.runtime= > "%SCRIPT_DIR%\..\out\dist\tqrespec\app\tqrespec.cfg"
37+
38+
echo CREATING ZIP tqrespec_withjre.zip
39+
powershell.exe Compress-Archive -Path "%SCRIPT_DIR%\..\out\dist\withjre\*" -DestinationPath "%SCRIPT_DIR%\..\out\dist\tqrespec_withjre.zip -force
40+
echo CREATING ZIP tqrespec.zip
41+
powershell.exe Compress-Archive -Path "%SCRIPT_DIR%\..\out\dist\tqrespec\*" -DestinationPath "%SCRIPT_DIR%\..\out\dist\tqrespec.zip -force
42+
echo CREATING ZIP tqrespec_jar.zip
43+
powershell.exe Compress-Archive -Path "%SCRIPT_DIR%\..\out\dist\tqrespec\*" -DestinationPath "%SCRIPT_DIR%\..\out\dist\tqrespec_jar.zip -force

Diff for: dist/jlink.cmd

+50
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
@echo off
2+
3+
setlocal
4+
5+
set SCRIPT_DIR=%~dp0
6+
7+
::- Get the Java Version
8+
set KEY="HKLM\SOFTWARE\JavaSoft\JDK"
9+
set VALUE=CurrentVersion
10+
reg query %KEY% /v %VALUE% 2>nul || (
11+
echo JRE not installed
12+
exit /b 1
13+
)
14+
set JRE_VERSION=
15+
for /f "tokens=2,*" %%a in ('reg query %KEY% /v %VALUE% ^| findstr %VALUE%') do (
16+
set JRE_VERSION=%%b
17+
)
18+
19+
echo JRE VERSION: %JRE_VERSION%
20+
21+
::- Get the JavaHome
22+
set KEY="HKLM\SOFTWARE\JavaSoft\JDK\%JRE_VERSION%"
23+
set VALUE=JavaHome
24+
reg query %KEY% /v %VALUE% 2>nul || (
25+
echo JavaHome not installed
26+
exit /b 1
27+
)
28+
29+
set JAVAHOME=
30+
for /f "tokens=2,*" %%a in ('reg query %KEY% /v %VALUE% ^| findstr %VALUE%') do (
31+
set JAVAHOME=%%b
32+
)
33+
34+
35+
36+
37+
38+
echo DELETING DIRECTORY "%SCRIPT_DIR%\..\out\jre-image"
39+
rd /s "%SCRIPT_DIR%\..\out\jre-image"
40+
echo JavaHome: %JAVAHOME%
41+
"%JAVAHOME%\bin\jlink" --compress=2 --output "%SCRIPT_DIR%\..\out\jre-image" --module-path "%JAVAHOME%\jmods" --add-modules javafx.base,javafx.fxml,javafx.graphics,javafx.controls,java.prefs,java.base,jdk.zipfs
42+
endlocal
43+
44+
45+
rem jdeps --print-module-deps tqrespec.jar
46+
47+
48+
rem c:jlink --module-path C:\Program Files\Java\jdk-9.0.1\jmods --add-modules br.com.pinter.tqrespec.save,com.sun.jna.platform.win32,java.io,java.lang,java.lang.invoke,java.net,java.nio.file,java.util,java.util.regex,javafx.application,javafx.fxml,javafx.scene,javafx.stage,org.apache.commons.lang3,java.lang,javafx.application,javafx.fxml,javafx.scene,javafx.scene.control,javafx.scene.input,javafx.scene.layout,javafx.stage,br.com.pinter.tqrespec,java.io,java.lang,java.lang.invoke,java.nio,java.nio.channels,java.nio.charset,java.util,org.apache.commons.lang3
49+
50+

Diff for: gradle/wrapper/gradle-wrapper.properties

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,4 +7,4 @@ distributionBase=GRADLE_USER_HOME
77
distributionPath=wrapper/dists
88
zipStoreBase=GRADLE_USER_HOME
99
zipStorePath=wrapper/dists
10-
distributionUrl=https\://services.gradle.org/distributions/gradle-4.0-bin.zip
10+
distributionUrl=https\://services.gradle.org/distributions/gradle-4.2.1-bin.zip

Diff for: src/META-INF/MANIFEST.MF

-4
This file was deleted.

Diff for: src/br/com/pinter/tqrespec/Main.java

-31
This file was deleted.

Diff for: src/br/com/pinter/tqrespec/Util.java

-11
This file was deleted.

Diff for: src/br/com/pinter/tqrespec/package-info.java

-5
This file was deleted.

Diff for: src/br/com/pinter/tqrespec/save/IncompatibleSavegameException.java

-24
This file was deleted.

Diff for: src/br/com/pinter/tqrespec/save/PlayerWriter.java

-63
This file was deleted.

Diff for: src/images/about.xcf

32.2 KB
Binary file not shown.

Diff for: src/images/about_character.xcf

295 KB
Binary file not shown.

Diff for: src/images/icon.png

93.2 KB
Loading

Diff for: src/images/icon.xcf

167 KB
Binary file not shown.

Diff for: src/images/icon2.xcf

193 KB
Binary file not shown.

Diff for: src/images/window.xcf

4.09 MB
Binary file not shown.

Diff for: src/images/window2.xcf

1.04 MB
Binary file not shown.

Diff for: src/main/java/br/com/pinter/tqrespec/Constants.java

+38
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
/*
2+
* Copyright (C) 2018 Emerson Pinter - All Rights Reserved
3+
*/
4+
5+
/* This file is part of TQ Respec.
6+
7+
TQ Respec is free software: you can redistribute it and/or modify
8+
it under the terms of the GNU General Public License as published by
9+
the Free Software Foundation, either version 3 of the License, or
10+
(at your option) any later version.
11+
12+
Foobar is distributed in the hope that it will be useful,
13+
but WITHOUT ANY WARRANTY; without even the implied warranty of
14+
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15+
GNU General Public License for more details.
16+
17+
You should have received a copy of the GNU General Public License
18+
along with Foobar. If not, see <http://www.gnu.org/licenses/>.
19+
*/
20+
21+
package br.com.pinter.tqrespec;
22+
23+
public class Constants {
24+
public static final int STR_ATTR_STEP = 4;
25+
public static final int STR_ATTR_MIN = 50;
26+
public static final int INT_ATTR_STEP = 4;
27+
public static final int INT_ATTR_MIN = 50;
28+
public static final int DEX_ATTR_STEP = 4;
29+
public static final int DEX_ATTR_MIN = 50;
30+
public static final int LIFE_ATTR_STEP = 40;
31+
public static final int LIFE_ATTR_MIN = 300;
32+
public static final int MANA_ATTR_STEP = 40;
33+
public static final int MANA_ATTR_MIN = 300;
34+
public static final String INITIAL_FONT_SIZE = "1";
35+
public static final String BACKUP_DIRECTORY = "SaveData\\TQRespec Backup";
36+
public static final boolean SKIP_INVENTORY_BLOCKS = true;
37+
public static final String VERSION_CHECK_URL = "https://epinter.github.io/version/tqrespec";
38+
}

0 commit comments

Comments
 (0)