OpenHantek / OpenHantek6022

OpenHantek6022 is a DSO software for Hantek USB digital signal oscilloscopes 6022BE / BL. Development OS is Debian Linux, but the program also works on FreeBSD, MacOS, RaspberryPi and Windows. No support for non-Linux related issues unless a volunteer steps in!
GNU General Public License v3.0
858 stars 152 forks source link

switch windows build to mingw64 compiler #346

Closed gitguest0 closed 1 year ago

gitguest0 commented 1 year ago

Builds a selfcontained windows binary with msys/mingw64 instead of msvc for more portability.

Ho-Ro commented 1 year ago

Hi @gitguest0 thank you for your PR, I will check it during the next days.

Ho-Ro commented 1 year ago

@gitguest0 Well done! I've added the documents directory because under windows the program takes local documentation files out of this directory.

gitguest0 commented 1 year ago

Hello, i noticed that if the documentation files are not locally available, it will instead call the corresponding github page. Which i thought would be the ideal solution for a portable executable.

There is one issue with the embedded png on the startup dialog, it is not displayed even though the file itself (switch_6022BL.png) is embedded into the *.exe file.

Ho-Ro commented 1 year ago

Your solution as portable exe is very clever, but some lab computers have no permanent internet connection, e.g. I know companies where they use old W7 devices with removed/disabled network HW. And if you do not install the documentation, it will be taken from the net. Another possibility would be to put the docs into the resources and display them from there.

Yes, I saw the missing picture but cannot investigate because I do not have a win machine where I develop. Only look-and-feel checks can be done on a laptop where I do not have Admin rights, so it only works in demo mode. More difficult is the Mac development, where I do not have any access to a device.

gitguest0 commented 1 year ago

I see your point. I thought about embedding the PDF into the executable, but that would also increase it's size. So the current solution is probably the most reasonable, the (local) documentation is supplied if needed, but the binary can also be used without it.

I assume it is most likely an issue with the mingw compiler if the embedded resources are working fine for every other compiler. I will look for a workaround.

Ho-Ro commented 1 year ago

if the embedded resources are working fine for every other compiler

Indeed, GCC (Linux, FreeBSD), Clang (Linux, MAC) and MSVC (Win) did work.