diff options
-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 |