From 3e36b069aabf76e95f17c4d3b98e4bce0120030e Mon Sep 17 00:00:00 2001 From: Andy Tather Date: Thu, 16 Feb 2017 11:40:50 +0000 Subject: [PATCH 1/3] Make changes back into generation framework for FireFox extension --- fbgen/src/CMakeLists.txt | 6 ++ fbgen/src/PluginConfig.cmake | 4 +- fbgen/src/Win/WiX/TemplateInstaller.wxs | 97 ++++++++++++++++++++----- fbgen/src/Win/projectDef.cmake | 6 +- 4 files changed, 92 insertions(+), 21 deletions(-) diff --git a/fbgen/src/CMakeLists.txt b/fbgen/src/CMakeLists.txt index c13faeff..9696ed25 100755 --- a/fbgen/src/CMakeLists.txt +++ b/fbgen/src/CMakeLists.txt @@ -77,3 +77,9 @@ add_native_message_host(${PROJECT_NAME}) # "${CMAKE_CURRENT_SOURCE_DIR}/sign/passphrase.txt" # ${PROJECT_NAME}) +#firebreath_sign_file("${PLUGIN_NAME}" +# "${PLUGIN_PATH}/${FBSTRING_HostFileName}.exe" +# "${CMAKE_CURRENT_SOURCE_DIR}/sign/certificate.pfx" +# "${CMAKE_CURRENT_SOURCE_DIR}/sign/passphrase.txt" +# "http://timestamp.verisign.com/scripts/timestamp.dll") + diff --git a/fbgen/src/PluginConfig.cmake b/fbgen/src/PluginConfig.cmake index 5e0b84f8..83b9546f 100644 --- a/fbgen/src/PluginConfig.cmake +++ b/fbgen/src/PluginConfig.cmake @@ -18,7 +18,9 @@ set(PLUGIN_CRX_KEY "MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQDOqMBmB8ThMqFT3/9s/bfS set(PLUGIN_CRX_ID "dlfdfkalmjbghacnadegnkmbcnpmnmfn") set(PLUGIN_CRX_WYRMHOLE_NAME ${COMPANY_NAME}) set(PLUGIN_CRX_NATIVEHOST_NAME "${COMPANY_REVDOMAIN}.firewyrmhost") -set(PLUGIN_MOZ_ID "@{PLUGIN_ident}\@@{COMPANY_domain}") +set(PLUGIN_CRX_NATIVEHOST_DESCRIPTION "${COMPANY_NAME} FireWyrm Native Messaging Wyrmhole") +set(FBSTRING_HostFileName "FireWyrmNativeMessageHost") +set(PLUGIN_MOZ_ID "@{PLUGIN_ident}@@@{COMPANY_domain}") # ActiveX constants: set(FBTYPELIB_NAME @{PLUGIN_ident}Lib) diff --git a/fbgen/src/Win/WiX/TemplateInstaller.wxs b/fbgen/src/Win/WiX/TemplateInstaller.wxs index 4a3ca5bd..15cb1c93 100755 --- a/fbgen/src/Win/WiX/TemplateInstaller.wxs +++ b/fbgen/src/Win/WiX/TemplateInstaller.wxs @@ -53,37 +53,53 @@ KeyPath="yes" /> - - + + - + - + - + + Value="true" + KeyPath="yes" /> + + + Value="[INSTALLDIR]${PLUGIN_CRX_NATIVEHOST_NAME}_chrome.json" /> + + + Value="[INSTALLDIR]${PLUGIN_CRX_NATIVEHOST_NAME}_mozilla.json" /> - - + + + + @@ -102,6 +158,13 @@ + + + + diff --git a/fbgen/src/Win/projectDef.cmake b/fbgen/src/Win/projectDef.cmake index 9153d6b8..f1c60676 100755 --- a/fbgen/src/Win/projectDef.cmake +++ b/fbgen/src/Win/projectDef.cmake @@ -70,16 +70,16 @@ add_wix_installer( ${PLUGIN_NAME} # This is an example of how to add a build step to sign the WiX installer # -- uncomment lines below this to enable signing -- #firebreath_sign_file("${PLUGIN_NAME}_WiXInstall" -# "${FB_BIN_DIR}/${PLUGIN_NAME}/${CMAKE_CFG_INTDIR}/${PLUGIN_NAME}.msi" +# "${PLUGIN_PATH}/${PLUGIN_NAME}.msi" # "${CMAKE_CURRENT_SOURCE_DIR}/sign/certificate.pfx" # "${CMAKE_CURRENT_SOURCE_DIR}/sign/passphrase.txt" # "http://timestamp.verisign.com/scripts/timestamp.dll") # This is an example of how to create a cab -# -- uncomment lines below this to enable signing -- +# -- uncomment lines below this to enable cab file creation -- #create_cab(${PLUGIN_NAME} # ${CMAKE_CURRENT_SOURCE_DIR}/Win/Wix/@{PLUGIN_ident}.ddf # ${CMAKE_CURRENT_SOURCE_DIR}/Win/Wix/@{PLUGIN_ident}.inf -# ${FB_BIN_DIR}/${PLUGIN_NAME}/${CMAKE_CFG_INTDIR}/ +# ${PLUGIN_PATH} # ${PROJECT_NAME}_WiXInstallExe # ) From 33ff6f8fbbb6180300405a7b48fcdc7e219d465f Mon Sep 17 00:00:00 2001 From: Andy Tather Date: Thu, 16 Feb 2017 12:25:52 +0000 Subject: [PATCH 2/3] Fix up examples --- examples/EchoTestPlugin/Win/projectDef.cmake | 6 +++--- examples/FBTestPlugin/Win/projectDef.cmake | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/examples/EchoTestPlugin/Win/projectDef.cmake b/examples/EchoTestPlugin/Win/projectDef.cmake index 839a4424..b03aa716 100644 --- a/examples/EchoTestPlugin/Win/projectDef.cmake +++ b/examples/EchoTestPlugin/Win/projectDef.cmake @@ -60,7 +60,7 @@ get_plugin_path(PLUGIN_FILEPATH ${PROJECT_NAME}) get_filename_component(PLUGIN_PATH ${PLUGIN_FILEPATH} DIRECTORY) add_wix_installer( ${PLUGIN_NAME} - ${CMAKE_CURRENT_SOURCE_DIR}/Win/WiX/@{PLUGIN_ident}Installer.wxs + ${CMAKE_CURRENT_SOURCE_DIR}/Win/WiX/EchoTestPluginInstaller.wxs PluginDLLGroup ${PLUGIN_PATH} $ @@ -70,7 +70,7 @@ add_wix_installer( ${PLUGIN_NAME} # This is an example of how to add a build step to sign the WiX installer # -- uncomment lines below this to enable signing -- #firebreath_sign_file("${PLUGIN_NAME}_WiXInstall" -# "${FB_BIN_DIR}/${PLUGIN_NAME}/${CMAKE_CFG_INTDIR}/${PLUGIN_NAME}.msi" +# "${PLUGIN_PATH}/${PLUGIN_NAME}.msi" # "${CMAKE_CURRENT_SOURCE_DIR}/sign/certificate.pfx" # "${CMAKE_CURRENT_SOURCE_DIR}/sign/passphrase.txt" # "http://timestamp.verisign.com/scripts/timestamp.dll") @@ -80,6 +80,6 @@ add_wix_installer( ${PLUGIN_NAME} #create_cab(${PLUGIN_NAME} # ${CMAKE_CURRENT_SOURCE_DIR}/Win/Wix/EchoTestPlugin.ddf # ${CMAKE_CURRENT_SOURCE_DIR}/Win/Wix/EchoTestPlugin.inf -# ${FB_BIN_DIR}/${PLUGIN_NAME}/${CMAKE_CFG_INTDIR}/ +# ${PLUGIN_PATH} # ${PROJECT_NAME}_WiXInstallExe # ) diff --git a/examples/FBTestPlugin/Win/projectDef.cmake b/examples/FBTestPlugin/Win/projectDef.cmake index a2c5cc8b..c434836f 100755 --- a/examples/FBTestPlugin/Win/projectDef.cmake +++ b/examples/FBTestPlugin/Win/projectDef.cmake @@ -43,7 +43,7 @@ get_plugin_path(PLUGIN_FILEPATH ${PROJECT_NAME}) get_filename_component(PLUGIN_PATH ${PLUGIN_FILEPATH} DIRECTORY) add_wix_installer( ${PLUGIN_NAME} - ${CMAKE_CURRENT_SOURCE_DIR}/Win/WiX/GCPlugin2Installer.wxs + ${CMAKE_CURRENT_SOURCE_DIR}/Win/WiX/FBTestPluginInstaller.wxs PluginDLLGroup ${PLUGIN_PATH} $ From a11084a80be1e4df25f8a3c12fc743e19d104b5d Mon Sep 17 00:00:00 2001 From: Andy Tather Date: Thu, 16 Feb 2017 12:25:52 +0000 Subject: [PATCH 3/3] Use correct template variable --- examples/EchoTestPlugin/Win/projectDef.cmake | 6 +++--- examples/FBTestPlugin/Win/projectDef.cmake | 2 +- fbgen/src/Win/WiX/TemplateInstaller.wxs | 10 ++++++---- 3 files changed, 10 insertions(+), 8 deletions(-) diff --git a/examples/EchoTestPlugin/Win/projectDef.cmake b/examples/EchoTestPlugin/Win/projectDef.cmake index 839a4424..b03aa716 100644 --- a/examples/EchoTestPlugin/Win/projectDef.cmake +++ b/examples/EchoTestPlugin/Win/projectDef.cmake @@ -60,7 +60,7 @@ get_plugin_path(PLUGIN_FILEPATH ${PROJECT_NAME}) get_filename_component(PLUGIN_PATH ${PLUGIN_FILEPATH} DIRECTORY) add_wix_installer( ${PLUGIN_NAME} - ${CMAKE_CURRENT_SOURCE_DIR}/Win/WiX/@{PLUGIN_ident}Installer.wxs + ${CMAKE_CURRENT_SOURCE_DIR}/Win/WiX/EchoTestPluginInstaller.wxs PluginDLLGroup ${PLUGIN_PATH} $ @@ -70,7 +70,7 @@ add_wix_installer( ${PLUGIN_NAME} # This is an example of how to add a build step to sign the WiX installer # -- uncomment lines below this to enable signing -- #firebreath_sign_file("${PLUGIN_NAME}_WiXInstall" -# "${FB_BIN_DIR}/${PLUGIN_NAME}/${CMAKE_CFG_INTDIR}/${PLUGIN_NAME}.msi" +# "${PLUGIN_PATH}/${PLUGIN_NAME}.msi" # "${CMAKE_CURRENT_SOURCE_DIR}/sign/certificate.pfx" # "${CMAKE_CURRENT_SOURCE_DIR}/sign/passphrase.txt" # "http://timestamp.verisign.com/scripts/timestamp.dll") @@ -80,6 +80,6 @@ add_wix_installer( ${PLUGIN_NAME} #create_cab(${PLUGIN_NAME} # ${CMAKE_CURRENT_SOURCE_DIR}/Win/Wix/EchoTestPlugin.ddf # ${CMAKE_CURRENT_SOURCE_DIR}/Win/Wix/EchoTestPlugin.inf -# ${FB_BIN_DIR}/${PLUGIN_NAME}/${CMAKE_CFG_INTDIR}/ +# ${PLUGIN_PATH} # ${PROJECT_NAME}_WiXInstallExe # ) diff --git a/examples/FBTestPlugin/Win/projectDef.cmake b/examples/FBTestPlugin/Win/projectDef.cmake index a2c5cc8b..c434836f 100755 --- a/examples/FBTestPlugin/Win/projectDef.cmake +++ b/examples/FBTestPlugin/Win/projectDef.cmake @@ -43,7 +43,7 @@ get_plugin_path(PLUGIN_FILEPATH ${PROJECT_NAME}) get_filename_component(PLUGIN_PATH ${PLUGIN_FILEPATH} DIRECTORY) add_wix_installer( ${PLUGIN_NAME} - ${CMAKE_CURRENT_SOURCE_DIR}/Win/WiX/GCPlugin2Installer.wxs + ${CMAKE_CURRENT_SOURCE_DIR}/Win/WiX/FBTestPluginInstaller.wxs PluginDLLGroup ${PLUGIN_PATH} $ diff --git a/fbgen/src/Win/WiX/TemplateInstaller.wxs b/fbgen/src/Win/WiX/TemplateInstaller.wxs index 15cb1c93..e7c8a087 100755 --- a/fbgen/src/Win/WiX/TemplateInstaller.wxs +++ b/fbgen/src/Win/WiX/TemplateInstaller.wxs @@ -53,8 +53,8 @@ KeyPath="yes" /> - - + + @@ -76,7 +76,8 @@ Id="NativeHostChromeManifestRegEntry" Key="SOFTWARE\Google\Chrome\NativeMessagingHosts\${PLUGIN_CRX_NATIVEHOST_NAME}" Type="string" - Value="[INSTALLDIR]${PLUGIN_CRX_NATIVEHOST_NAME}_chrome.json" /> + Value="[INSTALLDIR]${PLUGIN_CRX_NATIVEHOST_NAME}_chrome.json" + KeyPath="yes" /> + Value="[INSTALLDIR]${PLUGIN_CRX_NATIVEHOST_NAME}_mozilla.json" + KeyPath="yes" />