hxSerial icon indicating copy to clipboard operation
hxSerial copied to clipboard

32bit / 64bit fix

Open ianharrigan opened this issue 4 years ago • 4 comments

ianharrigan avatar Dec 06 '20 19:12 ianharrigan

Failures
 - kb2999226 (exited 1058) - Error while running 'C:\ProgramData\chocolatey\lib\KB2999226\tools\chocolateyinstall.ps1'.
 See log for details.
 - kb2919442 (exited 1058) - Error while running 'C:\ProgramData\chocolatey\lib\KB2919442\tools\ChocolateyInstall.ps1'.
 See log for details.
 - kb3035131 (exited 1058) - Error while running 'C:\ProgramData\chocolatey\lib\KB3035131\Tools\ChocolateyInstall.ps1'.
 See log for details.
Command exited with code 1058

Feels unrelated? I havent tested on a 32 bit system, but can confirm that on my 64 bit system trace(hxSerial.Serial.getDeviceList()); returns and empty array rather than an error about failing to load hxSerial.ndll

ianharrigan avatar Dec 06 '20 19:12 ianharrigan

@andyli please?

0xF6 avatar Dec 27 '20 01:12 0xF6

I'm not sure if it's the right approach to load dynamic libraries.

The loading logic in this PR assume a certain directory structure to find a 64bit lib. And it's a bit weird to have this logic reside in hxSerial but not in a lower level (e.g. Neko/hxcpp, or system library search path) or higher level (configurable by hxSerial users).

What I've done in the past was to manually copy the dynamic libraries to the folder containing the executable file. I know it's suboptimal, but that was just my way.

Anyway, I haven't touched hxSerial or any hardware hacking project for a long while so I don't think I'm good to maintain it. It would be great if any of you can take over it and I'm happy to transfer the github repo and the haxelib ownership.

andyli avatar Dec 30 '20 08:12 andyli

Hi Andy,

Yeah, obviously it would be much nicer for neko to handle this, but that aint gonna happen. And having the user copy files is also "fine", but a gotcha (especially as the 64bit windows ndll is never included in this repo), i feel this is a decent compromise where at least hxSerial will "just work". One problem with copying the correct file next to the executable is hxSerial is used in one of the run commands for hxArduino, making it even more of pain to copy the ndll to the correct place (ie, the hxArduino haxelib dir).

That all said and done, im happy to take ownership of the repo, this is still a really useful lib and it would defo be a shame for it to "die"... let me know how you want to go about the transfer...

Cheers, Ian

ianharrigan avatar Dec 31 '20 07:12 ianharrigan