WheezyE / Winelink

Installation scripts for running Winlink (RMS Express/Trimode & VARA) on non-Windows computers. Wine & Box86 make this project possible.
69 stars 19 forks source link

Add VarAC ? #27

Closed djecom1 closed 1 year ago

djecom1 commented 2 years ago

Do you think that is possible to add installation of VarAC to your script? https://www.varac-hamradio.com/

WheezyE commented 2 years ago

It seems to have stability and TCP issues with box86 and/or wine-mono at the moment, but maybe in the future it could be possible? image

Here are some install notes if you want to tinker with it a bit or try it out. The download link might break in the future:

mkdir varac && cd varac
wget http://www.dxatlas.com/OmniRig/Files/OmniRig.zip
wget -O VarAC_V3_2_1.zip https://288b5dcd-0898-4460-b829-4a40f1724acf.usrfiles.com/archives/288b5d_15be9603f4bf45ba96b3f150e6072827.zip?dn=VarAC_V3_2_1.zip
7z x VarAC_V3_2_1.zip
7z x OmniRig.zip -o"OR"
wine OR/OmniRigSetup.exe /SILENT
WheezyE commented 2 years ago

Oh the TCP issues were from a testing version of box86 I was using. TCP works with the version of box86 used in Winelink.

VarAC seems to crash a lot though. I'll have to see if I can look into what might be causing that. It's a little bit lower priority on my list of things to look at, if I'm being honest. But I'll look into it when I get some time. Thank you for telling me about VarAC.

WheezyE commented 2 years ago

More testing notes: BOX86_DYNAREC_BIGBLOCK=0 doesn't seem to help the crashes.

SIGSEGV in box86 ed8e01ea (Dec 10, 21) may be causing the crashes. ``` BOX86_LOG=1 wine VarAC.exe 2>&1 | tee varac_log1.txt ... 7277|SIGSEGV @0x4fe90db4 (???(0x4fe90db4)) (x86pc=0x1026744f/???:"???", esp=0x21e7ec, stack=0x40bb4000:0x413b4000 own=(nil) fp=0x23fae8), for accessing 0x4 (code=1/prot=0), db=0x4bdf66d0(0x4fe90d94:0x4fe90e6c/0x10267440:0x1026747a/???:clean, hash:911230db/911230db) ================================================================= Native Crash Reporting ================================================================= Got a UNKNOWN while executing native code. This usually indicates a fatal error in the mono runtime or one of the native libraries used by your application. ================================================================= ================================================================= Managed Stacktrace: ================================================================= at <0xffffffff> at System.Object:__icall_wrapper_mono_gc_alloc_obj <0x00012> at System.Object:AllocSmall <0x000bb> at System.Windows.Forms.Internal.DeviceContext:SaveHdc <0x0009f> at System.Windows.Forms.Internal.DeviceContext:SaveHdc <0x00063> at System.Windows.Forms.Internal.WindowsGraphics:.ctor <0x0004b> at System.Windows.Forms.Internal.WindowsGraphics:.ctor <0x00047> at System.Windows.Forms.Internal.WindowsGraphics:FromHdc <0x0004b> at System.Windows.Forms.Label:OnPaint <0x002ab> at System.Windows.Forms.Control:PaintWithErrorHandling <0x000cf> at System.Windows.Forms.Control:WmPaint <0x00917> at System.Windows.Forms.Control:WndProc <0x0042b> at System.Windows.Forms.Label:WndProc <0x0016b> at ControlNativeWindow:OnMessage <0x0002f> at ControlNativeWindow:WndProc <0x00136> at System.Windows.Forms.NativeWindow:Callback <0x00076> at System.Windows.Forms.NativeWindow:Callback <0x00073> at System.Windows.Forms.NativeWindowProc:Callback <0x000db> at System.Windows.Forms.NativeWindowProc:Callback <0x00067> at <0xffffffff> at System.Windows.Forms.UnsafeNativeMethods:DispatchMessageW <0x00012> at ComponentManager:System.Windows.Forms.UnsafeNativeMethods.IMsoComponentManager.FPushMessageLoop <0x007d3> at ThreadContext:RunMessageLoopInner <0x00749> at ThreadContext:RunMessageLoop <0x0005b> at ThreadContext:RunMessageLoop <0x00087> at System.Windows.Forms.Application:Run <0x0005f> at VarAC.Program:Main <0x00053> at System.Object:runtime_invoke_void <0x00064> ================================================================= wine: Unhandled page fault on read access to 00000004 at address 1026744F (thread 0024), starting debugger... 01bc:err:x11settings:X11DRV_EnumDisplaySettingsEx Failed to get L"\\\\.\\DISPLAY1" current display settings. 01bc:err:x11settings:X11DRV_EnumDisplaySettingsEx Failed to get L"\\\\.\\DISPLAY1" current display settings. 01bc:err:x11settings:X11DRV_EnumDisplaySettingsEx Failed to get L"\\\\.\\DISPLAY1" current display settings. 0108:fixme:d3d:wined3d_guess_card_vendor Received unrecognized GL_VENDOR "Broadcom". Returning HW_VENDOR_NVIDIA. 01bc:err:x11settings:X11DRV_EnumDisplaySettingsEx Failed to get L"\\\\.\\DISPLAY1" current display settings. 01bc:err:x11settings:X11DRV_EnumDisplaySettingsEx Failed to get L"\\\\.\\DISPLAY1" current display settings. 01bc:err:x11settings:X11DRV_EnumDisplaySettingsEx Failed to get L"\\\\.\\DISPLAY1" current display settings. Debug level is 1 Dynarec for ARM, with extension: HALF FAST_MULT EDSP NEON VFPv4 IDIVA PageSize:4096 Box86 with Dynarec v0.2.5 ed8e01ea built on Dec 10 2021 23:45:16 BOX86: Wine detected, WINEPRELOADRESERVE="000400000-000556000" winedbg detected, not launching it! 0024:err:seh:start_debugger Couldn't start debugger L"winedbg --auto 32 944" (1359) Read the Wine Developers Guide on how to set up winedbg or another debugger ```
WheezyE commented 2 years ago

Using BOX86_DYNAREC_BIGBLOCK=0 BOX86_DYNAREC_STRONGMEM=2 wine VarAC.exe seems more stable, but VarAC still crashes.

VarAC is built with .NET 4.x https://github.com/ptitSeb/box86/issues/217#issuecomment-974332222

WheezyE commented 2 years ago

I'm also not sure if OmniRig might be crashing things, but I suspect it's from .NET 4.x compatibility issues with box86.

The short answer to all of this I think is that .NET compatibility has been a pretty challenging problem for box86 and we unfortunately might just have to wait for better stability in box86 before VarAC will work without crashing.

I'll keep this one on my radar and test it every now and then to see if we get better stability in box86 in the future, though it might be a while

djecom1 commented 2 years ago

The short answer to all of this I think is that .NET compatibility has been a pretty challenging problem for box86 and we unfortunately might just have to wait for better stability in box86 before VarAC will work without crashing.

I'll keep this one on my radar and test it every now and then to see if we get better stability in box86 in the future, though it might be a while

OK, thanks for testing ! Now let's wait and see.

PD7RON commented 2 years ago

Eric I have tested packet winlink with your script and used direwolf out off build a pi. It is now also possible for me to use rms express on the raspberry pi.

73 PD7RON Ron

Op 7 feb. 2022 om 06:19 heeft djecom1 @.***> het volgende geschreven:

The short answer to all of this I think is that .NET compatibility has been a pretty challenging problem for box86 and we unfortunately might just have to wait for better stability in box86 before VarAC will work without crashing.

I'll keep this one on my radar and test it every now and then to see if we get better stability in box86 in the future, though it might be a while

OK, thanks for testing ! Now let's wait and see.

— Reply to this email directly, view it on GitHub, or unsubscribe. Triage notifications on the go with GitHub Mobile for iOS or Android. You are receiving this because you are subscribed to this thread.

WheezyE commented 1 year ago

VARA TCP issues have been fixed with https://github.com/ptitSeb/box86/commit/26a6eb192231410772bf3c4aefaa4e05fe0c6949 , so we can continue debugging this application now. I have a few other higher-priority bugs to try to sort out first, but I haven't forgotten about VarAC.

As-of box86 14113faa (Oct 10 2022), wine-devel 7.1 (RPiOS 64-bit), I'm currently getting:

pi@raspberrypi4:~/Downloads $ wget https://288b5dcd-0898-4460-b829-4a40f1724acf.usrfiles.com/archives/288b5d_c885af0fc9e841efbe5d419a849ca7d3.zip?dn=VarAC_V6_0_8.zip
...
pi@raspberrypi4:~/Downloads/VARAAC $ BOX86_DYNAREC_BIGBLOCK=0 BOX86_DYNAREC_STRONGMEM=2 BOX86_DYNAREC_SAFEFLAGS=2 wine VarAC.exe
...
0024:fixme:imm:ImeSetActiveContext (0x18d00ba8, 1): stub
0024:fixme:imm:ImmReleaseContext (001700C0, 18D00BA8): stub
0118:err:sync:RtlpWaitForCriticalSection section 67C57100 "dlls/mscoree/metahost.c: runtime_list_cs" wait timed out in thread 0118, blocked by 0104, retrying (60 sec)
015c:err:sync:RtlpWaitForCriticalSection section 67C57100 "dlls/mscoree/metahost.c: runtime_list_cs" wait timed out in thread 015c, blocked by 0104, retrying (60 sec)
0118:err:sync:RtlpWaitForCriticalSection section 67C57100 "dlls/mscoree/metahost.c: runtime_list_cs" wait timed out in thread 0118, blocked by 0104, retrying (60 sec)
015c:err:sync:RtlpWaitForCriticalSection section 67C57100 "dlls/mscoree/metahost.c: runtime_list_cs" wait timed out in thread 015c, blocked by 0104, retrying (60 sec)
0118:err:sync:RtlpWaitForCriticalSection section 67C57100 "dlls/mscoree/metahost.c: runtime_list_cs" wait timed out in thread 0118, blocked by 0104, retrying (60 sec)
015c:err:sync:RtlpWaitForCriticalSection section 67C57100 "dlls/mscoree/metahost.c: runtime_list_cs" wait timed out in thread 015c, blocked by 0104, retrying (60 sec)
0118:err:sync:RtlpWaitForCriticalSection section 67C57100 "dlls/mscoree/metahost.c: runtime_list_cs" wait timed out in thread 0118, blocked by 0104, retrying (60 sec)
015c:err:sync:RtlpWaitForCriticalSection section 67C57100 "dlls/mscoree/metahost.c: runtime_list_cs" wait timed out in thread 015c, blocked by 0104, retrying (60 sec)
WheezyE commented 1 year ago

Some good news on this one VarAC-dotnet46-box86 Seems to work with box86 14113faa, RPiOS 64-bit Bullseye, wine-devel 7.1 with wintricks dotnet46 installed. I also am getting a black box for text input and not sure how to fix that yet. I haven't tested PTT yet either. (Full disclosure that I also have wine64/box64 installed, but I do not believe they are being used by the system to run this)

#Download VarAC (link current as-of 10/12/2022 - might expire in future)
cd ~/Downloads
wget https://288b5dcd-0898-4460-b829-4a40f1724acf.usrfiles.com/archives/288b5d_c885af0fc9e841efbe5d419a849ca7d3.zip?dn=VarAC_V6_0_8.zip && mv 288b5d_c885af0fc9e841efbe5d419a849ca7d3.zip?dn=VarAC_V6_0_8.zip VarAC_V6_0_8.zip
7z x VarAC_V6_0_8.zip -o"VarAC"

#Install .NET 4.6 for wine
winetricks -q dotnet46 && echo "done" #takes apx 1hr to install. Console appears to hang when done, so echo is helpful

#Run VarAC
wine VarAC/VarAC.exe # enter settings on first run

RMS Express also still runs (using .NET 4.6 instead of wine-mono), but it could have some bugs: BOX86_DYNAREC_BIGBLOCK=0 wine ~/.wine/drive_c/RMS Express/RMS\ Express.exe So far, I've tested VARA HF <-> RMS Express TCP (working)

I suppose this means that this could be some kind of issue with wine-mono then (or box86). It might take a long time to get this implemented with wine-mono, but maybe I could offer users a much longer installation procedure (using .NET 4.6 instead of wine-mono) that allows them to use VarAC.

WheezyE commented 1 year ago

I'll test on x86 Debain 11 VM next

WheezyE commented 1 year ago

Notes: dotnet46 installation on box86/Wine/Pi4 does not seem reliable. It also might take 3 hours.

SpudGunMan commented 1 year ago

I did chat with varac fella who said he will try to rework the text box issue so it's more functional.

I have been running it well for a while now (I did try installing extra .net but I found others with issues with WPFourms)

Anyway might pause this for a few while he considers options

WheezyE commented 1 year ago

Thank you for passing that along to VarAC’s dev

SpudGunMan commented 1 year ago

I assume a new version will release soon I assume with wine friendly config settings https://www.varac-hamradio.com/forum/varac-discussion-forum/running-on-wine-raspberry64

WheezyE commented 1 year ago

Kelly's VarAC installation has been merged into the script. VarAC might act a bit buggy on Linux at the moment, but we'll see what we can do to make this a smoother user experience on Linux in the future (#63).