Skip to content

Commit 99585d7

Browse files
committed
Change builds to be placed in home path
1 parent c60eef6 commit 99585d7

File tree

3 files changed

+12
-4
lines changed

3 files changed

+12
-4
lines changed

Makefile

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,10 +19,21 @@ sign:
1919
codesign --force --deep --sign $$(security find-identity -v -p codesigning | awk 'FNR == 1 {print $$2}') PathOfBuilding.app; \
2020
codesign -d -v PathOfBuilding.app
2121

22+
# We remove the `launch.devMode or` to ensure the user's builds are stored not in
23+
# the binary, but within their user directory
24+
25+
# Relevant code is:
26+
#
27+
# ```lua
28+
# if launch.devMode or (GetScriptPath() == GetRuntimePath() and not launch.installedMode) then
29+
# -- If running in dev mode or standalone mode, put user data in the script path
30+
# self.userPath = GetScriptPath().."/"
31+
# ```
2232
pob: load_pob luacurl frontend
2333
rm -rf PathOfBuildingBuild; \
2434
cp -rf PathOfBuilding PathOfBuildingBuild; \
2535
pushd PathOfBuildingBuild; \
36+
sed -i '' 's/if launch.devMode or .*then/if false then/' src/Modules/Main.lua; \
2637
unzip runtime-win32.zip lua/xml.lua lua/base64.lua lua/sha1.lua; \
2738
mv lua/*.lua .; \
2839
rmdir lua; \

main.cpp

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,6 @@
1616
#include "subscript.hpp"
1717
#include <unistd.h>
1818
#include <sys/types.h>
19-
#include <pwd.h>
20-
21-
const char *homedir;
2219

2320
lua_State *L;
2421

pobwindow.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ class POBWindow : public QOpenGLWindow {
3636
scriptPath = QDir::currentPath();
3737
scriptWorkDir = QDir::currentPath();
3838
basePath = QDir::currentPath();
39-
userPath = QDir::currentPath();
39+
userPath = QDir::homePath();
4040

4141
fontFudge = 0;
4242

0 commit comments

Comments
 (0)