radiomanV / TL866

Open source software for TL866
GNU General Public License v2.0
334 stars 79 forks source link

setupapi.dll wrapper not loading with Wine on Ubuntu with Xgpro version 11.30 #38

Closed rodneygray closed 2 months ago

rodneygray commented 2 years ago

0009:err:module:import_dll Loading library SETUPAPI.dll (which is needed by L"C:\xgpro\Xgpro.exe") failed (error c000012f). 0009:err:module:LdrInitializeThunk Importing dlls for L"C:\xgpro\Xgpro.exe" failed, status c0000135

If I remove setupapi.dll, the software starts but has no communication with the TL866ii.

radiomanV commented 2 years ago

Perhaps you do not have installed the 32 bit needed libraries. As i don't offer any packages you must install them by hand. I assume that you have a 64 bit Ubuntu right? so check this: ldd ./setupapi.dll or readelf -a ./setupapi.dll | grep NEEDED it will tell you the needed libraries which are only two: libusb and libudev. Please install the 32 bit version of these like this: sudo apt install libusb-1.0-0:i386 libudev1:i386 Then copy (if you don't did it already) the whole content of udev directory (from this repo) to /etc/udev/rules.d/ and reload the udev rules with sudo udevadm trigger At this point if the wine is installed you can launch the Xgpro with wine ./Xgpro.exe Normally in Ubuntu and derivates you don't need to manually install the above libs, it is enough to only install the wine package. Also please tell me what version of Ubuntu do you have and your wine version (wine --version). Thanks.

alexander-pick commented 2 years ago

I have the same issue here, Ubuntu 20.04 64 Bit. None of the tipps solved it so far. Any more ideas? wine-5.0.3 (Ubuntu 5.0.3-3)

My error is 1:1 the same Rodney reported above. c000012f is normally bad image, is the dll in the repo broken by any chance?

radiomanV commented 2 years ago

Don't know what wine version the Ubuntu 20.04 have (i have a feeling that it's old), but you should use at least version 6.0 of wine. Please check with wine --version what it is your version. If it is under 6.0 then please upgrade your wine version. Something like this:

sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv F987672F
sudo apt-add-repository 'deb https://dl.winehq.org/wine-builds/ubuntu/ focal main'
sudo apt update 
sudo apt-get install --install-recommends winehq-stable

Then do an optional sudo apt autoremove to clean old wine packages. Now issue wine --version to see the updated version and finally wine ./Xgpro.exe It should work this time. You can also use PlayOnLinux for a more fine control about wine versions.

rodneygray commented 2 years ago

Wine version was wine-5.0 (Ubuntu 5.0-3ubuntu1). Ubuntu is 20.04.3 LTS. I updated Wine which then wanted to install Mono and Gecko. After that, Xgpro did launch but it still can't connect to the USB programmer. It looks like a permissions issue with the USB devices. I will look around for that solution.

libusb: error [_get_usbfs_fd] libusb couldn't open USB device /dev/bus/usb/001/005: Permission denied libusb: error [_get_usbfs_fd] libusb requires write access to USB device nodes.

I re-read what you said above and added the udev rules and now it appears to work perfectly! Well Xgpro launches and the TL866II-Plus is detected. I have not tried to read or write anything yet.

Thanks for your help!!

radiomanV commented 2 years ago

Yeah, you'll need to add the udev permissions. Copy the provided udev rules from here : https://github.com/radiomanV/TL866/tree/master/udev to /etc/udev/rules.d/ and reload udev rules with sudo udevadm trigger or reboot your computer.

Wawavoun commented 2 years ago

Hello there,

I use last version of Ubuntu wine (wine --version report 5.0) and XGpro install and works smoothly.

I remove all wine packages and empty user .wine directory then install wine 6.0.2 (last version for Ubuntu focal on wine repository) then XGpro refuse to install directly complaining about user32.dll and setupapi.dll not starting.

At this moment setupapi.dll was in the same directory that XGpro setup program. If I remove this file from this place the setup run longer and did not complain about dll but hang. It seems he is working on fonts (but I am unsure about that) and waiting even a long time do not give success. Library etc... are ok.

Strangely If I only upgrade from wine 5.0 to wine 6.0.2 using apt then things seems continue to work normally (installation and usage)...

Okay I have a solution but it seems here that XGpro and setupapi.dll are not working on a clean wine > 6.0 install Thanks for help.

Regards. Philippe

Wawavoun commented 2 years ago

Found a solution... Seems really to be linked to a font problem because installing fonts-wine package solve it.

Regards. Philippe

radiomanV commented 2 years ago

Thanks Philippe, seems to be a wine related issue after all. I never encounter this issue, perhaps because i always install the devel packages with --install-recommends flag (Linux Mint). I'll add your fix in the docs.

CodeAsm commented 2 years ago

I had a similair issue wich seemed to relate to user32 and ole32 dll not being found (yet they where there.)

Perhaps you do not have installed the 32 bit needed libraries. As i don't offer any packages you must install them by hand. I assume that you have a 64 bit Ubuntu right? so check this: ldd ./setupapi.dll or readelf -a ./setupapi.dll | grep NEEDED it will tell you the needed libraries which are only two: libusb and libudev. Please install the 32 bit version of these ...

For my Arch install:

sudo pacman -S lib32-libusb

resolved my issue and the ldd command is something i should know, and I like it. it indeed showed

    libusb-1.0.so.0 => not found

and now is found (some adress is shown, like the rest.

Thank you so much radiomanV for your work and support.