From 4153e67166b69c71b743285fa5169bf298540a87 Mon Sep 17 00:00:00 2001 From: Nightblade Date: Mon, 15 Dec 2025 14:00:57 +0000 Subject: [PATCH 1/2] Apply changes from https://github.com/PathOfBuildingCommunity/PathOfBuilding/pull/9250 --- src/HeadlessWrapper.lua | 2 +- src/HeadlessWrapper.lua.rej | 9 +++++++++ src/Launch.lua | 2 +- src/Modules/BuildSiteTools.lua | 10 +++++----- src/Modules/BuildSiteTools.lua.rej | 14 ++++++++++++++ 5 files changed, 30 insertions(+), 7 deletions(-) create mode 100644 src/HeadlessWrapper.lua.rej create mode 100644 src/Modules/BuildSiteTools.lua.rej diff --git a/src/HeadlessWrapper.lua b/src/HeadlessWrapper.lua index 12e61024bc..69d6f0f5d8 100644 --- a/src/HeadlessWrapper.lua +++ b/src/HeadlessWrapper.lua @@ -44,7 +44,7 @@ function imageHandleClass:ImageSize() end -- Rendering -function RenderInit() end +function RenderInit(flag, ...) end function GetScreenSize() return 1920, 1080 end diff --git a/src/HeadlessWrapper.lua.rej b/src/HeadlessWrapper.lua.rej new file mode 100644 index 0000000000..abbde839ba --- /dev/null +++ b/src/HeadlessWrapper.lua.rej @@ -0,0 +1,9 @@ +diff a/src/HeadlessWrapper.lua b/src/HeadlessWrapper.lua (rejected hunks) +@@ -160,6 +160,7 @@ function OpenURL(url) end + function SetProfiling(isEnabled) end + function Restart() end + function Exit() end ++function TakeScreenshot() end + + local l_require = require + function require(name) diff --git a/src/Launch.lua b/src/Launch.lua index 0b579a4c33..dffeb83077 100644 --- a/src/Launch.lua +++ b/src/Launch.lua @@ -250,7 +250,7 @@ end ---Download the given page in the background, and calls the provided callback function when done: ---@param url string ---@param callback fun(response:table, errMsg:string) @ response = { header, body } ----@param params table @ params = { header, body } +---@param params? table @ params = { header, body } function launch:DownloadPage(url, callback, params) params = params or {} local script = [[ diff --git a/src/Modules/BuildSiteTools.lua b/src/Modules/BuildSiteTools.lua index 67f1d4b0a4..08ec4f7cac 100644 --- a/src/Modules/BuildSiteTools.lua +++ b/src/Modules/BuildSiteTools.lua @@ -32,8 +32,8 @@ buildSites.websiteList = { } --- Uploads a PoB build code to a website ---- @param websiteInfo Table Contains the postUrl, any postParams, and a prefix to add to the response ---- @param buildCode String The build code that will be uploaded +--- @param websiteInfo table Contains the postUrl, any postParams, and a prefix to add to the response +--- @param buildCode string The build code that will be uploaded function buildSites.UploadBuild(buildCode, websiteInfo) local response if websiteInfo then @@ -72,9 +72,9 @@ function buildSites.UploadBuild(buildCode, websiteInfo) end --- Downloads a PoB build code from a website ---- @param link String A link to the site that contains the link to the raw build code ---- @param websiteInfo Table Contains the downloadUrl ---- @param callback Function The function to call when the download is complete +--- @param link string A link to the site that contains the link to the raw build code +--- @param websiteInfo table? Contains the downloadUrl +--- @param callback function The function to call when the download is complete function buildSites.DownloadBuild(link, websiteInfo, callback) local siteCodeURL -- Only called on program start via protocol handler diff --git a/src/Modules/BuildSiteTools.lua.rej b/src/Modules/BuildSiteTools.lua.rej new file mode 100644 index 0000000000..d172708997 --- /dev/null +++ b/src/Modules/BuildSiteTools.lua.rej @@ -0,0 +1,14 @@ +diff a/src/Modules/BuildSiteTools.lua b/src/Modules/BuildSiteTools.lua (rejected hunks) +@@ -100,10 +100,10 @@ function buildSites.DownloadBuild(link, websiteInfo, callback) + end + + -- Parses and converts URI's to import links. Currently only supports protocol handler URI's, extend as needed. +--- @param uri String Example: pob://pobbin/ or pob://poeninja/ ++-- @param uri string Example: pob://pobbin/ or pob://poeninja/ + function buildSites.ParseImportLinkFromURI(uri) + local importLink = nil +- ++ + -- Check if it's an URI from protocol handler + for _, siteInfo in ipairs(buildSites.websiteList) do + if uri:match("^pob:[/\\]*" .. siteInfo.id:lower() .. "[/\\]+(.+)") then From 73720562db82eedd2f9a30edaeca904bde144a30 Mon Sep 17 00:00:00 2001 From: LocalIdentity Date: Tue, 16 Dec 2025 02:45:55 +1100 Subject: [PATCH 2/2] Fix merge conflict --- src/HeadlessWrapper.lua | 1 + src/HeadlessWrapper.lua.rej | 9 --------- src/Modules/BuildSiteTools.lua | 2 +- src/Modules/BuildSiteTools.lua.rej | 14 -------------- 4 files changed, 2 insertions(+), 24 deletions(-) delete mode 100644 src/HeadlessWrapper.lua.rej delete mode 100644 src/Modules/BuildSiteTools.lua.rej diff --git a/src/HeadlessWrapper.lua b/src/HeadlessWrapper.lua index 69d6f0f5d8..683afd95c7 100644 --- a/src/HeadlessWrapper.lua +++ b/src/HeadlessWrapper.lua @@ -157,6 +157,7 @@ function OpenURL(url) end function SetProfiling(isEnabled) end function Restart() end function Exit() end +function TakeScreenshot() end ---@return string? provider ---@return string? version diff --git a/src/HeadlessWrapper.lua.rej b/src/HeadlessWrapper.lua.rej deleted file mode 100644 index abbde839ba..0000000000 --- a/src/HeadlessWrapper.lua.rej +++ /dev/null @@ -1,9 +0,0 @@ -diff a/src/HeadlessWrapper.lua b/src/HeadlessWrapper.lua (rejected hunks) -@@ -160,6 +160,7 @@ function OpenURL(url) end - function SetProfiling(isEnabled) end - function Restart() end - function Exit() end -+function TakeScreenshot() end - - local l_require = require - function require(name) diff --git a/src/Modules/BuildSiteTools.lua b/src/Modules/BuildSiteTools.lua index 08ec4f7cac..9bd1d75750 100644 --- a/src/Modules/BuildSiteTools.lua +++ b/src/Modules/BuildSiteTools.lua @@ -103,7 +103,7 @@ function buildSites.DownloadBuild(link, websiteInfo, callback) end -- Parses and converts URI's to import links. Currently only supports protocol handler URI's, extend as needed. --- @param uri String Example: pob2://pobbin/ or pob2://poeninja/ +--- @param uri string Example: pob2://pobbin/ or pob2://poeninja/ function buildSites.ParseImportLinkFromURI(uri) local importLink = nil diff --git a/src/Modules/BuildSiteTools.lua.rej b/src/Modules/BuildSiteTools.lua.rej deleted file mode 100644 index d172708997..0000000000 --- a/src/Modules/BuildSiteTools.lua.rej +++ /dev/null @@ -1,14 +0,0 @@ -diff a/src/Modules/BuildSiteTools.lua b/src/Modules/BuildSiteTools.lua (rejected hunks) -@@ -100,10 +100,10 @@ function buildSites.DownloadBuild(link, websiteInfo, callback) - end - - -- Parses and converts URI's to import links. Currently only supports protocol handler URI's, extend as needed. ---- @param uri String Example: pob://pobbin/ or pob://poeninja/ -+-- @param uri string Example: pob://pobbin/ or pob://poeninja/ - function buildSites.ParseImportLinkFromURI(uri) - local importLink = nil -- -+ - -- Check if it's an URI from protocol handler - for _, siteInfo in ipairs(buildSites.websiteList) do - if uri:match("^pob:[/\\]*" .. siteInfo.id:lower() .. "[/\\]+(.+)") then