mirror of
https://mzte.de/git/LordMZTE/dotfiles.git
synced 2024-11-15 14:33:26 +01:00
mzte-nv: use procyon instead of fernflower as java decompiler
This commit is contained in:
parent
4c89decbbe
commit
f182e76912
1 changed files with 5 additions and 5 deletions
|
@ -103,15 +103,15 @@ fn lGetBundleInfo(l: *c.lua_State) !c_int {
|
||||||
// bundles
|
// bundles
|
||||||
c.lua_newtable(l);
|
c.lua_newtable(l);
|
||||||
|
|
||||||
var has_fernflower = false;
|
var has_procyon = false;
|
||||||
var iter = dir.iterate();
|
var iter = dir.iterate();
|
||||||
var idx: c_int = 1;
|
var idx: c_int = 1;
|
||||||
while (try iter.next()) |f| {
|
while (try iter.next()) |f| {
|
||||||
if (f.kind != .file or !std.mem.endsWith(u8, f.name, ".jar"))
|
if (f.kind != .file or !std.mem.endsWith(u8, f.name, ".jar"))
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
if (!has_fernflower and std.mem.containsAtLeast(u8, f.name, 1, "fernflower"))
|
if (!has_procyon and std.mem.containsAtLeast(u8, f.name, 1, "procyon"))
|
||||||
has_fernflower = true;
|
has_procyon = true;
|
||||||
|
|
||||||
const path = try std.fs.path.joinZ(std.heap.c_allocator, &.{ bundle_path, f.name });
|
const path = try std.fs.path.joinZ(std.heap.c_allocator, &.{ bundle_path, f.name });
|
||||||
defer std.heap.c_allocator.free(path);
|
defer std.heap.c_allocator.free(path);
|
||||||
|
@ -126,8 +126,8 @@ fn lGetBundleInfo(l: *c.lua_State) !c_int {
|
||||||
// content_provider
|
// content_provider
|
||||||
c.lua_newtable(l);
|
c.lua_newtable(l);
|
||||||
|
|
||||||
if (has_fernflower) {
|
if (has_procyon) {
|
||||||
c.lua_pushstring(l, "fernflower");
|
c.lua_pushstring(l, "procyon");
|
||||||
c.lua_setfield(l, -2, "preferred");
|
c.lua_setfield(l, -2, "preferred");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue