summarylogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.SRCINFO10
-rw-r--r--PKGBUILD12
-rw-r--r--PathOfBuilding-force-disable-devmode.patch39
-rw-r--r--pobfrontend-writable-user-dir.patch25
-rw-r--r--pobfrontend.patch240
5 files changed, 289 insertions, 37 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 330a4243d96a..29840dcfc28d 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,6 +1,6 @@
pkgbase = path-of-building-git
pkgdesc = An offline build planner for Path of Exile using PoBFrontent
- pkgver = 1.4.156.r996.37.479
+ pkgver = 1.4.157.r1012.37.479
pkgrel = 1
url = https://github.com/Openarl/PathOfBuilding
arch = x86_64
@@ -20,17 +20,17 @@ pkgbase = path-of-building-git
source = git+https://github.com/Lua-cURL/Lua-cURLv3
source = https://github.com/Openarl/PathOfBuilding/files/1167199/PathOfBuilding-runtime-src.zip
source = PathOfBuilding.sh
- source = PathOfBuilding-force-disable-devmode.patch
- source = pobfrontend-writable-user-dir.patch
source = lzip-linux.patch
+ source = PathOfBuilding-force-disable-devmode.patch
+ source = pobfrontend.patch
sha256sums = SKIP
sha256sums = SKIP
sha256sums = SKIP
sha256sums = 6d21872a2b2bdbfaebb20de5cac28ac402316e5314c97a89049320ff13c2f622
sha256sums = 02b44b44872bae4725bc6de600f4592ce33b26e90fa0f392922004ee15898446
- sha256sums = 38a09a82f06c2d8738f674c5d2818e5f9580bb25611212507814c97ac25adbd1
- sha256sums = 58a47220d0d1b0209734fc42c0f7dc603c231985eb52f393a7c28598200503e1
sha256sums = 9dbc8802b74ceed78f1a6ba1d5b90251f5ae7f9a8cf5497426e4a35001112fcd
+ sha256sums = 4b37acb9f25f6841726d6b73e6b893d1376c858e879dd6daf35a1bbae8bc2faf
+ sha256sums = 87cbc36ace84ebd746a5b8ec5a88ffde5b03cea7c633a4d437d46b5434ae86da
pkgname = path-of-building-git
diff --git a/PKGBUILD b/PKGBUILD
index 0d51aac2ab8b..a59eec916928 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -6,7 +6,7 @@ pkgdesc='An offline build planner for Path of Exile using PoBFrontent'
arch=('x86_64')
url='https://github.com/Openarl/PathOfBuilding'
license=('MIT')
-pkgver=1.4.156.r996.37.479
+pkgver=1.4.157.r1012.37.479
depends=('zlib' 'qt5-base' 'luajit' 'libgl' 'curl')
makedepends=('meson' 'ninja' 'unzip' 'rsync')
@@ -17,9 +17,9 @@ source=(
'git+https://github.com/Lua-cURL/Lua-cURLv3'
'https://github.com/Openarl/PathOfBuilding/files/1167199/PathOfBuilding-runtime-src.zip'
'PathOfBuilding.sh'
- 'PathOfBuilding-force-disable-devmode.patch'
- 'pobfrontend-writable-user-dir.patch'
'lzip-linux.patch'
+ 'PathOfBuilding-force-disable-devmode.patch'
+ 'pobfrontend.patch'
)
sha256sums=(
'SKIP'
@@ -27,9 +27,9 @@ sha256sums=(
'SKIP'
'6d21872a2b2bdbfaebb20de5cac28ac402316e5314c97a89049320ff13c2f622'
'02b44b44872bae4725bc6de600f4592ce33b26e90fa0f392922004ee15898446'
- '38a09a82f06c2d8738f674c5d2818e5f9580bb25611212507814c97ac25adbd1'
- '58a47220d0d1b0209734fc42c0f7dc603c231985eb52f393a7c28598200503e1'
'9dbc8802b74ceed78f1a6ba1d5b90251f5ae7f9a8cf5497426e4a35001112fcd'
+ '4b37acb9f25f6841726d6b73e6b893d1376c858e879dd6daf35a1bbae8bc2faf'
+ '87cbc36ace84ebd746a5b8ec5a88ffde5b03cea7c633a4d437d46b5434ae86da'
)
noextract=(
'PathOfBuilding-runtime-src.zip'
@@ -46,7 +46,7 @@ prepare() {
# disable devmode
(cd "${srcdir}/PathOfBuilding" && patch -p1 <"${srcdir}/PathOfBuilding-force-disable-devmode.patch")
# fix pobfrontend to have a writable user dir
- (cd "${srcdir}/pobfrontend" && patch -p1 <"${srcdir}/pobfrontend-writable-user-dir.patch")
+ (cd "${srcdir}/pobfrontend" && patch -p1 <"${srcdir}/pobfrontend.patch")
}
pkgver() {
diff --git a/PathOfBuilding-force-disable-devmode.patch b/PathOfBuilding-force-disable-devmode.patch
index b4c24f88b354..56851f6a89be 100644
--- a/PathOfBuilding-force-disable-devmode.patch
+++ b/PathOfBuilding-force-disable-devmode.patch
@@ -1,5 +1,5 @@
diff --git a/Launch.lua b/Launch.lua
-index 0673314..3126c1e 100644
+index 0673314..39800ae 100644
--- a/Launch.lua
+++ b/Launch.lua
@@ -51,7 +51,7 @@ function launch:OnInit()
@@ -11,3 +11,40 @@ index 0673314..3126c1e 100644
end
RenderInit()
ConPrintf("Loading main script...")
+@@ -286,6 +286,8 @@ function launch:ApplyUpdate(mode)
+ end
+
+ function launch:CheckForUpdate(inBackground)
++ return
++ --[[
+ if self.updateCheckRunning then
+ return
+ end
+@@ -302,6 +304,7 @@ function launch:CheckForUpdate(inBackground)
+ self.updateCheckRunning = true
+ end
+ update:close()
++ --]]
+ end
+
+ function launch:ShowPrompt(r, g, b, str, func)
+diff --git a/Modules/Main.lua b/Modules/Main.lua
+index 1af88e0..683fc33 100644
+--- a/Modules/Main.lua
++++ b/Modules/Main.lua
+@@ -42,7 +42,7 @@ function main:Init()
+ self.modes["LIST"] = LoadModule("Modules/BuildList")
+ self.modes["BUILD"] = LoadModule("Modules/Build")
+
+- if launch.devMode or GetScriptPath() == GetRuntimePath() then
++ if launch.devMode and GetScriptPath() == GetRuntimePath() then
+ -- If running in dev mode or standalone mode, put user data in the script path
+ self.userPath = GetScriptPath().."/"
+ else
+@@ -917,4 +917,4 @@ do
+ end
+ end
+
+-return main
+\ No newline at end of file
++return main
diff --git a/pobfrontend-writable-user-dir.patch b/pobfrontend-writable-user-dir.patch
deleted file mode 100644
index 544df2670b24..000000000000
--- a/pobfrontend-writable-user-dir.patch
+++ /dev/null
@@ -1,25 +0,0 @@
-diff --git a/pobwindow.hpp b/pobwindow.hpp
-index cd88f54..7edec7f 100644
---- a/pobwindow.hpp
-+++ b/pobwindow.hpp
-@@ -2,6 +2,7 @@
- #include <QDir>
- #include <QOpenGLWindow>
- #include <QPainter>
-+#include <QStandardPaths>
- #include <memory>
-
- #include "main.h"
-@@ -30,10 +31,11 @@ public:
- // theformat.setAlphaBufferSize(8);
- // std::cout << theformat.hasAlpha() << std::endl;
- // setFormat(theformat);
-+ QString AppDataLocation = QStandardPaths::writableLocation(QStandardPaths::AppDataLocation);
- scriptPath = QDir::currentPath();
- scriptWorkDir = QDir::currentPath();
- basePath = QDir::currentPath();
-- userPath = QDir::currentPath();
-+ userPath = AppDataLocation;
-
- fontFudge = 0;
- }
diff --git a/pobfrontend.patch b/pobfrontend.patch
new file mode 100644
index 000000000000..e349cc9eb19b
--- /dev/null
+++ b/pobfrontend.patch
@@ -0,0 +1,240 @@
+diff --git a/main.cpp b/main.cpp
+index 5c0f49b..3841bbc 100644
+--- a/main.cpp
++++ b/main.cpp
+@@ -525,7 +525,7 @@ static int l_imgHandleIsValid(lua_State* L)
+
+ static int l_imgHandleIsLoading(lua_State* L)
+ {
+- imgHandle_s* imgHandle = GetImgHandle(L, "IsLoading", true);
++// imgHandle_s* imgHandle = GetImgHandle(L, "IsLoading", true);
+ // int width, height;
+ // pobwindow->renderer->GetShaderImageSize(imgHandle->hnd, width, height);
+ lua_pushboolean(L, false);
+@@ -534,7 +534,7 @@ static int l_imgHandleIsLoading(lua_State* L)
+
+ static int l_imgHandleSetLoadingPriority(lua_State* L)
+ {
+- imgHandle_s* imgHandle = GetImgHandle(L, "SetLoadingPriority", true);
++// imgHandle_s* imgHandle = GetImgHandle(L, "SetLoadingPriority", true);
+ int n = lua_gettop(L);
+ pobwindow->LAssert(L, n >= 1, "Usage: imgHandle:SetLoadingPriority(pri)");
+ pobwindow->LAssert(L, lua_isnumber(L, 1), "imgHandle:SetLoadingPriority() argument 1: expected number, got %t", 1);
+@@ -746,8 +746,8 @@ static int l_DrawImageQuad(lua_State* L)
+
+ DrawStringCmd::DrawStringCmd(float X, float Y, int Align, int Size, int Font, const char *Text) : text(Text) {
+ dscount++;
+- if (text[0] == '^') {
+- switch(text[1].toLatin1()) {
++ if (Text[0] == '^') {
++ switch(Text[1]) {
+ case '0':
+ setCol(0.0f, 0.0f, 0.0f);
+ break;
+@@ -1446,7 +1446,7 @@ static int l_ConPrintf(lua_State* L)
+ lua_insert(L, 1);
+ lua_call(L, n, 1);
+ pobwindow->LAssert(L, lua_isstring(L, 1), "ConPrintf() error: string.format returned non-string");
+- //std::cout << lua_tostring(L, 1) << std::endl;
++ std::cout << lua_tostring(L, 1) << std::endl;
+ //pobwindow->sys->con->Printf("%s\n", lua_tostring(L, 1));
+ return 0;
+ }
+@@ -1595,6 +1595,7 @@ static int l_Exit(lua_State* L)
+ pobwindow->LAssert(L, lua_isstring(L, 1), "Exit() argument 1: expected string or nil, got %t", 1);
+ msg = lua_tostring(L, 1);
+ }
++ (void)msg;
+ // FIXME
+ //pobwindow->sys->Exit(msg);
+ //pobwindow->didExit = true;
+@@ -1606,6 +1607,52 @@ static int l_Exit(lua_State* L)
+ #define ADDFUNC(n) lua_pushcclosure(L, l_##n, 0);lua_setglobal(L, #n);
+ #define ADDFUNCCL(n, u) lua_pushcclosure(L, l_##n, u);lua_setglobal(L, #n);
+
++void RegisterGeneralLuaCallbacks(lua_State* L)
++{
++ // General function
++ ADDFUNC(SetWindowTitle);
++ ADDFUNC(GetCursorPos);
++ ADDFUNC(SetCursorPos);
++ ADDFUNC(ShowCursor);
++ ADDFUNC(IsKeyDown);
++ ADDFUNC(Copy);
++ ADDFUNC(Paste);
++ ADDFUNC(Deflate);
++ ADDFUNC(Inflate);
++ ADDFUNC(GetTime);
++ ADDFUNC(GetScriptPath);
++ ADDFUNC(GetRuntimePath);
++ ADDFUNC(GetUserPath);
++ ADDFUNC(MakeDir);
++ ADDFUNC(RemoveDir);
++ ADDFUNC(SetWorkDir);
++ ADDFUNC(GetWorkDir);
++ ADDFUNC(LaunchSubScript);
++ ADDFUNC(AbortSubScript);
++ ADDFUNC(IsSubScriptRunning);
++ ADDFUNC(LoadModule);
++ ADDFUNC(PLoadModule);
++ ADDFUNC(PCall);
++ lua_getglobal(L, "string");
++ lua_getfield(L, -1, "format");
++ ADDFUNCCL(ConPrintf, 1);
++ lua_pop(L, 1); // Pop 'string' table
++ ADDFUNC(ConPrintTable);
++ ADDFUNC(ConExecute);
++ ADDFUNC(ConClear);
++ ADDFUNC(print);
++ ADDFUNC(SpawnProcess);
++ ADDFUNC(OpenURL);
++ ADDFUNC(SetProfiling);
++ ADDFUNC(Restart);
++ ADDFUNC(Exit);
++ lua_getglobal(L, "os");
++ lua_pushcfunction(L, l_Exit);
++ lua_setfield(L, -2, "exit");
++ lua_pop(L, 1); // Pop 'os' table
++
++}
++
+ int main(int argc, char **argv)
+ {
+ QGuiApplication app{argc, argv};
+@@ -1691,47 +1738,7 @@ int main(int argc, char **argv)
+ lua_setfield(L, -2, "GetFileModifiedTime");
+ lua_setfield(L, LUA_REGISTRYINDEX, "uisearchhandlemeta");
+
+- // General function
+- ADDFUNC(SetWindowTitle);
+- ADDFUNC(GetCursorPos);
+- ADDFUNC(SetCursorPos);
+- ADDFUNC(ShowCursor);
+- ADDFUNC(IsKeyDown);
+- ADDFUNC(Copy);
+- ADDFUNC(Paste);
+- ADDFUNC(Deflate);
+- ADDFUNC(Inflate);
+- ADDFUNC(GetTime);
+- ADDFUNC(GetScriptPath);
+- ADDFUNC(GetRuntimePath);
+- ADDFUNC(GetUserPath);
+- ADDFUNC(MakeDir);
+- ADDFUNC(RemoveDir);
+- ADDFUNC(SetWorkDir);
+- ADDFUNC(GetWorkDir);
+- ADDFUNC(LaunchSubScript);
+- ADDFUNC(AbortSubScript);
+- ADDFUNC(IsSubScriptRunning);
+- ADDFUNC(LoadModule);
+- ADDFUNC(PLoadModule);
+- ADDFUNC(PCall);
+- lua_getglobal(L, "string");
+- lua_getfield(L, -1, "format");
+- ADDFUNCCL(ConPrintf, 1);
+- lua_pop(L, 1); // Pop 'string' table
+- ADDFUNC(ConPrintTable);
+- ADDFUNC(ConExecute);
+- ADDFUNC(ConClear);
+- ADDFUNC(print);
+- ADDFUNC(SpawnProcess);
+- ADDFUNC(OpenURL);
+- ADDFUNC(SetProfiling);
+- ADDFUNC(Restart);
+- ADDFUNC(Exit);
+- lua_getglobal(L, "os");
+- lua_pushcfunction(L, l_Exit);
+- lua_setfield(L, -2, "exit");
+- lua_pop(L, 1); // Pop 'os' table
++ RegisterGeneralLuaCallbacks(L);
+
+ int result = luaL_dofile(L, "Launch.lua");
+ if (result != 0) {
+diff --git a/main.h b/main.h
+index 224a15a..93b40d1 100644
+--- a/main.h
++++ b/main.h
+@@ -34,6 +34,7 @@ enum r_texFlag_e {
+
+ class Cmd {
+ public:
++ virtual ~Cmd() = default;
+ virtual void execute() = 0;
+ };
+
+diff --git a/meson.build b/meson.build
+index 871cdc3..045b094 100644
+--- a/meson.build
++++ b/meson.build
+@@ -16,6 +16,12 @@ zlib_dep = dependency('zlib')
+ qt5 = import('qt5')
+ prep = qt5.preprocess(moc_headers : ['subscript.hpp', 'pobwindow.hpp'])
+
++extra_args = []
++if meson.get_compiler('cpp').get_id() == 'gcc'
++ extra_args = ['-Wno-reorder']
++endif
++
+ executable('pobfrontend',
+ sources : ['main.cpp', prep],
+- dependencies : [qt5_dep, gl_dep, zlib_dep, lua_dep])
++ dependencies : [qt5_dep, gl_dep, zlib_dep, lua_dep],
++ cpp_args: extra_args)
+diff --git a/pobwindow.hpp b/pobwindow.hpp
+index cd88f54..7edec7f 100644
+--- a/pobwindow.hpp
++++ b/pobwindow.hpp
+@@ -2,6 +2,7 @@
+ #include <QDir>
+ #include <QOpenGLWindow>
+ #include <QPainter>
++#include <QStandardPaths>
+ #include <memory>
+
+ #include "main.h"
+@@ -30,10 +31,11 @@ public:
+ // theformat.setAlphaBufferSize(8);
+ // std::cout << theformat.hasAlpha() << std::endl;
+ // setFormat(theformat);
++ QString AppDataLocation = QStandardPaths::writableLocation(QStandardPaths::AppDataLocation);
+ scriptPath = QDir::currentPath();
+ scriptWorkDir = QDir::currentPath();
+ basePath = QDir::currentPath();
+- userPath = QDir::currentPath();
++ userPath = AppDataLocation;
+
+ fontFudge = 0;
+ }
+diff --git a/subscript.hpp b/subscript.hpp
+index defc016..6dae331 100644
+--- a/subscript.hpp
++++ b/subscript.hpp
+@@ -12,10 +12,12 @@ extern "C" {
+ #include "luajit.h"
+ }
+
+-static int dummy_ConPrintf(lua_State* L)
+-{
+- return 0;
+-}
++void RegisterGeneralLuaCallbacks(lua_State* L);
++
++//static int dummy_ConPrintf(lua_State* L)
++//{
++// return 0;
++//}
+
+ class SubScript : public QThread {
+ Q_OBJECT
+@@ -26,8 +28,9 @@ public:
+ lua_pushlightuserdata(L, this);
+ lua_rawseti(L, LUA_REGISTRYINDEX, 0);
+ luaL_openlibs(L);
+- lua_pushcfunction(L, dummy_ConPrintf);
+- lua_setglobal(L, "ConPrintf");
++ //lua_pushcfunction(L, dummy_ConPrintf);
++ //lua_setglobal(L, "ConPrintf");
++ RegisterGeneralLuaCallbacks(L);
+ int err = luaL_loadstring(L, lua_tostring(L_main, 1));
+ if (err) {
+ std::cout << "Error in subscript: " << err << std::endl;