mirror of
https://gitlab.com/2009scape/rt4-client.git
synced 2025-12-09 16:45:46 -07:00
More branding, add CI
This commit is contained in:
parent
1262d7cbd4
commit
2281888e42
3 changed files with 40 additions and 11 deletions
26
.gitlab-ci.yml
Normal file
26
.gitlab-ci.yml
Normal file
|
|
@ -0,0 +1,26 @@
|
||||||
|
image: java:8-jdk
|
||||||
|
|
||||||
|
stages:
|
||||||
|
- build
|
||||||
|
|
||||||
|
before_script:
|
||||||
|
# - echo `pwd` # debug
|
||||||
|
# - echo "$CI_BUILD_NAME, $CI_BUILD_REF_NAME $CI_BUILD_STAGE" # debug
|
||||||
|
- export GRADLE_USER_HOME=`pwd`/.gradle
|
||||||
|
|
||||||
|
cache:
|
||||||
|
paths:
|
||||||
|
- .gradle/wrapper
|
||||||
|
- .gradle/caches
|
||||||
|
|
||||||
|
build:
|
||||||
|
stage: build
|
||||||
|
script:
|
||||||
|
- ./gradlew jar
|
||||||
|
- mv client/build/libs/*.jar client/build/libs/2009scape.jar
|
||||||
|
artifacts:
|
||||||
|
paths:
|
||||||
|
- client/build/libs/*.jar
|
||||||
|
expire_in: 1 week
|
||||||
|
only:
|
||||||
|
- master
|
||||||
|
|
@ -51,6 +51,8 @@ public class PluginRepository {
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void Init() {
|
public static void Init() {
|
||||||
|
if (GlobalJsonConfig.instance == null)
|
||||||
|
return;
|
||||||
File pluginsDirectory = new File(GlobalJsonConfig.instance.pluginsFolder);
|
File pluginsDirectory = new File(GlobalJsonConfig.instance.pluginsFolder);
|
||||||
|
|
||||||
if (!pluginsDirectory.exists()) {
|
if (!pluginsDirectory.exists()) {
|
||||||
|
|
|
||||||
|
|
@ -468,8 +468,8 @@ public abstract class GameShell extends Applet implements Runnable, FocusListene
|
||||||
synchronized (this) {
|
synchronized (this) {
|
||||||
focus = focusIn;
|
focus = focusIn;
|
||||||
}
|
}
|
||||||
this.mainLoop();
|
|
||||||
setWindowTitle();
|
setWindowTitle();
|
||||||
|
this.mainLoop();
|
||||||
}
|
}
|
||||||
|
|
||||||
public static GraphicsDevice getCurrentDevice() {
|
public static GraphicsDevice getCurrentDevice() {
|
||||||
|
|
@ -690,7 +690,7 @@ public abstract class GameShell extends Applet implements Runnable, FocusListene
|
||||||
frame.setIconImage(new javax.swing.ImageIcon(getClass().getResource("/saradomin.png")).getImage());
|
frame.setIconImage(new javax.swing.ImageIcon(getClass().getResource("/saradomin.png")).getImage());
|
||||||
@Pc(44) Insets insets = frame.getInsets();
|
@Pc(44) Insets insets = frame.getInsets();
|
||||||
frame.setSize(insets.left + frameWidth + insets.right, insets.top + frameHeight + insets.bottom);
|
frame.setSize(insets.left + frameWidth + insets.right, insets.top + frameHeight + insets.bottom);
|
||||||
GameShell.setFpsTarget(getCurrentDevice().getDisplayMode().getRefreshRate());
|
configureTargetFPS();
|
||||||
signLink2 = signLink = new SignLink(null, cacheId, cacheSubDir, 28);
|
signLink2 = signLink = new SignLink(null, cacheId, cacheSubDir, 28);
|
||||||
@Pc(76) PrivilegedRequest request = signLink.startThread(1, this);
|
@Pc(76) PrivilegedRequest request = signLink.startThread(1, this);
|
||||||
while (request.status == 0) {
|
while (request.status == 0) {
|
||||||
|
|
@ -703,8 +703,8 @@ public abstract class GameShell extends Applet implements Runnable, FocusListene
|
||||||
}
|
}
|
||||||
|
|
||||||
private void setWindowTitle() {
|
private void setWindowTitle() {
|
||||||
|
String modeString = "2009Scape [Test]";
|
||||||
if (GlobalJsonConfig.instance != null) {
|
if (GlobalJsonConfig.instance != null) {
|
||||||
String modeString = "2009Scape [Local]";
|
|
||||||
switch (GlobalJsonConfig.instance.ip_management) {
|
switch (GlobalJsonConfig.instance.ip_management) {
|
||||||
case "play.2009scape.org":
|
case "play.2009scape.org":
|
||||||
modeString = "2009Scape [Live]";
|
modeString = "2009Scape [Live]";
|
||||||
|
|
@ -713,8 +713,10 @@ public abstract class GameShell extends Applet implements Runnable, FocusListene
|
||||||
modeString = "2009Scape [Test]";
|
modeString = "2009Scape [Test]";
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
|
modeString = "2009Scape [Local]";
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
if (PlayerList.self != null) {
|
if (PlayerList.self != null) {
|
||||||
JagString name = PlayerList.self.username;
|
JagString name = PlayerList.self.username;
|
||||||
if (name != null)
|
if (name != null)
|
||||||
|
|
@ -724,7 +726,6 @@ public abstract class GameShell extends Applet implements Runnable, FocusListene
|
||||||
if (frame != null)
|
if (frame != null)
|
||||||
frame.setTitle(modeString);
|
frame.setTitle(modeString);
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
private final void configureTargetFPS() {
|
private final void configureTargetFPS() {
|
||||||
int refreshRate = getCurrentDevice().getDisplayMode().getRefreshRate();
|
int refreshRate = getCurrentDevice().getDisplayMode().getRefreshRate();
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue