You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
sed -i 's|return ..app.isPackaged?.*resolve(__dirname,"..","..","resources")|return "/usr/lib/'"${pkgname}"'/resources"|' app.asar.contents/.vite/build/index*.js
65
-
# note that the below is replacing i18n with the standard resources directory as that's where the i18n json files wind up
66
-
sed -i 's|return ..app.isPackaged?.*resolve(__dirname,"..","..","resources","i18n")|return "/usr/lib/'"${pkgname}"'/resources"|' app.asar.contents/.vite/build/index*.js
64
+
# Fix resource paths - handle different variable names for app object
65
+
sed -i 's|return[[:space:]]\+[a-zA-Z_][a-zA-Z0-9_]*\.app\.isPackaged[[:space:]]*?[^:]*:[[:space:]]*[a-zA-Z_][a-zA-Z0-9_]*\.resolve([^,]*,[[:space:]]*"\.\.","\.\.","resources")|return "/usr/lib/'"${pkgname}"'/resources"|g' app.asar.contents/.vite/build/index*.js
66
+
# Fix i18n resource paths specifically
67
+
sed -i 's|return[[:space:]]\+[a-zA-Z_][a-zA-Z0-9_]*\.app\.isPackaged[[:space:]]*?[^:]*:[[:space:]]*[a-zA-Z_][a-zA-Z0-9_]*\.resolve([^,]*,[[:space:]]*"\.\.","\.\.","resources","i18n")|return "/usr/lib/'"${pkgname}"'/resources"|g' app.asar.contents/.vite/build/index*.js
67
68
# fix negation operator to show menubar
68
69
sed -i -E 's/if\(!([a-zA-Z]+)[[:space:]]*&&[[:space:]]*([a-zA-Z]+)\)/if(\1 \&\& \2)/g' app.asar.contents/.vite/renderer/main_window/assets/MainWindowPage-*.js
0 commit comments