1
0
mirror of https://gitlab.com/kelteseth/ScreenPlay.git synced 2024-10-06 09:17:07 +02:00

Revert QArchive update

this caused compilation errors for time

Add duration prints to build.py
This commit is contained in:
Elias Steurer 2022-11-02 12:56:34 +01:00
parent 0748f904d6
commit 6e320c0b50
3 changed files with 43 additions and 22 deletions

View File

@ -7,7 +7,7 @@ set(THIRD_PARTY_PATH "${CMAKE_SOURCE_DIR}/ThirdParty/")
FetchContent_Populate(
QArchive
GIT_REPOSITORY https://github.com/antony-jr/QArchive.git
GIT_TAG cb9c6ea9300f5f37d581ba4f039cfdb7bcf3c9e6
GIT_TAG 2d05e652ad9a2bff8c87962d5525e2b3c4d7351b
# Workaround because:
# 1. QtCreator cannot handle QML_ELEMENT stuff when it is in bin folder
# https://bugreports.qt.io/browse/QTCREATORBUG-27083

View File

@ -236,22 +236,31 @@
</context>
<context>
<name>ExitPopup</name>
<message>
<source>Are you sure you want to exit ScreenPlay?</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>This will shut down all Wallpaper and Widgets. If you want your Wallpaper to continue playing, press the minimize button.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Close ScreenPlay</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Minimize ScreenPlay</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Always minimize ScreenPlay</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>You have active Wallpaper.
ScreenPlay will only quit if no Wallpaper are running.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>You can &lt;b&gt;quit&lt;/b&gt; ScreenPlay via the bottom right Tray-Icon.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>You can &lt;b&gt;quit&lt;/b&gt; ScreenPlay via the top right Tray-Icon.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Quit ScreenPlay now</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>GifWallpaper</name>

View File

@ -73,7 +73,7 @@ class BuildConfig:
def execute(
build_config: BuildConfig
) -> BuildResult:
start_time = time.time()
# Make sure the script is always started from the same folder
build_config.root_path = cd_repo_root_path()
@ -92,29 +92,41 @@ def execute(
# temporary files in the build directory.
clean_build_dir(build_config.build_folder)
start_time = time.time()
# Runs cmake configure and cmake build
step_time = time.time()
build_result = build(build_config, build_result)
build_duration = time.time() - step_time
print(f"⏱️ build_duration: {build_duration}s")
# Copies all needed libraries and assets into the bin folder
step_time = time.time()
package(build_config)
package_duration = time.time() - step_time
print(f"⏱️ package_duration: {package_duration}s")
# Creates a Qt InstallerFrameWork (IFW) installer
if build_config.create_installer == "ON":
step_time = time.time()
build_installer(build_config, build_result)
build_installer_duration = time.time() - step_time
print(f"⏱️ build_installer_duration: {zip_duration}s")
# Create a zip file for scoop & chocolatey
if platform.system() == "Windows":
step_time = time.time()
build_result = zip(build_config, build_result)
zip_duration = time.time() - step_time
print(f"⏱️ zip_duration: {zip_duration}s")
print("Time taken: {}s".format(time.time() - start_time))
duration = time.time() - start_time
print(f"⏱️ Build completed in: {duration}s")
# Print BuildConfig & BuildResult member for easier debugging
print("BuildResult:\n")
print(' '.join("- %s: \t\t%s\n" % item for item in vars(build_result).items()))
print("BuildConfig:\n")
print(' '.join("- %s: \t\t%s\n" % item for item in vars(build_config).items()))
print("\n🆗 BuildResult:")
print(' '.join("\n- %s: \t\t%s" % item for item in vars(build_result).items()))
print("\n⚙️ BuildConfig:")
print(' '.join("\n- %s: \t\t%s" % item for item in vars(build_config).items()))
return build_result
@ -238,9 +250,9 @@ def build(build_config: BuildConfig, build_result: BuildResult) -> BuildResult:
-G "CodeBlocks - Ninja" \
-B.'
print(f"CMake configure:\n{cmake_configure_command}\n\n")
print(f"\n\n⚙️ CMake configure:\n{cmake_configure_command}\n\n")
run(cmake_configure_command, cwd=build_config.build_folder)
print(f"\nCMake build:\n")
print(f"\n\n⚙️ CMake build:\n\n")
run("cmake --build . --target all", cwd=build_config.build_folder)
build_result.binary = Path(build_config.bin_dir)