rocksdanister / lively

Free and open-source software that allows users to set animated desktop wallpapers and screensavers powered by WinUI 3.
https://rocksdanister.com/lively
GNU General Public License v3.0
15.29k stars 1.07k forks source link

eDEX UI can't be added #450

Closed No3371 closed 3 years ago

No3371 commented 3 years ago

Describe the bug When I drop eDEX-UI.exe into Lively A small window with title 資料庫 (Database) (Figure 2) is opened if I close the window, the newly added entry (Figure 1) in Lively window is removed

To Reproduce Drop eDEX-UI.exe into Lively

Expected behavior Proceed to add wallpaper

Screenshots/Video 圖片

Desktop (please complete the following information):

Additional context Note: to disable the loading animation of eDEX-UI we must command/ctrl + alt + s in eDEX-UI and set the nointro to true

Log file (Important) It basically just stuck at 處理中... (Processing...) whenver eDEX-UI is dropped into, nothing more is logged.

``` 2021-04-14 09:36:45.0238|INFO|livelywpf.NLogger| Lively v1.3.0.0 zh-TW 64Bit:False MSIX:False OS: Microsoft Windows 10 Pro 10.0.18363 CPU: Intel(R) Core(TM) i7-9700 CPU @ 3.00GHz GPU: NVIDIA GeForce GTX 1080 2021-04-14 09:36:45.1634|ERROR|livelywpf.SettingsViewModel|System.IO.FileNotFoundException: Could not find file 'C:\Users\user\AppData\Local\Lively Wallpaper\Settings.json'. File name: 'C:\Users\user\AppData\Local\Lively Wallpaper\Settings.json' at System.IO.FileStream.ValidateFileHandle(SafeFileHandle fileHandle) at System.IO.FileStream.CreateFileOpenHandle(FileMode mode, FileShare share, FileOptions options) at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, FileOptions options) at System.IO.StreamReader.ValidateArgsAndOpenPath(String path, Encoding encoding, Int32 bufferSize) at System.IO.StreamReader..ctor(String path) at System.IO.File.OpenText(String path) at livelywpf.Helpers.JsonStorage`1.LoadData(String filePath) in C:\Users\rocks\source\repos\livelywpf\livelywpf\Helpers\Storage\JsonStorage.cs:line 12 at livelywpf.SettingsViewModel..ctor() in C:\Users\rocks\source\repos\livelywpf\livelywpf\ViewModel\SettingsViewModel.cs:line 26 2021-04-14 09:36:56.7270|ERROR|livelywpf.ApplicationRulesViewModel|System.IO.FileNotFoundException: Could not find file 'C:\Users\user\AppData\Local\Lively Wallpaper\AppRules.json'. File name: 'C:\Users\user\AppData\Local\Lively Wallpaper\AppRules.json' at System.IO.FileStream.ValidateFileHandle(SafeFileHandle fileHandle) at System.IO.FileStream.CreateFileOpenHandle(FileMode mode, FileShare share, FileOptions options) at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, FileOptions options) at System.IO.StreamReader.ValidateArgsAndOpenPath(String path, Encoding encoding, Int32 bufferSize) at System.IO.StreamReader..ctor(String path) at System.IO.File.OpenText(String path) at livelywpf.Helpers.JsonStorage`1.LoadData(String filePath) in C:\Users\rocks\source\repos\livelywpf\livelywpf\Helpers\Storage\JsonStorage.cs:line 12 at livelywpf.ApplicationRulesViewModel..ctor() in C:\Users\rocks\source\repos\livelywpf\livelywpf\ViewModel\ApplicationRulesViewModel.cs:line 18 2021-04-14 09:36:56.7597|INFO|livelywpf.LibraryViewModel|Loading Wallpaper(relative):- C:\Users\user\AppData\Local\Lively Wallpaper\Library\wallpapers\0wj1biqk.f41\fluid.html webaudio 2021-04-14 09:36:56.7597|INFO|livelywpf.LibraryViewModel|Loading Wallpaper(relative):- C:\Users\user\AppData\Local\Lively Wallpaper\Library\wallpapers\4kgcos4n.kal\waves.html web 2021-04-14 09:36:56.7597|INFO|livelywpf.LibraryViewModel|Loading Wallpaper(relative):- C:\Users\user\AppData\Local\Lively Wallpaper\Library\wallpapers\aahrtq0t.dme\index.html web 2021-04-14 09:36:56.7597|INFO|livelywpf.LibraryViewModel|Loading Wallpaper(relative):- C:\Users\user\AppData\Local\Lively Wallpaper\Library\wallpapers\gdkyowfb.3tk\eternal_light_version2.mp4 video 2021-04-14 09:36:56.7597|INFO|livelywpf.LibraryViewModel|Loading Wallpaper(relative):- C:\Users\user\AppData\Local\Lively Wallpaper\Library\wallpapers\iqdvd4pt.jyo\triangle.html web 2021-04-14 09:36:56.7597|INFO|livelywpf.LibraryViewModel|Loading Wallpaper(relative):- C:\Users\user\AppData\Local\Lively Wallpaper\Library\wallpapers\lgz4xpht.sjn\index.html web 2021-04-14 09:36:56.7597|INFO|livelywpf.LibraryViewModel|Loading Wallpaper(relative):- C:\Users\user\AppData\Local\Lively Wallpaper\Library\wallpapers\mrn3a0m5.0lk\index.html web 2021-04-14 09:36:56.7597|INFO|livelywpf.LibraryViewModel|Loading Wallpaper(relative):- C:\Users\user\AppData\Local\Lively Wallpaper\Library\wallpapers\nps35xrp.5eh\jellyfish.html web 2021-04-14 09:36:56.7597|INFO|livelywpf.LibraryViewModel|Loading Wallpaper(relative):- C:\Users\user\AppData\Local\Lively Wallpaper\Library\wallpapers\ptpcxvcd.hlz\index.html web 2021-04-14 09:36:56.7597|INFO|livelywpf.LibraryViewModel|Loading Wallpaper(relative):- C:\Users\user\AppData\Local\Lively Wallpaper\Library\wallpapers\rtnm43pj.wyl\index.html web 2021-04-14 09:36:56.7597|INFO|livelywpf.LibraryViewModel|Loading Wallpaper(relative):- C:\Users\user\AppData\Local\Lively Wallpaper\Library\wallpapers\v44be4yd.a1r\ribbon.html web 2021-04-14 09:36:56.7597|INFO|livelywpf.LibraryViewModel|Loading Wallpaper(relative):- C:\Users\user\AppData\Local\Lively Wallpaper\Library\wallpapers\xn0quq52.bq2\index.html web 2021-04-14 09:36:57.6109|INFO|livelywpf.SetupDesktop|Core: Wallpaper input setup=> mouse 2021-04-14 09:36:58.0453|ERROR|livelywpf.SetupDesktop|Core: Failed to restore wallpaper=>System.IO.FileNotFoundException: Could not find file 'C:\Users\user\AppData\Local\Lively Wallpaper\WallpaperLayout.json'. File name: 'C:\Users\user\AppData\Local\Lively Wallpaper\WallpaperLayout.json' at System.IO.FileStream.ValidateFileHandle(SafeFileHandle fileHandle) at System.IO.FileStream.CreateFileOpenHandle(FileMode mode, FileShare share, FileOptions options) at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, FileOptions options) at System.IO.StreamReader.ValidateArgsAndOpenPath(String path, Encoding encoding, Int32 bufferSize) at System.IO.StreamReader..ctor(String path) at System.IO.File.OpenText(String path) at livelywpf.Helpers.JsonStorage`1.LoadData(String filePath) in C:\Users\rocks\source\repos\livelywpf\livelywpf\Helpers\Storage\JsonStorage.cs:line 12 at livelywpf.SetupDesktop.RestoreWallpaperFromSave() in C:\Users\rocks\source\repos\livelywpf\livelywpf\Core\SetupDesktop.cs:line 702 2021-04-14 09:37:40.4560|INFO|livelywpf.Views.LibraryView|Dropped file=>C:\Users\user\AppData\Local\Programs\eDEX-UI\eDEX-UI.exe 2021-04-14 09:37:43.0056|INFO|livelywpf.SetupDesktop|Core: Setting Wallpaper=>處理中... C:\Users\user\AppData\Local\Programs\eDEX-UI\eDEX-UI.exe 2021-04-14 09:37:43.0698|INFO|livelywpf.SetupDesktop|Core Initialized 2021-04-14 09:38:28.7645|INFO|livelywpf.Views.LibraryView|Dropped file=>C:\Program Files\Everything\Everything.exe 2021-04-14 09:38:30.6001|INFO|livelywpf.SetupDesktop|Core: Setting Wallpaper=>處理中... C:\Program Files\Everything\Everything.exe 2021-04-14 09:38:31.1236|ERROR|livelywpf.SetupDesktop|Core: Failed to launch wallpaper=>:( System.AggregateException: One or more errors occurred. (No process is associated with this object.) ---> System.InvalidOperationException: No process is associated with this object. at System.Diagnostics.Process.EnsureState(State state) at System.Diagnostics.Process.EnsureState(State state) at livelywpf.Core.ExtPrograms.WaitForProcesWindow() in C:\Users\rocks\source\repos\livelywpf\livelywpf\Core\Wallpapers\ExtPrograms.cs:line 247 --- End of inner exception stack trace --- at System.Threading.Tasks.Task.ThrowIfExceptional(Boolean includeTaskCanceledExceptions) at System.Threading.Tasks.Task`1.GetResultCore(Boolean waitCompletionNotification) at System.Threading.Tasks.Task`1.get_Result() at livelywpf.Core.ExtPrograms.b__24_0() in C:\Users\rocks\source\repos\livelywpf\livelywpf\Core\Wallpapers\ExtPrograms.cs:line 156 at System.Threading.Tasks.Task`1.InnerInvoke() at System.Threading.Tasks.Task.<>c.<.cctor>b__274_0(Object obj) at System.Threading.ExecutionContext.RunFromThreadPoolDispatchLoop(Thread threadPoolThread, ExecutionContext executionContext, ContextCallback callback, Object state) --- End of stack trace from previous location where exception was thrown --- at System.Threading.ExecutionContext.RunFromThreadPoolDispatchLoop(Thread threadPoolThread, ExecutionContext executionContext, ContextCallback callback, Object state) at System.Threading.Tasks.Task.ExecuteWithThreadLocal(Task& currentTaskSlot, Thread threadPoolThread) --- End of stack trace from previous location where exception was thrown --- at livelywpf.Core.ExtPrograms.Show() in C:\Users\rocks\source\repos\livelywpf\livelywpf\Core\Wallpapers\ExtPrograms.cs:line 157 2021-04-14 09:38:44.9414|INFO|livelywpf.SetupDesktop|Core: Setting Wallpaper=>處理中... C:\Program Files\Everything\Everything.exe 2021-04-14 09:38:59.2931|INFO|livelywpf.SetupDesktop|Core: Setting Wallpaper=>處理中... C:\Program Files\Everything\Everything.exe 2021-04-14 09:38:59.2931|INFO|livelywpf.SetupDesktop|Core: Skipping, wallpaper already queued/screen not found=>\\.\DISPLAY2 2021-04-14 09:39:01.3782|ERROR|livelywpf.Views.WallpaperPreviewWindow|Wallpaper Preview: Failed to launch wallpaper=>:( System.AggregateException: One or more errors occurred. (No process is associated with this object.) ---> System.InvalidOperationException: No process is associated with this object. at System.Diagnostics.Process.EnsureState(State state) at System.Diagnostics.Process.EnsureState(State state) at livelywpf.Core.ExtPrograms.WaitForProcesWindow() in C:\Users\rocks\source\repos\livelywpf\livelywpf\Core\Wallpapers\ExtPrograms.cs:line 247 --- End of inner exception stack trace --- at System.Threading.Tasks.Task.ThrowIfExceptional(Boolean includeTaskCanceledExceptions) at System.Threading.Tasks.Task`1.GetResultCore(Boolean waitCompletionNotification) at System.Threading.Tasks.Task`1.get_Result() at livelywpf.Core.ExtPrograms.b__24_0() in C:\Users\rocks\source\repos\livelywpf\livelywpf\Core\Wallpapers\ExtPrograms.cs:line 156 at System.Threading.Tasks.Task`1.InnerInvoke() at System.Threading.Tasks.Task.<>c.<.cctor>b__274_0(Object obj) at System.Threading.ExecutionContext.RunFromThreadPoolDispatchLoop(Thread threadPoolThread, ExecutionContext executionContext, ContextCallback callback, Object state) --- End of stack trace from previous location where exception was thrown --- at System.Threading.ExecutionContext.RunFromThreadPoolDispatchLoop(Thread threadPoolThread, ExecutionContext executionContext, ContextCallback callback, Object state) at System.Threading.Tasks.Task.ExecuteWithThreadLocal(Task& currentTaskSlot, Thread threadPoolThread) --- End of stack trace from previous location where exception was thrown --- at livelywpf.Core.ExtPrograms.Show() in C:\Users\rocks\source\repos\livelywpf\livelywpf\Core\Wallpapers\ExtPrograms.cs:line 157 2021-04-14 09:39:04.4788|ERROR|livelywpf.NLogger|failed to set custom parent, HRESULT:1400 2021-04-14 09:39:05.6535|ERROR|livelywpf.SetupDesktop|Core: Failed to launch wallpaper=>:( System.AggregateException: One or more errors occurred. (No process is associated with this object.) ---> System.InvalidOperationException: No process is associated with this object. at System.Diagnostics.Process.EnsureState(State state) at System.Diagnostics.Process.EnsureState(State state) at livelywpf.Core.ExtPrograms.WaitForProcesWindow() in C:\Users\rocks\source\repos\livelywpf\livelywpf\Core\Wallpapers\ExtPrograms.cs:line 247 --- End of inner exception stack trace --- at System.Threading.Tasks.Task.ThrowIfExceptional(Boolean includeTaskCanceledExceptions) at System.Threading.Tasks.Task`1.GetResultCore(Boolean waitCompletionNotification) at System.Threading.Tasks.Task`1.get_Result() at livelywpf.Core.ExtPrograms.b__24_0() in C:\Users\rocks\source\repos\livelywpf\livelywpf\Core\Wallpapers\ExtPrograms.cs:line 156 at System.Threading.Tasks.Task`1.InnerInvoke() at System.Threading.Tasks.Task.<>c.<.cctor>b__274_0(Object obj) at System.Threading.ExecutionContext.RunFromThreadPoolDispatchLoop(Thread threadPoolThread, ExecutionContext executionContext, ContextCallback callback, Object state) --- End of stack trace from previous location where exception was thrown --- at System.Threading.ExecutionContext.RunFromThreadPoolDispatchLoop(Thread threadPoolThread, ExecutionContext executionContext, ContextCallback callback, Object state) at System.Threading.Tasks.Task.ExecuteWithThreadLocal(Task& currentTaskSlot, Thread threadPoolThread) --- End of stack trace from previous location where exception was thrown --- at livelywpf.Core.ExtPrograms.Show() in C:\Users\rocks\source\repos\livelywpf\livelywpf\Core\Wallpapers\ExtPrograms.cs:line 157 2021-04-14 09:39:19.5162|INFO|livelywpf.Views.LibraryView|Dropped file=>C:\Users\user\AppData\Local\Programs\eDEX-UI\eDEX-UI.exe 2021-04-14 09:39:21.6045|INFO|livelywpf.SetupDesktop|Core: Setting Wallpaper=>處理中... C:\Users\user\AppData\Local\Programs\eDEX-UI\eDEX-UI.exe 2021-04-14 09:41:15.9763|INFO|livelywpf.Views.LibraryView|Dropped file=>C:\Users\user\AppData\Local\Programs\eDEX-UI\eDEX-UI.exe 2021-04-14 09:41:17.6972|INFO|livelywpf.SetupDesktop|Core: Setting Wallpaper=>處理中... C:\Users\user\AppData\Local\Programs\eDEX-UI\eDEX-UI.exe 2021-04-14 09:45:43.0916|INFO|livelywpf.Views.LibraryView|Dropped file=>C:\Users\user\AppData\Local\Programs\eDEX-UI\eDEX-UI.exe 2021-04-14 09:45:44.5859|INFO|livelywpf.SetupDesktop|Core: Setting Wallpaper=>處理中... C:\Users\user\AppData\Local\Programs\eDEX-UI\eDEX-UI.exe 2021-04-14 09:57:22.4783|INFO|livelywpf.Views.LibraryView|Dropped file=>C:\Users\user\AppData\Local\Programs\eDEX-UI\eDEX-UI.exe 2021-04-14 09:57:24.6245|INFO|livelywpf.SetupDesktop|Core: Setting Wallpaper=>處理中... C:\Users\user\AppData\Local\Programs\eDEX-UI\eDEX-UI.exe ```
rocksdanister commented 3 years ago

Its because eDEX is trying to go fullscreen on its own, not listening to Lively. (Lively resizes application into small window and embeds it into Lively's own window for screen capture preview gif when importing..)

You will have to manually create Lively .zip file and import it that way to skip the import wizard:

  1. Create new folder, copy eDEX files into it.
  2. Create LivelyInfo.json
    {
    "AppVersion": "1.3.0.1",
    "Title": "W3Clock",
    "Thumbnail": "lively_t.jpg",
    "Preview": "lively_p.gif",
    "Desc": null,
    "Author": null,
    "License": null,
    "Contact": null,
    "Type": 0,
    "FileName": "eDEX-UI.exe",
    "Arguments": null,
    "IsAbsolutePath": false
    }
  3. Create zip file of the folder, making sure LivelyInfo.json is in root folder.
  4. Drag'n'drop the created Lively .zip file.
    1. If eDEX supports commandline arguments then see if there is an argument for disabling fullscreen mode and add that to the "Arguments" of LivelyInfo.json... otherwise it will not work properly with multimonitor setups since it wont listen to Lively's commands.

Further read: https://github.com/rocksdanister/lively/wiki/Application-Wallpaper

rocksdanister commented 3 years ago

Duplicate https://github.com/rocksdanister/lively/issues/328

No3371 commented 3 years ago

Thank you, sorry for not carefully investigating first!

No3371 commented 3 years ago

It seems to work without step 5, maybe it's because eDEX is already fullscreen windowed by default.

rocksdanister commented 3 years ago

If its single screen it does not matter too much.. but if u have multiple monitors setup in different alignment in windows then https://github.com/rocksdanister/lively/issues/328 will happen since the app won't listen to Lively's position and sizing instructions.

No3371 commented 3 years ago

I do have 2 monitors and eDEX does obey Lively monitor selection, and it renders correctly😮

No3371 commented 3 years ago

in different alignment

Ah, i see, both my monitors are in landscape!

Anyway thanks for the quick reply, very helpful 😄

rocksdanister commented 3 years ago

Desktop does not support input forwarding to child windows (wallpapers are set as child window to desktop.) so Lively is manually doing it instead: https://github.com/rocksdanister/lively/blob/d6bc1919741417bbd5159fb6bf9bd62e1b1dabf8/src/livelywpf/livelywpf/Core/InputForwarding/RawInputDX.xaml.cs#L162-L201

It might not work in some applications depending on how its implementing input, since it is application wallpaper you can create your own input hooks within it by editing the source code if you are familiar.

No3371 commented 3 years ago

It seems like it's not that complex, I found the input option in Lively settings, switch it to keyboard and it works. (so I deleted that comment)

eDEX-UI has a digital keyboard and I believe it handles redirecting on its own.

Thank you!

rocksdanister commented 3 years ago

ah right.. Yeah keyboard input is disabled by default for privacy/security reasons.