Skip to content
Snippets Groups Projects
Commit 279f92d2 authored by Andreas Traczyk's avatar Andreas Traczyk
Browse files

misc: generate image resource files during cmake configure

resources.qrc & src/constant/JamiResources.qml are unversioned.

Glob checks for changes to the resource dir and forces a
reconfigure.

Change-Id: Ic88e4e861b8367ba44bc0eea6c323e08310afb8b
Gitlab: #477
parent 2a291486
No related branches found
No related tags found
No related merge requests found
......@@ -25,3 +25,7 @@ build-local/
*qmlcache.qrc
.deploy.stamp
# auto-gen files
resources.qrc
src/constant/JamiResources.qml
......@@ -23,6 +23,18 @@ set(CMAKE_INSTALL_RPATH_USE_LINK_PATH true)
set(QML_RESOURCES ${PROJECT_SOURCE_DIR}/resources.qrc)
set(QML_RESOURCES_QML ${PROJECT_SOURCE_DIR}/qml.qrc)
# Resource auto-gen
# check files in the resource directory and force a reconfigure if it changes
file(GLOB_RECURSE
RES_FILES CONFIGURE_DEPENDS
${PROJECT_SOURCE_DIR}/resources/*
)
include(FindPythonInterp)
execute_process(
COMMAND ${PYTHON_EXECUTABLE} ${PROJECT_SOURCE_DIR}/gen-resources.py
WORKING_DIRECTORY ${PROJECT_SOURCE_DIR}
)
# library compatibility (boost, libnotify, etc.)
add_definitions(-DQT_NO_KEYWORDS)
......
......@@ -6,6 +6,8 @@ resdir = 'resources'
qmlfile = os.path.join('src', 'constant', 'JamiResources.qml')
sep = '_'
print("Generating resource files ...")
# replace characters that aren't valid within QML property names
formatProp = lambda str: (
"".join([{".": sep, "-": sep, " ": sep}
......
<RCC>
<qresource prefix="/fonts">
<file alias="FontAwesome.otf">resources/fonts/FontAwesome.otf</file>
</qresource>
<qresource prefix="/icons">
<file alias="account_24dp.svg">resources/icons/account_24dp.svg</file>
<file alias="add_people_24dp.svg">resources/icons/add_people_24dp.svg</file>
<file alias="add_people_black_24dp.svg">resources/icons/add_people_black_24dp.svg</file>
<file alias="arrow_drop_down_24dp.svg">resources/icons/arrow_drop_down_24dp.svg</file>
<file alias="arrow_drop_up_24dp.svg">resources/icons/arrow_drop_up_24dp.svg</file>
<file alias="backup_24dp.svg">resources/icons/backup_24dp.svg</file>
<file alias="back_24dp.svg">resources/icons/back_24dp.svg</file>
<file alias="baseline_camera_alt_24dp.svg">resources/icons/baseline_camera_alt_24dp.svg</file>
<file alias="baseline_close_24dp.svg">resources/icons/baseline_close_24dp.svg</file>
<file alias="baseline_desktop_windows_24dp.svg">resources/icons/baseline_desktop_windows_24dp.svg</file>
<file alias="baseline_done_24dp.svg">resources/icons/baseline_done_24dp.svg</file>
<file alias="baseline_error_outline_24dp.svg">resources/icons/baseline_error_outline_24dp.svg</file>
<file alias="block_black_24dp.svg">resources/icons/block_black_24dp.svg</file>
<file alias="chat_black_24dp.svg">resources/icons/chat_black_24dp.svg</file>
<file alias="check_black_24dp.svg">resources/icons/check_black_24dp.svg</file>
<file alias="check_box_24dp.svg">resources/icons/check_box_24dp.svg</file>
<file alias="check_box_outline_blank_24dp.svg">resources/icons/check_box_outline_blank_24dp.svg</file>
<file alias="chevron_left_black_24dp.svg">resources/icons/chevron_left_black_24dp.svg</file>
<file alias="close_fullscreen_24dp.svg">resources/icons/close_fullscreen_24dp.svg</file>
<file alias="close_white_24dp.svg">resources/icons/close_white_24dp.svg</file>
<file alias="content_copy_24dp.svg">resources/icons/content_copy_24dp.svg</file>
<file alias="cross_black_24dp.svg">resources/icons/cross_black_24dp.svg</file>
<file alias="delete_24dp.svg">resources/icons/delete_24dp.svg</file>
<file alias="delete_forever_24dp.svg">resources/icons/delete_forever_24dp.svg</file>
<file alias="devices_24dp.svg">resources/icons/devices_24dp.svg</file>
<file alias="done_white_24dp.svg">resources/icons/done_white_24dp.svg</file>
<file alias="drafts_24dp.svg">resources/icons/drafts_24dp.svg</file>
<file alias="emoji_black_24dp.svg">resources/icons/emoji_black_24dp.svg</file>
<file alias="expand_less_24dp.svg">resources/icons/expand_less_24dp.svg</file>
<file alias="expand_more_24dp.svg">resources/icons/expand_more_24dp.svg</file>
<file alias="extension_24dp.svg">resources/icons/extension_24dp.svg</file>
<file alias="fiber_manual_record_24dp.svg">resources/icons/fiber_manual_record_24dp.svg</file>
<file alias="file_black_24dp.svg">resources/icons/file_black_24dp.svg</file>
<file alias="gear_black_24dp.svg">resources/icons/gear_black_24dp.svg</file>
<file alias="groups_24dp.svg">resources/icons/groups_24dp.svg</file>
<file alias="group_add_24dp.svg">resources/icons/group_add_24dp.svg</file>
<file alias="ic_arrow_back_24dp.svg">resources/icons/ic_arrow_back_24dp.svg</file>
<file alias="ic_arrow_back_white_24dp.svg">resources/icons/ic_arrow_back_white_24dp.svg</file>
<file alias="ic_baseline_search_24dp.svg">resources/icons/ic_baseline_search_24dp.svg</file>
<file alias="ic_call_end_white_24dp.svg">resources/icons/ic_call_end_white_24dp.svg</file>
<file alias="ic_clear_24dp.svg">resources/icons/ic_clear_24dp.svg</file>
<file alias="ic_content_copy.svg">resources/icons/ic_content_copy.svg</file>
<file alias="ic_hangup_participant_24dp.svg">resources/icons/ic_hangup_participant_24dp.svg</file>
<file alias="ic_high_quality_24dp.svg">resources/icons/ic_high_quality_24dp.svg</file>
<file alias="ic_keypad.svg">resources/icons/ic_keypad.svg</file>
<file alias="ic_pause_white_100px.svg">resources/icons/ic_pause_white_100px.svg</file>
<file alias="ic_send_24dp.svg">resources/icons/ic_send_24dp.svg</file>
<file alias="ic_video_call_24dp.svg">resources/icons/ic_video_call_24dp.svg</file>
<file alias="info_24dp.svg">resources/icons/info_24dp.svg</file>
<file alias="insert_photo_24dp.svg">resources/icons/insert_photo_24dp.svg</file>
<file alias="link_black_24dp.svg">resources/icons/link_black_24dp.svg</file>
<file alias="media_black_24dp.svg">resources/icons/media_black_24dp.svg</file>
<file alias="message_audio_black_24dp.svg">resources/icons/message_audio_black_24dp.svg</file>
<file alias="message_video_black_24dp.svg">resources/icons/message_video_black_24dp.svg</file>
<file alias="mic_24dp.svg">resources/icons/mic_24dp.svg</file>
<file alias="mic_off_24dp.svg">resources/icons/mic_off_24dp.svg</file>
<file alias="moderator.svg">resources/icons/moderator.svg</file>
<file alias="more_vert_24dp.svg">resources/icons/more_vert_24dp.svg</file>
<file alias="mosaic_black_24dp.svg">resources/icons/mosaic_black_24dp.svg</file>
<file alias="open_in_full_24dp.svg">resources/icons/open_in_full_24dp.svg</file>
<file alias="outline_info_24dp.svg">resources/icons/outline_info_24dp.svg</file>
<file alias="pause_24dp.svg">resources/icons/pause_24dp.svg</file>
<file alias="pause_circle_outline_24dp.svg">resources/icons/pause_circle_outline_24dp.svg</file>
<file alias="person_24dp.svg">resources/icons/person_24dp.svg</file>
<file alias="phone_forwarded_24dp.svg">resources/icons/phone_forwarded_24dp.svg</file>
<file alias="phone_paused_24dp.svg">resources/icons/phone_paused_24dp.svg</file>
<file alias="place_audiocall_24dp.svg">resources/icons/place_audiocall_24dp.svg</file>
<file alias="play_circle_outline_24dp.svg">resources/icons/play_circle_outline_24dp.svg</file>
<file alias="plugins_24dp.svg">resources/icons/plugins_24dp.svg</file>
<file alias="plugin_settings_black_24dp.svg">resources/icons/plugin_settings_black_24dp.svg</file>
<file alias="qr_code_24dp.svg">resources/icons/qr_code_24dp.svg</file>
<file alias="record_black_24dp.svg">resources/icons/record_black_24dp.svg</file>
<file alias="re_record_24dp.svg">resources/icons/re_record_24dp.svg</file>
<file alias="round_add_24dp.svg">resources/icons/round_add_24dp.svg</file>
<file alias="round_add_a_photo_24dp.svg">resources/icons/round_add_a_photo_24dp.svg</file>
<file alias="round_arrow_drop_down_24dp.svg">resources/icons/round_arrow_drop_down_24dp.svg</file>
<file alias="round_arrow_drop_up_24dp.svg">resources/icons/round_arrow_drop_up_24dp.svg</file>
<file alias="round_arrow_right_24dp.svg">resources/icons/round_arrow_right_24dp.svg</file>
<file alias="round_check_circle_24dp.svg">resources/icons/round_check_circle_24dp.svg</file>
<file alias="round_close_24dp.svg">resources/icons/round_close_24dp.svg</file>
<file alias="round_edit_24dp.svg">resources/icons/round_edit_24dp.svg</file>
<file alias="round_error_24dp.svg">resources/icons/round_error_24dp.svg</file>
<file alias="round_folder_24dp.svg">resources/icons/round_folder_24dp.svg</file>
<file alias="round_remove_circle_24dp.svg">resources/icons/round_remove_circle_24dp.svg</file>
<file alias="round_save_alt_24dp.svg">resources/icons/round_save_alt_24dp.svg</file>
<file alias="round_settings_24dp.svg">resources/icons/round_settings_24dp.svg</file>
<file alias="round_undo_24dp.svg">resources/icons/round_undo_24dp.svg</file>
<file alias="router_24dp.svg">resources/icons/router_24dp.svg</file>
<file alias="send_24dp.svg">resources/icons/send_24dp.svg</file>
<file alias="send_black_24dp.svg">resources/icons/send_black_24dp.svg</file>
<file alias="settings_24dp.svg">resources/icons/settings_24dp.svg</file>
<file alias="settings_backup_restore_24dp.svg">resources/icons/settings_backup_restore_24dp.svg</file>
<file alias="settings_backup_restore_black_18dp.svg">resources/icons/settings_backup_restore_black_18dp.svg</file>
<file alias="share_24dp.svg">resources/icons/share_24dp.svg</file>
<file alias="share_screen_black_24dp.svg">resources/icons/share_screen_black_24dp.svg</file>
<file alias="share_stop_black_24dp.svg">resources/icons/share_stop_black_24dp.svg</file>
<file alias="spk_black_24dp.svg">resources/icons/spk_black_24dp.svg</file>
<file alias="spk_none_black_24dp.svg">resources/icons/spk_none_black_24dp.svg</file>
<file alias="star_outline_24dp.svg">resources/icons/star_outline_24dp.svg</file>
<file alias="stop_24dp.svg">resources/icons/stop_24dp.svg</file>
<file alias="stop_24dp_red.svg">resources/icons/stop_24dp_red.svg</file>
<file alias="videocam_24dp.svg">resources/icons/videocam_24dp.svg</file>
<file alias="videocam_off_24dp.svg">resources/icons/videocam_off_24dp.svg</file>
</qresource>
<qresource prefix="/images">
<file alias="default_avatar_overlay.svg">resources/images/default_avatar_overlay.svg</file>
<file alias="jami-32px.xpm">resources/images/jami-32px.xpm</file>
<file alias="jami-48px.png">resources/images/jami-48px.png</file>
<file alias="jami-new.svg">resources/images/jami-new.svg</file>
<file alias="jami.ico">resources/images/jami.ico</file>
<file alias="jami.svg">resources/images/jami.svg</file>
<file alias="jami_eclipse_spinner.gif">resources/images/jami_eclipse_spinner.gif</file>
<file alias="jami_rolling_spinner.gif">resources/images/jami_rolling_spinner.gif</file>
<file alias="logo-jami-standard-coul-white.svg">resources/images/logo-jami-standard-coul-white.svg</file>
<file alias="logo-jami-standard-coul.svg">resources/images/logo-jami-standard-coul.svg</file>
<file alias="quote.svg">resources/images/quote.svg</file>
</qresource>
<qresource prefix="/misc">
<file alias="projectcredits.html">resources/misc/projectcredits.html</file>
</qresource>
</RCC>
\ No newline at end of file
pragma Singleton
import QtQuick 2.14
QtObject {
readonly property string account_24dp_svg: "qrc:/icons/account_24dp.svg"
readonly property string add_people_24dp_svg: "qrc:/icons/add_people_24dp.svg"
readonly property string add_people_black_24dp_svg: "qrc:/icons/add_people_black_24dp.svg"
readonly property string arrow_drop_down_24dp_svg: "qrc:/icons/arrow_drop_down_24dp.svg"
readonly property string arrow_drop_up_24dp_svg: "qrc:/icons/arrow_drop_up_24dp.svg"
readonly property string backup_24dp_svg: "qrc:/icons/backup_24dp.svg"
readonly property string back_24dp_svg: "qrc:/icons/back_24dp.svg"
readonly property string baseline_camera_alt_24dp_svg: "qrc:/icons/baseline_camera_alt_24dp.svg"
readonly property string baseline_close_24dp_svg: "qrc:/icons/baseline_close_24dp.svg"
readonly property string baseline_desktop_windows_24dp_svg: "qrc:/icons/baseline_desktop_windows_24dp.svg"
readonly property string baseline_done_24dp_svg: "qrc:/icons/baseline_done_24dp.svg"
readonly property string baseline_error_outline_24dp_svg: "qrc:/icons/baseline_error_outline_24dp.svg"
readonly property string block_black_24dp_svg: "qrc:/icons/block_black_24dp.svg"
readonly property string chat_black_24dp_svg: "qrc:/icons/chat_black_24dp.svg"
readonly property string check_black_24dp_svg: "qrc:/icons/check_black_24dp.svg"
readonly property string check_box_24dp_svg: "qrc:/icons/check_box_24dp.svg"
readonly property string check_box_outline_blank_24dp_svg: "qrc:/icons/check_box_outline_blank_24dp.svg"
readonly property string chevron_left_black_24dp_svg: "qrc:/icons/chevron_left_black_24dp.svg"
readonly property string close_fullscreen_24dp_svg: "qrc:/icons/close_fullscreen_24dp.svg"
readonly property string close_white_24dp_svg: "qrc:/icons/close_white_24dp.svg"
readonly property string content_copy_24dp_svg: "qrc:/icons/content_copy_24dp.svg"
readonly property string cross_black_24dp_svg: "qrc:/icons/cross_black_24dp.svg"
readonly property string delete_24dp_svg: "qrc:/icons/delete_24dp.svg"
readonly property string delete_forever_24dp_svg: "qrc:/icons/delete_forever_24dp.svg"
readonly property string devices_24dp_svg: "qrc:/icons/devices_24dp.svg"
readonly property string done_white_24dp_svg: "qrc:/icons/done_white_24dp.svg"
readonly property string drafts_24dp_svg: "qrc:/icons/drafts_24dp.svg"
readonly property string emoji_black_24dp_svg: "qrc:/icons/emoji_black_24dp.svg"
readonly property string expand_less_24dp_svg: "qrc:/icons/expand_less_24dp.svg"
readonly property string expand_more_24dp_svg: "qrc:/icons/expand_more_24dp.svg"
readonly property string extension_24dp_svg: "qrc:/icons/extension_24dp.svg"
readonly property string fiber_manual_record_24dp_svg: "qrc:/icons/fiber_manual_record_24dp.svg"
readonly property string file_black_24dp_svg: "qrc:/icons/file_black_24dp.svg"
readonly property string gear_black_24dp_svg: "qrc:/icons/gear_black_24dp.svg"
readonly property string groups_24dp_svg: "qrc:/icons/groups_24dp.svg"
readonly property string group_add_24dp_svg: "qrc:/icons/group_add_24dp.svg"
readonly property string ic_arrow_back_24dp_svg: "qrc:/icons/ic_arrow_back_24dp.svg"
readonly property string ic_arrow_back_white_24dp_svg: "qrc:/icons/ic_arrow_back_white_24dp.svg"
readonly property string ic_baseline_search_24dp_svg: "qrc:/icons/ic_baseline_search_24dp.svg"
readonly property string ic_call_end_white_24dp_svg: "qrc:/icons/ic_call_end_white_24dp.svg"
readonly property string ic_clear_24dp_svg: "qrc:/icons/ic_clear_24dp.svg"
readonly property string ic_content_copy_svg: "qrc:/icons/ic_content_copy.svg"
readonly property string ic_hangup_participant_24dp_svg: "qrc:/icons/ic_hangup_participant_24dp.svg"
readonly property string ic_high_quality_24dp_svg: "qrc:/icons/ic_high_quality_24dp.svg"
readonly property string ic_keypad_svg: "qrc:/icons/ic_keypad.svg"
readonly property string ic_pause_white_100px_svg: "qrc:/icons/ic_pause_white_100px.svg"
readonly property string ic_send_24dp_svg: "qrc:/icons/ic_send_24dp.svg"
readonly property string ic_video_call_24dp_svg: "qrc:/icons/ic_video_call_24dp.svg"
readonly property string info_24dp_svg: "qrc:/icons/info_24dp.svg"
readonly property string insert_photo_24dp_svg: "qrc:/icons/insert_photo_24dp.svg"
readonly property string link_black_24dp_svg: "qrc:/icons/link_black_24dp.svg"
readonly property string media_black_24dp_svg: "qrc:/icons/media_black_24dp.svg"
readonly property string message_audio_black_24dp_svg: "qrc:/icons/message_audio_black_24dp.svg"
readonly property string message_video_black_24dp_svg: "qrc:/icons/message_video_black_24dp.svg"
readonly property string mic_24dp_svg: "qrc:/icons/mic_24dp.svg"
readonly property string mic_off_24dp_svg: "qrc:/icons/mic_off_24dp.svg"
readonly property string moderator_svg: "qrc:/icons/moderator.svg"
readonly property string more_vert_24dp_svg: "qrc:/icons/more_vert_24dp.svg"
readonly property string mosaic_black_24dp_svg: "qrc:/icons/mosaic_black_24dp.svg"
readonly property string open_in_full_24dp_svg: "qrc:/icons/open_in_full_24dp.svg"
readonly property string outline_info_24dp_svg: "qrc:/icons/outline_info_24dp.svg"
readonly property string pause_24dp_svg: "qrc:/icons/pause_24dp.svg"
readonly property string pause_circle_outline_24dp_svg: "qrc:/icons/pause_circle_outline_24dp.svg"
readonly property string person_24dp_svg: "qrc:/icons/person_24dp.svg"
readonly property string phone_forwarded_24dp_svg: "qrc:/icons/phone_forwarded_24dp.svg"
readonly property string phone_paused_24dp_svg: "qrc:/icons/phone_paused_24dp.svg"
readonly property string place_audiocall_24dp_svg: "qrc:/icons/place_audiocall_24dp.svg"
readonly property string play_circle_outline_24dp_svg: "qrc:/icons/play_circle_outline_24dp.svg"
readonly property string plugins_24dp_svg: "qrc:/icons/plugins_24dp.svg"
readonly property string plugin_settings_black_24dp_svg: "qrc:/icons/plugin_settings_black_24dp.svg"
readonly property string qr_code_24dp_svg: "qrc:/icons/qr_code_24dp.svg"
readonly property string record_black_24dp_svg: "qrc:/icons/record_black_24dp.svg"
readonly property string re_record_24dp_svg: "qrc:/icons/re_record_24dp.svg"
readonly property string round_add_24dp_svg: "qrc:/icons/round_add_24dp.svg"
readonly property string round_add_a_photo_24dp_svg: "qrc:/icons/round_add_a_photo_24dp.svg"
readonly property string round_arrow_drop_down_24dp_svg: "qrc:/icons/round_arrow_drop_down_24dp.svg"
readonly property string round_arrow_drop_up_24dp_svg: "qrc:/icons/round_arrow_drop_up_24dp.svg"
readonly property string round_arrow_right_24dp_svg: "qrc:/icons/round_arrow_right_24dp.svg"
readonly property string round_check_circle_24dp_svg: "qrc:/icons/round_check_circle_24dp.svg"
readonly property string round_close_24dp_svg: "qrc:/icons/round_close_24dp.svg"
readonly property string round_edit_24dp_svg: "qrc:/icons/round_edit_24dp.svg"
readonly property string round_error_24dp_svg: "qrc:/icons/round_error_24dp.svg"
readonly property string round_folder_24dp_svg: "qrc:/icons/round_folder_24dp.svg"
readonly property string round_remove_circle_24dp_svg: "qrc:/icons/round_remove_circle_24dp.svg"
readonly property string round_save_alt_24dp_svg: "qrc:/icons/round_save_alt_24dp.svg"
readonly property string round_settings_24dp_svg: "qrc:/icons/round_settings_24dp.svg"
readonly property string round_undo_24dp_svg: "qrc:/icons/round_undo_24dp.svg"
readonly property string router_24dp_svg: "qrc:/icons/router_24dp.svg"
readonly property string send_24dp_svg: "qrc:/icons/send_24dp.svg"
readonly property string send_black_24dp_svg: "qrc:/icons/send_black_24dp.svg"
readonly property string settings_24dp_svg: "qrc:/icons/settings_24dp.svg"
readonly property string settings_backup_restore_24dp_svg: "qrc:/icons/settings_backup_restore_24dp.svg"
readonly property string settings_backup_restore_black_18dp_svg: "qrc:/icons/settings_backup_restore_black_18dp.svg"
readonly property string share_24dp_svg: "qrc:/icons/share_24dp.svg"
readonly property string share_screen_black_24dp_svg: "qrc:/icons/share_screen_black_24dp.svg"
readonly property string share_stop_black_24dp_svg: "qrc:/icons/share_stop_black_24dp.svg"
readonly property string spk_black_24dp_svg: "qrc:/icons/spk_black_24dp.svg"
readonly property string spk_none_black_24dp_svg: "qrc:/icons/spk_none_black_24dp.svg"
readonly property string star_outline_24dp_svg: "qrc:/icons/star_outline_24dp.svg"
readonly property string stop_24dp_svg: "qrc:/icons/stop_24dp.svg"
readonly property string stop_24dp_red_svg: "qrc:/icons/stop_24dp_red.svg"
readonly property string videocam_24dp_svg: "qrc:/icons/videocam_24dp.svg"
readonly property string videocam_off_24dp_svg: "qrc:/icons/videocam_off_24dp.svg"
readonly property string default_avatar_overlay_svg: "qrc:/images/default_avatar_overlay.svg"
readonly property string jami_32px_xpm: "qrc:/images/jami-32px.xpm"
readonly property string jami_48px_png: "qrc:/images/jami-48px.png"
readonly property string jami_new_svg: "qrc:/images/jami-new.svg"
readonly property string jami_ico: "qrc:/images/jami.ico"
readonly property string jami_svg: "qrc:/images/jami.svg"
readonly property string jami_eclipse_spinner_gif: "qrc:/images/jami_eclipse_spinner.gif"
readonly property string jami_rolling_spinner_gif: "qrc:/images/jami_rolling_spinner.gif"
readonly property string logo_jami_standard_coul_white_svg: "qrc:/images/logo-jami-standard-coul-white.svg"
readonly property string logo_jami_standard_coul_svg: "qrc:/images/logo-jami-standard-coul.svg"
readonly property string quote_svg: "qrc:/images/quote.svg"
}
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment