Closed zerodegress closed 1 year ago
Can you give more details? What operating system are you using? How are you building/installing Aegisub? It looks like you're using scoop in some way, which isn't really officially supported. If this is an issue with the scoop packaging (which I would suspect) instead of the upstream code, I might not really be able to help you, and this should be fixed in the respective scoop package instead.
os: windows11 installing method: use the protable version and directly unzip it to use. env:LUA_CPATH=~\scoop\apps\lua\current,LUA_EXE_PATH=~\scoop\apps\lua\current I use my own scoop bucket to test installing it,here is it:https://github.com/zerodegress/zerobucket. I have previously installed the lua and luarocks through scoop,it may overwrite some env variables,making the lua lib path wrong. but after installing this aegisub version failed I tried to install official aegisub version through portable, and it works,maybe it is I had installed the aegisub thourgh the installer program.
Then it seems like it was indeed an issue with your configuration.
I also have this problem, and not only with this fork, but also Daydream Cafe Edition. If a specific lua version's required, it should be used and bundled. The official aegisub doesn't exhibit such a problem.
22:04:58: Multiple scripts in the Automation autoload directory failed to load.
Please review the errors, fix them and use the Rescan Autoload Dir button in Automation Manager to load the scripts again.
22:04:58: Failed to load Automation script '...\aegisub\automation\autoload\macro-1-edgeblur.lua':
[string "require('unicode-monkeypatch')"]:1: module 'unicode-monkeypatch' not found:
no field package.preload['unicode-monkeypatch']
no file '~\scoop\apps\lua\current'
22:04:58: Failed to load Automation script '...\aegisub\automation\autoload\macro-2-mkfullwitdh.lua':
[string "require('unicode-monkeypatch')"]:1: module 'unicode-monkeypatch' not found:
no field package.preload['unicode-monkeypatch']
no file '~\scoop\apps\lua\current'
22:04:58: Failed to load Automation script '...\aegisub\automation\autoload\kara-templater.lua':
[string "require('unicode-monkeypatch')"]:1: module 'unicode-monkeypatch' not found:
no field package.preload['unicode-monkeypatch']
no file '~\scoop\apps\lua\current'
22:04:58: Failed to load Automation script '...\aegisub\automation\autoload\l0.DependencyControl.Toolbox.moon':
[string "require('unicode-monkeypatch')"]:1: module 'unicode-monkeypatch' not found:
no field package.preload['unicode-monkeypatch']
no file '~\scoop\apps\lua\current'
22:04:58: Failed to load Automation script '...\aegisub\automation\autoload\select-overlaps.moon':
[string "require('unicode-monkeypatch')"]:1: module 'unicode-monkeypatch' not found:
no field package.preload['unicode-monkeypatch']
no file '~\scoop\apps\lua\current'
22:04:58: Failed to load Automation script '...\aegisub\automation\autoload\karaoke-auto-leadin.lua':
[string "require('unicode-monkeypatch')"]:1: module 'unicode-monkeypatch' not found:
no field package.preload['unicode-monkeypatch']
no file '~\scoop\apps\lua\current'
22:04:58: Failed to load Automation script '...\aegisub\automation\autoload\cleantags-autoload.lua':
[string "require('unicode-monkeypatch')"]:1: module 'unicode-monkeypatch' not found:
no field package.preload['unicode-monkeypatch']
no file '~\scoop\apps\lua\current'
22:04:58: Failed to load Automation script '...\aegisub\automation\autoload\strip-tags.lua':
[string "require('unicode-monkeypatch')"]:1: module 'unicode-monkeypatch' not found:
no field package.preload['unicode-monkeypatch']
no file '~\scoop\apps\lua\current'
If a specific lua version's required, it should be used and bundled.
And that is indeed what's being done on all releases.
As said above, whatever scoop package you are using is not maintained by me. This issue does not happen for the windows release bundles (nor for the CI artifacts), so it's an issue with this scoop port and should be reported there.
The scoop ports don't do anything outside of unzipping a portable install, I have the same issue on portable installs.
Portable installs work fine on my end. Are you sure that your portable install is a completely clean one? Do you have any environment variables messing with the lua package path?
I do have a lua env var, same as @zerodegress, but that's a standard env var, if you have a portable install that requires specific deps, you need to either overwrite the env var witin scope for the program launch, or not read it at all, this isn't a user error.
The package path is being overwritten here https://github.com/arch1t3cht/Aegisub/blob/91b198d12d44ab4c3d2489a74547c40993102f9a/libaegisub/lua/script_reader.cpp#L124-L141
I cannot reproduce your issue when setting LUA_PATH or LUA_CPATH environment variables (and according to the lua documentation, C modules are tried after lua modules so LUA_CPATH should not be relevant for finding lua modules).
If you have a scenario where an untouched build (portable or otherwise) fails to start, I suggest you give a clear list of steps to reproduce on a clean install (in particular including your environment variables) instead of vague descriptions and condescending comments. If there is an actual issue on Aegisub's side here I'd like to fix it as much as you do, but I cannot do anything with the information I currently have.
looks like that it uses my own lua installation,not its own.