Permalink
Browse files

Generate MSI installer using WiX, from CMake.

Might only work in Debug builds right now because of hardcoded fragment
ID name.  Needs testing.
  • Loading branch information...
1 parent 1ce8794 commit 3c8b5a4858b9a20508fabc01ddf0974fbfad7892 @alamaison committed May 14, 2015
Showing with 475 additions and 1,307 deletions.
  1. +36 −1 CMakeLists.txt
  2. +339 −339 COPYING → LICENSE.txt
  3. +65 −0 cpack_wix_patch.xml
  4. +35 −0 po/CMakeLists.txt
  5. +0 −32 wix/add_new_lang.sh
  6. +0 −20 wix/bg.wxs
  7. +0 −20 wix/ca.wxs
  8. +0 −23 wix/cs.wxs
  9. +0 −20 wix/cy.wxs
  10. +0 −20 wix/da_DK.wxs
  11. +0 −23 wix/de.wxs
  12. +0 −20 wix/el_GR.wxs
  13. +0 −23 wix/es.wxs
  14. +0 −20 wix/et.wxs
  15. +0 −20 wix/fi.wxs
  16. +0 −23 wix/fr.wxs
  17. +0 −23 wix/he.wxs
  18. +0 −20 wix/hi.wxs
  19. +0 −23 wix/hu.wxs
  20. +0 −23 wix/it.wxs
  21. +0 −23 wix/ja.wxs
  22. +0 −20 wix/ko.wxs
  23. +0 −20 wix/lv.wxs
  24. +0 −24 wix/nl.wxs
  25. +0 −23 wix/pl.wxs
  26. +0 −20 wix/pt.wxs
  27. +0 −20 wix/pt_BR.wxs
  28. +0 −20 wix/ro.wxs
  29. +0 −23 wix/ru.wxs
  30. +0 −23 wix/sk.wxs
  31. +0 −20 wix/sv.wxs
  32. +0 −218 wix/swish.wxs
  33. +0 −23 wix/tr.wxs
  34. +0 −94 wix/wix.wixproj
  35. +0 −20 wix/zh_CN.wxs
  36. +0 −23 wix/zh_TW.wxs
View
@@ -29,9 +29,10 @@ HunterGate(
################################################################################
-project(swish VERSION 0.8.2)
+project(swish VERSION 0.8.3)
set(SWISH_FRIENDLY_NAME "Swish")
+set(SWISH_VENDOR "swish-sftp.org")
set(SWISH_DESCRIPTION "Easy SFTP for Windows Explorer")
set(SWISH_COPYRIGHT "Copyright (C) 2006-2015 Alexander Lamaison and contributors")
@@ -62,6 +63,7 @@ include_directories(${Boost_INCLUDE_DIRS})
add_subdirectory(ezel)
add_subdirectory(ssh)
add_subdirectory(swish)
+add_subdirectory(po)
option(BUILD_TESTING "Build test suite" ON)
if(BUILD_TESTING)
@@ -82,3 +84,36 @@ configure_file(
${CMAKE_CURRENT_SOURCE_DIR}/setup_conf.xml.in
${CMAKE_CURRENT_BINARY_DIR}/setup_conf.xml
@ONLY)
+
+file(DOWNLOAD "http://the.earth.li/~sgtatham/putty/0.64/x86/pageant.exe"
+ "${CMAKE_CURRENT_BINARY_DIR}/pageant.exe"
+ SHOW_PROGRESS
+ EXPECTED_HASH SHA1=4f7ec7e53b7dd557603c2447fd177d85f14006ad)
+
+install(FILES
+ "${CMAKE_CURRENT_BINARY_DIR}/pageant.exe" NEWS LICENSE.txt README
+ DESTINATION .)
+
+include(InstallRequiredSystemLibraries)
+
+set(CPACK_GENERATOR WIX)
+set(CPACK_PACKAGE_NAME "${SWISH_FRIENDLY_NAME}")
+set(CPACK_PACKAGE_VENDOR "${SWISH_VENDOR}")
+set(CPACK_PACKAGE_DESCRIPTION_SUMMARY "${SWISH_DESCRIPTION}")
+
+set(CPACK_RESOURCE_FILE_LICENSE "${CMAKE_CURRENT_SOURCE_DIR}/LICENSE.txt")
+set(CPACK_RESOURCE_FILE_README "${CMAKE_CURRENT_SOURCE_DIR}/README")
+
+set(CPACK_WIX_UPGRADE_GUID "97CF376F-FFDE-472A-946B-E3F5D45229DA")
+set(CPACK_WIX_PATCH_FILE "${CMAKE_CURRENT_SOURCE_DIR}/cpack_wix_patch.xml")
+
+set(CPACK_PACKAGE_VERSION "${PROJECT_VERSION}")
+set(CPACK_PACKAGE_INSTALL_DIRECTORY "${SWISH_FRIENDLY_NAME}")
+set(CMAKE_WIX_PROPERTY_ARPCONTACT swish@lammy.co.uk)
+set(CMAKE_WIX_PROPERTY_ARPHELPLINK http://www.swish-sftp.org)
+set(CMAKE_WIX_PROPERTY_ARPURLINFOABOUT http://www.swish-sftp.org)
+set(CMAKE_WIX_PROPERTY_ARPURLUPDATEINFO http://sourceforge.net/projects/swish/)
+
+#set(CPACK_WIX_UI_REF WixUI_Minimal)
+
+include(CPack)
Oops, something went wrong.
View
@@ -0,0 +1,65 @@
+<CPackWiXPatch>
+ <!-- When #PRODUCT is supported (CMake 3.3?) we can yse this to remove the
+ license page -->
+ <!-- <CPackWiXFragment Id="#PRODUCT"> -->
+ <!-- <UI> -->
+ <!-- <UIRef Id="WixUI_InstallDir" /> -->
+
+ <!-- <Publish Dialog="WelcomeDlg" -->
+ <!-- Control="Next" -->
+ <!-- Event="NewDialog" -->
+ <!-- Value="InstallDirDlg" -->
+ <!-- Order="2">1</Publish> -->
+ <!-- <Publish Dialog="InstallDirDlg" -->
+ <!-- Control="Back" -->
+ <!-- Event="NewDialog" -->
+ <!-- Value="WelcomeDlg" -->
+ <!-- Order="2">1</Publish> -->
+ <!-- </UI> -->
+ <!-- </CPackWiXFragment> -->
+
+ <CPackWiXFragment Id="CM_FP_shell_folder_com_dlld.dll">
+
+ <TypeLib Id="B816A838-5022-11DC-9153-0090F5284F85"
+ Description="Swish Type Library" Language="0" MajorVersion="0"
+ MinorVersion="3">
+ <AppId Description="Swish"
+ Id="B816A838-5022-11DC-9153-0090F5284F85">
+ <Class Id="B816A83A-5022-11DC-9153-0090F5284F85"
+ Context="InprocServer32" Description="Swish"
+ ThreadingModel="apartment">
+ <ProgId Id="Swish.HostFolder.1" Description="CHostFolder Class">
+ <ProgId Id="Swish.HostFolder" Description="CHostFolder Class" />
+ </ProgId>
+ </Class>
+ <Class Id="B816A83C-5022-11DC-9153-0090F5284F85"
+ Context="InprocServer32" Description="CRemoteFolder Class"
+ ThreadingModel="apartment">
+ <ProgId Id="Swish.RemoteFolder.1" Description="CRemoteFolder Class">
+ <ProgId Id="Swish.RemoteFolder" Description="CRemoteFolder Class" />
+ </ProgId>
+ </Class>
+ </AppId>
+ </TypeLib>
+
+ </CPackWiXFragment>
+
+ <CPackWiXFragment Id="CM_CP_shell_folder_com_dlld.dll">
+
+ <RegistryValue Root="HKCR" Key="AppID\Swish.DLL" Name="AppID" Value="{b816a838-5022-11dc-9153-0090f5284f85}" Type="string" Action="write" />
+ <RegistryValue Root="HKCR" Key="CLSID\{b816a83a-5022-11dc-9153-0090f5284f85}\DefaultIcon" Value="shell32.dll,9" Type="string" Action="write" />
+ <RegistryValue Root="HKCR" Key="CLSID\{b816a83a-5022-11dc-9153-0090f5284f85}\ShellFolder" Name="Attributes" Value="-1610612736" Type="integer" Action="write" />
+ <RegistryValue Root="HKCR" Key="CLSID\{b816a83a-5022-11dc-9153-0090f5284f85}" Name="InfoTip" Value="Remote file-system access via SFTP" Type="string" Action="write" />
+ <RegistryValue Root="HKCR" Key="CLSID\{b816a83a-5022-11dc-9153-0090f5284f85}" Name="TileInfo" Value="prop:{28636AA6-953D-11D2-B5D6-00C04FD918D0} 5;{b816a850-5022-11dc-9153-0090f5284f85} 2;{E3E0584C-B788-4A5A-BB20-7F5A44C9ACDD} 7" Type="string" Action="write" />
+ <RegistryValue Root="HKCR" Key="CLSID\{b816a83c-5022-11dc-9153-0090f5284f85}\DefaultIcon" Value="shell32.dll,9" Type="string" Action="write" />
+ <RegistryValue Root="HKCR" Key="CLSID\{b816a83c-5022-11dc-9153-0090f5284f85}\ShellFolder" Name="Attributes" Value="-1610612736" Type="integer" Action="write" />
+ <RegistryValue Root="HKCR" Key="CLSID\{b816a83c-5022-11dc-9153-0090f5284f85}" Name="InfoTip" Value="Remote file-system access via SFTP" Type="string" Action="write" />
+ <RegistryValue Root="HKCR" Key="CLSID\{b816a83c-5022-11dc-9153-0090f5284f85}" Name="TileInfo" Value="prop:{B725F130-47EF-101A-A5F1-02608C9EEBAC}, 12;{B725F130-47EF-101A-A5F1-02608C9EEBAC, 14}" Type="string" Action="write" />
+ <RegistryValue Root="HKCR" Key="Interface" Value="" Type="string" Action="write" />
+ <RegistryValue Root="HKLM" Key="Software\Microsoft\Windows\CurrentVersion\Explorer\MyComputer\NameSpace\{b816a83a-5022-11dc-9153-0090f5284f85}" Value="Swish" Type="string" Action="write" />
+ <RegistryValue Root="HKLM" Key="Software\Microsoft\Windows\CurrentVersion\Explorer\MyComputer\NameSpace\{b816a83a-5022-11dc-9153-0090f5284f85}" Name="Removal Message" Value="Please don't remove Swish this way - uninstall it." Type="string" Action="write" />
+ <RegistryValue Root="HKLM" Key="Software\Microsoft\Windows\CurrentVersion\Shell Extensions\Approved" Name="{b816a83a-5022-11dc-9153-0090f5284f85}" Value="Swish HostFolder" Type="string" Action="write" />
+ <RegistryValue Root="HKLM" Key="Software\Microsoft\Windows\CurrentVersion\Shell Extensions\Approved" Name="{b816a83c-5022-11dc-9153-0090f5284f85}" Value="Swish SFTP Folder" Type="string" Action="write" />
+
+ </CPackWiXFragment>
+</CPackWiXPatch>
View
@@ -0,0 +1,35 @@
+set(LANGUAGES
+ bg
+ ca
+ cs
+ cy
+ da_DK
+ de
+ el_GR
+ es
+ et
+ fi
+ fr
+ he
+ hi
+ hu
+ it
+ ja
+ ko
+ lv
+ nl
+ pl
+ pt
+ pt_BR
+ ro
+ ru
+ sk
+ sv
+ tr
+ zh_CN
+ zh_TW)
+
+foreach(lang ${LANGUAGES})
+ set(COMPILED_TRANSLATION "${lang}/swish.mo")
+ install(FILES "${COMPILED_TRANSLATION}" DESTINATION "${lang}/LC_MESSAGES")
+endforeach()
View
@@ -1,32 +0,0 @@
-#!/usr/bin/env bash
-
-lang=${1}
-heat="${WIX}bin\heat.exe"
-
-# strip underscores and make uppercase for WiX component name
-componentprefix="$(echo ${lang} | tr -d _ | tr '[a-z]' '[A-Z]')"
-
-# Template directory structure
-mkdir ${lang}
-mkdir ${lang}/LC_MESSAGES
-touch ${lang}/LC_MESSAGES/swish.mo
-
-"${heat}" dir ${lang} -cg ${componentprefix}Trans -dr INSTALLDIR -var var.SolutionDir -ag -indent 2 -o ${lang}.wxs
-
-rm ${lang}/LC_MESSAGES/swish.mo
-rmdir ${lang}/LC_MESSAGES
-rmdir ${lang}
-
-# The source tree doesn't match the template directory structure we
-# built the WXS file from, above. So we fix the file to match the
-# source
-sed -i 's/(var.SolutionDir)\\LC_MESSAGES/(var.SolutionDir)\\po\\'"${lang}"'/g' ${lang}.wxs
-
-
-# The new fragment must appear in the WiX file to be included in the installer
-insertionmarker='<ComponentGroup Id="Translations">'
-sed -i "s/${insertionmarker}/${insertionmarker}\\n <ComponentGroupRef Id=\"${componentprefix}Trans\" \\/>/g" swish.wxs
-
-# And must be in the VS project or it won't get compiled
-insertionmarker='<Compile Include="swish.wxs" \/>'
-sed -i "s/${insertionmarker}/${insertionmarker}\\n <Compile Include=\"${lang}.wxs\" \\/>/g" wix.wixproj
View
@@ -1,20 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi">
- <Fragment>
- <DirectoryRef Id="INSTALLDIR">
- <Directory Id="dir409B9E667F34505F6E1ACD0620C9A621" Name="bg" />
- </DirectoryRef>
- </Fragment>
- <Fragment>
- <ComponentGroup Id="BGTrans">
- <Component Id="cmpCA265AA8D1094316044C6795C172E88B" Directory="dir5B1CAF2733276D62A708C012427C8734" Guid="*">
- <File Id="filE8A6081B7F309C174C79B95BA5B19F77" KeyPath="yes" Source="$(var.SolutionDir)\po\bg\swish.mo" />
- </Component>
- </ComponentGroup>
- </Fragment>
- <Fragment>
- <DirectoryRef Id="dir409B9E667F34505F6E1ACD0620C9A621">
- <Directory Id="dir5B1CAF2733276D62A708C012427C8734" Name="LC_MESSAGES" />
- </DirectoryRef>
- </Fragment>
-</Wix>
View
@@ -1,20 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi">
- <Fragment>
- <DirectoryRef Id="INSTALLDIR">
- <Directory Id="dir9A0B204D905DB896E046E87B38DF1F60" Name="ca" />
- </DirectoryRef>
- </Fragment>
- <Fragment>
- <ComponentGroup Id="CATrans">
- <Component Id="cmpEB2C4FFA2D9645CB6D2DA4BF9EAF805A" Directory="dir7941852A353C319ED36D06039F899326" Guid="*">
- <File Id="fil7463BF9955DE53CF45D45A2050EDCCB3" KeyPath="yes" Source="$(var.SolutionDir)\po\ca\swish.mo" />
- </Component>
- </ComponentGroup>
- </Fragment>
- <Fragment>
- <DirectoryRef Id="dir9A0B204D905DB896E046E87B38DF1F60">
- <Directory Id="dir7941852A353C319ED36D06039F899326" Name="LC_MESSAGES" />
- </DirectoryRef>
- </Fragment>
-</Wix>
View
@@ -1,23 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi">
- <Fragment>
- <ComponentGroup Id="CSTrans">
- <Component Id="cmpE74DD7D9D8227D34510B3F7E321AAF94" Directory="dirC098ECCEF58EF943C727685AD3588010" Guid="*">
- <File Id="fil091986D285260DB81D03555C17AA166A" KeyPath="yes" Source="$(var.SolutionDir)\po\cs\swish.mo" />
- </Component>
- </ComponentGroup>
- </Fragment>
- <Fragment>
- <DirectoryRef Id="INSTALLDIR">
- <Directory Id="dir0CC9B82D6C29B1750FB80DBF8B6E0820" Name="cs" />
- </DirectoryRef>
- </Fragment>
- <Fragment>
- <DirectoryRef Id="dirC098ECCEF58EF943C727685AD3588010" />
- </Fragment>
- <Fragment>
- <DirectoryRef Id="dir0CC9B82D6C29B1750FB80DBF8B6E0820">
- <Directory Id="dirC098ECCEF58EF943C727685AD3588010" Name="LC_MESSAGES" />
- </DirectoryRef>
- </Fragment>
-</Wix>
View
@@ -1,20 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi">
- <Fragment>
- <DirectoryRef Id="INSTALLDIR">
- <Directory Id="dirC2FB03F03DC27286522C0FCB4F138014" Name="cy" />
- </DirectoryRef>
- </Fragment>
- <Fragment>
- <ComponentGroup Id="CYTrans">
- <Component Id="cmpB73BA70453C8DBE05F9DBE242E93EDD2" Directory="dir9A53629F15C880C1D8E8A18B8D801618" Guid="*">
- <File Id="fil4F7C4599A8B7CD99B29B651A552FC8E3" KeyPath="yes" Source="$(var.SolutionDir)\po\cy\swish.mo" />
- </Component>
- </ComponentGroup>
- </Fragment>
- <Fragment>
- <DirectoryRef Id="dirC2FB03F03DC27286522C0FCB4F138014">
- <Directory Id="dir9A53629F15C880C1D8E8A18B8D801618" Name="LC_MESSAGES" />
- </DirectoryRef>
- </Fragment>
-</Wix>
View
@@ -1,20 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi">
- <Fragment>
- <DirectoryRef Id="INSTALLDIR">
- <Directory Id="dirD514B179CB38BD305594E5896F71684C" Name="da_DK" />
- </DirectoryRef>
- </Fragment>
- <Fragment>
- <ComponentGroup Id="DADKTrans">
- <Component Id="cmp9695454AC4BC24E02FD035C04C0E4CFE" Directory="dir1F21CB3EA8388487496B2166346CD03F" Guid="*">
- <File Id="filFB08CC783D23577AFE3202572AF199B5" KeyPath="yes" Source="$(var.SolutionDir)\po\da_DK\swish.mo" />
- </Component>
- </ComponentGroup>
- </Fragment>
- <Fragment>
- <DirectoryRef Id="dirD514B179CB38BD305594E5896F71684C">
- <Directory Id="dir1F21CB3EA8388487496B2166346CD03F" Name="LC_MESSAGES" />
- </DirectoryRef>
- </Fragment>
-</Wix>
View
@@ -1,23 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi">
- <Fragment>
- <ComponentGroup Id="DETrans">
- <Component Id="cmp81467DEAECFA13CC98FDC19FB07DBDC0" Directory="dir44CE9997011387247333132008650569" Guid="*">
- <File Id="fil710508795831ABCAF199E74256C15809" KeyPath="yes" Source="$(var.SolutionDir)\po\de\swish.mo" />
- </Component>
- </ComponentGroup>
- </Fragment>
- <Fragment>
- <DirectoryRef Id="INSTALLDIR">
- <Directory Id="dir0AD562225EF949C7A8A506C59B4C2274" Name="de" />
- </DirectoryRef>
- </Fragment>
- <Fragment>
- <DirectoryRef Id="dir44CE9997011387247333132008650569" />
- </Fragment>
- <Fragment>
- <DirectoryRef Id="dir0AD562225EF949C7A8A506C59B4C2274">
- <Directory Id="dir44CE9997011387247333132008650569" Name="LC_MESSAGES" />
- </DirectoryRef>
- </Fragment>
-</Wix>
View
@@ -1,20 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi">
- <Fragment>
- <DirectoryRef Id="INSTALLDIR">
- <Directory Id="dir2EDB99921FA555A0F8A72F9ECFA4261B" Name="el_GR" />
- </DirectoryRef>
- </Fragment>
- <Fragment>
- <ComponentGroup Id="ELGRTrans">
- <Component Id="cmpD4F7D2C780E78080557FA0DC22697688" Directory="dirAFAF24B3882BDBD5314999CD292ACFDD" Guid="*">
- <File Id="filAD76ECC70E69DD60541C9D7F2CC04F06" KeyPath="yes" Source="$(var.SolutionDir)\po\el_GR\swish.mo" />
- </Component>
- </ComponentGroup>
- </Fragment>
- <Fragment>
- <DirectoryRef Id="dir2EDB99921FA555A0F8A72F9ECFA4261B">
- <Directory Id="dirAFAF24B3882BDBD5314999CD292ACFDD" Name="LC_MESSAGES" />
- </DirectoryRef>
- </Fragment>
-</Wix>
View
@@ -1,23 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi">
- <Fragment>
- <ComponentGroup Id="ESTrans">
- <Component Id="cmp8EDB14FB1698A7DD0DB00A0B23541C1F" Directory="dir3E68079F479E8AB78B392232952916ED" Guid="*">
- <File Id="filD239C28D82603CCE019446D2063BE46E" KeyPath="yes" Source="$(var.SolutionDir)\po\es\swish.mo" />
- </Component>
- </ComponentGroup>
- </Fragment>
- <Fragment>
- <DirectoryRef Id="INSTALLDIR">
- <Directory Id="dirA412D920167A9863DBA4DC421E1F3A7B" Name="es" />
- </DirectoryRef>
- </Fragment>
- <Fragment>
- <DirectoryRef Id="dir3E68079F479E8AB78B392232952916ED" />
- </Fragment>
- <Fragment>
- <DirectoryRef Id="dirA412D920167A9863DBA4DC421E1F3A7B">
- <Directory Id="dir3E68079F479E8AB78B392232952916ED" Name="LC_MESSAGES" />
- </DirectoryRef>
- </Fragment>
-</Wix>
View
@@ -1,20 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi">
- <Fragment>
- <DirectoryRef Id="INSTALLDIR">
- <Directory Id="dir2C4A21B07B8FA2296707A86D0BCBF403" Name="et" />
- </DirectoryRef>
- </Fragment>
- <Fragment>
- <ComponentGroup Id="ETTrans">
- <Component Id="cmpE2C185A7696096745FBE6AF20713C7DF" Directory="dirB2F588BF9DE0CDFC3AB37C4810F8E333" Guid="*">
- <File Id="filA2C04E8660C02154F911B35A1D5756F1" KeyPath="yes" Source="$(var.SolutionDir)\po\et\swish.mo" />
- </Component>
- </ComponentGroup>
- </Fragment>
- <Fragment>
- <DirectoryRef Id="dir2C4A21B07B8FA2296707A86D0BCBF403">
- <Directory Id="dirB2F588BF9DE0CDFC3AB37C4810F8E333" Name="LC_MESSAGES" />
- </DirectoryRef>
- </Fragment>
-</Wix>
Oops, something went wrong.

0 comments on commit 3c8b5a4

Please sign in to comment.