Skip to content

Packed resources - #155

Open
mymedia2 wants to merge 1 commit into
desktop-app:masterfrom
mymedia2:patch-14
Open

mymedia2 wants to merge 1 commit into
desktop-app:masterfrom
mymedia2:patch-14

Conversation

@mymedia2

Copy link
Copy Markdown
Contributor

Dynamically load packed resources from a separate file. This reduces amount of main memory required for linking stage.

Main PR: telegramdesktop/tdesktop#17339

Dynamically load packed resources from a separate file. This
reduces amount of main memory required for linking stage.
Comment thread target_prepare_qrc.cmake
set(rcc_file ${target_name}.rcc)
set(rcc_path "${CMAKE_BINARY_DIR}/${rcc_file}")
source_group(TREE ${CMAKE_BINARY_DIR} PREFIX Resources FILES ${rcc_path})
set(cmd_run "$<IF:$<BOOL:${qrc_files}>,,true>") # do nothing if qrc_files are empty

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This code is cross-platform and Windows will fail on it.

Comment thread options.cmake
)
endif()

if (DESKTOP_APP_USE_PACKED_RESOURCES)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
if (DESKTOP_APP_USE_PACKED_RESOURCES)
if (DESKTOP_APP_PACKED_RESOURCES)
Comment thread options.cmake
if (DESKTOP_APP_USE_PACKED_RESOURCES)
target_compile_definitions(common_options
INTERFACE
DESKTOP_APP_USE_PACKED_RESOURCES

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
DESKTOP_APP_USE_PACKED_RESOURCES
DESKTOP_APP_PACKED_RESOURCES
Comment thread target_prepare_qrc.cmake
set(rcc_file ${target_name}.rcc)
endif()

if (NOT DESKTOP_APP_USE_PACKED_RESOURCES)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
if (NOT DESKTOP_APP_USE_PACKED_RESOURCES)
if (NOT DESKTOP_APP_PACKED_RESOURCES)
Comment thread variables.cmake
cmake_dependent_option(DESKTOP_APP_USE_PACKAGED_LAZY "Bundle recommended Qt plugins for self-contained packages." OFF LINUX OFF)
option(DESKTOP_APP_USE_PACKAGED_FONTS "Use preinstalled fonts instead of bundled patched ones." OFF)
option(DESKTOP_APP_USE_PACKAGED_RLOTTIE "Find rlottie using CMake instead of bundled patched one." OFF)
option(DESKTOP_APP_USE_PACKED_RESOURCES "Whether to pack resources into a separate archive." ${APPLE})

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
option(DESKTOP_APP_USE_PACKED_RESOURCES "Whether to pack resources into a separate archive." ${APPLE})
option(DESKTOP_APP_PACKED_RESOURCES "Whether to pack resources into a separate archive." ${APPLE})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

2 participants