Skip to content

Commit

Permalink
refactor: make version.h static
Browse files Browse the repository at this point in the history
  • Loading branch information
arcan1s committed Apr 18, 2024
1 parent 95d5bb9 commit c608c40
Showing 1 changed file with 143 additions and 144 deletions.
287 changes: 143 additions & 144 deletions sources/version.h.in
Original file line number Diff line number Diff line change
Expand Up @@ -2,174 +2,173 @@


// information
const char NAME[] = "Awesome Widgets";
const char VERSION[] = "@PROJECT_VERSION@";
const char COMMIT_SHA[] = "@PROJECT_COMMIT_SHA@";
const char AUTHOR[] = "@PROJECT_AUTHOR@";
const char TRANSLATORS[] = "Ernesto Aviles Vzqz (Spanish),"
"Mermouy (French),"
"underr (Brazillian Portuguese),"
"Viktor Slobodyan (Ukrainian),"
"Lemueler (Chinese),"
"Heimen Stoffels (Dutch),"
"Mariusz Kocoń (Polish),"
"Ibnu Daru Aji (Indonesian),"
"Antonio Vivace (Italian)";
const char EMAIL[] = "@PROJECT_CONTACT@";
const char LICENSE[] = "@PROJECT_LICENSE@";
const char TRDPARTY_LICENSE[] = "QReplyTimeout "
"wrapper,no,http://"
"codereview.stackexchange.com/questions/30031/"
"qnetworkreply-network-reply-timeout-helper";
const char SPECIAL_THANKS[] = "Stooq,https://stooq.com/;"
"Yahoo! Weather,https://weather.yahoo.com/;"
"JetBrains,https://www.jetbrains.com/;"
"OpenWeatherMap,http://openweathermap.org/";
const char CHANGELOG[] = "@PROJECT_CHANGELOG@";
static const char NAME[] = "Awesome Widgets";
static const char VERSION[] = "@PROJECT_VERSION@";
static const char COMMIT_SHA[] = "@PROJECT_COMMIT_SHA@";
static const char AUTHOR[] = "@PROJECT_AUTHOR@";
static const char TRANSLATORS[] = "Ernesto Aviles Vzqz (Spanish),"
"Mermouy (French),"
"underr (Brazillian Portuguese),"
"Viktor Slobodyan (Ukrainian),"
"Lemueler (Chinese),"
"Heimen Stoffels (Dutch),"
"Mariusz Kocoń (Polish),"
"Ibnu Daru Aji (Indonesian),"
"Antonio Vivace (Italian)";
static const char EMAIL[] = "@PROJECT_CONTACT@";
static const char LICENSE[] = "@PROJECT_LICENSE@";
static const char TRDPARTY_LICENSE[]
= "QReplyTimeout "
"wrapper,no,http://codereview.stackexchange.com/questions/30031/qnetworkreply-network-reply-timeout-helper";
static const char SPECIAL_THANKS[] = "Stooq,https://stooq.com/;"
"Yahoo! Weather,https://weather.yahoo.com/;"
"JetBrains,https://www.jetbrains.com/;"
"OpenWeatherMap,http://openweathermap.org/";
static const char CHANGELOG[] = "@PROJECT_CHANGELOG@";

// configuration
// graphical items api version
const int AW_GRAPHITEM_API = 6;
static const int AW_GRAPHITEM_API = 6;
// extquotes api version
const int AW_EXTQUOTES_API = 5;
static const int AW_EXTQUOTES_API = 5;
// extscript api version
const int AW_EXTSCRIPT_API = 5;
static const int AW_EXTSCRIPT_API = 5;
// extupgrade api version
const int AW_EXTUPGRADE_API = 4;
static const int AW_EXTUPGRADE_API = 4;
// extweather api version
const int AW_EXTWEATHER_API = 4;
static const int AW_EXTWEATHER_API = 4;
// extnetworkrequest api version
const int AW_EXTNETREQUEST_API = 2;
static const int AW_EXTNETREQUEST_API = 2;
// formatter api version
const int AW_FORMATTER_API = 3;
static const int AW_FORMATTER_API = 3;
// telemetry api version
const int AW_TELEMETRY_API = 1;
static const int AW_TELEMETRY_API = 1;
// dbus adaptor properties
// use define here instead of normal const definition for moc
#define AWDBUS_SERVICE_NAME "org.kde.plasma.awesomewidget"
const char AWDBUS_SERVICE[] = AWDBUS_SERVICE_NAME;
const char AWDBUS_PATH[] = "/awesomewidgets";
static const char AWDBUS_SERVICE[] = AWDBUS_SERVICE_NAME;
static const char AWDBUS_PATH[] = "/awesomewidgets";
// network requests timeout, ms
const int REQUEST_TIMEOUT = 3000;
static const int REQUEST_TIMEOUT = 3000;
// available time keys
const char TIME_KEYS[] = "d,dd,ddd,dddd,M,MM,MMM,MMMM,yy,yyyy,h,hh,H,HH,m,mm,s,ss,t,a,ap,A,AP";
static const char TIME_KEYS[] = "d,dd,ddd,dddd,M,MM,MMM,MMMM,yy,yyyy,h,hh,H,HH,m,mm,s,ss,t,a,ap,A,AP";
// static keys
const char STATIC_FUNCTIONS[] = "{{\n\n}},"
"template{{\n\n}},"
"aw_all<>{{}},"
"aw_count<>{{}},"
"aw_keys<>{{}},"
"aw_macro<>{{}},"
"aw_names<>{{}}";
const char STATIC_KEYS[] = "time,"
"isotime,"
"shorttime,"
"longtime,"
"tstime,"
"ctime,"
"uptime,"
"cuptime,"
"cpucl,"
"cpu,"
"gpu,"
"memmb,"
"memgb,"
"memfreemb,"
"memfreegb,"
"memtotmb,"
"memtotgb,"
"memusedmb,"
"memusedgb,"
"mem,"
"swapmb,"
"swapgb,"
"swapfreemb,"
"swapfreegb,"
"swaptotmb,"
"swaptotgb,"
"swap,"
"downunits,"
"upunits,"
"downkb,"
"downtotkb,"
"downtot,"
"down,"
"uptotkb,"
"uptot,"
"upkb,"
"up,"
"netdev,"
"ac,"
"bat,"
"batleft,"
"batnow,"
"batrate,"
"battotal,"
"album,"
"artist,"
"duration,"
"progress,"
"title,"
"dalbum,"
"dartist,"
"dtitle,"
"salbum,"
"sartist,"
"stitle,"
"pscount,"
"pstot,"
"ps,"
"desktop,"
"ndesktop,"
"tdesktops,"
"la15,"
"la5,"
"la1,"
"ssid,"
"volume,"
"brightness";
static const char STATIC_FUNCTIONS[] = "{{\n\n}},"
"template{{\n\n}},"
"aw_all<>{{}},"
"aw_count<>{{}},"
"aw_keys<>{{}},"
"aw_macro<>{{}},"
"aw_names<>{{}}";
static const char STATIC_KEYS[] = "time,"
"isotime,"
"shorttime,"
"longtime,"
"tstime,"
"ctime,"
"uptime,"
"cuptime,"
"cpucl,"
"cpu,"
"gpu,"
"memmb,"
"memgb,"
"memfreemb,"
"memfreegb,"
"memtotmb,"
"memtotgb,"
"memusedmb,"
"memusedgb,"
"mem,"
"swapmb,"
"swapgb,"
"swapfreemb,"
"swapfreegb,"
"swaptotmb,"
"swaptotgb,"
"swap,"
"downunits,"
"upunits,"
"downkb,"
"downtotkb,"
"downtot,"
"down,"
"uptotkb,"
"uptot,"
"upkb,"
"up,"
"netdev,"
"ac,"
"bat,"
"batleft,"
"batnow,"
"batrate,"
"battotal,"
"album,"
"artist,"
"duration,"
"progress,"
"title,"
"dalbum,"
"dartist,"
"dtitle,"
"salbum,"
"sartist,"
"stitle,"
"pscount,"
"pstot,"
"ps,"
"desktop,"
"ndesktop,"
"tdesktops,"
"la15,"
"la5,"
"la1,"
"ssid,"
"volume,"
"brightness";
#cmakedefine BUILD_FUTURE
#cmakedefine BUILD_LOAD
#cmakedefine BUILD_TESTING

// links
const char HOMEPAGE[] = "https://arcanis.me/projects/awesome-widgets";
const char REPOSITORY[] = "https://github.com/arcan1s/awesome-widgets";
const char RELEASES[] = "https://github.com/arcan1s/awesome-widgets/releases/tag/";
const char VERSION_API[] = "https://api.github.com/repos/arcan1s/awesome-widgets/releases";
const char BUGTRACKER[] = "https://github.com/arcan1s/awesome-widgets/issues";
const char BUGTRACKER_API[] = "https://arcanis.me/repos/arcan1s/awesome-widgets/issues";
const char TRANSLATION[] = "https://github.com/arcan1s/awesome-widgets/issues/14";
const char AUR_PACKAGES[] = "https://aur.archlinux.org/packages/plasma5-applet-awesome-widgets/";
const char OPENSUSE_PACKAGES[] = "http://software.opensuse.org/package/plasma5-awesome-widgets";
static const char HOMEPAGE[] = "https://arcanis.me/projects/awesome-widgets";
static const char REPOSITORY[] = "https://github.com/arcan1s/awesome-widgets";
static const char RELEASES[] = "https://github.com/arcan1s/awesome-widgets/releases/tag/";
static const char VERSION_API[] = "https://api.github.com/repos/arcan1s/awesome-widgets/releases";
static const char BUGTRACKER[] = "https://github.com/arcan1s/awesome-widgets/issues";
static const char BUGTRACKER_API[] = "https://arcanis.me/repos/arcan1s/awesome-widgets/issues";
static const char TRANSLATION[] = "https://github.com/arcan1s/awesome-widgets/issues/14";
static const char AUR_PACKAGES[] = "https://aur.archlinux.org/packages/plasma5-applet-awesome-widgets/";
static const char OPENSUSE_PACKAGES[] = "http://software.opensuse.org/package/plasma5-awesome-widgets";

// build information
const char BUILD_DATE[] = "@CURRENT_DATE@";
const char DATE[] = "2013-@CURRENT_YEAR@";
static const char BUILD_DATE[] = "@CURRENT_DATE@";
static const char DATE[] = "2013-@CURRENT_YEAR@";

// cmake properties
const char CMAKE_BUILD_TYPE[] = "@CMAKE_BUILD_TYPE@";
const char CMAKE_CXX_COMPILER[] = "@CMAKE_CXX_COMPILER@";
const char CMAKE_CXX_FLAGS[] = "@CMAKE_CXX_FLAGS@";
const char CMAKE_CXX_FLAGS_DEBUG[] = "@CMAKE_CXX_FLAGS_DEBUG@";
const char CMAKE_CXX_FLAGS_RELEASE[] = "@CMAKE_CXX_FLAGS_RELEASE@";
const char CMAKE_CXX_FLAGS_OPTIMIZATION[] = "@CMAKE_CXX_FLAGS_OPTIMIZATION@";
const char CMAKE_DEFINITIONS[] = "@CMAKE_DEFINITIONS@";
const char CMAKE_INSTALL_PREFIX[] = "@CMAKE_INSTALL_PREFIX@";
const char CMAKE_MODULE_LINKER_FLAGS[] = "@CMAKE_MODULE_LINKER_FLAGS@";
const char CMAKE_SHARED_LINKER_FLAGS[] = "@CMAKE_SHARED_LINKER_FLAGS@";
static const char CMAKE_BUILD_TYPE[] = "@CMAKE_BUILD_TYPE@";
static const char CMAKE_CXX_COMPILER[] = "@CMAKE_CXX_COMPILER@";
static const char CMAKE_CXX_FLAGS[] = "@CMAKE_CXX_FLAGS@";
static const char CMAKE_CXX_FLAGS_DEBUG[] = "@CMAKE_CXX_FLAGS_DEBUG@";
static const char CMAKE_CXX_FLAGS_RELEASE[] = "@CMAKE_CXX_FLAGS_RELEASE@";
static const char CMAKE_CXX_FLAGS_OPTIMIZATION[] = "@CMAKE_CXX_FLAGS_OPTIMIZATION@";
static const char CMAKE_DEFINITIONS[] = "@CMAKE_DEFINITIONS@";
static const char CMAKE_INSTALL_PREFIX[] = "@CMAKE_INSTALL_PREFIX@";
static const char CMAKE_MODULE_LINKER_FLAGS[] = "@CMAKE_MODULE_LINKER_FLAGS@";
static const char CMAKE_SHARED_LINKER_FLAGS[] = "@CMAKE_SHARED_LINKER_FLAGS@";
// components
const char BUILD_PLASMOIDS[] = "@BUILD_PLASMOIDS@";
const char BUILD_DEB_PACKAGE[] = "@BUILD_DEB_PACKAGE@";
const char BUILD_RPM_PACKAGE[] = "@BUILD_RPM_PACKAGE@";
const char CLANGFORMAT_EXECUTABLE[] = "@CLANGFORMAT_EXECUTABLE@";
const char COVERITY_COMMENT[] = "@COVERITY_COMMENT@";
const char COVERITY_DIRECTORY[] = "@COVERITY_DIRECTORY@";
const char COVERITY_EMAIL[] = "@COVERITY_EMAIL@";
const char COVERITY_EXECUTABLE[] = "@COVERITY_EXECUTABLE@";
const char COVERITY_URL[] = "@COVERITY_URL@";
const char CPPCHECK_EXECUTABLE[] = "@CPPCHECK_EXECUTABLE@";
static const char BUILD_PLASMOIDS[] = "@BUILD_PLASMOIDS@";
static const char BUILD_DEB_PACKAGE[] = "@BUILD_DEB_PACKAGE@";
static const char BUILD_RPM_PACKAGE[] = "@BUILD_RPM_PACKAGE@";
static const char CLANGFORMAT_EXECUTABLE[] = "@CLANGFORMAT_EXECUTABLE@";
static const char COVERITY_COMMENT[] = "@COVERITY_COMMENT@";
static const char COVERITY_DIRECTORY[] = "@COVERITY_DIRECTORY@";
static const char COVERITY_EMAIL[] = "@COVERITY_EMAIL@";
static const char COVERITY_EXECUTABLE[] = "@COVERITY_EXECUTABLE@";
static const char COVERITY_URL[] = "@COVERITY_URL@";
static const char CPPCHECK_EXECUTABLE[] = "@CPPCHECK_EXECUTABLE@";
// additional functions
const char PROP_FUTURE[] = "@BUILD_FUTURE@";
const char PROP_LOAD[] = "@BUILD_LOAD@";
const char PROP_TEST[] = "@BUILD_TESTING@";
static const char PROP_FUTURE[] = "@BUILD_FUTURE@";
static const char PROP_LOAD[] = "@BUILD_LOAD@";
static const char PROP_TEST[] = "@BUILD_TESTING@";

0 comments on commit c608c40

Please sign in to comment.