fsphil / hacktv

Analogue TV transmitter for the HackRF
GNU General Public License v3.0
671 stars 80 forks source link

Building for Windows #18

Closed neo7530 closed 5 years ago

neo7530 commented 5 years ago

...and compile it for Windows... I run on errors while compiling it (FFMPEG, LIBHACKRF)

Thank you.

Zcooger commented 5 years ago

+1

SAUCYSOUP76 commented 5 years ago

Can't you just use linux?

neo7530 commented 5 years ago

don't want to boot 2 computers to play with it, so it would be nice, if i had it for windows...

Zcooger commented 5 years ago

Getting it to work on second partition or VM takes some time along with transferring heavy .raw files generated by HackRF from guest OS to host OS.

SAUCYSOUP76 commented 5 years ago

@neo7530 have you considered dual booting? I'm using this under linux and it works perfectly. @Zcooger well it'll be quicker than waiting for the dev to compile it for windows as for me the compiliation time was roughly under a few seconds.

neo7530 commented 5 years ago

i have to transmit and receive at the same time... my tv software works on windows only, so i have to boot 2 computers to play with hacktv. virtualbox is no option, because of issues with usb, so i can't transmit from it.

fsphil commented 5 years ago

Can someone test this build please: https://www.sanslogic.co.uk/hacktv/hacktv-20190131-x86_64.zip

neo7530 commented 5 years ago

jiippyyy... works like a charm. have to reset the hackrf after transmitting, but it works :)

SAUCYSOUP76 commented 5 years ago

well it'll be quicker than waiting for the dev to compile it for windows

haha disregard that comment :)

Zcooger commented 5 years ago

For my needs it works fine, thanks.

neo7530 commented 5 years ago

Perfect. @Fsphil, can you post the steps to compile it for Windows, please? Many thanks.

SAUCYSOUP76 commented 5 years ago

@neo7530 i take it compiling c is not the same on windows as it is on linux? for me it's cd hacktv and then make and make install.

fsphil commented 5 years ago

I've added a script which will attempt to build hacktv for Windows x86_64:

$ ./build_win64.sh

The required packages for each distro will vary, but on Fedora I believe you just need: git make libtool mingw64-gcc mingw64-gcc-c++ mingw64-winpthreads-static mingw64-pkg-config

neo7530 commented 5 years ago

Thank you for Your work.

neo7530 commented 5 years ago

Something goes wrong with this version when i build it for Windows in fedora: /usr/lib/gcc/x86_64-w64-mingw32/8.3.0/../../../../x86_64-w64-mingw32/bin/ld: cannot find -lbz2 /usr/lib/gcc/x86_64-w64-mingw32/8.3.0/../../../../x86_64-w64-mingw32/bin/ld: cannot find -lz /usr/lib/gcc/x86_64-w64-mingw32/8.3.0/../../../../x86_64-w64-mingw32/bin/ld: cannot find -liconv /usr/lib/gcc/x86_64-w64-mingw32/8.3.0/../../../../x86_64-w64-mingw32/bin/ld: cannot find -lz

Do you have an idea? Thank you.

fsphil commented 5 years ago

Which version of Fedora? It's working fine here on Fedora 29 (x86_64).

neo7530 commented 5 years ago

same version... Fedora 29 Are there some missing libs in my system?

fsphil commented 5 years ago

Have you made any changes?

neo7530 commented 5 years ago

Nope... the old builds still compiling right...

fsphil commented 5 years ago

Can you show me the lines above the error, the context might help.

neo7530 commented 5 years ago
fsphil commented 5 years ago

Thanks. At first glance it looks like something has changed in ffmpeg. I'm rebuilding it from fresh here now, will see if the error appears.

fsphil commented 5 years ago

It's still building fine here. Can you try from a fresh directory? Run "make clean" and delete the build_win64 directory.

neo7530 commented 5 years ago

still the same issue :(

fsphil commented 5 years ago

I've just tried on a fresh install of Fedora 30 and it worked fine. There must be something outside of your build directory that's causing ffmpeg to pull in the -lz and -lbz2 libraries. I'm not sure what it could be.

neo7530 commented 5 years ago

Will test it later with a fresh install and report. Thank you.

neo7530 commented 5 years ago

ackrf-2018.01.1/issue_template.md

No job control in this shell... what is this? Fedora 30 fresh install... :/

neo7530 commented 5 years ago

found it... had to install cmake...