diff options
author | Markus Mohrhard <markus.mohrhard@googlemail.com> | 2016-09-07 05:18:42 +0200 |
---|---|---|
committer | Markus Mohrhard <markus.mohrhard@googlemail.com> | 2017-05-19 03:43:23 +0200 |
commit | 4a32354d48d1250fe761833b065ab2129de351a9 (patch) | |
tree | 38aef173698c433df20e9fc529c340277015371d /onlineupdate | |
parent | ac647e290d1e483b67fb7860ac81d553863f69ee (diff) |
store the correct version string in the updater and the mar executable
Change-Id: I52ca969b9fa84320614f77bd51b8aac736478c54
Diffstat (limited to 'onlineupdate')
-rw-r--r-- | onlineupdate/Executable_mar.mk | 10 | ||||
-rw-r--r-- | onlineupdate/source/libmar/tool/mar.c | 10 |
2 files changed, 15 insertions, 5 deletions
diff --git a/onlineupdate/Executable_mar.mk b/onlineupdate/Executable_mar.mk index 628ca2680058..e6f18ef5c8ee 100644 --- a/onlineupdate/Executable_mar.mk +++ b/onlineupdate/Executable_mar.mk @@ -24,6 +24,7 @@ $(eval $(call gb_Executable_use_externals,mar,\ nss3 \ )) + ifeq ($(OS),WNT) $(eval $(call gb_Executable_add_libs,mar,\ ws2_32.lib \ @@ -33,9 +34,16 @@ endif ifeq ($(filter WNT MACOSX,$(OS)),) $(eval $(call gb_Executable_use_externals,mar,nss3)) -$(eval $(call gb_Executable_add_defs,mar,-DMAR_NSS)) + +$(eval $(call gb_Executable_add_defs,mar,\ + -DMAR_NSS \ +)) endif +$(eval $(call gb_Executable_add_defs,mar,\ + -DAPP_VERSION=\"$(LIBO_VERSION_MAJOR).$(LIBO_VERSION_MINOR).$(LIBO_VERSION_MICRO).$(LIBO_VERSION_PATCH)\" \ +)) + $(eval $(call gb_Executable_add_cobjects,mar,\ onlineupdate/source/libmar/sign/nss_secutil \ onlineupdate/source/libmar/sign/mar_sign \ diff --git a/onlineupdate/source/libmar/tool/mar.c b/onlineupdate/source/libmar/tool/mar.c index 33159bd9655f..232e4e0c220a 100644 --- a/onlineupdate/source/libmar/tool/mar.c +++ b/onlineupdate/source/libmar/tool/mar.c @@ -19,8 +19,10 @@ #include <errno.h> #endif -#define MOZ_APP_VERSION "5" /* Dummy value; replace or remove in the - future */ +#ifndef APP_VERSION +#error "Missing APP_VERSION" +#endif + #define MAR_CHANNEL_ID "LOOnlineUpdater" /* Dummy value; replace or remove in the future */ @@ -37,7 +39,7 @@ int mar_repackage_and_sign(const char *NSSConfigDir, const char * dest); static void print_version(void) { - printf("Version: %s\n", MOZ_APP_VERSION); + printf("Version: %s\n", APP_VERSION); printf("Default Channel ID: %s\n", MAR_CHANNEL_ID); } @@ -126,7 +128,7 @@ int main(int argc, char **argv) { char *NSSConfigDir = NULL; const char *certNames[MAX_SIGNATURES]; char *MARChannelID = MAR_CHANNEL_ID; - char *productVersion = MOZ_APP_VERSION; + char *productVersion = APP_VERSION; #ifndef NO_SIGN_VERIFY uint32_t k; #endif |