pkgs: Package runelite

main
idylls 11 months ago
parent ef93de4664
commit ad1e7cb2c7
Signed by: idylls
GPG Key ID: 52D7502B0C319049

@ -51,11 +51,28 @@
"type": "github"
}
},
"nixpkgsDevel": {
"locked": {
"lastModified": 1687895380,
"narHash": "sha256-0bRwXPP1jtPDsCGCBwr4f/ml6tYJCXhXu//91Zh3GrU=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "e689069f507e510ed07571679611480ada251a9a",
"type": "github"
},
"original": {
"owner": "NixOS",
"ref": "e689069",
"repo": "nixpkgs",
"type": "github"
}
},
"root": {
"inputs": {
"flake-utils": "flake-utils",
"mozilla": "mozilla",
"nixpkgs": "nixpkgs"
"nixpkgs": "nixpkgs",
"nixpkgsDevel": "nixpkgsDevel"
}
},
"systems": {

@ -3,11 +3,12 @@
nixpkgs.url = "github:NixOS/nixpkgs/nixos-23.05";
mozilla.url = "github:mozilla/nixpkgs-mozilla/3a44b87";
flake-utils.url = "github:numtide/flake-utils/dbabf0c";
nixpkgsDevel.url = "github:NixOS/nixpkgs/e689069";
};
outputs = { self, flake-utils, nixpkgs, mozilla }:
outputs = { self, flake-utils, nixpkgs, mozilla, nixpkgsDevel }:
let mkPackages = (import ./packages.nix) {
inherit nixpkgs;
inherit nixpkgs nixpkgsDevel;
rustOverlay = mozilla.overlays.rust;
};
systems = [ "x86_64-linux" ];

@ -1,6 +1,7 @@
{ nixpkgs, rustOverlay }: system:
{ nixpkgs, rustOverlay, nixpkgsDevel }: system:
let pkgs = nixpkgs.legacyPackages.${system};
pkgsDevel = nixpkgsDevel.legacyPackages.${system};
rustPkgs = rustOverlay pkgs pkgs;
buildRustPlatform = (import ./utils.nix).buildRustPlatform {
inherit (rustPkgs) rustChannelOf;
@ -9,4 +10,5 @@ let pkgs = nixpkgs.legacyPackages.${system};
in {
eww = pkgs.callPackage ./eww { inherit buildRustPlatform; };
emacs = pkgs.callPackage (import ./emacs { inherit (pkgs) emacs; }) {};
runelite = pkgs.callPackage ./runelite { inherit (pkgsDevel) maven; };
}

@ -0,0 +1,43 @@
{ maven
, fetchFromGitHub
, lib
, stdenv
, makeWrapper
, jre
}:
let version = "7426a5a"; # Keep these in sync
runeliteVersion = "1.10.6";
pluginHubVersion = "1.10.5";
src = fetchFromGitHub {
owner = "runelite";
repo = "runelite";
rev = version;
hash = "sha256-mYFHDY7j8eL8e8voVi3UcSBR5MfmVn/Exc/xNkI74Xw=";
};
in maven.buildMavenPackage rec {
inherit src version;
pname = "runelite";
buildInputs = [ maven makeWrapper ];
mvnParameters = "-DskipTests=true";
mvnHash = "sha256-6RxWzK9A8oJMH8NrjPAP9/N5bE6ti7Y+UFENU7r6enU=";
patches = [ ./my-hacks.patch ];
postPatch = ''
sed -i \
-e 's/runelite.pluginhub.version=.*/runelite.pluginhub.version=${pluginHubVersion}/'\
runelite-client/src/main/resources/net/runelite/client/runelite.properties
'';
installPhase = ''
mkdir -p "$out/bin" "$out/share/java"
cp \
"runelite-client/target/client-${runeliteVersion}-SNAPSHOT-shaded.jar" \
"$out/share/java/runelite.jar"
makeWrapper "${jre}/bin/java" "$out/bin/runelite" \
--add-flags "-jar '$out/share/java/runelite.jar'"
'';
}

@ -0,0 +1,207 @@
diff --git a/runelite-client/src/main/java/net/runelite/client/RuneLite.java b/runelite-client/src/main/java/net/runelite/client/RuneLite.java
index e2a467a07..fa4a641c2 100644
--- a/runelite-client/src/main/java/net/runelite/client/RuneLite.java
+++ b/runelite-client/src/main/java/net/runelite/client/RuneLite.java
@@ -159,10 +159,6 @@ public class RuneLite
@Nullable
private RuntimeConfig runtimeConfig;
- @Inject
- @Nullable
- private TelemetryClient telemetryClient;
-
public static void main(String[] args) throws Exception
{
Locale.setDefault(Locale.ENGLISH);
@@ -175,7 +171,7 @@ public class RuneLite
parser.accepts("jav_config", "jav_config url")
.withRequiredArg()
.defaultsTo(RuneLiteProperties.getJavConfig());
- parser.accepts("disable-telemetry", "Disable telemetry");
+ parser.accepts("enable-telemetry", "Enable telemetry");
parser.accepts("profile", "Configuration profile to use").withRequiredArg();
final ArgumentAcceptingOptionSpec<File> sessionfile = parser.accepts("sessionfile", "Use a specified session file")
@@ -240,22 +236,7 @@ public class RuneLite
ClassPreloader.preload();
}, "Preloader").start();
- final boolean developerMode = options.has("developer-mode") && RuneLiteProperties.getLauncherVersion() == null;
-
- if (developerMode)
- {
- boolean assertions = false;
- assert assertions = true;
- if (!assertions)
- {
- SwingUtilities.invokeLater(() ->
- new FatalErrorDialog("Developers should enable assertions; Add `-ea` to your JVM arguments`")
- .addHelpButtons()
- .addBuildingGuide()
- .open());
- return;
- }
- }
+ final boolean developerMode = true;
log.info("RuneLite {} (launcher version {}) starting up, args: {}",
RuneLiteProperties.getVersion(), MoreObjects.firstNonNull(RuneLiteProperties.getLauncherVersion(), "unknown"),
@@ -393,11 +374,6 @@ public class RuneLite
clientUI.show();
- if (telemetryClient != null)
- {
- telemetryClient.submitTelemetry();
- }
-
ReflectUtil.queueInjectorAnnotationCacheInvalidation(injector);
ReflectUtil.invalidateAnnotationCaches();
}
diff --git a/runelite-client/src/main/java/net/runelite/client/RuneLiteModule.java b/runelite-client/src/main/java/net/runelite/client/RuneLiteModule.java
index fc96e159d..ef482b72b 100644
--- a/runelite-client/src/main/java/net/runelite/client/RuneLiteModule.java
+++ b/runelite-client/src/main/java/net/runelite/client/RuneLiteModule.java
@@ -118,7 +118,7 @@ public class RuneLiteModule extends AbstractModule
bindConstant().annotatedWith(Names.named("developerMode")).to(developerMode);
bindConstant().annotatedWith(Names.named("safeMode")).to(safeMode);
- bindConstant().annotatedWith(Names.named("disableTelemetry")).to(disableTelemetry);
+ bindConstant().annotatedWith(Names.named("disableTelemetry")).to(true);
bind(File.class).annotatedWith(Names.named("sessionfile")).toInstance(sessionfile);
bind(String.class).annotatedWith(Names.named("profile")).toProvider(Providers.of(profile));
bindConstant().annotatedWith(Names.named("insecureWriteCredentials")).to(insecureWriteCredentials);
@@ -225,6 +225,6 @@ public class RuneLiteModule extends AbstractModule
Gson gson,
@Named("runelite.api.base") HttpUrl apiBase)
{
- return disableTelemetry ? null : new TelemetryClient(okHttpClient, gson, apiBase);
+ return null;
}
}
diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/PluginManager.java b/runelite-client/src/main/java/net/runelite/client/plugins/PluginManager.java
index ffff6dbfe..259162f5f 100644
--- a/runelite-client/src/main/java/net/runelite/client/plugins/PluginManager.java
+++ b/runelite-client/src/main/java/net/runelite/client/plugins/PluginManager.java
@@ -277,11 +277,6 @@ public class PluginManager
public void loadSideLoadPlugins()
{
- if (!developerMode)
- {
- return;
- }
-
File[] files = SIDELOADED_PLUGINS.listFiles();
if (files == null)
{
diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/camera/CameraConfig.java b/runelite-client/src/main/java/net/runelite/client/plugins/camera/CameraConfig.java
index f4d302b3b..0f196a712 100644
--- a/runelite-client/src/main/java/net/runelite/client/plugins/camera/CameraConfig.java
+++ b/runelite-client/src/main/java/net/runelite/client/plugins/camera/CameraConfig.java
@@ -32,14 +32,14 @@ import net.runelite.client.config.Range;
@ConfigGroup("zoom") // using the old plugin's group name
public interface CameraConfig extends Config
{
- int OUTER_LIMIT_MIN = -400;
- int OUTER_LIMIT_MAX = 400;
+ int OUTER_LIMIT_MIN = -4000;
+ int OUTER_LIMIT_MAX = 4000;
/**
* The largest (most zoomed in) value that can be used without the client crashing.
*
* Larger values trigger an overflow in the engine's fov to scale code.
*/
- int INNER_ZOOM_LIMIT = 1004;
+ int INNER_ZOOM_LIMIT = 10000;
@ConfigItem(
keyName = "inner",
diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/menuentryswapper/MenuEntrySwapperPlugin.java b/runelite-client/src/main/java/net/runelite/client/plugins/menuentryswapper/MenuEntrySwapperPlugin.java
index e33f5dd36..06df7dc4e 100644
--- a/runelite-client/src/main/java/net/runelite/client/plugins/menuentryswapper/MenuEntrySwapperPlugin.java
+++ b/runelite-client/src/main/java/net/runelite/client/plugins/menuentryswapper/MenuEntrySwapperPlugin.java
@@ -523,13 +523,6 @@ public class MenuEntrySwapperPlugin extends Plugin
continue;
}
- if ("Build".equals(actions[actionIdx])
- || "Remove".equals(actions[actionIdx]))
- {
- // https://secure.runescape.com/m=news/third-party-client-guidelines?oldschool=1
- continue;
- }
-
final MenuAction menuAction = OBJECT_MENU_TYPES.get(actionIdx);
if (menuAction != currentAction)
{
@@ -732,13 +725,6 @@ public class MenuEntrySwapperPlugin extends Plugin
continue;
}
- if ("Knock-Out".equals(actions[actionIdx])
- || "Lure".equals(actions[actionIdx]))
- {
- // https://secure.runescape.com/m=news/third-party-client-guidelines?oldschool=1
- continue;
- }
-
final MenuAction menuAction = NPC_MENU_TYPES.get(actionIdx);
if (menuAction != currentAction)
{
diff --git a/runelite-client/src/main/java/net/runelite/client/ui/ClientUI.java b/runelite-client/src/main/java/net/runelite/client/ui/ClientUI.java
index 3ed8b8105..8d4905bdc 100644
--- a/runelite-client/src/main/java/net/runelite/client/ui/ClientUI.java
+++ b/runelite-client/src/main/java/net/runelite/client/ui/ClientUI.java
@@ -395,7 +395,6 @@ public class ClientUI
container = new JPanel();
container.setLayout(new BoxLayout(container, BoxLayout.X_AXIS));
- container.add(new ClientPanel(client));
navContainer = new JPanel();
navContainer.setLayout(cardLayout);
@@ -405,10 +404,13 @@ public class ClientUI
// To reduce substance's colorization (tinting)
navContainer.putClientProperty(SubstanceSynapse.COLORIZATION_FACTOR, 1.0);
- container.add(navContainer);
pluginToolbar = new ClientPluginToolbar();
titleToolbar = new ClientTitleToolbar();
+
+ container.add(navContainer);
+ container.add(new ClientPanel(client));
+
frame.add(container);
// Add key listener
@@ -950,7 +952,7 @@ public class ClientUI
expand(currentNavButton);
// Add plugin toolbar back
- container.add(pluginToolbar);
+ container.add(pluginToolbar, 0);
}
// Revalidate sizes of affected Swing components
diff --git a/runelite-client/src/main/resources/net/runelite/client/runelite.properties b/runelite-client/src/main/resources/net/runelite/client/runelite.properties
index 9cc84c2fc..add2ad717 100644
--- a/runelite-client/src/main/resources/net/runelite/client/runelite.properties
+++ b/runelite-client/src/main/resources/net/runelite/client/runelite.properties
@@ -13,7 +13,7 @@ runelite.dnschange.link=https://1.1.1.1/dns/#setup-instructions
runelite.jav_config=https://oldschool.runescape.com/jav_config.ws
runelite.jav_config_backup=https://static.runelite.net/jav_config.ws
runelite.pluginhub.url=https://repo.runelite.net/plugins
-runelite.pluginhub.version=${project.version}
+runelite.pluginhub.version=1.10.5
runelite.imgur.client.id=30d71e5f6860809
runelite.api.base=https://api.runelite.net/runelite-${project.version}
runelite.session=https://api.runelite.net/session
@@ -21,4 +21,4 @@ runelite.static.base=https://static.runelite.net
runelite.ws=https://api.runelite.net/ws2
runelite.config=https://static.runelite.net/config.json
runelite.osrstwitter.link=https://twitter.com/OldSchoolRS
-runelite.oauth.redirect=https://runelite.net/logged-in
\ No newline at end of file
+runelite.oauth.redirect=https://runelite.net/logged-in
Loading…
Cancel
Save