HydrogenAudio

Hosted Forums => foobar2000 => 3rd Party Plugins - (fb2k) => Topic started by: TT on 2021-11-27 17:50:35

Title: Wine/Spider Monkey Panel/Script bugs on Linux
Post by: TT on 2021-11-27 17:50:35
Hi,

this thread should be an overview and troubleshooting of Wine/Spider Monkey Panel/Script bugs on Linux.
Most reported bugs are scattered in various threads which is not ideal. If you find a bug or a fix please report it here, thanks!

Bugs:
https://theqwertiest.github.io/foo_spider_monkey_panel/docs/faq/wine
https://github.com/TT-ReBORN/Georgia-ReBORN/issues/2


Title: Re: Wine/Spider Monkey Panel/Script bugs on Linux
Post by: TT on 2021-11-27 18:03:27
Drag and drop bug for all themes using TheQwertiest playlist script e.g CatRox/Georgia/Georgia-ReBORN etc...
( Drag and drop works in the window if you use Files -> Add files/folder ).

Wine bug reported here (https://bugs.winehq.org/show_bug.cgi?id=51772).

----------------------------------------------------------------------------------------------------------------------

WilB's library and biography script bugs:

Library options menu and Library right click search context menu crashes foobar.

Biography does not download and save ( to HDD ) artist images ( last.fm and allmusic ) and
Biography options plus Biography right click context menu crashes foobar.

----------------------------------------------------------------------------------------------------------------------

WilB's comment:

Quote
Regarding saving images, as noted above, the first part of the process is to call windows cscript that's run through ActiveXObject('WScript.Shell').
This in turn calls an external .vbs file that streams and saves the images. To do this, the .vbs file uses a number of further objects:

Code: [Select]
Createobject("Scripting.FileSystemObject")

CreateObject("MSXML2.XMLHTTP")

CreateObject("ADODB.Stream")

I guess as these are in an external file they're normally run by windows & may be independent of SMP.

I think it would need someone with coding skills running Linux (which I don't have & so can't test anything) to debug exactly where it's failing and to see if it's possible to work around it.
Otherwise SMP may need to be updated with new methods.

Right-click error is due to: doc.parentWindow.clipboardData.getData, where doc is ActiveXObject('htmlfile').
So the error seems to be due to some issue with that ActiveXObject method in Linux .
It's used to paste from clipboard. So another way of accessing the clipboard may be needed, or comment out usage.

Options uses the SMP ShowHtmlDialog. ShowHtmlDialog v2 is in SMP current tasks and plans.
Title: Re: Wine/Spider Monkey Panel/Script bugs on Linux
Post by: TT on 2021-11-27 18:32:42
Bugs reported and tested with Wine 6.02 stable and SMP 1.5.2.
Title: Re: Wine/Spider Monkey Panel/Script bugs on Linux
Post by: razielanarki on 2021-11-27 21:05:42
so i've checked, these activecx controls should-be in wine by default.

( windows scriptintg: https://github.com/wine-mirror/wine/tree/master/dlls/scrrun , xmlhttp & htmlfile : https://github.com/wine-mirror/wine/tree/master/dlls/mshtml / https://github.com/wine-mirror/wine/tree/master/dlls/msxtml1 .. 6, adodb: https://github.com/wine-mirror/wine/tree/master/dlls/msado15 )

so they shoud be under the wineroot's system32.

i'm thinking that maybe the activex compoments were not registered , you you coule try manually regitistering?
https://www.lifewire.com/regsvr32-what-it-is-how-to-register-dlls-2623958)

basically it's like a:
> cd windows/system32  (for b32bits w 32bits foobar, or windows/sysWOW64 (if wine has it) for 64bits)
> regsvr32 filename.dll

or maybe loading the into the fb process  process with ui_hacks.? (i think that whats this "portability" thing is for at least)

X

also: some googling reveleaded this, so could be disabled on wine (win too)
https://nakedsecurity.sophos.com/2021/09/08/windows-zero-day-mshtml-attack-how-not-to-get-booby-trapped/


++ eeither way ++ if you could capture the fb2k console log, or some other logfile, that would be of great help.

Title: Re: Wine/Spider Monkey Panel/Script bugs on Linux
Post by: TT on 2021-11-28 19:15:46
Hi @razielanarki,

registering the dll's does not help...

It seems there is a problem with vbscript and mshtml, here is a log from the konsole:

Code: [Select]
[media@xero-pc foobar2k]$ WINEPREFIX=~/AppImages/foobar2k/wine-files ./wine ~/AppImages/foobar2k/foobar20
00/foobar2000.exe
006c:err:vulkan:get_vulkan_driver Wine was built without Vulkan support.
0024:fixme:msvcrt:_set_abort_behavior _WRITE_CALL_REPORTFAULT unhandled
0024:fixme:heap:RtlSetHeapInformation 04070000 0 04049034 4 stub
0024:fixme:mmdevapi:AEV_RegisterControlChangeNotify stub
0024:fixme:mmdevapi:AEV_GetMasterVolumeLevelScalar stub
0024:fixme:mmdevapi:MMDevice_Activate IID_IDeviceTopology unsupported
0024:fixme:pulse:AudioSessionManager_RegisterDuckNotification (0xb89d60)->(0x4074614) - stub
0024:fixme:win:RegisterShellHookWindow (00010050): stub
0024:fixme:ntdll:NtQuerySystemInformation info_class SYSTEM_PERFORMANCE_INFORMATION
0134:fixme:kernelbase:AppPolicyGetThreadInitializationType FFFFFFFA, 0DDAFF08
0138:fixme:kernelbase:AppPolicyGetThreadInitializationType FFFFFFFA, 0E0DFF08
0024:fixme:mlang:fnIMultiLanguage3_DetectInputCodepage 
0024:fixme:win:LockWindowUpdate (00010066), partial stub!
0024:fixme:win:LockWindowUpdate (00000000), partial stub!
0024:fixme:mlang:fnIMultiLanguage3_DetectInputCodepage 
0024:fixme:mlang:fnIMultiLanguage3_DetectInputCodepage 
0024:fixme:mlang:fnIMultiLanguage3_DetectInputCodepage 
0024:fixme:mlang:fnIMultiLanguage3_DetectInputCodepage 
0024:fixme:mlang:fnIMultiLanguage3_DetectInputCodepage 
0024:fixme:mlang:fnIMultiLanguage3_DetectInputCodepage 
0024:fixme:mlang:fnIMultiLanguage3_DetectInputCodepage 
0160:fixme:iphlpapi:NotifyIpInterfaceChange (family 0, callback 0x24529460, context 0x170480a8, init_noti
fy 0, handle 0xf3ffdf0): stub
0024:fixme:imm:ImmGetDescriptionW (04090409, 00000000, 0): semi stub
0024:fixme:imm:ImmGetDescriptionW (04090409, 171C5FA8, 9): semi stub
0024:fixme:msctf:InputProcessorProfileMgr_GetActiveProfile (22160FC8)->({34745c63-b2f0-4784-8b67-5e12c870
1a31} 0031E474)
0024:fixme:file:NtLockFile I/O completion on lock not implemented yet
0024:fixme:mlang:fnIMultiLanguage3_DetectInputCodepage 
0024:fixme:mlang:fnIMultiLanguage3_DetectInputCodepage 
0024:fixme:mlang:fnIMultiLanguage3_DetectInputCodepage 
0024:fixme:mlang:fnIMultiLanguage3_DetectInputCodepage 
0024:fixme:mlang:fnIMultiLanguage3_DetectInputCodepage 
0024:fixme:mlang:fnIMultiLanguage3_DetectInputCodepage 
0024:fixme:msxml:BindStatusCallback_QueryInterface Unsupported riid = {79eac9e1-baf9-11ce-8c82-00aa004ba9
0b}
0024:fixme:urlmon:InternetBindInfo_GetBindString not supported string type 20
01a4:fixme:ntdll:NtCreatePowerRequest (0x2d7bf938, 0x2d7bf93c): stub
01a4:fixme:avrt:AvSetMmThreadCharacteristicsW (L"Audio",2D7BFB84): stub
01a8:fixme:avrt:AvSetMmThreadCharacteristicsW (L"Audio",2D8CFF08): stub
01b4:fixme:ver:GetCurrentPackageId (2DD9FF30 00000000): stub
0024:fixme:msvcp:_Locinfo__Locinfo_ctor_cat_cstr (0031CD8C 1 C) semi-stub
0024:fixme:msvcp:_Locinfo__Locinfo_ctor_cat_cstr (0031CAA4 1 C) semi-stub
01a4:fixme:avrt:AvRevertMmThreadCharacteristics (12345678): stub
01a8:fixme:avrt:AvRevertMmThreadCharacteristics (12345678): stub
01a4:fixme:ntdll:NtCreatePowerRequest (0x2d7bf938, 0x2d7bf93c): stub
01a4:fixme:avrt:AvSetMmThreadCharacteristicsW (L"Audio",2D7BFB84): stub
0210:fixme:avrt:AvSetMmThreadCharacteristicsW (L"Audio",20DFFF08): stub
0024:fixme:urlmon:InternetBindInfo_GetBindString not supported string type 20
029c:fixme:wmvcore:WMSyncReader_OpenStream (22280770)->(17D45D30): stub!
029c:fixme:wmvcore:WMSyncReader_QueryInterface (22280770)->({96406bdb-2b2b-11d3-b36b-00c04f6108ff} 378FFA
D4)
029c:fixme:wmvcore:WMSyncReader_Close (22280770): stub!
02a0:fixme:wmvcore:WMSyncReader_OpenStream (0DDF72E0)->(17D45D30): stub!
02a0:fixme:wmvcore:WMSyncReader_QueryInterface (0DDF72E0)->({96406bdb-2b2b-11d3-b36b-00c04f6108ff} 377EFA
D4)
02a0:fixme:wmvcore:WMSyncReader_Close (0DDF72E0): stub!
02a4:fixme:wmvcore:WMSyncReader_OpenStream (0DDF72E0)->(17550730): stub!
02a4:fixme:wmvcore:WMSyncReader_QueryInterface (0DDF72E0)->({96406bdb-2b2b-11d3-b36b-00c04f6108ff} 378FFA
D4)
02a4:fixme:wmvcore:WMSyncReader_Close (0DDF72E0): stub!
02a8:fixme:wmvcore:WMSyncReader_OpenStream (0DDF72E0)->(17550730): stub!
02a8:fixme:wmvcore:WMSyncReader_QueryInterface (0DDF72E0)->({96406bdb-2b2b-11d3-b36b-00c04f6108ff} 377EFA
D4)
02a8:fixme:wmvcore:WMSyncReader_Close (0DDF72E0): stub!
02ac:fixme:wmvcore:WMSyncReader_OpenStream (0DDF72E0)->(17550730): stub!
02ac:fixme:wmvcore:WMSyncReader_QueryInterface (0DDF72E0)->({96406bdb-2b2b-11d3-b36b-00c04f6108ff} 378FFA
D4)
02ac:fixme:wmvcore:WMSyncReader_Close (0DDF72E0): stub!
02b0:fixme:wmvcore:WMSyncReader_OpenStream (0DDF72E0)->(17550730): stub!
02b0:fixme:wmvcore:WMSyncReader_QueryInterface (0DDF72E0)->({96406bdb-2b2b-11d3-b36b-00c04f6108ff} 377EFA
D4)
02b0:fixme:wmvcore:WMSyncReader_Close (0DDF72E0): stub!
02b4:fixme:wmvcore:WMSyncReader_OpenStream (0DDF72E0)->(17550730): stub!
02b4:fixme:wmvcore:WMSyncReader_QueryInterface (0DDF72E0)->({96406bdb-2b2b-11d3-b36b-00c04f6108ff} 378FFA
D4)
02b4:fixme:wmvcore:WMSyncReader_Close (0DDF72E0): stub!
02b8:fixme:wmvcore:WMSyncReader_OpenStream (0DDF72E0)->(17550730): stub!
02b8:fixme:wmvcore:WMSyncReader_QueryInterface (0DDF72E0)->({96406bdb-2b2b-11d3-b36b-00c04f6108ff} 377EFA
D4)
02b8:fixme:wmvcore:WMSyncReader_Close (0DDF72E0): stub!
02bc:fixme:wmvcore:WMSyncReader_OpenStream (0DDF72E0)->(17B579A8): stub!
02bc:fixme:wmvcore:WMSyncReader_QueryInterface (0DDF72E0)->({96406bdb-2b2b-11d3-b36b-00c04f6108ff} 378FFA
D4)
02bc:fixme:wmvcore:WMSyncReader_Close (0DDF72E0): stub!
02c0:fixme:wmvcore:WMSyncReader_OpenStream (0DDF72E0)->(17550730): stub!
02c0:fixme:wmvcore:WMSyncReader_QueryInterface (0DDF72E0)->({96406bdb-2b2b-11d3-b36b-00c04f6108ff} 377EFA
D4)
02c0:fixme:wmvcore:WMSyncReader_Close (0DDF72E0): stub!
0024:fixme:urlmon:InternetBindInfo_GetBindString not supported string type 20
0024:fixme:urlmon:InternetBindInfo_GetBindString not supported string type 20
0148:fixme:wininet:set_cookie secure not handled
0024:fixme:urlmon:InternetBindInfo_GetBindString not supported string type 20
019c:fixme:wininet:set_cookie secure not handled
0024:fixme:urlmon:InternetBindInfo_GetBindString not supported string type 20
0148:fixme:wininet:set_cookie secure not handled
0024:fixme:urlmon:InternetBindInfo_GetBindString not supported string type 20
0148:fixme:wininet:set_cookie secure not handled
0024:fixme:urlmon:InternetBindInfo_GetBindString not supported string type 20
019c:fixme:wininet:set_cookie secure not handled
0024:fixme:mshtml:InternetProtocol_Abort (22209570)->(80004004 00000000)
0024:err:mshtml:read_stream_data OnDataAvailable failed: 804b0002
0024:err:mshtml:on_stop_nsrequest RemoveRequest failed: 80004005
0024:fixme:urlmon:InternetBindInfo_GetBindString not supported string type 20
0024:fixme:urlmon:InternetBindInfo_GetBindString not supported string type 20
0024:fixme:mshtml:InternetProtocol_Abort (2222FA58)->(80004004 00000000)
0024:err:mshtml:read_stream_data OnDataAvailable failed: 804b0002
0024:err:mshtml:on_stop_nsrequest RemoveRequest failed: 80004005
0330:fixme:wscript:set_host_properties ignored L"nologo" switch
0024:fixme:mshtml:InternetProtocol_Abort (222C84A0)->(80004004 00000000)
0024:err:mshtml:read_stream_data OnDataAvailable failed: 804b0002
0024:err:mshtml:on_stop_nsrequest RemoveRequest failed: 80004005
0024:fixme:mshtml:InternetProtocol_Abort (222C86D8)->(80004004 00000000)
0024:err:mshtml:read_stream_data OnDataAvailable failed: 804b0002
0024:err:mshtml:on_stop_nsrequest RemoveRequest failed: 80004005
0024:fixme:urlmon:InternetBindInfo_GetBindString not supported string type 20
0024:fixme:urlmon:InternetBindInfo_GetBindString not supported string type 20
0024:fixme:urlmon:InternetBindInfo_GetBindString not supported string type 20
0024:fixme:urlmon:InternetBindInfo_GetBindString not supported string type 20
0330:fixme:msxml:ClassFactory_QueryInterface interface {342d1ea0-ae25-11d1-89c5-006008c3fbfc} not impleme
nted
0330:err:vbscript:create_ax_site Could not get IServiceProvider iface: 80004002
0330:fixme:wscript:ActiveScriptSite_OnScriptError ()
0024:fixme:urlmon:InternetBindInfo_GetBindString not supported string type 20
0024:fixme:urlmon:InternetBindInfo_GetBindString not supported string type 20
0024:fixme:urlmon:InternetBindInfo_GetBindString not supported string type 20
0024:fixme:mshtml:InternetProtocol_Abort (22510F40)->(80004004 00000000)
0024:err:mshtml:read_stream_data OnDataAvailable failed: 804b0002
0024:err:mshtml:on_stop_nsrequest RemoveRequest failed: 80004005
0024:fixme:urlmon:InternetBindInfo_GetBindString not supported string type 20
0024:fixme:urlmon:InternetBindInfo_GetBindString not supported string type 20
0024:fixme:urlmon:InternetBindInfo_GetBindString not supported string type 20
0024:fixme:urlmon:InternetBindInfo_GetBindString not supported string type 20
0024:fixme:urlmon:InternetBindInfo_GetBindString not supported string type 20
0338:fixme:wscript:set_host_properties ignored L"nologo" switch
0024:fixme:urlmon:InternetBindInfo_GetBindString not supported string type 20
0024:fixme:urlmon:InternetBindInfo_GetBindString not supported string type 20
0024:fixme:urlmon:InternetBindInfo_GetBindString not supported string type 20
0338:fixme:msxml:ClassFactory_QueryInterface interface {342d1ea0-ae25-11d1-89c5-006008c3fbfc} not impleme
nted
0338:err:vbscript:create_ax_site Could not get IServiceProvider iface: 80004002
0338:fixme:wscript:ActiveScriptSite_OnScriptError ()
0024:fixme:urlmon:InternetBindInfo_GetBindString not supported string type 20
0024:fixme:urlmon:InternetBindInfo_GetBindString not supported string type 20
0340:fixme:wscript:set_host_properties ignored L"nologo" switch
0024:fixme:urlmon:InternetBindInfo_GetBindString not supported string type 20
0024:fixme:urlmon:InternetBindInfo_GetBindString not supported string type 20
0024:fixme:urlmon:InternetBindInfo_GetBindString not supported string type 20
0148:fixme:secur32:schannel_get_cipher_algid unknown algorithm 23
0148:fixme:secur32:schannel_get_mac_algid unknown algorithm 200, cipher 23
0024:fixme:urlmon:InternetBindInfo_GetBindString not supported string type 20
0024:fixme:urlmon:InternetBindInfo_GetBindString not supported string type 20
0024:fixme:urlmon:InternetBindInfo_GetBindString not supported string type 20
0024:fixme:urlmon:InternetBindInfo_GetBindString not supported string type 20
0340:fixme:msxml:ClassFactory_QueryInterface interface {342d1ea0-ae25-11d1-89c5-006008c3fbfc} not impleme
nted
0340:err:vbscript:create_ax_site Could not get IServiceProvider iface: 80004002
0340:fixme:wscript:ActiveScriptSite_OnScriptError ()
0024:fixme:urlmon:InternetBindInfo_GetBindString not supported string type 20
0024:fixme:urlmon:InternetBindInfo_GetBindString not supported string type 20
0024:fixme:urlmon:InternetBindInfo_GetBindString not supported string type 20
0024:fixme:urlmon:InternetBindInfo_GetBindString not supported string type 20
0348:fixme:wscript:set_host_properties ignored L"nologo" switch
0024:fixme:urlmon:InternetBindInfo_GetBindString not supported string type 20
0024:fixme:urlmon:InternetBindInfo_GetBindString not supported string type 20
0024:fixme:urlmon:InternetBindInfo_GetBindString not supported string type 20
0024:fixme:urlmon:InternetBindInfo_GetBindString not supported string type 20
0348:fixme:msxml:ClassFactory_QueryInterface interface {342d1ea0-ae25-11d1-89c5-006008c3fbfc} not impleme
nted
0348:err:vbscript:create_ax_site Could not get IServiceProvider iface: 80004002
0348:fixme:wscript:ActiveScriptSite_OnScriptError ()
0024:fixme:urlmon:InternetBindInfo_GetBindString not supported string type 20
0024:fixme:urlmon:InternetBindInfo_GetBindString not supported string type 20
0024:fixme:urlmon:InternetBindInfo_GetBindString not supported string type 20
0024:fixme:urlmon:InternetBindInfo_GetBindString not supported string type 20
0024:fixme:urlmon:InternetBindInfo_GetBindString not supported string type 20
0350:fixme:wscript:set_host_properties ignored L"nologo" switch
0024:fixme:urlmon:InternetBindInfo_GetBindString not supported string type 20
0024:fixme:urlmon:InternetBindInfo_GetBindString not supported string type 20
0024:fixme:urlmon:InternetBindInfo_GetBindString not supported string type 20
0024:fixme:urlmon:InternetBindInfo_GetBindString not supported string type 20
0024:fixme:urlmon:InternetBindInfo_GetBindString not supported string type 20
0024:fixme:urlmon:InternetBindInfo_GetBindString not supported string type 20
0024:fixme:urlmon:InternetBindInfo_GetBindString not supported string type 20
0024:fixme:urlmon:InternetBindInfo_GetBindString not supported string type 20
0024:fixme:urlmon:InternetBindInfo_GetBindString not supported string type 20
0024:fixme:urlmon:InternetBindInfo_GetBindString not supported string type 20
0350:fixme:msxml:ClassFactory_QueryInterface interface {342d1ea0-ae25-11d1-89c5-006008c3fbfc} not impleme
nted
0350:err:vbscript:create_ax_site Could not get IServiceProvider iface: 80004002
0350:fixme:wscript:ActiveScriptSite_OnScriptError ()
0148:fixme:secur32:schannel_get_cipher_algid unknown algorithm 23
0148:fixme:secur32:schannel_get_mac_algid unknown algorithm 200, cipher 23
0024:fixme:mshtml:nsChannel_IsNoCacheResponse (2217FDD0)->(0031E7CF)
0024:fixme:mshtml:nsChannel_GetContentLength (2217FDD0)->(0031E720)
0024:fixme:mshtml:nsChannel_IsNoCacheResponse (22269A08)->(0031E7CF)
0024:fixme:mshtml:nsChannel_GetContentLength (22269A08)->(0031E720)
0024:fixme:mshtml:nsChannel_IsNoCacheResponse (2226A7B0)->(0031E7CF)
0024:fixme:mshtml:nsChannel_GetContentLength (2226A7B0)->(0031E720)
0024:fixme:ntdll:EtwRegisterTraceGuidsW (24333F90, E6555338, {509962e0-406b-46f4-99ba-5a009f8d2225}, 3, 1
74AB908, (null), (null), E6555368): stub
0024:fixme:ntdll:EtwRegisterTraceGuidsW   register trace class {a3da04e0-57d7-482a-a1c1-61da5f95bacb}
0024:fixme:ntdll:EtwRegisterTraceGuidsW   register trace class {917b96b1-ecad-4dab-a760-8d49027748ae}
0024:fixme:ntdll:EtwRegisterTraceGuidsW   register trace class {26d1e091-0ae7-4f49-a554-4214445c505c}
0024:fixme:mshtml:nsChannel_IsNoCacheResponse (222A1A58)->(0031EA4F)
0024:fixme:mshtml:nsChannel_GetContentLength (222A1A58)->(0031E9A0)
0024:fixme:mshtml:nsChannel_IsNoCacheResponse (222A1F10)->(0031EA4F)
0024:fixme:mshtml:nsChannel_GetContentLength (222A1F10)->(0031E9A0)
0024:fixme:mshtml:nsChannel_IsNoCacheResponse (222A2880)->(0031EA4F)
0024:fixme:mshtml:nsChannel_GetContentLength (222A2880)->(0031E9A0)
0024:fixme:mshtml:nsChannel_IsNoCacheResponse (222A23C0)->(0031EA4F)
0024:fixme:mshtml:nsChannel_GetContentLength (222A23C0)->(0031E9A0)
0024:fixme:mshtml:nsChannel_IsNoCacheResponse (222A2D40)->(0031EA4F)
0024:fixme:mshtml:nsChannel_GetContentLength (222A2D40)->(0031E9A0)
0024:fixme:mshtml:nsChannel_IsNoCacheResponse (222A3200)->(0031EA4F)
0024:err:mshtml:on_stop_nsrequest RemoveRequest failed: 80004005
0024:fixme:mshtml:nsChannel_GetContentLength (224120F0)->(0031E9A0)
0024:err:mshtml:on_stop_nsrequest RemoveRequest failed: 80004005
0024:fixme:urlmon:InternetBindInfo_GetBindString not supported string type 20


The interesting part:

Code: [Select]
0024:err:mshtml:read_stream_data OnDataAvailable failed: 804b0002
0024:err:mshtml:on_stop_nsrequest RemoveRequest failed: 80004005
0330:err:vbscript:create_ax_site Could not get IServiceProvider iface: 80004002

foobar console does not show anything...
I've also tried to change the dll's in Winecfg from Native to builtin <> Builtin to native without any difference.

-TT
Title: Re: Wine/Spider Monkey Panel/Script bugs on Linux
Post by: marc2k3 on 2021-11-28 20:11:15
 You need a 32bit WINE prefix and install the XP version of IE8, and various other scripting bits via WINETRICKS. The subject has been done to death on these forums. I was doing it for WSH panel mod scripts 10+ years ago and nothing has changed with regards to getting the same ActiveX objects working with SMP. AFAIK, everything offline works. I'm not aware of anything that doesn't. Clipboard access certainly works.

I'm not even going to start on fetching online stuff. I've repeated myself dozens of times on this subject and no one ever takes any notice of what I say and I'm not doing it again.

edit: before anyone grumbles about needing 64bit or IE8 breaking things, setup multiple prefixes. It really is that simple.
Title: Re: Wine/Spider Monkey Panel/Script bugs on Linux
Post by: marc2k3 on 2021-11-29 00:01:16
Just because I like to prove a point, everything offline working...

(https://i.imgur.com/l7MQgUV.png)

I had to edit my own script which reads the DPI from the registry (the ActiveX object works fine - it's just that the expected registry key does not exist by default in WINE)

JS Smooth playlist required no edits - it just works (edit just realised the rating stars aren't showing due to a missing font, nothing that can't be easily fixed i've already installed FontAwesome which is required for the buttons on the bottom right)

The only edit to Library Tree was a playlist lock detection bug that also affects windows users and has nothing to do with running in WINE.

edit: this is using WINE v5 that ships with Ubuntu as default. I didn't bother with getting the latest.
Title: Re: Wine/Spider Monkey Panel/Script bugs on Linux
Post by: regor on 2021-11-29 09:14:47
Well thats the point of this thread. No matter how many times those tips are repeated, unless there is a clear place collecting all steps for users (wiki) this will continue on the future repeating itself (agree with TT on this).

If there are fixes for most of these reports, they should be included once they are compiled on the FAQ TT linked. Even a thread here is a bad place as a final documentation since it will be lost on a few weeks. That's why there is an official github for SMP with a linux FAQ.

For sure we can not expect that a regular user must know that a DPI variable have to be edited or that internet things doesn't work just because it's a "known thing" for developers while the FAQ omits that info.

I could help creating a pdf with latex if TheQwertiest prefers to go that route though.
Title: Re: Wine/Spider Monkey Panel/Script bugs on Linux
Post by: paregistrase on 2021-11-29 09:40:02
You can configure the panel and copy paste works but there is no data downlaoded from internet so it only could be a workaround to configure UI.

in order to have a working prefix you can't use the ie8 verb so the problem are still there.

Current workarounds are configure the panel with the 32 prefix (one time solution,), comment out the copy paste line to avoid right click crash in the everyday use prefix and add the DPI to the registry.

There is not workaround to download images (as far as I know)

So any effort to make it works will be welcome with joy.




Title: Re: Wine/Spider Monkey Panel/Script bugs on Linux
Post by: marc2k3 on 2021-11-29 13:33:29
Just trying the wine development version and it seems to have newer root certificates meaning connections to https websites now work properly. I'm quite surprised tbh.
Title: Re: Wine/Spider Monkey Panel/Script bugs on Linux
Post by: paregistrase on 2021-11-29 13:58:01
Wine has progressed a lot. In the past I had to install a lot of things with winetricks, now I'm using a clean prefix.

Some things in foobar's scripts are still tricky but is a great improvement in relation to the past.

Also thanks to the foobar and component developers that take care of us linux refugees  :))

Title: Re: Wine/Spider Monkey Panel/Script bugs on Linux
Post by: TT on 2021-11-29 15:13:51
Hi @marc2k3,

thanks for your help and effort!

I created this new topic for linux users, so all known problems are gathered here with updated troubleshooting and for better overview, like regor already pointed out...

I'm using AppImage for pure Wine32 with Mono/Gecko and only 1 MB GDI+ from archive.org.
My whole package with foobar is only around 960 MB unpacked and 560 MB zipped, which is great, instead of slowly downloading bloatware and useless runtimes/libs.

Can you please tell me which required dll's I need, to be able to get ONLY the library/biography options with clipboard working?
Or can you just list all components you've installed with winetricks?
I.e in terminal:
Code: [Select]
winetricks list-installed
It seems you only need ie8 for the library/biography options and for the clipboard func to work properly?

@paregistrase
Quote
in order to have a working prefix you can't use the ie8 verb so the problem are still there.
Can you eloborate a bit more on this?


I'm not up to date where the real problem lies with the biography image fetching. Can you please explain it once more @marc2k3?
Quote
Just trying the wine development version and it seems to have newer root certificates meaning connections to https websites now work properly. I'm quite surprised tbh.
It seems this is a Wine problem, not SMP? I can also forward this to the Wine dev...


I will write it in the FAQ's and @TheQwertiest can also update his at:
https://theqwertiest.github.io/foo_spider_monkey_panel/docs/faq/wine

@regor It would be also nice to have a pdf, maybe other linux users will distribute it over the net :)

Thanks

-TT



 
Title: Re: Wine/Spider Monkey Panel/Script bugs on Linux
Post by: paregistrase on 2021-11-29 16:47:36
@paregistrase
Quote
in order to have a working prefix you can't use the ie8 verb so the problem are still there.
Can you eloborate a bit more on this?
Thanks

-TT


It doesn't download any data, allways gives this error

Code: [Select]
Biography Server: last.fm album cover: Killer / Alice Cooper: not found Status error: 12157
Biography Server: allmusic album review / biography: Killer / Alice Cooper: not found Status error: 12157
Biography Server: last.fm album review: Killer / Alice Cooper: not found Status error: 12157

Also you need to install msxml3 verb with ie8 to avoid the bio panel to crash.

Usefull to configure the bio but not for normal use.
Title: Re: Wine/Spider Monkey Panel/Script bugs on Linux
Post by: marc2k3 on 2021-11-30 02:06:08
Last.fm images...

(https://i.imgur.com/QIJfQlG.gif)
Title: Re: Wine/Spider Monkey Panel/Script bugs on Linux
Post by: marc2k3 on 2021-11-30 03:53:39
I've submitted a PR on github to fix the issues with the included "complete" samples. Specifically the DPI registry issue and handle when the clipboard is unavailable. It's better to use try/catch rather than nuke the functionality for the 99.9% of people who will be on windows.

https://github.com/TheQwertiest/smp_2003/pull/9/files

I'll list the required winetricks packages for everything else later.
Title: Re: Wine/Spider Monkey Panel/Script bugs on Linux
Post by: regor on 2021-11-30 10:36:36
Quote
@regor It would be also nice to have a pdf, maybe other linux users will distribute it over the net :)

Thanks

-TT
Yes sure.
marc2k3 fixes cover most common uses I think. I also use a helper to restore things from recycle bin (_restoreFile) and anyway I always wrap all file ops. from fso and and app calls with try/catchs. Attached files in case anyone cares.

Also this may come useful
Code: [Select]
// Linux features
console.log(getSoFeatures());

function getSoFeatures() {
const soFeat = {gecko: true, clipboard: true, dpi: true, recycle: true, gdiplus: true}
const WshShell = new ActiveXObject('WScript.Shell');
const app = new ActiveXObject('Shell.Application');
let doc;
try {doc = new ActiveXObject('htmlfile');} catch (e) {soFeat.gecko = false;}
if (typeof doc !== 'undefined' && soFeat.gecko) {
try {doc.parentWindow.clipboardData.setData('Text', doc.parentWindow.clipboardData.getData('Text'));} catch (e) {soFeat.clipboard = false;}
} else {soFeat.clipboard = false;}
if (typeof WshShell !== 'undefined') {
try {WshShell.RegRead('HKCU\\Control Panel\\Desktop\\WindowMetrics\\AppliedDPI');} catch (e) {soFeat.dpi = false;}
} else {soFeat.dpi = false;}
if (typeof app !== 'undefined') {
try {app.NameSpace(10).MoveHere(null);} catch (e) {soFeat.recycle = false;}
} else {soFeat.recycle = false;}
if (!utils.CheckFont('Segoe UI') && !utils.CheckFont('Arial')) {
soFeat.gdiplus = false;
}
return soFeat;
}

It can be checked once at startup and then modify the helpers to use or not those features (instead of relaying only on try/catch which is slower). It may also be used to point users to fixes directly via popups which would cover the documentation problem at the endpoint.

Code: [Select]
if (!getSoFeatures().gecko) {fb.ShowPopupMessage('Found an issue on current installation:\nActiveXObject_Constructor failed:\nFailed to create ActiveXObject object via CLSID: htmlfile\n\nFix: install Gecko package.\nhttps://wiki.winehq.org/Gecko', 'SO features');}

Once all issues are documented, we can simply create a popup for every one of them, add the check to our main helper(s) and done.
Title: Re: Wine/Spider Monkey Panel/Script bugs on Linux
Post by: TT on 2021-11-30 11:57:41
Ok, this is great @mark2k3  8)

How did you fix the biography image fetching?
Also thanks for the DPI fix, other linux users will appreciate it. I have wrote my own auto-install bash script that automatically adds the registry based on FULL HD or 4K res.
Once it's perfect and everything works as it should, I can also share it here. I think people will be interested.

Also @regor, this is really useful. I really like the popup idea! This will also help a lot of users!

Thanks a lot guys!
We're making progress!

-TT
Title: Re: Wine/Spider Monkey Panel/Script bugs on Linux
Post by: marc2k3 on 2021-11-30 18:00:08
So you only need 2 packages to get image downloads working. Assuming you already have winetricks installed...

Code: [Select]
sh winetricks wsh57 mdac28

and that's it. All other scripting objects seem to be native when using WINE 6.22. xmlhttp, fso etc all work without those packages but they are definitely needed to for executing the external vbscript that downloads from last.fm.

I've only tested my own scripts and there doesn't seem to be any way to get recycling files working so I just catch errors and report a console message.

Clipboard access can be made to work by installing ie8 via winetricks and of course ie8 is required if you want WilB's fancy html settings dialogs.

BTW, that script checking for Segoe UI won't find it. Pretty sure it's copyrighted and can't be legally distributed. Of course there's nothing stopping you copying it from a windows machine but it's not a good step for instructing others.
Title: Re: Wine/Spider Monkey Panel/Script bugs on Linux
Post by: regor on 2021-11-30 18:24:05
Arial alone would do then? Have no access to a linux pc right now, if someone can offer a list of native fonts installed by wine it would be great. The function above should be modified with those.

So this is the current list (?)
Quote
- Registry missing 'HKCU\\Control Panel\\Desktop\\WindowMetrics\\AppliedDPI' entry: set DPI to 96 by default when its not found or recreate reg. entry.
- Clipboard not working: Install IE8 with Winetricks. https://wiki.winehq.org/Winetricks
- HTML Popup not working: Install IE8 with Winetricks. https://wiki.winehq.org/Winetricks
- Bio image download (and possibly other vbs scripts): Install 'wsh57' and 'mdac28' with Winetricks. sh winetricks wsh57 mdac28
- HTML activeX error: Install Gecko package. https://wiki.winehq.org/Gecko
- Fonts are not being found (native ones): Install 'gdiplus' with Winetricks. sh winetricks gdiplus
Title: Re: Wine/Spider Monkey Panel/Script bugs on Linux
Post by: paregistrase on 2021-12-01 06:09:05
Very cool @marc2k3

According with my test:

In wine 5 (default in ubuntu)

In order to use the "fancy html settings"  8) of biography you need to make 32 wine prefix and install ie8 and msxml3 verbs with winetricks. Doing that makes the panel to fail when try to download data with error: 12157. So this profile only can be use to make the initial configuration.

To operates normally makes a new 32 prefix, install wsh57,mdac28 and gdiplus. Download fron internet Segoeui fonts (symbols too) and put then in /home/user./local/share/fonts or /home/user/.fonts

With the modifications of included samples there's no more dpi error and rigth click works. The thumbs sample doesn't download image in automatic but if you makes download now it works.

Biography panel download artist images in auto. The rev_img are never downloaded and the cover file in album folder sometimes is writed sometimes not. Maybe this could be a misconfiguration in my panel.

The right click in bio crash but this is normal because the new modification are not in bio yet. Can be avoid comenting out the funtcion of copy-paste (parentWindow.clipboardData.getData) for now

In wine 6.22, last devel and stagging, the same as wine 5 with the exception that you doesn't need gdiplus verb to show segoeui.

To be perfect the only thing left is using the configuration ui without making a prefix with ie8 but anyway this is not a thing you do everyday. Ah and the copy-paste.

Very thanks people.
Title: Re: Wine/Spider Monkey Panel/Script bugs on Linux
Post by: regor on 2021-12-03 09:54:43
Let me know if I missed anything:

Code: [Select]
// Linux features
const soFeat = getSoFeatures();
CheckSoFeatures(soFeat);

function getSoFeatures() {
const soFeat = {gecko: true, clipboard: true, dpi: true, recycle: true, gdiplus: true, segoe: true, bio: true}
const WshShell = new ActiveXObject('WScript.Shell');
const app = new ActiveXObject('Shell.Application');
let doc;
// Internals
try {doc = new ActiveXObject('htmlfile');} catch (e) {soFeat.gecko = false;}
if (typeof doc !== 'undefined' && soFeat.gecko) {
let clText = 'test';
try {doc.parentWindow.clipboardData.setData('Text', clText); clText = doc.parentWindow.clipboardData.getData('Text');} catch (e) {soFeat.clipboard = false;}
if (clText !== 'test') {soFeat.clipboard = false;}
} else {soFeat.clipboard = false;}
// File system
if (typeof app !== 'undefined') {
try {app.NameSpace(10).MoveHere(null);} catch (e) {soFeat.recycle = false;}
} else {soFeat.recycle = false;}
// Scripting
if (utils.IsFile && utils.IsFile(fb.ProfilePath + 'yttm\\foo_lastfm_img.vbs')) {
try {
new ActiveXObject("Scripting.FileSystemObject");
new ActiveXObject("MSXML2.XMLHTTP");
new ActiveXObject("ADODB.Stream");
} catch (e) {soFeat.bio = false;}
}
// UI
if (typeof WshShell !== 'undefined') {
try {WshShell.RegRead('HKCU\\Control Panel\\Desktop\\WindowMetrics\\AppliedDPI');} catch (e) {soFeat.dpi = false;}
} else {soFeat.dpi = false;}
if (!utils.CheckFont('Arial')) {
soFeat.gdiplus = false;
}
if (!utils.CheckFont('Segoe UI')) {
soFeat.segoe = false;
}
return soFeat;
}

function CheckSoFeatures(soFeat) {
let bPass = true;
// Internals
if (!soFeat.gecko) {
fb.ShowPopupMessage('Found an issue on current installation:\nActiveXObject_Constructor failed:\nFailed to create ActiveXObject object via CLSID: htmlfile.\n\nFix: install \'Gecko\' package.\n' + 'https://wiki.winehq.org/Gecko', 'SO features');
bPass = false;
} else  if (!soFeat.clipboard) {
fb.ShowPopupMessage('Found an issue on current installation:\nclipboardData failed.\n\nFix: Install IE8 with Winetricks.\n' + 'https://wiki.winehq.org/Winetricks' + '\n' + 'https://askubuntu.com/questions/1194126/problem-in-installing-internet-explorer-8', 'SO features');
bPass = false;
}
// File system
if (!soFeat.recycle) {
// Not sure if there is an alternative (?)
bPass = false;
}
// Scripting
if (!soFeat.bio) {
fb.ShowPopupMessage('Found an issue on current installation:\nMissing scripting components for vbs integration (BIO panel).\nFix:  Install \'wsh57\' and \'mdac28\' with Winetricks.\n' + 'https://wiki.winehq.org/Winetricks' + 'sh winetricks wsh57 mdac28', 'SO features');
bPass = false;
}
// UI
if (!soFeat.dpi) {
fb.ShowPopupMessage('Found an issue on current installation:\nRegistry entry not found:\nHKCU\\Control Panel\\Desktop\\WindowMetrics\\AppliedDPI\n\nFix: add entry to registry.\n' + 'HKCU\\Control Panel\\Desktop\\WindowMetrics\\AppliedDPI          --->     96', 'SO features');
bPass = false;
}
if (!soFeat.gdiplus) {
fb.ShowPopupMessage('Found an issue on current installation:\nFonts are not found via utils.CheckFont() and gdi.Font().\n\nFix: install install \'gdiplus\' package with winetricks.\n' + 'https://wiki.winehq.org/Winetricks' + '\n' + 'sh winetricks gdiplus', 'SO features');
bPass = false;
} else if (!soFeat.segoe) {
fb.ShowPopupMessage('Found an issue on current installation:\nSegoe UI font is missing.\n\nFix: install missing font.\n' + 'https://github.com/mrbvrz/segoe-ui-linux', 'SO features');
bPass = false;
}
return bPass;
}
Some notes:
- The clipboard thing works according to @marc2k3 with ie8, but you say the opposite @paregistrase (?).
- I included segoe as a requisite since it's being used by some scripts, although not related to gdiplus now.
- I added a link to IE8 installation since most posts I found were about it not working, could someone confirm they are the actual steps you followed?
- The recycle bin bug has no fix known, is that right? We may consider changing the recycle funcs to use standard move func to a configurable path when using wine.
Title: Re: Wine/Spider Monkey Panel/Script bugs on Linux
Post by: paregistrase on 2021-12-03 11:04:44
- The clipboard thing works according to @marc2k3 with ie8, but you say the opposite @paregistrase (?).

With ie8 the clipboard and the configuration html UI woks but the script gives and error when download data (error: 12157). That why i said that this trick is only for a initial configuration.

If you recommend the installation of ie8 to make work the clipboard it will end in a user without possibility of download any data because ie8 installation breaks internet data download.

Is important to said that i can't managed to install ie8 in wine stable (version 6), devel or staging. Only works (at least for me) with wine 5. In 2022 wine will release wine 7 so is posible that many distros will update wine base package to 6 or even 7 and the possibility of install ie8 verb will go away. This is very possible, recent changes in kernel to include futex to help wine gaming and valve new console and proton will force distros to update his wine version in order to satisfy the gamer market.

In my opinion the best will be to instruct  users to make a 32 wine prefix with wsh57,mdac28 and gdipuls deppending of the wine version, inform them that the ui and clipboard doesn't work (and if is possible disable them if wine is detected to avoid crashes) and tell them that they can configure the scripts with normal dialogues and configuration files.

And like a plus tell them that exists an option to configure the scripts with the UI but it breaks https data download and need a separate profile only to do that and doesn't work with modern wine versions after ancient ubuntu wine 5



Title: Re: Wine/Spider Monkey Panel/Script bugs on Linux
Post by: regor on 2021-12-03 12:04:41
Sorry, probably read too fast to marc and thought otherwise. If the choice is between having the script working or the config working, and there is no way to have both, then html popups are still a problem... makes no sense to install ie8 to then have BIO not downloading anything until you create another profile.

Also I already shared a full working framework to create config windows within the same panel than the script, so HTML popups are clearly not needed at all if developers try an alternative.
https://hydrogenaud.io/index.php?topic=116669.msg1000465#msg1000465
https://hydrogenaud.io/index.php?topic=116669.msg1000638#msg1000638

It may be wisest to instruct users to install the packages to get the scripts working by default since that's the main aim... Then at a further doc file (pdf), explain that HTML popups may be made to work with another profile + ie8. But that's just a plus, since as you noted the config files may be directly edited.

Reworked with such warning. May be checked once per script/panel at first startup with a simple property boolean and done.
Code: [Select]
// Linux features
const soFeat = getSoFeatures();
CheckSoFeatures(soFeat);

function getSoFeatures() {
const soFeat = {gecko: true, clipboard: true, dpi: true, recycle: true, gdiplus: true, segoe: true, bio: true}
const WshShell = new ActiveXObject('WScript.Shell');
const app = new ActiveXObject('Shell.Application');
let doc;
// Internals
try {doc = new ActiveXObject('htmlfile');} catch (e) {soFeat.gecko = false;}
if (typeof doc !== 'undefined' && soFeat.gecko) {
let clText = 'test';
try {doc.parentWindow.clipboardData.setData('Text', clText); clText = doc.parentWindow.clipboardData.getData('Text');} catch (e) {soFeat.clipboard = false;}
if (clText !== 'test') {soFeat.clipboard = false;}
} else {soFeat.clipboard = false;}
// File system
if (typeof app !== 'undefined') {
try {app.NameSpace(10).MoveHere(null);} catch (e) {soFeat.recycle = false;}
} else {soFeat.recycle = false;}
// Scripting
if (utils.IsFile && utils.IsFile(fb.ProfilePath + 'yttm\\foo_lastfm_img.vbs')) {
try {
new ActiveXObject("Scripting.FileSystemObject");
new ActiveXObject("MSXML2.XMLHTTP");
new ActiveXObject("ADODB.Stream");
} catch (e) {soFeat.bio = false;}
}
// UI
if (typeof WshShell !== 'undefined') {
try {WshShell.RegRead('HKCU\\Control Panel\\Desktop\\WindowMetrics\\AppliedDPI');} catch (e) {soFeat.dpi = false;}
} else {soFeat.dpi = false;}
if (!utils.CheckFont('Arial')) {
soFeat.gdiplus = false;
}
if (!utils.CheckFont('Segoe UI')) {
soFeat.segoe = false;
}
return soFeat;
}

function CheckSoFeatures(soFeat) {
let bPass = true;
// Internals
if (!soFeat.gecko) {
fb.ShowPopupMessage('Found an issue on current installation:\nActiveXObject_Constructor failed:\nFailed to create ActiveXObject object via CLSID: htmlfile.\n\nFix: install \'Gecko\' package.\n' + 'https://wiki.winehq.org/Gecko', 'SO features');
bPass = false;
} else  if (soFeat.clipboard) {
fb.ShowPopupMessage('Found an issue on current installation:\nclipboardData failed.\n\nFix: Install IE8 with Winetricks.\n' + 'https://wiki.winehq.org/Winetricks' + '\n' + 'https://askubuntu.com/questions/1194126/problem-in-installing-internet-explorer-8' + '\n\nWARNING:\nApplying this fix will break internet connection on current profile.\ni.e. Bio Script config popup will work but image downloading will be broken. It\'s therefore recommended to don\'t apply this fix on online systems.', 'SO features');
bPass = false;
}
// File system
if (!soFeat.recycle) {
// Not sure if there is an alternative (?)
bPass = false;
}
// Scripting
if (!soFeat.bio) {
fb.ShowPopupMessage('Found an issue on current installation:\nMissing scripting components for vbs integration (BIO panel).\nFix:  Install \'wsh57\' and \'mdac28\' with Winetricks.\n' + 'https://wiki.winehq.org/Winetricks' + 'sh winetricks wsh57 mdac28', 'SO features');
bPass = false;
}
// UI
if (!soFeat.dpi) {
fb.ShowPopupMessage('Found an issue on current installation:\nRegistry entry not found:\nHKCU\\Control Panel\\Desktop\\WindowMetrics\\AppliedDPI\n\nFix: add entry to registry.\n' + 'HKCU\\Control Panel\\Desktop\\WindowMetrics\\AppliedDPI          --->     96\nreg.exe ADD "HKEY_CURRENT_USER\Control Panel\Desktop\WindowMetrics" /v AppliedDPI /t REG_DWORD /d 96', 'SO features');
bPass = false;
}
if (!soFeat.gdiplus) {
fb.ShowPopupMessage('Found an issue on current installation:\nFonts are not found via utils.CheckFont() and gdi.Font().\n\nFix: install install \'gdiplus\' package with winetricks.\n' + 'https://wiki.winehq.org/Winetricks' + '\n' + 'sh winetricks gdiplus', 'SO features');
bPass = false;
} else if (!soFeat.segoe) {
fb.ShowPopupMessage('Found an issue on current installation:\nSegoe UI font is missing.\n\nFix: install missing font.\n' + 'https://github.com/mrbvrz/segoe-ui-linux', 'SO features');
bPass = false;
}
return bPass;
}

EDIT: the dpi registry thing may be automatically fixed too by adding an entry using cmd, which may be done by the js script itself.
reg.exe ADD "HKCU\Control Panel\Desktop\WindowMetrics" /v AppliedDPI /t REG_DWORD /d 96 /f
Title: Re: Wine/Spider Monkey Panel/Script bugs on Linux
Post by: paregistrase on 2021-12-03 12:23:26
Sure. If the panel leitmotiv is download internet data and getting the clipboard works requiere ie8 and that breaks data download the choice is easy at least for me, i prefer download data.

And to make your code work in Bio is enough with paste it in the script main.js or requieres deeper changes?

This inside configurations looks cool. Hope that can be used in bio.
Title: Re: Wine/Spider Monkey Panel/Script bugs on Linux
Post by: regor on 2021-12-03 12:30:55
Sure. If the panel leitmotiv is download internet data and getting the clipboard works requiere ie8 and that breaks data download the choice is easy at least for me, i prefer download data.

And to make your code work in Bio is enough with paste it in the script main.js or requieres deeper changes?

This inside configurations looks cool. Hope that can be used in bio.


The warning code may be added as is to any script. No more changes needed and it would work fine.... although any error found would be reported everytime foobar starts. i.e. clipboard would always report an error.

I would implement it myself to run it once only at first startup, right after installation. That requires a property on the panel, something any developer may implement in its own scripts in 2 minutes. Another possibility would be to skip clipboard checks, so that it only reports an error for things that should always be fixed (since we have noted that clipboard fixing involves IE8 which breaks other things).
Title: Re: Wine/Spider Monkey Panel/Script bugs on Linux
Post by: paregistrase on 2021-12-03 12:42:07
Sure. If the panel leitmotiv is download internet data and getting the clipboard works requiere ie8 and that breaks data download the choice is easy at least for me, i prefer download data.

And to make your code work in Bio is enough with paste it in the script main.js or requieres deeper changes?

This inside configurations looks cool. Hope that can be used in bio.


The warning code may be added as is to any script. No more changes needed and it would work fine.... although any error found would be reported everytime foobar starts. i.e. clipboard would always report an error.

I would implement it myself to run it once only at first startup, right after installation. That requires a property on the panel, something any developer may implement in its own scripts in 2 minutes. Another possibility would be to skip clipboard checks, so that it only reports an error for things that should always be fixed (since we have noted that clipboard fixing involves IE8 which breaks other things).

Better to wait until a coder makes the changes  8) for now i have the clipboard commented out in bio.and is working well and a popup every start will be annoying.

Personally i will disable both features (options menu and clipboard) if wine is detected and leaves a way to enable them in the future if new wine versions solves the problem (or any suitable workaround is found)

Because if you didn't disable the clipboard, in bio for example, every time you do right click the panel crash and can't use any menu
Title: Re: Wine/Spider Monkey Panel/Script bugs on Linux
Post by: marc2k3 on 2021-12-03 13:32:49
Seems like using wine5/ie6 fixes clipboard access without breaking https sites. html dialogs won't work though.

Another possible fix is to add utils.GetClipboardText and utils.SetClipboardText to the component which will use windows APIs and should work fine. There are some one-liners in shared.h from the foobar2000 SDK for this.
Title: Re: Wine/Spider Monkey Panel/Script bugs on Linux
Post by: paregistrase on 2021-12-03 13:53:14
Seems like using wine5/ie6 fixes clipboard access without breaking https sites. html dialogs won't work though.

Another possible fix is to add utils.GetClipboardText and utils.SetClipboardText to the component which will use windows APIs and should work fine. There are some one-liners in shared.h from the foobar2000 SDK for this.

If this is feasible then all important things of panels will work.

The configuration ui is cool but anyway you can use others ways to configure the panel.

Maybe you can alert WilB to do that in biography? I could do it myself but i think that you could explain it to him better (in a developer way).
Title: Re: Wine/Spider Monkey Panel/Script bugs on Linux
Post by: regor on 2021-12-03 15:40:50
Seems like using wine5/ie6 fixes clipboard access without breaking https sites. html dialogs won't work though.

Another possible fix is to add utils.GetClipboardText and utils.SetClipboardText to the component which will use windows APIs and should work fine. There are some one-liners in shared.h from the foobar2000 SDK for this.

If this is feasible then all important things of panels will work.

The configuration ui is cool but anyway you can use others ways to configure the panel.

Maybe you can alert WilB to do that in biography? I could do it myself but i think that you could explain it to him better (in a developer way).
That's not something on WilB's hands (although he could add the SO features check to warn about the other "problems"). The clipboard additions would have to be implemented on SMP itself, the component.

Quote
Seems like using wine5/ie6 fixes clipboard access without breaking https sites. html dialogs won't work though.
Great, will add it to the popups then. paregistrase could you confirm it too?
Title: Re: Wine/Spider Monkey Panel/Script bugs on Linux
Post by: paregistrase on 2021-12-03 16:03:46
Ah man so he already must to know about it because that was his response about the issue when he solves the data download for wine.  :))

Well, TheQwertiest seems to be busy with his real life problems so we have to wait a little bit more.

About the broken https; yes, 100% confirmed.

Oh sorry, fast reading.

ie6 not breaking.

I'll test it.
Title: Re: Wine/Spider Monkey Panel/Script bugs on Linux
Post by: paregistrase on 2021-12-03 17:35:52
Not so well.

Multiple freezes and crashes, very slow, some dropdown menus doesn't work, new wine errors i never saw before.....

but the limited time before freazees or crash the clipboard seems to work  :D

I can say if it break https or not because i can't get that far, always freezes or crash before.

Title: Re: Wine/Spider Monkey Panel/Script bugs on Linux
Post by: marc2k3 on 2021-12-03 18:03:07
Well I've only been testing my scripts and they work fine. SMP v1.5.2 with samples\complete\js\helpers.js from here...

https://raw.githubusercontent.com/marc2k3/smp_2003/0e17bcacc8fd3ddcb69af7412701abb709f37ff9/js/helpers.js

Just tried a WIlB's bio and got a few unresponsive script dialogs (from the component - I've seen the same on windows). Clicking stop makes the component crash. If you continue, it did eventually work and display all images/text as expected.

I guess how well it works depends entirely on the script and may be host (mine was VMware, not a proper install)

edit: georgia reborn seems unusable on my setup. I can get the initial layout showing but it's totally unresponsive with these WINE popups.

(https://i.imgur.com/otwxR1m.png)

Title: Re: Wine/Spider Monkey Panel/Script bugs on Linux
Post by: paregistrase on 2021-12-03 18:53:17
installing msxml3 bio stop to lag and crashes but even with wsh57 and mdac28 it doesn't download images. Same for the thumbs script in samples.

The text data and clipboard work in samples and bio and i can copy and paste in bio and library view.

In the system console there's a lot of

Code: [Select]
err:ole:CoGetClassObject no class object {6c736db1-bd94-11d0-8a23-00aa00b58e10} could be created for context 0x1

In the foobar console all normal.

this with a new foobar instalation with only SMP and biography. My normal foobar still freezes and crash.

Doesn't seem to be a long time solution.

But the old one is good enough, the script download text and imagess (that is his primordial use), the html configuration is not essential and with a future fix for clipboard this is great for me as is.

Few mouths ago i can't even download a biography text.

You people are real chads
Title: Re: Wine/Spider Monkey Panel/Script bugs on Linux
Post by: marc2k3 on 2021-12-03 19:12:21
Well all I can do is show my scripts working on my setup.

The first thing I do here is delete my cache folder before showing the wine version / winetricks components.

(https://i.imgur.com/G77cTEr.gif)
Title: Re: Wine/Spider Monkey Panel/Script bugs on Linux
Post by: paregistrase on 2021-12-03 20:47:33
Installing the verbs in this exact order works for the complete samples.

With the bio freezes (likes yours with reborn) and often crash in various web.js lines, that have

Code: [Select]
this.xmlhttp.send();

msxml3 helps with bio freezes and crashes but breaks image downloading in bio and thumbs.
Title: Re: Wine/Spider Monkey Panel/Script bugs on Linux
Post by: marc2k3 on 2021-12-04 06:43:31
FWIW, I've never installed msxml3. Although mine and WilB's scripts are radically different, the actually bits that fetch online info must be pretty much identical. If mine works without msxml3, his should too.
Title: Re: Wine/Spider Monkey Panel/Script bugs on Linux
Post by: paregistrase on 2021-12-04 09:53:07
FWIW, I've never installed msxml3. Although mine and WilB's scripts are radically different, the actually bits that fetch online info must be pretty much identical. If mine works without msxml3, his should too.

With the ie8 verb it helps to avoid random crashes in bio. I tried it with ie6 because crashes too but it didn't work,in this situation, it breaks downloading images.

Anyway the problem with this option is that with bio added the player becomes unstable. When search for new bio and images it freezes, sometimes the bio popupcomes up but not render and after a time crashes the panel or the system popup of not responding comes up.

This only selecting tracks in the playlist, when i try to listen a actual track most of the time it even start playing or stop in the middle if it need to search for new data.

The user experience with this test was without a doubt the worst of all, even worst than when the panel didn't download any data and I have to reuse text and images from others components, because at least i could listen music.

The best results I had comes with your first solution of 32 prefix, gdi, wsh and mdac and commenting out the clipboard funtcion in scripts to avoid crashes in the panel at right click. In this test the player didn't crash or freezes, i can listen music and download bios at the same time, etc...
Title: Re: Wine/Spider Monkey Panel/Script bugs on Linux
Post by: TT on 2021-12-04 15:01:12
Georgia-ReBORN does work stable with Wine 6.02 stable, Mono/Gecko and GDI+ ( the 1MB from archive.org ).
I'm not using Winetricks though, want to have it absolutely clean and only the minimum installed...
The only problem as already mentioned by me is the playlist drag and drop ( works in Wine explorer -> File > Add files/folder ) which is a Wine bug and already reported to a Wine dev.
I have also disabled the clipboard func plus the library/biography options won't work ( crash )

So what about WilB's biography image fetching?
@paregistrase does it work now 100%?

To summarize:
You only need GDI+, wsh57 and mdac28?
Ie6/8 and msxml3 breaks image fetching?
Can you confirm this?

I've tried some days ago with Wine 6.22 dev with ie8, wsh57 and mdac28 and had problems ( Wine bugs, no image fetching )...

Thank you all for testing, I know myself how frustrating it is...

-TT
Title: Re: Wine/Spider Monkey Panel/Script bugs on Linux
Post by: paregistrase on 2021-12-04 15:51:50
Georgia-ReBORN does work stable with Wine 6.02 stable, Mono/Gecko and GDI+ ( the 1MB from archive.org ).
I'm not using Winetricks though, want to have it absolutely clean and only the minimum installed...
The only problem as already mentioned by me is the playlist drag and drop ( works in Wine explorer -> File > Add files/folder ) which is a Wine bug and already reported to a Wine dev.
I have also disabled the clipboard func plus the library/biography options won't work ( crash )

So what about WilB's biography image fetching?
@paregistrase does it work now 100%?

To summarize:
You only need GDI+, wsh57 and mdac28?
Ie6/8 and msxml3 breaks image fetching?
Can you confirm this?

I've tried some days ago with Wine 6.22 dev with ie8, wsh57 and mdac28 and had problems ( Wine bugs, no image fetching )...

Thank you all for testing, I know myself how frustrating it is...

-TT

yeah, the image downloading works 100% thanks to marc discover.

you need a wine 32 prefix, wsh57, mdac28 and gdiplus if you use a old wine version. In staging and devel there's no need of gdi. This works for me in all wine versions, old ubuntu 5, stable 6, devel and staging

The configuration UI and the clipboard in script still doesn't works. The clipboard thing could be fix but need SMP dev intervention.

There's a change to use the html UI configuration. You need 32 prefix and ie8 verb and wine5, in others wine version doesn't install or crash. But this prefix doesn't have https working, so no data download. Can be use to a initial configuration.

The test with ie6 in order to make the clipboard working without breaking https didn't give good results, too much unestable. the clipboard works and download images (with wsh and mdac) but is buggy, lag a lot and bio crash. Installing msxml stop the crashes but break image downloading. Also is important install the verb in the same order that mark did and one by one. the first time i did with wine tricks ui all verbs at once didn't work. anyway the palyer becomes almos usable to normal use.

My test agrees with your experience, the ie verbs breaks more things that they solves.

Right now i'm using 32 prefix, wsh57 and mdac28 with the clipboard funtcion commented out without problems. The scripts works (data and images) and the player is stable. This morning was playing songs a few hours at the same time i was tagging new albums and navigating and no problem happend.

I didn't test your reborn because is installed in the living room computer and is busy ;-) but this must works too.


Title: Re: Wine/Spider Monkey Panel/Script bugs on Linux
Post by: TT on 2021-12-05 15:32:33
I got it working with Georgia-ReBORN, finally!
After nearly a year we got it sorted out, it was a good idea to start this thread =)

Needed to add msado15 to the dll overrides in Winecfg to make it work:

(https://i.ibb.co/d4ZPzZ9/Winecfg.jpg)

Thanks a lot @marc2k3 and @paregistrase  8)
@WilB wanted to notify you that biography image fetching now works!

-TT
Title: Re: Wine/Spider Monkey Panel/Script bugs on Linux
Post by: paregistrase on 2021-12-05 16:04:16
What was the problem that solves msado15?
Title: Re: Wine/Spider Monkey Panel/Script bugs on Linux
Post by: TT on 2021-12-05 16:16:57
What was the problem that solves msado15?

This is related to ActiveX objects, the terminal log pointed out to me that I need it...
Title: Re: Wine/Spider Monkey Panel/Script bugs on Linux
Post by: paregistrase on 2021-12-05 16:40:22
I tried to add it to mine and was already there, winetricks must be set it when it installs the others verbs (maybe a different winetricks version)

I'm very happy too, now all important funtcions works.

Kudos to @marc2k3 who was the real hero here.
Title: Re: Wine/Spider Monkey Panel/Script bugs on Linux
Post by: TT on 2021-12-06 12:52:57
Just wanted to let you all know and confirm that msado15 is really required to get the biography working.
Did some tests yesterday and without it it's not working. The terminal log and @razielanarki was right after all as he already mentioned it on the first page.
So be sure to have it in the Winecfg as shown in the screenshot above, if it's not there, manually add it.

For all non-winetricks users,
I also encountered a really weird bug with the 1 MB GDI+ from archive.org: https://archive.org/download/gdiplus_dnld
This version was also distributed on the CNET website after MS has removed it from theirs.
Sometimes it renders JPG images with a green tint which sucks... I've tried to set Wine to different Windows versions
but without luck, so this GDI+ version is for the trash bin. At least as already mentioned, you won't need to install GDI+
in the future as Wine 6.10 and above already has it built in, so we just need to wait for the next stable release...

-TT



Title: Re: Wine/Spider Monkey Panel/Script bugs on Linux
Post by: regor on 2021-12-09 09:42:38
Updated.
Code: [Select]
function getSoFeatures() {
const soFeat = {gecko: true, clipboard: true, dpi: true, recycle: true, gdiplus: true, segoe: true, bio: true}
const WshShell = new ActiveXObject('WScript.Shell');
const app = new ActiveXObject('Shell.Application');
let doc;
// Internals
try {doc = new ActiveXObject('htmlfile');} catch (e) {soFeat.gecko = false;}
if (typeof doc !== 'undefined' && soFeat.gecko) {
let clText = 'test';
try {doc.parentWindow.clipboardData.setData('Text', clText); clText = doc.parentWindow.clipboardData.getData('Text');} catch (e) {soFeat.clipboard = false;}
if (clText !== 'test') {soFeat.clipboard = false;}
} else {soFeat.clipboard = false;}
// File system
if (typeof app !== 'undefined') {
try {app.NameSpace(10).MoveHere(null);} catch (e) {soFeat.recycle = false;}
} else {soFeat.recycle = false;}
// Scripting
if (utils.IsFile && utils.IsFile(fb.ProfilePath + 'yttm\\foo_lastfm_img.vbs')) {
try {
new ActiveXObject("Scripting.FileSystemObject");
new ActiveXObject("MSXML2.XMLHTTP");
new ActiveXObject("ADODB.Stream");
} catch (e) {soFeat.bio = false;}
}
// UI
if (typeof WshShell !== 'undefined') {
try {WshShell.RegRead('HKCU\\Control Panel\\Desktop\\WindowMetrics\\AppliedDPI');} catch (e) {soFeat.dpi = false;}
} else {soFeat.dpi = false;}
if (!utils.CheckFont('Arial')) {
soFeat.gdiplus = false;
}
if (!utils.CheckFont('Segoe UI')) {
soFeat.segoe = false;
}
return soFeat;
}

function CheckSoFeatures(soFeat) {
let bPass = true;
// Internals
if (!soFeat.gecko) {
fb.ShowPopupMessage('Found an issue on current installation:\nActiveXObject_Constructor failed:\nFailed to create ActiveXObject object via CLSID: htmlfile.\n\nFix: install \'Gecko\' package.\n' + 'https://wiki.winehq.org/Gecko', 'SO features');
bPass = false;
} else  if (!soFeat.clipboard) {
fb.ShowPopupMessage('Found an issue on current installation:\nclipboardData failed.\n\nFix: Install IE8 with Winetricks.\n' + 'https://wiki.winehq.org/Winetricks' + '\n' + 'https://askubuntu.com/questions/1194126/problem-in-installing-internet-explorer-8' + '\n\nWARNING:\nApplying this fix will break internet connection on current profile.\ni.e. Bio Script config popup will work but image downloading will be broken. It\'s therefore recommended to don\'t apply this fix on online systems.', 'SO features');
bPass = false;
}
// File system
if (!soFeat.recycle) {
// Not sure if there is an alternative (?)
bPass = false;
}
// Scripting
if (!soFeat.bio) {
fb.ShowPopupMessage('Found an issue on current installation:\nMissing scripting components for vbs integration (BIO panel).\n\nFix:  Install \'wsh57\' and \'mdac28\' with Winetricks.\n' + 'https://wiki.winehq.org/Winetricks' + '\n\nTerminal command:\n' + 'sh winetricks wsh57 mdac28' + '\n\nFix: Also msado15 needs to be aded to the dll overrides in Winecfg:\n' + 'https://hydrogenaud.io/index.php?topic=121786.msg1005447#msg1005447' +'\n' + 'https://itectec.com/ubuntu/ubuntu-how-to-override-a-dll-without-using-the-winecfg-gui-in-wine/' + '\n' + 'https://wiki.winehq.org/Wine_User%27s_Guide#WINEDLLOVERRIDES.3DDLL_Overrides', 'SO features');
bPass = false;
}
// UI
if (!soFeat.dpi) {
fb.ShowPopupMessage('Found an issue on current installation:\nRegistry entry not found:\nHKCU\\Control Panel\\Desktop\\WindowMetrics\\AppliedDPI\n\nFix: add entry to registry.\n' + 'HKCU\\Control Panel\\Desktop\\WindowMetrics\\AppliedDPI          --->     96\n\nCMD command:\n' + 'reg.exe ADD "HKEY_CURRENT_USER\Control Panel\Desktop\WindowMetrics" /v AppliedDPI /t REG_DWORD /d 96', 'SO features');
bPass = false;
}
if (!soFeat.gdiplus) {
fb.ShowPopupMessage('Found an issue on current installation:\nFonts are not found via utils.CheckFont() and gdi.Font().\n\nFix: install install \'gdiplus\' package with winetricks.\n' + 'https://wiki.winehq.org/Winetricks' + '\n\nTerminal command:\n' + 'sh winetricks gdiplus', 'SO features');
bPass = false;
} else if (!soFeat.segoe) {
fb.ShowPopupMessage('Found an issue on current installation:\nSegoe UI font is missing.\n\nFix: install missing font.\n' + 'https://github.com/mrbvrz/segoe-ui-linux', 'SO features');
bPass = false;
}
return bPass;
}
Title: Re: Wine/Spider Monkey Panel/Script bugs on Linux
Post by: michtar on 2022-01-05 08:15:40
DPI related fixes (either modified helpers.js or registry editing) worked with album art.js. Thanks.

Now the question is why some images flicker, hopefully not randomly  >:( .
Title: Re: Wine/Spider Monkey Panel/Script bugs on Linux
Post by: regor on 2022-02-03 12:30:01
Could someone test this code on wine?

Code: [Select]
const testFile = 'c:\\test.txt';
const app = new ActiveXObject('Shell.Application');
app.NameSpace(0).ParseName(testFile).InvokeVerb('delete');

If that works ('test.txt' file must be created first) and the file is sent to the recycle bin, then that method may be used as an alternative to app.NameSpace(10).MoveHere(file), which is known to fail on unix.

Finally I would really appreciate this second test:

Code: [Select]
const recycle= '"c:\\Recycle.exe"';
const testFile = '"c:\\test.txt"';
const WshShell = new ActiveXObject('WScript.Shell');
WshShell.Run(recycle + ' -f ' + testFile, 0, true);
It may be used as fallback if the others fail or Shift is being pressed (since that bypasses recycling on win for previous methods)

The test file and recycle paths may be changed as required. The exe is attached to the post.
Title: Re: Wine/Spider Monkey Panel/Script bugs on Linux
Post by: tomaasz on 2022-02-09 09:11:36
Hi, could you explain me, as i'm noob, step by step, howto do this on Mint 20.3 (Ubuntu) ? I would like to use footuner
Title: Re: Wine/Spider Monkey Panel/Script bugs on Linux
Post by: marc2k3 on 2022-02-24 15:56:41
Here's a dev build with utils.GetClipboardText() and utils.SetClipboardText()

https://ci.appveyor.com/project/TheQwertiest/foo-spider-monkey-panel/builds/42696596

Pull request on github...

https://github.com/TheQwertiest/foo_spider_monkey_panel/pull/158
Title: Re: Wine/Spider Monkey Panel/Script bugs on Linux
Post by: paregistrase on 2022-02-24 17:53:12
Here's a dev build with utils.GetClipboardText() and utils.SetClipboardText()

https://ci.appveyor.com/project/TheQwertiest/foo-spider-monkey-panel/builds/42696596

Pull request on github...

https://github.com/TheQwertiest/foo_spider_monkey_panel/pull/158

Great news.

is there any .fb2k-component file available to test it?
Title: Re: Wine/Spider Monkey Panel/Script bugs on Linux
Post by: marc2k3 on 2022-02-24 18:04:31
Ah yes, I meant to link here...

https://ci.appveyor.com/project/TheQwertiest/foo-spider-monkey-panel/builds/42696596/job/gjt89h4p5y76dr69/artifacts
Title: Re: Wine/Spider Monkey Panel/Script bugs on Linux
Post by: paregistrase on 2022-02-24 18:32:01
Ah yes, I meant to link here...

https://ci.appveyor.com/project/TheQwertiest/foo-spider-monkey-panel/builds/42696596/job/gjt89h4p5y76dr69/artifacts

Thanks.

But copy-paste continoues to give me a crash

Code: [Select]
Error: Spider Monkey Panel v1.6.2-dev+7c0928bf ({3F91DEBE-38E0-4E81-9F34-32FCD36EF5EB}: Library Tree v2.2.0 by WilB)
WinAPI error:
  ActiveXObject failed with error (0x80004001):
    No implementado.

File: search.js
Line: 288, Column: 5
Stack trace:
  on_char@search.js:288:5
  on_char@callbacks.js:39:9
Title: Re: Wine/Spider Monkey Panel/Script bugs on Linux
Post by: marc2k3 on 2022-02-24 18:36:34
Show me the changes you made to the scripts, before and after.

As an example, I had to replace this line of code in my copy of JSPlaylist

Code: [Select]
cInputbox.doc.parentWindow.clipboardData.setData("Text", this.text_selected);

with this...

Code: [Select]
utils.SetClipboardText(this.text_selected);

Depending on the complexity of the scripts, there could multiple instances where code like this would need updating.
Title: Re: Wine/Spider Monkey Panel/Script bugs on Linux
Post by: paregistrase on 2022-02-24 18:55:13
Show me the changes you made to the scripts, before and after.

As an example, I had to replace this line of code in my copy of JSPlaylist

Code: [Select]
cInputbox.doc.parentWindow.clipboardData.setData("Text", this.text_selected);

with this...

Code: [Select]
utils.SetClipboardText(this.text_selected);

Depending on the complexity of the scripts, there could multiple instances where code like this would need updating.

No changes at all, i install a new one to test.

So is not that easy as install a new SMP version. The scripts needs an update too.

Right now i'm using Biography and library tree. Any idea what i need to modify?
Title: Re: Wine/Spider Monkey Panel/Script bugs on Linux
Post by: marc2k3 on 2022-02-24 19:25:25
Well every single instance of the old code will contain parentWindow.clipboardData. That's something to search for. I already gave an example of how to replace the code in my previous post.

Perhaps you should just wait and see if my pull request is accepted, and if it is, some script authors *might* update their scripts.

Title: Re: Wine/Spider Monkey Panel/Script bugs on Linux
Post by: paregistrase on 2022-02-24 19:32:09
Well every single instance of the old code will contain parentWindow.clipboardData. That's something to search for. I already gave an example of how to replace the code in my previous post.

Perhaps you should just wait and see if my pull request is accepted, and if it is, some script authors *might* update their scripts.

Sure, changes the code is above my nonexistent coding skills.  ;D

Thanks man
Title: Re: Wine/Spider Monkey Panel/Script bugs on Linux
Post by: TT on 2022-02-24 19:57:39
Thanks a lot @marc2k3!

Really nice, this means I can re-enable the clipboard func for the library and biography without crashing foobar right?
Will update my code when @TheQwertiest merges the code and I have time to test it 8)

This means I only have the drag and drop problem in the playlist under Wine...

-TT
Title: Re: Wine/Spider Monkey Panel/Script bugs on Linux
Post by: paregistrase on 2022-03-01 16:27:42
ignoring my own advice i have been trying to test the new features.

In Biography v1.2.0 (by WilB) I made the next changes in menu.js

In line 1015
Code: [Select]
this.docTxt = doc.parentWindow.clipboardData.getData('text');
to
Code: [Select]
this.docTxt = utils.GetClipboardText();

And the menu paste text from clipboard works  8)

In Library Tree v2.2.0 (by WilB)  I made the next changes in search.js

In line 223
Code: [Select]
if (this.start != this.end) this.doc.parentWindow.clipboardData.setData('text', panel.search.txt.substring(this.start, this.end));
to
Code: [Select]
if (this.start != this.end) utils.SetClipboardText(text, panel.search.txt.substring(this.start, this.end));

In line 227
Code: [Select]
iif (this.start != this.end) this.doc.parentWindow.clipboardData.setData('text', panel.search.txt.substring(this.start, this.end)); // fall through
to
Code: [Select]
if (this.start != this.end) utils.SetClipboardText(text, panel.search.txt.substring(this.start, this.end)); // fall through

In line 290
Code: [Select]
text = this.doc.parentWindow.clipboardData.getData('text') || ''; // fall through
to
Code: [Select]
text = utils.GetClipboardText() || ''; // fall through

In line 387
Code: [Select]
his.paste = this.doc.parentWindow.clipboardData.getData('text') ? true : false;
to
Code: [Select]
this.paste = utils.GetClipboardText() ? true : false;

and the copy, cut and paste in the search field works  8)

Of course changes was made by trial and error without coding knowledge so could be an aberration. Any help will be welcome  :D 


Thanks @marc2k3





Title: Re: Wine/Spider Monkey Panel/Script bugs on Linux
Post by: marc2k3 on 2022-03-01 19:25:23
This is incorrect.

Code: [Select]
if (this.start != this.end) utils.SetClipboardText(text, panel.search.txt.substring(this.start, this.end));

It only expects a single argument but you've inserted an unexpected variable named text so it should be this like this....

Code: [Select]
if (this.start != this.end) utils.SetClipboardText(panel.search.txt.substring(this.start, this.end));

Also, using || ''; is not necessary now

Code: [Select]
text = utils.GetClipboardText() || '';

It can be simplified to...

Code: [Select]
text = utils.GetClipboardText();

The component already returns an empty string if the clipboard contents are not text.
Title: Re: Wine/Spider Monkey Panel/Script bugs on Linux
Post by: paregistrase on 2022-03-01 20:18:44
Thank you @marc2k3
Title: Re: Wine/Spider Monkey Panel/Script bugs on Linux
Post by: TT on 2022-04-20 10:31:39
Hi,

I've encountered a SMP/GDI+ bug when it tries to load a JPG image with an unusual ICC profile embedded, although there seems to be no problem on Windows, it crashes on Linux/Wine:

Code: [Select]
GdiPlus error: DrawImage failed with error (0x7): Win32Error 

Can someone confirm this? Will forward this to @TheQwertiest...
I've used Wine 6.0.1 with original GDI+ with all required dll's ( wsh57, mdac28 ) and @marc2k3's SMP v1.6.2-dev+7c0928bf ( would be the same with 1.6.1 ).

For now, I've solved this issue by adding a try catch when drawing/resizing an image...

The image has an Generic Gray ICC profile embedded.

-TT
Title: Re: Wine/Spider Monkey Panel/Script bugs on Linux
Post by: marc2k3 on 2022-04-20 12:58:45
It's unlikely anything can be done because the component is just using windows APIs. Seems very much like a WINE bug??

But you could test default UI/columns UI. Try the artwork panels/CUI playlist view.
Title: Re: Wine/Spider Monkey Panel/Script bugs on Linux
Post by: TT on 2022-04-20 14:03:40
@mark2k3,

I've tried pure Columns UI with playlist and artwork view and the cover.jpg is loaded and displayed correctly without any crash in Wine.
Also tried your samples -> album art.js and thumbs.js with a SMP and it starts to crash with the same error...
It seems that it is a SMP bug, but it's really weird that the cover.jpg with the embedded generic gray icc profile does not crash on Windows...

But few days ago a user reported the same error on Windows but this time with a corrupt image:
https://github.com/TT-ReBORN/Georgia-ReBORN/issues/66
that's why I've started to debug it...

Also this problems relates to this old discussion from 2019 in WilB's Biography thread:
https://hydrogenaud.io/index.php?topic=112914.msg976737#msg976737
https://hydrogenaud.io/index.php?topic=112914.msg977175#msg977175

-TT
Title: Re: Wine/Spider Monkey Panel/Script bugs on Linux
Post by: marc2k3 on 2022-04-20 15:23:16
JSP/SMP respect the colour profiles embedded in images and DUI/CUI don't. It's clearer in this example...

(https://i.imgur.com/FsxUB80.png)

Disabling support for embedded colour profiles would probably "fix" your issue but then break the display of images like the one above.

I suppose you could argue that DUI/CUI have many more users and I've not seen any complaints for the existing behaviour so maybe these horrible scripting components should be updated to do the  same.

edit: i don't have to change JSP as it won't run on WINE.  :P

Title: Re: Wine/Spider Monkey Panel/Script bugs on Linux
Post by: paregistrase on 2022-04-20 18:11:58
Hi TT

I'm using the modified version of SMP made by marc (Build: 15:49:00, Feb 24 2022), a biography modified to use it with wine-7.6 (Staging) and the image load.



https://imgur.com/a/u7IApId (https://imgur.com/a/u7IApId)

Title: Re: Wine/Spider Monkey Panel/Script bugs on Linux
Post by: TT on 2022-04-20 18:30:52
Hi paregistrase,

Interesting! I'll try wine-7.6, maybe they're using a newer GDI+ version which fixed it?!
Do you also have 6.0.1 installed and can test it with this version? This would help a lot to know :)

-TT
Title: Re: Wine/Spider Monkey Panel/Script bugs on Linux
Post by: paregistrase on 2022-04-20 18:56:46
Hi paregistrase,

Interesting! I'll try wine-7.6, maybe they're using a newer GDI+ version which fixed it?!
Do you also have 6.0.1 installed and can test it with this version? This would help a lot to know :)

-TT

Sure no problem. I'll try stable

wine-6.0.4 new 32prefix without any modification load the image too


https://imgur.com/a/NkiSfb1 (https://imgur.com/a/NkiSfb1)
Title: Re: Wine/Spider Monkey Panel/Script bugs on Linux
Post by: marc2k3 on 2022-04-20 19:17:03
Can you test this image which I used for my JSP/DUI comparison a few posts up.

https://camo.githubusercontent.com/103a0f0301f70dcb0883cd2c83b02567d67f22838d6b2e15ca3d08817118bac4/68747470733a2f2f70686f746f73617563652e6e65742f696d616765732f72617370626572726965732d637267622e6a7067
Title: Re: Wine/Spider Monkey Panel/Script bugs on Linux
Post by: paregistrase on 2022-04-20 19:35:12
Can you test this image which I used for my JSP/DUI comparison a few posts up.

https://camo.githubusercontent.com/103a0f0301f70dcb0883cd2c83b02567d67f22838d6b2e15ca3d08817118bac4/68747470733a2f2f70686f746f73617563652e6e65742f696d616765732f72617370626572726965732d637267622e6a7067

https://imgur.com/hS5pFD6 (https://imgur.com/hS5pFD6)



Title: Re: Wine/Spider Monkey Panel/Script bugs on Linux
Post by: marc2k3 on 2022-04-20 19:45:44
So completely different to how you view it in your browser or the right hand pane in my screenshot a few posts up. Those berries should be red!

Still, displaying the wrong colours is better than throwing an error and it has parity with fb2k itself/facets/CUI.


Title: Re: Wine/Spider Monkey Panel/Script bugs on Linux
Post by: paregistrase on 2022-04-20 20:01:22
So completely different to how you view it in your browser or the right hand pane in my screenshot a few posts up. Those berries should be red!

Still, displaying the wrong colours is better than throwing an error and it has parity with fb2k itself/facets/CUI.

Correct, in firefox is red.

Also in the file manager preview is blue like in foobar but when i open it in any image viewer is red
Title: Re: Wine/Spider Monkey Panel/Script bugs on Linux
Post by: TT on 2022-04-21 17:34:33
So I've tried Wine 7.6 with a 32 prefix and I got mixed results...

With pure Columns UI ( no SMP panel ), playlist and artwork view in Columns UI, the cover.jpg with the embedded Generic Gray ICC profile is loaded without any crash. Marc's image with the berries, the ICC profile is ignored = blue berries.

--------------------------------------------------------------------------------------------------------------

Now if I try with a SMP panel and Marc's samples Album art.js and Thumbs.js:

Blue berries in Album art.js

and crash in Thumbs.js:
Code: [Select]
Error: Spider Monkey Panel v1.6.2-dev+7c0928bf ({AD15D11D-34C8-46F7-B13B-1D017BA1849A}: Thumbs by marc2003)
DrawImage failed:
GdiPlus error: DrawImage failed with error (0x7): Win32Error
File: helpers.js
Line: 175, Column: 6
Stack trace:
  _drawImage@helpers.js:175:6
  _thumbs/this.size/<@thumbs.js:74:6
  r@lodash.min.js:5:356
  Xe@lodash.min.js:67:74
  _thumbs/this.size@thumbs.js:73:7
  on_size@thumbs.js:16:9

--------------------------------------------------------------------------------------------------------------

The cover.jpg with the embedded Generic Gray ICC profile crashes in both:

Album art.js:
Code: [Select]
Error: Spider Monkey Panel v1.6.2-dev+7c0928bf ({F1C40D43-2658-44E2-9626-880BCDD56B0B}: Album Art by marc2003)
DrawImage failed:
GdiPlus error: DrawImage failed with error (0x7): Win32Error
File: helpers.js
Line: 175, Column: 6
Stack trace:
  _drawImage@helpers.js:175:6
  _albumart/this.paint@albumart.js:23:4
  on_paint@album art.js:22:11

Thumbs.js:
Code: [Select]
Error: Spider Monkey Panel v1.6.2-dev+7c0928bf ({AD15D11D-34C8-46F7-B13B-1D017BA1849A}: Thumbs by marc2003)
DrawImage failed:
GdiPlus error: DrawImage failed with error (0x7): Win32Error
File: helpers.js
Line: 175, Column: 6
Stack trace:
  _drawImage@helpers.js:175:6
  _thumbs/this.size/<@thumbs.js:74:6
  r@lodash.min.js:5:356
  Xe@lodash.min.js:67:74
  _thumbs/this.size@thumbs.js:73:7
  on_size@thumbs.js:16:9

--------------------------------------------------------------------------------------------------------------
 
The cover.jpg with the embedded Generic Gray ICC profile in Georgia-ReBORN's Playlist crashes ( would be the same in Biography but WilB added a try catch ):
Code: [Select]
Error: Spider Monkey Panel v1.6.2-dev+7c0928bf ({04620F16-1878-47A1-8EFE-0CE0B99566CC}: Georgia-ReBORN v2.0.3b by TT)
Resize failed:
GdiPlus error: DrawImage failed with error (0x7): Win32Error
File: main.js
Line: 4517, Column: 21
Stack trace:
  assign_art@main.js:4517:21
  getHeaderArtwork/</<@main.js:3017:12

Blue berries displayed in Georgia-ReBORN's Playlist and Biography with no crash...

--------------------------------------------------------------------------------------------------------------

So yea that's a really weird bug, it could be either a GDI+ bug ( maybe different versions handle it different ) or a bug in the SMP image.Resize() callback?
The cover.jpg with the Generic Gray ICC profile does make more problems than your custom ICC profile in your berries image...


-TT
Title: Re: Wine/Spider Monkey Panel/Script bugs on Linux
Post by: marc2k3 on 2022-04-21 18:19:57
The .Resize function uses the same windows APIs as DrawImage. It's not an SMP bug - you're just encountering the same WINE gdiplus bug in different places.

If anyone wants to build their own copy of SMP without colour profile support so it behaves like CUI/DUI/facets etc, the TRUE needs replacing with FALSE on these 2 lines of code....

https://github.com/TheQwertiest/foo_spider_monkey_panel/blob/00b8cee40801f9594fcb45fbd578e9b91c1304a3/foo_spider_monkey_panel/utils/art_helpers.cpp#L114

https://github.com/TheQwertiest/foo_spider_monkey_panel/blob/00b8cee40801f9594fcb45fbd578e9b91c1304a3/foo_spider_monkey_panel/utils/image_helpers.cpp#L136
Title: Re: Wine/Spider Monkey Panel/Script bugs on Linux
Post by: paregistrase on 2022-04-21 18:39:11
It is a weird situation, I'm unable to crash SMP in any of the situations that crash for TT.
I installed Georgia-ReBORN and load the images without crashes.



(https://i.imgur.com/VGy2PBM.png)

(https://i.imgur.com/viTdn3r.png)

(https://i.imgur.com/24MLA22.png)
Title: Re: Wine/Spider Monkey Panel/Script bugs on Linux
Post by: paregistrase on 2022-04-21 19:16:10
@TT

At least I managed to get your crash  8)

Installing the GDI+ winetricks verb gives me your Win32Error.

Removing the verb and installing the XP verb version avoid the crash but get a weird yellowish display of both images.

(https://i.imgur.com/B1fdU7D.png)

(https://i.imgur.com/keeqI4d.png)

(https://i.imgur.com/ZiAmmOr.png)

Without any verb the images load without crash or weird effect (besides the lack of ICC)

Title: Re: Wine/Spider Monkey Panel/Script bugs on Linux
Post by: TT on 2022-04-21 21:43:09
@paregistrase,

thanks for your testing.

In your previous post GDI+ is not working correctly because it is seen in the screenshots, see right top corner.
Minimize, fullscreen and close buttons are not parsed right, they are displayed as 0 2 r.

In your last post GDI+ is working correctly and the weird yellow color is also a GDI+ bug, this happens in old GDI+ versions...

@marc2k3, at first I thought so too, that it is a GDI+ issue ( and I still think it is ) but I still don't understand why your berrie image does not crash in your Album art.js and is displayed blue.
But in your Thumb.js it does crash, in both test the same GDI+ version was used with a SMP panel. So what's so different between Album art.js and Thumbs.js? Though the cover.jpg with the generic gray ICC profile crashes in both Album art.js and Thumbs.js, that's why I posted this comparison in the first place.

-TT


Title: Re: Wine/Spider Monkey Panel/Script bugs on Linux
Post by: paregistrase on 2022-04-21 22:58:52
@paregistrase,

thanks for your testing.

In your previous post GDI+ is not working correctly because it is seen in the screenshots, see right top corner.
Minimize, fullscreen and close buttons are not parsed right, they are displayed as 0 2 r.

In your last post GDI+ is working correctly and the weird yellow color is also a GDI+ bug, this happens in old GDI+ versions...

@marc2k3, at first I thought so too, that it is a GDI+ issue ( and I still think it is ) but I still don't understand why your berrie image does not crash in your Album art.js and is displayed blue.
But in your Thumb.js it does crash, in both test the same GDI+ version was used with a SMP panel. So what's so different between Album art.js and Thumbs.js? Though the cover.jpg with the generic gray ICC profile crashes in both Album art.js and Thumbs.js, that's why I posted this comparison in the first place.

-TT

The first serie is with the stock WINE GDI. I didn't notice the wrong window controls. The others fonts seems to work (rating starts, etc)

I made another test in my main foobar installing GDI+ verb

(https://i.imgur.com/6yVXh8B.png)

Same as your experience album art and thumbs crash with the cover file.

Biography seems to ignore the file
Title: Re: Wine/Spider Monkey Panel/Script bugs on Linux
Post by: marc2k3 on 2022-04-21 23:06:47
So what's so different between Album art.js and Thumbs.js?

There really should be no difference.

Either they both work or they both fail. Knowing the internals, I really don't see how one can work and the other one does not.

This snippet reads the album art first and then uses gdi.Image to load the same image from the path that is also returned.

Code: [Select]
async function get_album_art() {
    let handle = fb.GetFocusItem();
    if (handle) {
        let result = await utils.GetAlbumArtAsyncV2(window.ID, handle, 0);
        if (result.image) {
            album_art = result.image;
            image = gdi.Image(result.path);
            window.Repaint();
        }
    }
}

let album_art = null, image = null;
get_album_art();


function on_paint(gr) {
    if (album_art) {
        try {
            gr.DrawImage(album_art, 0, 0, 300, 300, 0, 0, album_art.Width, album_art.Height);
        } catch(e) {
            console.log("drawing album_art failed", e);
        }
    } else {
        console.log("album_art not valid");
    }
   
    if (image) {
        try {
            gr.DrawImage(image, 0, 300, 300, 300, 0, 0, image.Width, image.Height);
        } catch(e) {
            console.log("drawing image failed", e);
        }
    } else {
        console.log("image not valid");
    }
}

edit: just to clarify, thumbs uses gdi.Image, albumart uses utils.GetAlbumArtAsyncV2
Title: Re: Wine/Spider Monkey Panel/Script bugs on Linux
Post by: paregistrase on 2022-04-21 23:51:35
There really should be no difference.
Either they both work or they both fail. Knowing the internals, I really don't see how one can work and the other one does not.

Yeah

With the cover picture and GDI+ verb both panels crashes. With the stock WINE GDI both works. With GDI+_winxp verb no crash but images are yellowish

And the berries picture doesn't crash in any case but is displayed blueish in stock and GDI+ or yellowish with gdi_xp.

Title: Re: Wine/Spider Monkey Panel/Script bugs on Linux
Post by: TT on 2022-04-22 00:12:03
Look at this @mark2k3, here is proof:

(https://i.ibb.co/3ykvScw/Album-Art-Thumbs.png)

I can always reload both panels and album art.js will never crash and load the image, but thumbs.js will always crash...

You can try it out for yourself @paregistrase.
You need to add two SMP, click on the first SMP and click configure, select sample > complete\album art.js
The other SMP panel select sample > complete\thumbs.js.

I've used Wine 6.0.1 with prefix32 with GDI+ ( No XP ) installed via latest Winetricks...
In Winecfg, set to Windows 7 compatibility.


-TT

Title: Re: Wine/Spider Monkey Panel/Script bugs on Linux
Post by: marc2k3 on 2022-04-22 00:42:40
Well thumbs does resize the images for creating the thumbnail strip. I'd have thought there wouldn't be much difference between using DrawImage inside on_paint and image.Resize but I guess there is.

Since newer versions of WINE are available (v7 is stable since January), I'd try that.

edit: just testing and wine7 is pretty terrible for default UI without any other components, it's glitchy as **** !!
edit2: wine staging (7.6) is also borked in DUI too but CUI seems OK.

As for the images, they display OK without any gdiplus verb but the min/max/close buttons don't display.

But using these FontAwesome chars work in my own buttons.

minimise: '\uf2d1'
maximise: '\uf2d0'
close: '\uf2d3' 

I think aiming for built in WINE gdiplus without downloading windows 7 SP1 via winetricks is the way to go if possible.
Title: Re: Wine/Spider Monkey Panel/Script bugs on Linux
Post by: TT on 2022-09-15 18:58:58
Hi @marc2k3 =)

I wanted to ask if you can help me out to "fix" the drag n drop Wine bug on Linux?
Drag n drop does not work if you drag and drop music files from the desktop or nautilus into the playlist with
SMP's drag n drop code because:

Spoiler (click to show/hide)

TheQwertiest wrote that you can make a workaround:
Quote
I don't think I will change my implementation in Catrox, but if you want to "fix" it in your theme, you just need to remove all the filters for external drop and just set it to 1 (DROPEFFECT_COPY).

I have done that by changing the action.Effect in on_drag_over and on_drag_drop in the sample/DragnDrop.js:
Code: [Select]
action.Effect = g_drop_effect.copy; // filter_effect_by_modifiers(action.Effect);
but it's still not working...

It shows in the console the following with g_drop_effect.copy (1):
Code: [Select]
1. on_drag_enter ( on first mouse playlist drag encounter )
2. on_drag_over ( when still holding left mouse btn and dragging around )
3. on_drag_drop ( on left mouse btn release ) -> calling and executing external_drop()
It drops without doing anything :(

I'm attaching a modified console logged debug version of the basic sample/DragnDrop.js
if you want to take a look, I would appreciate your help, thanks!

Btw, drag and drop works if you try it in the standard playlist view panel...

-TT

Title: Re: Wine/Spider Monkey Panel/Script bugs on Linux
Post by: marc2k3 on 2022-09-15 19:35:06
To test incoming drag/drop from other sources, all you need is this.

Code: [Select]
window.DefineScript('drop', { author: 'me', features: { drag_n_drop: true } });

// this is for the mouse pointer, it should change accordingly
function on_drag_over(action, x, y, mask) {
    var ap = plman.ActivePlaylist;
    if (ap == -1 || plman.IsAutoPlaylist(ap)) {
        // can't drop here
        action.Effect = 0;
    } else {
        // yes we can!
        action.Effect = 1;
    }
}

// handle the actual drop
function on_drag_drop(action, x, y, mask) {
    var ap = plman.ActivePlaylist;
    if (ap == -1 || plman.IsAutoPlaylist(ap)) {
        // can't drop here
        action.Effect = 0;
    } else {
        // yes we can!
        action.Effect = 1;
        action.Playlist = ap;
        action.Base = plman.PlaylistItemCount(ap);
    }
}

If this code does not work, SMP dnd doesn't work on WINE and there's nothing you can do about it until is updated.

Note the values of action.Effect are dependent entirely on whether or not you want to handle the incoming files. This is a simplistic example that refuses if no playlists are active or the the playlist is an autoplaylist. More complicated scenarios would involve checking the mouse position for the insertion point in a playlist or hovering over a list of multiple playlists in a manager of some kind.
   
Title: Re: Wine/Spider Monkey Panel/Script bugs on Linux
Post by: TT on 2022-09-15 20:29:11
Thanks but It did not work, it's basically the same code like the modified sample DragnDrop.js I've attached.

What is really confusing me, is that zeremy's footuner's drag n drop does work in Wine, it's using the JSPlaylist vSMP-Mod by Br3tt.
So, what is the difference between TheQwertiest dnd code and Br3tt's JSPlaylist vSMP-Mod?

Or maybe I'm wrong? Can you try out and tell me I'm incompetent?  :))

Thanks

-TT
Title: Re: Wine/Spider Monkey Panel/Script bugs on Linux
Post by: marc2k3 on 2022-09-15 20:37:19
First of all, my days of downloading ubuntu ISOs and firing up virtual machines are behind me.

But the code for JSPlaylist is here...

https://github.com/TheQwertiest/foo_spider_monkey_panel/blob/997ad85febd614d30949e85c8df2c126f58038ed/component/samples/jsplaylist-mod/js/main.js#L2821L2862

No different from the example I posted. action.Effect is set to 1 dependent on mouse position/playlist properties. It really is that simple.

edit: you did read the first sentence of my previous post...

Code: [Select]
To test incoming drag/drop from other sources, all you need is this.

If you're talking about dragging JSplaylist playlist items then that is something else entirely.

I didn't think you were because of this...

Quote
Drag n drop does not work if you drag and drop music files from the desktop or nautilus into the playlist with SMP's drag n drop code because:
Title: Re: Wine/Spider Monkey Panel/Script bugs on Linux
Post by: TT on 2022-09-15 21:22:19
Ok, I'm NOT incompetent at all, I've found what the problems is and I thought I was going crazy  :P

The problem is the SMP v1.6.2-dev+7c0928bf ( I'm using the one with the fixed clipboard you've compiled ) ,
the drag and drop code above DOES work with SMP 1.5.2!

Can you help out with this marc? Find the difference between SMP 1.5.2 and SMP 1.6.2-dev and compile a new fixed one since TheQwertiest is absent?
I would appreciate it if you can!

@TheQwertiest, take a note, thanks.

-TT
Title: Re: Wine/Spider Monkey Panel/Script bugs on Linux
Post by: TT on 2022-09-15 21:37:49
It seems TheQwertiest changed dnd behavior in SMP 1.6.0, see this here:
https://theqwertiest.github.io/foo_spider_monkey_panel/docs/changelog/#160---2021-09-11

Quote
Changed: fb.DoDragDrop() is now executed asynchronously.
Quote
Fixed (?) drag-n-drop sometimes not working (#60).

And for clarification, we are talking about external drag and drop, from desktop/nautilus to the Playlist.
The code was indeed the same as you mentioned, zeremy's footuner is just using SMP 1.5.2, that's why I found out...

-TT
Title: Re: Wine/Spider Monkey Panel/Script bugs on Linux
Post by: marc2k3 on 2022-09-15 21:42:41
Can you check 1.6.1 official works? If I build a new copy with clipboard support, it will be based on that.

No new build from me. I can't compile with the latest VS2022 I'm running. Too many errors I don't understand.
Title: Re: Wine/Spider Monkey Panel/Script bugs on Linux
Post by: TT on 2022-09-15 22:14:46
Can you check 1.6.1 official works? If I build a new copy with clipboard support, it will be based on that.

Ok I've tested it and the dnd bug starts with 1.6.0 and 1.6.1 ( Hotfix ) also doesn't work...

Edit: Well thanks for trying marc, I guess @TheQwertiest needs to fix this issue himself.

-TT
Title: Re: Wine/Spider Monkey Panel/Script bugs on Linux
Post by: marc2k3 on 2022-09-15 22:25:22
edit: i have no idea what I'm doing.  :))  :-X
Title: Re: Wine/Spider Monkey Panel/Script bugs on Linux
Post by: TT on 2022-09-15 22:38:49
edit: i have no idea what I'm doing.  :))  :-X

I've also no idea what I'm doing most of the time ;)

Well at least with your help I could debug this problem, so I'm grateful  :D
I hope TheQwertiest comes back soon, fingers crossed...

-TT
Title: Re: Wine/Spider Monkey Panel/Script bugs on Linux
Post by: paregistrase on 2023-02-28 13:45:01
First thing, sorry for the "reposting" but I thing that is a good thing to have this here.
The fonts are a recurrent problem with wine. The Segoe UI in windows display all characters and languages but in wine show a lot of ugly squares.
Everybody (myself included) have tried a lot of method and hacks to make them show good but any ot them cover al use cases.
In a recent conversation with mark in MusicBrainz threah he point me to the solution.
In the first place another dirty hack comes out of my mind, but digging in I think I found a permanent solution.
I found this:
Code: [Select]
By default windows 10 always uses Segoe UI, but when a language is required that is not supported by it, Windows will fall through a prespecified fallback font stack for Segoe UI, which is stored in the Windows NT part of the registry (not the standard Windows part), at:
For Segoe UI, the font stack is:
TAHOMA.TTF,Tahoma
MEIRYO.TTC,Meiryo UI,128,96
MEIRYO.TTC,Meiryo UI
MSGOTHIC.TTC,MS UI Gothic
MSJH.TTC,Microsoft JhengHei UI,128,96
MSJH.TTC,Microsoft JhengHei UI
MSYH.TTC,Microsoft YaHei UI,128,96
MSYH.TTC,Microsoft YaHei UI
MALGUN.TTF,Malgun Gothic,128,96
MALGUN.TTF,Malgun Gothic
MINGLIU.TTC,PMingLiU
SIMSUN.TTC,SimSun
GULIM.TTC,Gulim
YUGOTHM.TTC,Yu Gothic UI,128,96
YUGOTHM.TTC,Yu Gothic UI
SEGUISYM.TTF,Segoe UI Symbol

I search in wine with regedit and this key is not present.
So I add it.
In linux we don't have this wine fonts but you can download them from internet windows 10 fonts (https://github.com/taveevut/Windows-10-Fonts-Default) or add to the list the Noto fonts corresponding to the language you miss.
After installing Segoe UI and Segoe UI Symbols you must add with regedit this

In HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\FontLink\SystemLink

New REG_MULTI_SZ with name "Segoe UI" and as value
Code: [Select]
TAHOMA.TTF,Tahoma
MEIRYO.TTC,Meiryo UI,128,96
MEIRYO.TTC,Meiryo UI
MSGOTHIC.TTC,MS UI Gothic
MSJH.TTC,Microsoft JhengHei UI,128,96
MSJH.TTC,Microsoft JhengHei UI
MSYH.TTC,Microsoft YaHei UI,128,96
MSYH.TTC,Microsoft YaHei UI
MALGUN.TTF,Malgun Gothic,128,96
MALGUN.TTF,Malgun Gothic
MINGLIU.TTC,PMingLiU
SIMSUN.TTC,SimSun
GULIM.TTC,Gulim
YUGOTHM.TTC,Yu Gothic UI,128,96
YUGOTHM.TTC,Yu Gothic UI
SEGUISYM.TTF,Segoe UI Symbol
NOTOSANS-REGULAR.TTF,Noto Sans
NOTOSANSCJK-REGULAR.TTC,Noto Sans CJK JP
NOTOSANSSYMBOLS-REGULAR.TTF,Noto Sans Symbols
You can add as much Noto Sans <language> as you can or your choice fonts.
This way you can use Segoe UI in foobar and scripts and when it need to display a characters that is not in there it will fallback to the added fonts to show it, just like Windows do.
Hope that it will help and resolve the eternal font problem.



Title: Re: Wine/Spider Monkey Panel/Script bugs on Linux
Post by: regor on 2023-02-28 22:24:11
https://github.com/regorxxx/Playlist-Tools-SMP/wiki/Wine
Reworded it a bit and added it to the wiki, so it's placed along the installation notes of my scripts. Thanks :)
Title: Re: Wine/Spider Monkey Panel/Script bugs on Linux
Post by: paregistrase on 2023-02-28 22:36:38
https://github.com/regorxxx/Playlist-Tools-SMP/wiki/Wine
Reworded it a bit and added it to the wiki, so it's placed along the installation notes of my scripts. Thanks :)

Clear and concise.
8)
Maybe an "after picture"....every good info commercial need one

https://imgur.com/dPqdHNT


Title: Re: Wine/Spider Monkey Panel/Script bugs on Linux
Post by: fooball on 2023-03-01 07:29:51
https://github.com/regorxxx/Playlist-Tools-SMP/wiki/Wine
Reworded it a bit and added it to the wiki, so it's placed along the installation notes of my scripts. Thanks :)
Are you open to editing?

s/sensible/sensitive/ (1 instance)
s/(me)/(to me)/ (1 instance)
s/wine/Wine/ (numerous instances)
s/windows/Windows/ (numerous instances)
s/unix/Unix/ (numerous instances)
s/foobar/Foobar/  (1 instance)
Title: Re: Wine/Spider Monkey Panel/Script bugs on Linux
Post by: marc2k3 on 2023-03-01 07:40:22
s/foobar/Foobar/  (1 instance)

Absolutely not. foobar should never be capitalised.

edit: the HA wiki might do it to article URLs but IIRC that's a limitation of the MediaWiki software used to run it. Any instance of foobar2000 written in article titles/content should be lower case.
Title: Re: Wine/Spider Monkey Panel/Script bugs on Linux
Post by: fooball on 2023-03-01 08:07:07
Absolutely not. foobar should never be capitalised.

edit: the HA wiki might do it to article URLs but IIRC that's a limitation of the MediaWiki software used to run it. Any instance of foobar2000 written in article titles/content should be lower case.
Really?  OK, but I find that very odd as a style choice.  Capitalising the first letter of a word signals that it is a proper noun, and lack of capitalisation makes it much harder to parse a sentence.  Why make life hard for people, particularly non-native English readers, just to be "trendy"?  I had previously assumed instances of "foobar" were just laziness by the typist.

You could also say, then, that "foobar" should always be "foobar2000".

Meanwhile, I submit, "Foobar" is excusable because it is a proper noun and that's how proper nouns would normally be represented.
Title: Re: Wine/Spider Monkey Panel/Script bugs on Linux
Post by: regor on 2023-03-01 12:18:33
Quote
Are you open to editing?
Done :) Thanks-

Will create a new independent wiki on github recompiling all these tips one of these days. (much better than only on my own)
And there anyone could edit it freely.
Title: Re: Wine/Spider Monkey Panel/Script bugs on Linux
Post by: fooball on 2023-04-11 10:34:24
Absolutely not. foobar should never be capitalised.
From Type & typography* by Baines & Haslam, p.164:
Quote
A further problem today arises when companies who use lower-case only (or all caps) as part of their identity want them always to appear like that in print.  There is no reason for this: their name is different from their signature and should be set in a standard style.
The point they are making is disambiguation.  I am very much pro disambiguation.

Thus, "Foobar" is a proper noun and should be treated as such (and, without the initial capital, "foobar" is a noun meaning something disposable).  foobar2000 is the signature, with fb2k an unambiguous abbreviation.

But note I fundamentally disagree with Baines & Haslam in other matters covered in their book, particularly the use of additional white space after a full stop within a sentence.  In my opinion (and completely contrary to modern practice – AKA "French Spacing"!), having additional space is an aid to reading – and typographically a wide-space character should be used following a full stop (traditionally an em-space, U+2003), with a double space only being used for convenience (or when the em-space is not available, eg on a typewriter).  In my view French Spacing has only become adopted out of laziness!

* I have not found it referred to in the book, but I suspect the choice of capitalisation in the book's title is deliberately antagonistic and relates to the discussion on heading case... but it's a title, not a heading!