Skip to content

Commit

Permalink
Added cmake prefix for install path to be set dynamically
Browse files Browse the repository at this point in the history
  • Loading branch information
babluboy committed Oct 28, 2017
1 parent b8ac0cd commit 7565019
Show file tree
Hide file tree
Showing 5 changed files with 261 additions and 42 deletions.
3 changes: 3 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,9 @@ set (GETTEXT_PACKAGE "${CMAKE_PROJECT_NAME}")
add_definitions ("-DGETTEXT_PACKAGE=\"${GETTEXT_PACKAGE}\"")
add_subdirectory (po)

# Replace parameters in source code
configure_file("${CMAKE_CURRENT_SOURCE_DIR}/src/constants.vala.in" "${CMAKE_SOURCE_DIR}/src/constants.vala" @ONLY)

# define variable for sources
set (SOURCE_LIST
src/main.vala
Expand Down
2 changes: 1 addition & 1 deletion po/bookworm.pot
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2017-10-26 23:03+0100\n"
"POT-Creation-Date: 2017-10-28 14:47+0100\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
Expand Down
78 changes: 38 additions & 40 deletions src/constants.vala
Original file line number Diff line number Diff line change
Expand Up @@ -137,53 +137,51 @@ namespace BookwormApp.Constants {
public const string TEXT_FOR_PREF_MENU_ABOUT_ITEM = _("About");
public const string TEXT_FOR_PREF_MENU_PREFERENCES_ITEM = _("Preferences");

public static const string MONITOR_SCRIPT_LOCATION = "/usr/share/bookworm/scripts/tasks/com.github.babluboy.bookworm.monitor.sh";
public static const string SEARCH_SCRIPT_LOCATION = "/usr/share/bookworm/scripts/tasks/com.github.babluboy.bookworm.search.sh";
public static const string HTML_SCRIPT_LOCATION = "/usr/share/bookworm/scripts/tasks/com.github.babluboy.bookworm.htmlscripts.txt";
public static const string MOBIUNPACK_SCRIPT_LOCATION = "/usr/share/bookworm/scripts/mobi_lib/mobi_unpack.py";
public static const string CSS_LOCATION = "/usr/share/bookworm/com.github.babluboy.bookworm.app.css";
public static const string PREV_PAGE_ICON_IMAGE_LOCATION = "/usr/share/bookworm/icons/hicolor/16x16/actions/bookworm-go-previous.svg";
public static const string NEXT_PAGE_ICON_IMAGE_LOCATION = "/usr/share/bookworm/icons/hicolor/16x16/actions/bookworm-go-next.svg";
public static const string SELECT_BOOK_ICON_IMAGE_LOCATION = "/usr/share/bookworm/icons/hicolor/16x16/actions/bookworm-object-select-symbolic.svg";
public static const string ADD_BOOK_ICON_IMAGE_LOCATION = "/usr/share/bookworm/icons/hicolor/16x16/actions/bookworm-list-add.svg";
public static const string REMOVE_BOOK_ICON_IMAGE_LOCATION = "/usr/share/bookworm/icons/hicolor/16x16/actions/bookworm-list-remove.svg";
public static const string LIBRARY_VIEW_GRID_IMAGE_LOCATION = "/usr/share/bookworm/icons/hicolor/16x16/actions/bookworm-view-grid-symbolic.svg";
public static const string LIBRARY_VIEW_LIST_IMAGE_LOCATION = "/usr/share/bookworm/icons/hicolor/16x16/actions/bookworm-view-list-symbolic.svg";
public static const string MORE_LINE_HEIGHT_IMAGE_LOCATION = "/usr/share/bookworm/icons/hicolor/16x16/actions/bookworm-line-height-more.png";
public static const string LESS_LINE_HEIGHT_IMAGE_LOCATION = "/usr/share/bookworm/icons/hicolor/16x16/actions/bookworm-line-height-less.png";
public static const string MORE_LINE_WIDTH_IMAGE_LOCATION = "/usr/share/bookworm/icons/hicolor/16x16/actions/bookworm-width-more.png";
public static const string LESS_LINE_WIDTH_IMAGE_LOCATION = "/usr/share/bookworm/icons/hicolor/16x16/actions/bookworm-width-less.png";
public static const string RATING_NONE_IMAGE_ICON_LOCATION = "/usr/share/bookworm/icons/hicolor/16x16/actions/bookworm-help-about-symbolic.svg";
public static const string RATING_SELECTED_IMAGE_ICON_LOCATION = "/usr/share/bookworm/icons/hicolor/16x16/actions/bookworm-help-about.svg";
public static const string TEXT_LARGER_IMAGE_ICON_LOCATION = "/usr/share/bookworm/icons/hicolor/16x16/actions/bookworm-format-text-larger-symbolic.svg";
public static const string TEXT_SMALLER_IMAGE_ICON_LOCATION = "/usr/share/bookworm/icons/hicolor/16x16/actions/bookworm-format-text-smaller-symbolic.svg";
public static const string RATING_1_IMAGE_LOCATION = "/usr/share/bookworm/icons/hicolor/16x16/actions/bookworm_rating_1.png";
public static const string RATING_2_IMAGE_LOCATION = "/usr/share/bookworm/icons/hicolor/16x16/actions/bookworm_rating_2.png";
public static const string RATING_3_IMAGE_LOCATION = "/usr/share/bookworm/icons/hicolor/16x16/actions/bookworm_rating_3.png";
public static const string RATING_4_IMAGE_LOCATION = "/usr/share/bookworm/icons/hicolor/16x16/actions/bookworm_rating_4.png";
public static const string RATING_5_IMAGE_LOCATION = "/usr/share/bookworm/icons/hicolor/16x16/actions/bookworm_rating_5.png";
public static const string UPDATE_IMAGE_ICON_LOCATION = "/usr/share/bookworm/icons/hicolor/16x16/actions/bookworm-insert-image.svg";
public static const string SELECTION_OPTION_IMAGE_SMALL_LOCATION = "/usr/share/bookworm/icons/hicolor/16x16/actions/bookworm-selection-option.svg";
public static const string SELECTION_CHECKED_IMAGE_SMALL_LOCATION = "/usr/share/bookworm/icons/hicolor/16x16/actions/bookworm-selection-checked.svg";
public static const string BOOK_INFO_IMAGE_LOCATION = "/usr/share/bookworm/icons/hicolor/16x16/actions/bookworm-help-info-symbolic.svg";
public static const string BOOKMARK_INACTIVE_IMAGE_LOCATION = "/usr/share/bookworm/icons/hicolor/24x24/actions/bookworm-bookmark-inactive.png";
public static const string BOOKMARK_ACTIVE_IMAGE_LOCATION = "/usr/share/bookworm/icons/hicolor/24x24/actions/bookworm-bookmark-active.png";
public static const string SELECTION_OPTION_IMAGE_LOCATION = "/usr/share/bookworm/icons/hicolor/24x24/actions/bookworm-selection-option.svg";
public static const string SELECTION_CHECKED_IMAGE_LOCATION = "/usr/share/bookworm/icons/hicolor/24x24/actions/bookworm-selection-checked.svg";
public static const string HEADERBAR_PROPERTIES_IMAGE_LOCATION = "/usr/share/bookworm/icons/hicolor/24x24/actions/bookworm-open-menu.svg";
public static const string DEFAULT_COVER_IMAGE_LOCATION = "/usr/share/bookworm/icons/hicolor/256x256/apps/bookworm-default-cover-N.png";
public static const string PLACEHOLDER_COVER_IMAGE_LOCATION = "/usr/share/bookworm/icons/hicolor/256x256/apps/bookworm-placeholder-cover.png";
public const string INSTALL_PREFIX = "/usr";
public static const string MONITOR_SCRIPT_LOCATION = INSTALL_PREFIX+"/share/bookworm/scripts/tasks/com.github.babluboy.bookworm.monitor.sh";
public static const string SEARCH_SCRIPT_LOCATION = INSTALL_PREFIX+"/share/bookworm/scripts/tasks/com.github.babluboy.bookworm.search.sh";
public static const string HTML_SCRIPT_LOCATION = INSTALL_PREFIX+"/share/bookworm/scripts/tasks/com.github.babluboy.bookworm.htmlscripts.txt";
public static const string MOBIUNPACK_SCRIPT_LOCATION = INSTALL_PREFIX+"/share/bookworm/scripts/mobi_lib/mobi_unpack.py";
public static const string CSS_LOCATION = INSTALL_PREFIX+"/share/bookworm/com.github.babluboy.bookworm.app.css";
public static const string PREV_PAGE_ICON_IMAGE_LOCATION = INSTALL_PREFIX+"/share/bookworm/icons/hicolor/16x16/actions/bookworm-go-previous.svg";
public static const string NEXT_PAGE_ICON_IMAGE_LOCATION = INSTALL_PREFIX+"/share/bookworm/icons/hicolor/16x16/actions/bookworm-go-next.svg";
public static const string SELECT_BOOK_ICON_IMAGE_LOCATION = INSTALL_PREFIX+"/share/bookworm/icons/hicolor/16x16/actions/bookworm-object-select-symbolic.svg";
public static const string ADD_BOOK_ICON_IMAGE_LOCATION = INSTALL_PREFIX+"/share/bookworm/icons/hicolor/16x16/actions/bookworm-list-add.svg";
public static const string REMOVE_BOOK_ICON_IMAGE_LOCATION = INSTALL_PREFIX+"/share/bookworm/icons/hicolor/16x16/actions/bookworm-list-remove.svg";
public static const string LIBRARY_VIEW_GRID_IMAGE_LOCATION = INSTALL_PREFIX+"/share/bookworm/icons/hicolor/16x16/actions/bookworm-view-grid-symbolic.svg";
public static const string LIBRARY_VIEW_LIST_IMAGE_LOCATION = INSTALL_PREFIX+"/share/bookworm/icons/hicolor/16x16/actions/bookworm-view-list-symbolic.svg";
public static const string MORE_LINE_HEIGHT_IMAGE_LOCATION = INSTALL_PREFIX+"/share/bookworm/icons/hicolor/16x16/actions/bookworm-line-height-more.png";
public static const string LESS_LINE_HEIGHT_IMAGE_LOCATION = INSTALL_PREFIX+"/share/bookworm/icons/hicolor/16x16/actions/bookworm-line-height-less.png";
public static const string MORE_LINE_WIDTH_IMAGE_LOCATION = INSTALL_PREFIX+"/share/bookworm/icons/hicolor/16x16/actions/bookworm-width-more.png";
public static const string LESS_LINE_WIDTH_IMAGE_LOCATION = INSTALL_PREFIX+"/share/bookworm/icons/hicolor/16x16/actions/bookworm-width-less.png";
public static const string RATING_NONE_IMAGE_ICON_LOCATION = INSTALL_PREFIX+"/share/bookworm/icons/hicolor/16x16/actions/bookworm-help-about-symbolic.svg";
public static const string RATING_SELECTED_IMAGE_ICON_LOCATION = INSTALL_PREFIX+"/share/bookworm/icons/hicolor/16x16/actions/bookworm-help-about.svg";
public static const string TEXT_LARGER_IMAGE_ICON_LOCATION = INSTALL_PREFIX+"/share/bookworm/icons/hicolor/16x16/actions/bookworm-format-text-larger-symbolic.svg";
public static const string TEXT_SMALLER_IMAGE_ICON_LOCATION = INSTALL_PREFIX+"/share/bookworm/icons/hicolor/16x16/actions/bookworm-format-text-smaller-symbolic.svg";
public static const string RATING_1_IMAGE_LOCATION = INSTALL_PREFIX+"/share/bookworm/icons/hicolor/16x16/actions/bookworm_rating_1.png";
public static const string RATING_2_IMAGE_LOCATION = INSTALL_PREFIX+"/share/bookworm/icons/hicolor/16x16/actions/bookworm_rating_2.png";
public static const string RATING_3_IMAGE_LOCATION = INSTALL_PREFIX+"/share/bookworm/icons/hicolor/16x16/actions/bookworm_rating_3.png";
public static const string RATING_4_IMAGE_LOCATION = INSTALL_PREFIX+"/share/bookworm/icons/hicolor/16x16/actions/bookworm_rating_4.png";
public static const string RATING_5_IMAGE_LOCATION = INSTALL_PREFIX+"/share/bookworm/icons/hicolor/16x16/actions/bookworm_rating_5.png";
public static const string UPDATE_IMAGE_ICON_LOCATION = INSTALL_PREFIX+"/share/bookworm/icons/hicolor/16x16/actions/bookworm-insert-image.svg";
public static const string SELECTION_OPTION_IMAGE_SMALL_LOCATION = INSTALL_PREFIX+"/share/bookworm/icons/hicolor/16x16/actions/bookworm-selection-option.svg";
public static const string SELECTION_CHECKED_IMAGE_SMALL_LOCATION = INSTALL_PREFIX+"/share/bookworm/icons/hicolor/16x16/actions/bookworm-selection-checked.svg";
public static const string BOOK_INFO_IMAGE_LOCATION = INSTALL_PREFIX+"/share/bookworm/icons/hicolor/16x16/actions/bookworm-help-info-symbolic.svg";
public static const string BOOKMARK_INACTIVE_IMAGE_LOCATION = INSTALL_PREFIX+"/share/bookworm/icons/hicolor/24x24/actions/bookworm-bookmark-inactive.png";
public static const string BOOKMARK_ACTIVE_IMAGE_LOCATION = INSTALL_PREFIX+"/share/bookworm/icons/hicolor/24x24/actions/bookworm-bookmark-active.png";
public static const string SELECTION_OPTION_IMAGE_LOCATION = INSTALL_PREFIX+"/share/bookworm/icons/hicolor/24x24/actions/bookworm-selection-option.svg";
public static const string SELECTION_CHECKED_IMAGE_LOCATION = INSTALL_PREFIX+"/share/bookworm/icons/hicolor/24x24/actions/bookworm-selection-checked.svg";
public static const string HEADERBAR_PROPERTIES_IMAGE_LOCATION = INSTALL_PREFIX+"/share/bookworm/icons/hicolor/24x24/actions/bookworm-open-menu.svg";
public static const string DEFAULT_COVER_IMAGE_LOCATION = INSTALL_PREFIX+"/share/bookworm/icons/hicolor/256x256/apps/bookworm-default-cover-N.png";
public static const string PLACEHOLDER_COVER_IMAGE_LOCATION = INSTALL_PREFIX+"/share/bookworm/icons/hicolor/256x256/apps/bookworm-placeholder-cover.png";
public static const string EBOOK_EXTRACTION_LOCATION = "/tmp/bookworm/";
public static const string PREFIX_FOR_FILE_URL = "file:///";

public static const string FILE_CHOOSER_FILTER_EBOOKS[] = {"*.epub", "*.pdf", "*.cbr", "*.cbz", "*.mobi", "*.prc"};
public static const string FILE_CHOOSER_FILTER_IMAGES[] = {"*.jpg", "*.jpeg", "*.gif", "*.png", "*.svg"};


public static const string BOOKWORM_READING_MODE[] = {"PROFILE1",
"PROFILE2",
"PROFILE3"
};
public static const string BOOKWORM_READING_MODE[] = {"PROFILE1","PROFILE2","PROFILE3"};
public static const string BOOKWORM_UI_STATES[] = {"LIBRARY_MODE_GRID",
"READING_MODE",
"GRID_SELECTION_MODE",
Expand Down
Loading

0 comments on commit 7565019

Please sign in to comment.