1
0
mirror of https://gitlab.com/kelteseth/ScreenPlay.git synced 2024-09-18 08:22:33 +02:00

Update python to output utf-8

This commit is contained in:
Elias Steurer 2022-11-02 12:15:34 +01:00
parent 5228ec0d6d
commit 00c051da9a
17 changed files with 61 additions and 17 deletions

View File

@ -11,6 +11,10 @@ from typing import Tuple
from shutil import copytree from shutil import copytree
from pathlib import Path from pathlib import Path
from util import sha256, cd_repo_root_path, zipdir, run, get_vs_env_dict from util import sha256, cd_repo_root_path, zipdir, run, get_vs_env_dict
from sys import stdout
stdout.reconfigure(encoding='utf-8')
def clean_build_dir(build_dir): def clean_build_dir(build_dir):
if isinstance(build_dir, str): if isinstance(build_dir, str):

View File

@ -11,6 +11,10 @@ import platform
import paramiko import paramiko
import defines import defines
from util import sftp_exists from util import sftp_exists
from sys import stdout
stdout.reconfigure(encoding='utf-8')
if __name__ == "__main__": if __name__ == "__main__":
parser = argparse.ArgumentParser(description='Build and Package ScreenPlay') parser = argparse.ArgumentParser(description='Build and Package ScreenPlay')

View File

@ -4,6 +4,10 @@ import argparse
from format_util import find_files from format_util import find_files
from format_util import check_git_exit from format_util import check_git_exit
from format_util import execute_threaded from format_util import execute_threaded
from sys import stdout
stdout.reconfigure(encoding='utf-8')
def format_file_function(file): def format_file_function(file):

View File

@ -3,6 +3,10 @@ import argparse
from format_util import find_files from format_util import find_files
from format_util import check_git_exit from format_util import check_git_exit
from format_util import execute_threaded from format_util import execute_threaded
from sys import stdout
stdout.reconfigure(encoding='utf-8')
def format_file_function(file): def format_file_function(file):
executable = "cmake-format" executable = "cmake-format"

View File

@ -1,9 +1,13 @@
import sys import sys
from pathlib import Path from pathlib import Path
from sys import stdout
VCPKG_VERSION = "e2667a41fc2fc578474e9521d7eb90b769569c83" # Master 07.10.2022 stdout.reconfigure(encoding='utf-8')
VCPKG_VERSION = "c72cefb" # Master 27.10.2022
QT_VERSION = "6.3.2" QT_VERSION = "6.3.2"
QT_IFW_VERSION = "4.4" QT_IFW_VERSION = "4.4"
SCREENPLAY_VERSION = "0.15.0-RC1" SCREENPLAY_VERSION = "0.15.0-RC3"
AQT_PATH = Path("C:/aqt") if sys.platform == "win32" else Path().home().joinpath("aqt") AQT_PATH = Path("C:/aqt") if sys.platform == "win32" else Path().home().joinpath("aqt")
PYTHON_EXECUTABLE = "python" if sys.platform == "win32" else "python3" PYTHON_EXECUTABLE = "python" if sys.platform == "win32" else "python3"
FFMPEG_VERSION = "5.0.1"

View File

@ -1,16 +1,14 @@
from fileinput import filename from fileinput import filename
import pathlib
from zipfile import ZipFile from zipfile import ZipFile
from pathlib import Path
import py7zr
import platform import platform
from urllib.request import urlopen from urllib.request import urlopen
import os import os
import defines
from shutil import move, rmtree from shutil import move, rmtree
from util import cd_repo_root_path from util import cd_repo_root_path
from sys import stdout
FFMPEG_VERSION = "5.0.1" stdout.reconfigure(encoding='utf-8')
def download( def download(
download_server_base_url, download_server_base_url,
@ -75,8 +73,8 @@ def extract_zip_executables(extraction_path, path_and_filename):
def download_prebuild_ffmpeg_mac(extraction_path: str): def download_prebuild_ffmpeg_mac(extraction_path: str):
print("Setup ffmpeg mac") print("Setup ffmpeg mac")
ffmpeg_zip_name = f'ffmpeg-{FFMPEG_VERSION}.zip' ffmpeg_zip_name = f'ffmpeg-{defines.FFMPEG_VERSION}.zip'
ffprobe_zip_name = f'ffprobe-{FFMPEG_VERSION}.zip' ffprobe_zip_name = f'ffprobe-{defines.FFMPEG_VERSION}.zip'
download_server_base_url = 'https://evermeet.cx/ffmpeg/' download_server_base_url = 'https://evermeet.cx/ffmpeg/'
ffmpeg_path_and_filename = download( ffmpeg_path_and_filename = download(

View File

@ -5,7 +5,9 @@ import subprocess
from platform import platform, system from platform import platform, system
from pathlib import Path from pathlib import Path
from execute_util import execute from execute_util import execute
from sys import stdout
stdout.reconfigure(encoding='utf-8')
def run(cmd, cwd=Path.cwd()): def run(cmd, cwd=Path.cwd()):
result = subprocess.run(cmd, shell=True, cwd=cwd) result = subprocess.run(cmd, shell=True, cwd=cwd)

View File

@ -1,9 +1,10 @@
import subprocess import subprocess
from sys import stdout
stdout.reconfigure(encoding='utf-8')
# Python program to print # Python program to print
# colored text and background # colored text and background
def printRed(skk): print("\033[91m {}\033[0;37;40m" .format(skk)) def printRed(skk): print("\033[91m {}\033[0;37;40m" .format(skk))
def printGreen(skk): print("\033[92m {}\033[0;37;40m" .format(skk)) def printGreen(skk): print("\033[92m {}\033[0;37;40m" .format(skk))
def printYellow(skk): print("\033[93m {}\033[0;37;40m" .format(skk)) def printYellow(skk): print("\033[93m {}\033[0;37;40m" .format(skk))

View File

@ -5,6 +5,9 @@ from multiprocessing import cpu_count
from multiprocessing import Pool from multiprocessing import Pool
from multiprocessing import dummy from multiprocessing import dummy
from pathlib import Path from pathlib import Path
from sys import stdout
stdout.reconfigure(encoding='utf-8')
def find_all_files(path) -> []: def find_all_files(path) -> []:

View File

@ -2,6 +2,9 @@
import os import os
import sys import sys
import subprocess import subprocess
from sys import stdout
stdout.reconfigure(encoding='utf-8')
def install_requirements(): def install_requirements():
print("Set up required python modules") print("Set up required python modules")

View File

@ -1,11 +1,11 @@
#!/usr/bin/python3 #!/usr/bin/python3
from distutils.dir_util import mkpath from distutils.dir_util import mkpath
import os import os
import shutil
import pathlib
from pathlib import Path from pathlib import Path
from util import run, run_and_capture_output, cd_repo_root_path from util import run, run_and_capture_output, cd_repo_root_path
import warnings from sys import stdout
stdout.reconfigure(encoding='utf-8')
def listfiles(path): def listfiles(path):
files = [] files = []

View File

@ -1,8 +1,9 @@
#!/usr/bin/python3 #!/usr/bin/python3
import platform
import os
from build import BuildConfig from build import BuildConfig
from util import run from util import run
from sys import stdout
stdout.reconfigure(encoding='utf-8')
def sign(build_config: BuildConfig): def sign(build_config: BuildConfig):
print("Run codedesign") print("Run codedesign")

View File

@ -1,6 +1,9 @@
import subprocess import subprocess
import os import os
import shutil import shutil
from sys import stdout
stdout.reconfigure(encoding='utf-8')
def main(): def main():
print("\nRuns qdoc with the settings from Docs/config.qdocconf. For this you need to have Qt 6.1 installed!") print("\nRuns qdoc with the settings from Docs/config.qdocconf. For this you need to have Qt 6.1 installed!")

View File

@ -6,6 +6,9 @@ from format_util import find_files
from format_util import check_git_exit from format_util import check_git_exit
from format_util import execute_threaded from format_util import execute_threaded
from format_util import find_absolute_qt_path from format_util import find_absolute_qt_path
from sys import stdout
stdout.reconfigure(encoding='utf-8')
def format_file_function(file): def format_file_function(file):

View File

@ -8,6 +8,10 @@ import defines
import argparse import argparse
import util import util
import datetime import datetime
from sys import stdout
stdout.reconfigure(encoding='utf-8')
class commands_list(): class commands_list():
def __init__(self): def __init__(self):
@ -139,7 +143,7 @@ def main():
print(f"Clone into {vcpkg_path}") print(f"Clone into {vcpkg_path}")
execute("git clone https://github.com/microsoft/vcpkg.git ScreenPlay-vcpkg", project_source_parent_path, True) execute("git clone https://github.com/microsoft/vcpkg.git ScreenPlay-vcpkg", project_source_parent_path, True)
execute("git fetch", vcpkg_path) execute("git fetch", vcpkg_path)
execute("git checkout {}".format(defines.VCPKG_VERSION), vcpkg_path) execute(f"git checkout {defines.VCPKG_VERSION}", vcpkg_path)
# Setup vcpkg via boostrap script first # Setup vcpkg via boostrap script first
platform_command.execute_commands() # Execute platform specific commands. platform_command.execute_commands() # Execute platform specific commands.

View File

@ -10,6 +10,9 @@ from shutil import copyfile
import subprocess import subprocess
from util import cd_repo_root_path from util import cd_repo_root_path
import platform import platform
from sys import stdout
stdout.reconfigure(encoding='utf-8')
# Executes steamcmd with username and password. Changes the content of the config # Executes steamcmd with username and password. Changes the content of the config
# for better readability in the steam builds tab # for better readability in the steam builds tab

View File

@ -5,6 +5,9 @@ from os import chdir
from concurrent.futures import ThreadPoolExecutor from concurrent.futures import ThreadPoolExecutor
import os import os
import subprocess import subprocess
from sys import stdout
stdout.reconfigure(encoding='utf-8')
def sftp_exists(sftp, path) -> bool: def sftp_exists(sftp, path) -> bool:
try: try: