wouterdebie / locast2tuner

Locast to Emby/Plex/Channels server
https://wouterdebie.github.io/locast2tuner/
MIT License
52 stars 8 forks source link

Packages for Windows #7

Open wouterdebie opened 3 years ago

wouterdebie commented 3 years ago

We should have binary packages built for MacOS, Windows, Ubuntu and Docker.

eiddor commented 3 years ago

I should be able to work on a Docker version this coming weekend - Rust already has a base image that I think I can use.

Croq360 commented 3 years ago

Yeah, getting this docker-ized would be great. I wish I knew more about setting up a Windows installer, so I could help out in getting something put together for that.

eiddor commented 3 years ago

The Docker version is going to be interesting - I could build it realtime inside of a Rust image, but that would mean a 10 minute process anytime the container is created. There's also the problem of dynamically linked libraries.

Looking at some options now - A lot of this is new to me, so it'll be learning on the fly.

Moving the Docker-specific discussion to #17

wouterdebie commented 3 years ago

I'm working on packaging. Rust has some really nice crates for doing so. I'm starting with Ubuntu/Debian, but will also create a Windows installer package.

On Mon, Apr 5, 2021, 20:08 Roddie Hasan @.***> wrote:

The Docker version is going to be interesting - I could build it https://hub.docker.com/_/rust realtime inside of a Rust image, but that would mean a 10 minute process anytime the container is created.

Looking at some other options now - A lot of this is new to me.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/wouterdebie/locast2tuner/issues/7#issuecomment-813751644, or unsubscribe https://github.com/notifications/unsubscribe-auth/AABKABTU4FEPDW7OQIJA363THJNKFANCNFSM42NPDCKA .

eiddor commented 3 years ago

Do you think there would be demand for a Raspbian deb package as well? (yes, I'm still looking at ebbflow's YAML file :-) ).

wouterdebie commented 3 years ago

@eiddor Possibly.. My next package will be MacOS and publishing to homebrew, but after that, raspbian/arm7 might be a good target.

eiddor commented 3 years ago

Nice! I figured it would be an easier one since you already have the PPA stuff done.

wouterdebie commented 3 years ago

Couldn't help myself and added the Raspbian one. Was very easy to do, so why not :)

eiddor commented 3 years ago

Haha - I was hoping it would be that easy. I'll test it out later.

This is so cool!

image

eiddor commented 3 years ago

Raspbian package works beautifully.

wouterdebie commented 3 years ago

Just added a MacOS package through homebrew. Windows is the last one (unless we want RPMs) and I wonder what the best distribution mechanism is? Just create a .exe file for download somewhere? Or how does that work in Window? @Croq360 any ideas?

eiddor commented 3 years ago

I'll let @Croq360 weigh-in, but my thinking is that unless you're going to slap a GUI in front of it or make it a full-on Windows service, it might be better to just distribute it as an EXE file (maybe we put up some other binaries on the releases page as well).

@Croq360 How do you run Plex in Windows? Is it a service?

I was going to suggest that we should just direct Windows users to run it in Docker, but after figuring out #29, I'm not so sure that's the best idea.

Croq360 commented 3 years ago

I run Plex as a service, they provide that option. Not opposed to doing the same with locast2tuner, but not real keen on using nssm to run it as a service. As @wouterdebie probably remembers, we had some weirdness with trying to do locast2dvr that way. It would work for a while, but then lock up at some point, and I think I had to keep uninstalling and reinstalling the service to get it going again. Using it as a Windows service would be probably much easier for others too.

The big thing is if my computer is restarted, I want locast2tuner (and in my case, xTeVe) to start up and run again without me needing to do anything.

Croq360 commented 3 years ago

I managed to get a similar program, WinSW, configured and running locast2tuner as a Windows service. Monitoring it currently to see how it goes.

Croq360 commented 3 years ago

@wouterdebie - for Windows packaging, if you can, I think the best way would be to create an installer program.

It could put the locast2tuner.exe file in your "Program Files" folder (or "Program Files (x86)" if you're supporting a 32-bit version of the program). Then, in the user's "AppData" folder, you could create a location there. Note that there is "Local", "LocalLow", and "Roaming" top-level directories inside "AppData", and I don't know what the recommendation is as to where to put your folder (maybe Roaming?). You can use that folder just like you're currently doing for the .locast2tuner folder on *nix systems. If you put your config file there (and other ones), you could use that folder as a default place for the files you need/want to use.

If you can, offering the option to install locast2tuner as a service would be good too. The difficulty there is that you really need to have your configuration stuff set up and know it works before doing the service. Maybe an option for that would be a command-line option to install the service in Windows. If you don't want to mess with that, there are other ways to get it running as a service (like NSSM or WinSW).

All that being said, this project pretty much requires you have a decent amount of technical knowledge to configure everything and get it going, so maybe just providing an executable is enough. And documents could be written on how to configure things.

wouterdebie commented 3 years ago

I've been thinking using an actual installer instead of just the binary .exe file. That way we can automate installing it as a service for example. I'll do some research, but I'd probably need your help with some of the windows specific stuff.

Croq360 commented 3 years ago

Sure, I'll help in any way I can. 🙂

Croq360 commented 3 years ago

Just an update to the original purpose of this thread, or at least part of it. Once I changed to use the correct config.ini data, the Docker installation is running fine (Linux container on Windows 10 box).

eiddor commented 3 years ago

That's what I like to hear.

Thunder7ga commented 3 years ago

Glad to hear there is work on a windows package...I am just not Unix/Docker savvy to figure this out.

wouterdebie commented 3 years ago

I might be able to do a quick and dirty one where it just produces a .exe file that I'll make available for download. Then later I'll have a look at a proper installer.

On Mon, Apr 26, 2021, 16:11 Thunder7ga @.***> wrote:

Glad to hear there is work on a windows package...I am just not Unix/Docker savvy to figure this out.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/wouterdebie/locast2tuner/issues/7#issuecomment-827149811, or unsubscribe https://github.com/notifications/unsubscribe-auth/AABKABQSGIVU2GUHLQXI4LLTKXJJHANCNFSM42NPDCKA .

Thunder7ga commented 3 years ago

That would be fantastic when you have time.

I might be able to do a quick and dirty one where it just produces a .exe file that I'll make available for download. Then later I'll have a look at a proper installer. …

kblair1 commented 3 years ago

First Thanks to the contributors to this project. I wish I was still sharp enough to keep up with all the new tools you use on these projects. I run a windows server with Plex and Channels running parallel using Python Locast2plex as tuners. The only issues I have is I live in a location that is not served by over the air tv or a Locast region. I have to use a VPN In order to receive Locast. Using the Vpn causes my remote server connections to fail. I have used Docker setups but could not get them to relivable startup on server restarts. Your windows ver. of Locat2tuner will make my setup complete. The Service install is not necessary, I can setup an .exe to run as a service.

wouterdebie commented 3 years ago

@kblair1 thanks for your kind words!

I'm still working on a windows version (on the windows branch), but since I'm not very versed in windows, it's a bit tricky. To get a single .exe file, you can compile locast2tuner on windows, which should be explained in the readme.

Croq360 commented 3 years ago

@kblair1 - as @wouterdebie mentioned, there are instructions on how to get the files and the commands to run to build it. They work in Windows to create an executable file. Note that it'll be buried down a few directories below where you do the build command. You'll need to run the executable with appropriate command line options in a command prompt.

Once you have that working, you can even use one of the service installers (like WinSW) to get it running as a service. Note that it's not the most straight-forward thing to figure out though. So far, that seems to be working really well for me.

kblair1 commented 3 years ago

I want to say thanks again. I was able to to create an .exe for my windows machine use. I am using shortcut command line and multi config files to load 3 instances each with a different port for Plex, Emby and Channelsdvr. Plex and Emby work great but Channels loads the Hdhomerun device, loads guide but fails to play or record with several javascript video player errors with reconnecting till fail.

Croq360 commented 3 years ago

With Channels DVR, why couldn't you just use the M3U feed? I've seen people using M3U feeds of Pluto TV and some other IPTV feeds, so theoretically, locast2tuner could work the same way.

wouterdebie commented 3 years ago

Good to hear it works. I'm curious why you'd use multiple instances on different ports?

kblair1 commented 3 years ago

I am not very familiar with load capabilities of tuner apps. and thought it might make easer to troubleshoot. Did try M3U a couple of times but no love.

Get Outlook for Android

From: Wouter de Bie @.***>Sent: Friday, June 4, 2021, 12:36 PMTo: wouterdebie/locast2tunerCc: kblair1; MentionSubject: Re: [wouterdebie/locast2tuner] Packages for MacOS, Ubuntu, Windows and Docker (#7) Good to hear it works. I'm curious why you'd use multiple instances on different ports?

—You are receiving this because you were mentioned.Reply to this email directly, view it on GitHub, or unsubscribe.

wouterdebie commented 3 years ago

I am not very familiar with load capabilities of tuner apps. and thought it might make easer to troubleshoot.

locast2tuner is multi-threaded and should be fine with running multiple clients and multiple streams (one of the reasons I rewrote locast2dvr from python to rust).

wouterdebie commented 3 years ago

I just tested channels and it doesn't work well as an HDHomerun device, but m3u works well with the following settings:

image

Croq360 commented 3 years ago

Yeah, that's the settings I would have tried. I don't have Channels - just can't seem to justify the $8 a month for their service. I keep checking it out to see what's new though...

kblair1 commented 3 years ago

Thanks again for your guidance. In just over two and a half weeks a 74 yr old with no formal programming experience was able to compile your rust locast2tuner program into an EXE to run on windows using task scheduler unattended startup. I was able to able to eliminate my VPN increasing my bandwidth on my wireless internet connection and correct my remote connection problems with channelsdvr and Plex.

kblair1 commented 3 years ago

It also worked well with Emby in windows, Al on a single instance of the exe.

wouterdebie commented 3 years ago

@kblair1 great to hear!

mbtfeedback commented 3 years ago

Came here from a similar project. I was going to run Locast2Tuner in Docker on Windows 10 using docker-compose in Powershell, but it was never able to locate the config.ini that I had created, no matter where I moved it or where I tried to map it in docker-compose.yml. That being said, a Windows installer would be fantastic. I'm not a coder, but having worked in IT for a decade I can get around, but couldn't make this work.

eiddor commented 3 years ago

@mbtfeedback So the Docker image is looking for config not config.ini - Also keep in mind that with Docker Compose you want to map the directory, not the file directly.

To keep it simple, you should be able to put it in a directory inside your current directory (where docker-compose.yml lives) called config and use this:

    volumes:
      - .\config:/app/config

The other problem that Windows users have sometimes is CRLF related, which can be solved by using almost any editor other than Notepad to edit/create the file or using dos2unix after creating it.

mbtfeedback commented 3 years ago

@mbtfeedback So the Docker image is looking for config not config.ini - Also keep in mind that with Docker Compose you want to map the directory, not the file directly.

To keep it simple, you should be able to put it in a directory inside your current directory (where docker-compose.yml lives) called config and use this:

    volumes:
      - .\config:/app/config

The other problem that Windows users have sometimes is CRLF related, which can be solved by using almost any editor other than Notepad to edit/create the file or using dos2unix after creating it.

Very good, that worked. I'm used to .ini files I guess. Also, I've used Notepad++ for years, so I think I avoided the CRLF related problems. Thank you!