Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- :: Vérification de la présence de Python
- where python >nul 2>&1
- if %errorlevel% neq 0 (
- :: Téléchargement du fichier d'installation de Python
- powershell -Command "(New-Object System.Net.WebClient).DownloadFile('https://www.python.org/ftp/python/3.9.7/python-3.9.7-amd64.exe', 'python-installer.exe')"
- :: Installation silencieuse de Python
- python-installer.exe /quiet InstallAllUsers=1 PrependPath=1 Include_test=0
- )
- :: Vérification si pip est installé
- where pip >nul 2>&1
- if %errorlevel% equ 0 (
- echo pip est installé
- ) else (
- echo pip n'est pas installé
- echo install pip
- :: Télécharger get-pip.py
- curl https://bootstrap.pypa.io/get-pip.py -o get-pip.py
- :: Télécharger get-pip.py via PowerShell
- powershell -Command "(New-Object System.Net.WebClient).DownloadFile('https://bootstrap.pypa.io/get-pip.py', 'get-pip.py')"
- :: Télécharger get-pip.py via BITSAdmin
- bitsadmin /transfer mydownload /download /priority normal https://bootstrap.pypa.io/get-pip.py %CD%\get-pip.py
- :: Exécuter get-pip.py
- python get-pip.py
- )
- :: Cloner le dépôt youtube-dl
- git clone https://github.com/ytdl-org/youtube-dl.git
- cd youtube-dl
- git checkout master
- git pull
- pip install youtube-dl
- :: Installation de youtube-dl
- pip install --upgrade youtube-dl
- :: Installation de PyInstaller
- pip install pyinstaller
- :: Installer le package
- python setup.py install
- :: Générer un exécutable avec PyInstaller
- pyinstaller --onefile youtube_dl/__main__.py
- pause
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement