aajanki / yle-dl

Download videos from Yle servers
https://aajanki.github.io/yle-dl/index-en.html
GNU General Public License v3.0
308 stars 51 forks source link

standalone exe for windows #131

Open ahmedtds opened 6 years ago

ahmedtds commented 6 years ago

Can someone please compile a standalone exe file to run it under Windows just like how youtube-dl does? It's so complicated to starting to use this for a lot of people including me right now. Thanks.

aajanki commented 6 years ago

It would be nice if somebody familiar with Windows would create an installer that contains yle-dl with all the dependecies. I don't have any expertise on Windows packaging.

gunnar12 commented 6 years ago

run it under Windows/ Switched to pure linux after doing yle-dl windows since beginning. Run into one deep-swamp python connect-library that got stuck every 10-15 time getting a link. (restarting yle-dl.exe solved it, but had to babysit downloads. doesnt do that under Linux)

Back then "it was easy" bc yle-dl was one file and one just used a py2exe.exe on it.( Python2windowsexe)

Well, easy and easy, had to get paths and especially libraries right fir py2exe. Difficult to know where to put them,etc,etc,etc so that py2exe finds them so I had them "all over the place"

py2exe made a dist, (distribution) directory where it also put a (needed python libraries) library.zip file, hopefully with the right libraries and then some basic dlls to interface to windows

Was as easy as batch file below (v2.16, still just one file) if all py and pyc librarues in right places, never really figured them out (Crypo,etc)

Hmmm, i think I had to tweak somthng in yle-dl setup.py too, another reason I "gave up windos"

batch file: py2exe.exeo installed in same dir as python2.7, and all libraries everywhere.. (I used other windows-specific functions too, sound, read keyboard,etc)

set path = %path%;C:\Python27\ pause C:\Python27\python "P:__yledl216\setup.py" py2exe pause

py2exe collected, scanned tons of python-libraries and compiled lots of small stuff, cldnt find some things but still produced a functioning yle-dl.exe in the dist directory.

;C:\Python27\ where my python was P:__yledl216\setup.py where yle-dl was, yle-dl.exe went to dist directory Gunnar

PS I guess first attempt wld be to install the windows python "development GUI", IDLE or something., Should be first possible to run yle-dl from there?? Kindo weird old thingy..

PPS I guess the "secret sauce" is in that setup.py which is now totally different, and where the needed libraries shld be. I think I cldnt get multi-module, -file yle-dl to work at all wth windows?? Didnt understand anything..

gunnar12 commented 6 years ago

USed cpl of hours wth py2exe, my setup and googling in vain on ImportError: No module named lxml.html

Anyone with better "knowledge"(than my zero) or advice

import sys import urllib import urllib2 import re import subprocess import os import os.path import platform import signal import urlparse import json import xml.dom.minidom import time import codecs import base64 import ctypes import ctypes.util import logging import lxml.html <====== import lxml.etree import requests import hds

hugovk commented 6 years ago

Try: pip install lxml

gunnar12 commented 6 years ago

Try: pip install lxml/

Pip available on windows?? didnt know, but quick google, thanks!

"Good news! Python 3.4 (released March 2014) and Python 2.7.9 (released December 2014) ship with Pip. This is the best feature of any Python release. It makes the community's wealth of libraries accessible to everyone."

PS Yep, pip was sitting there, not saying a peep..

set path = %path%;C:\Python27\ pause pip.exe install lxml pip.exe install requests pip.exe install pyamf pause

Now it cant find vc9.0, special headers for pythin " Thank you for downloading Microsoft Visual C++ Compiler for Python 2.7 If your download does not start after 30 seconds, click here to download manually"

WOW!! yle-dl produced the help screen in IDLE debugger...!! OK, next evening??

aajanki commented 6 years ago

Here are installation instructions for Windows: https://github.com/aajanki/yle-dl/blob/master/OS-install-instructions.md#windows-10

It's still not a standalone exe, but at least documents all the applications you need to install.

gunnar12 commented 5 years ago

instructions for Windows: /

Btw, new install of pythion3.6.5 on old vista machine needed at least two tweaks

same problem with them windows egg-packs, the python list sometimes gets new and old versions in wrong order., Plain yle-dl command keeps starting some old installation bc its (still) earlier in list. (windows and python need to match yle-dl.exe with the correct needed library-etc egg-pack directory)

that easy-install.pth

PS theres some new builtin-version of py2exe, one can build a "(stand-alone) distribution". Yle-dl.exe file plus needed libraries,dlls go to dist subdirectory.(in the form of a zip-file? plus dll files) But havnt got it to work (not just like that, in 10 minutes)