diff options
Diffstat (limited to 'resources/install/windows')
-rwxr-xr-x | resources/install/windows/WiSubStg.vbs | 101 | ||||
-rw-r--r-- | resources/install/windows/en-us.wxl | 8 | ||||
-rw-r--r-- | resources/install/windows/fr-fr.wxl | 26 | ||||
-rw-r--r-- | resources/install/windows/installer-windows.wxs | 18 |
4 files changed, 145 insertions, 8 deletions
diff --git a/resources/install/windows/WiSubStg.vbs b/resources/install/windows/WiSubStg.vbs new file mode 100755 index 0000000..8b7a7fd --- /dev/null +++ b/resources/install/windows/WiSubStg.vbs @@ -0,0 +1,101 @@ +' Windows Installer utility to add a transform or nested database as a substorage
+' For use with Windows Scripting Host, CScript.exe or WScript.exe
+' Copyright (c) Microsoft Corporation. All rights reserved.
+' Demonstrates the use of the database _Storages table
+'
+Option Explicit
+
+Const msiOpenDatabaseModeReadOnly = 0
+Const msiOpenDatabaseModeTransact = 1
+Const msiOpenDatabaseModeCreate = 3
+
+Const msiViewModifyInsert = 1
+Const msiViewModifyUpdate = 2
+Const msiViewModifyAssign = 3
+Const msiViewModifyReplace = 4
+Const msiViewModifyDelete = 6
+
+Const ForAppending = 8
+Const ForReading = 1
+Const ForWriting = 2
+Const TristateTrue = -1
+
+' Check arg count, and display help if argument not present or contains ?
+Dim argCount:argCount = Wscript.Arguments.Count
+If argCount > 0 Then If InStr(1, Wscript.Arguments(0), "?", vbTextCompare) > 0 Then argCount = 0
+If (argCount = 0) Then
+ Wscript.Echo "Windows Installer database substorage managment utility" &_
+ vbNewLine & " 1st argument is the path to MSI database (installer package)" &_
+ vbNewLine & " 2nd argument is the path to a transform or database to import" &_
+ vbNewLine & " If the 2nd argument is missing, substorages will be listed" &_
+ vbNewLine & " 3rd argument is optional, the name used for the substorage" &_
+ vbNewLine & " If the 3rd arugment is missing, the file name is used" &_
+ vbNewLine & " To remove a substorage, use /D or -D as the 2nd argument" &_
+ vbNewLine & " followed by the name of the substorage to remove" &_
+ vbNewLine &_
+ vbNewLine & "Copyright (C) Microsoft Corporation. All rights reserved."
+ Wscript.Quit 1
+End If
+
+' Connect to Windows Installer object
+On Error Resume Next
+Dim installer : Set installer = Nothing
+Set installer = Wscript.CreateObject("WindowsInstaller.Installer") : CheckError
+
+' Evaluate command-line arguments and set open and update modes
+Dim databasePath:databasePath = Wscript.Arguments(0)
+Dim openMode : If argCount = 1 Then openMode = msiOpenDatabaseModeReadOnly Else openMode = msiOpenDatabaseModeTransact
+Dim updateMode : If argCount > 1 Then updateMode = msiViewModifyAssign 'Either insert or replace existing row
+Dim importPath : If argCount > 1 Then importPath = Wscript.Arguments(1)
+Dim storageName : If argCount > 2 Then storageName = Wscript.Arguments(2)
+If storageName = Empty And importPath <> Empty Then storageName = Right(importPath, Len(importPath) - InStrRev(importPath, "\",-1,vbTextCompare))
+If UCase(importPath) = "/D" Or UCase(importPath) = "-D" Then updateMode = msiViewModifyDelete : importPath = Empty 'substorage will be deleted if no input data
+
+' Open database and create a view on the _Storages table
+Dim sqlQuery : Select Case updateMode
+ Case msiOpenDatabaseModeReadOnly: sqlQuery = "SELECT `Name` FROM _Storages"
+ Case msiViewModifyAssign: sqlQuery = "SELECT `Name`,`Data` FROM _Storages"
+ Case msiViewModifyDelete: sqlQuery = "SELECT `Name` FROM _Storages WHERE `Name` = ?"
+End Select
+Dim database : Set database = installer.OpenDatabase(databasePath, openMode) : CheckError
+Dim view : Set view = database.OpenView(sqlQuery)
+Dim record
+
+If openMode = msiOpenDatabaseModeReadOnly Then 'If listing storages, simply fetch all records
+ Dim message, name
+ view.Execute : CheckError
+ Do
+ Set record = view.Fetch
+ If record Is Nothing Then Exit Do
+ name = record.StringData(1)
+ If message = Empty Then message = name Else message = message & vbNewLine & name
+ Loop
+ Wscript.Echo message
+Else 'If adding a storage, insert a row, else if removing a storage, delete the row
+ Set record = installer.CreateRecord(2)
+ record.StringData(1) = storageName
+ view.Execute record : CheckError
+ If importPath <> Empty Then 'Insert storage - copy data into stream
+ record.SetStream 2, importPath : CheckError
+ Else 'Delete storage, fetch first to provide better error message if missing
+ Set record = view.Fetch
+ If record Is Nothing Then Wscript.Echo "Storage not present:", storageName : Wscript.Quit 2
+ End If
+ view.Modify updateMode, record : CheckError
+ database.Commit : CheckError
+ Set view = Nothing
+ Set database = Nothing
+ CheckError
+End If
+
+Sub CheckError
+ Dim message, errRec
+ If Err = 0 Then Exit Sub
+ message = Err.Source & " " & Hex(Err) & ": " & Err.Description
+ If Not installer Is Nothing Then
+ Set errRec = installer.LastErrorRecord
+ If Not errRec Is Nothing Then message = message & vbNewLine & errRec.FormatText
+ End If
+ Wscript.Echo message
+ Wscript.Quit 2
+End Sub
\ No newline at end of file diff --git a/resources/install/windows/en-us.wxl b/resources/install/windows/en-us.wxl index e6bf7a1..d70deab 100644 --- a/resources/install/windows/en-us.wxl +++ b/resources/install/windows/en-us.wxl @@ -12,7 +12,15 @@ <String Id="ShortcutsAndRegistryDlgDescription" Overridable="yes">Which additional tasks should be done?</String>
<String Id="ShortcutsAndRegistryDlgTitle" Overridable="yes">{\WixUI_Font_Title}Additional Tasks</String>
+ <String Id="ShortcutsAndRegistryDlg_CreateShortcuts" Overridable="yes">&Create Shortcuts</String>
+ <String Id="ShortcutsAndRegistryDlg_CreateStartMenu" Overridable="yes">S&tart Menu</String>
+ <String Id="ShortcutsAndRegistryDlg_CreateDesktop" Overridable="yes">&Desktop</String>
+ <String Id="ShortcutsAndRegistryDlg_CreateAutoStart" Overridable="yes">&Auto-start when computer restarts or reboots</String>
+ <String Id="ShortcutsAndRegistryDlg_AssociateProtocols" Overridable="yes">&Associate Protocols</String>
+
<String Id="WelcomeText1" Overridable="yes"><![CDATA[@WelcomeText1@]]></String>
<String Id="WelcomeText2" Overridable="yes"><![CDATA[@WelcomeText2@]]></String>
<String Id="WelcomeText3" Overridable="yes">{\GreyText}@WelcomeText3@</String>
+
+ <String Id="ExitDialogOptionaCheckBoxText" Overridable="yes">Launch [ProductName]</String>
</WixLocalization>
diff --git a/resources/install/windows/fr-fr.wxl b/resources/install/windows/fr-fr.wxl new file mode 100644 index 0000000..d8b3e6c --- /dev/null +++ b/resources/install/windows/fr-fr.wxl @@ -0,0 +1,26 @@ +<?xml version="1.0" encoding="utf-8"?>
+<WixLocalization
+ xmlns="http://schemas.microsoft.com/wix/2006/localization"
+ Culture="fr-fr" Codepage="1252">
+ <String Id="CleanSweepDlg_Title" Overridable="yes">Installation de [ProductName]</String>
+ <String Id="CleanSweepDlgBannerBitmap" Overridable="yes">WixUI_Bmp_Banner</String>
+ <String Id="CleanSweepDlgDescription" Overridable="yes">Quelles options souhaitez-vous ajouter?</String>
+ <String Id="CleanSweepDlgTitle" Overridable="yes">{\WixUI_Font_Title}Options supplémentaires</String>
+
+ <String Id="ShortcutsAndRegistryDlg_Title" Overridable="yes">Installation de [ProductName]</String>
+ <String Id="ShortcutsAndRegistryDlgBannerBitmap" Overridable="yes">WixUI_Bmp_Banner</String>
+ <String Id="ShortcutsAndRegistryDlgDescription" Overridable="yes">Quelles options souhaitez-vous ajouter?</String>
+ <String Id="ShortcutsAndRegistryDlgTitle" Overridable="yes">{\WixUI_Font_Title}Options supplémentaires</String>
+
+ <String Id="ShortcutsAndRegistryDlg_CreateShortcuts" Overridable="yes">&Accès à [ProductName] :</String>
+ <String Id="ShortcutsAndRegistryDlg_CreateStartMenu" Overridable="yes">Placer un accès direct dans le Menu « Démarrer »</String>
+ <String Id="ShortcutsAndRegistryDlg_CreateDesktop" Overridable="yes">Placer un accès direct sur le Bureau</String>
+ <String Id="ShortcutsAndRegistryDlg_CreateAutoStart" Overridable="yes">Lancer automatiquement quand l’ordinateur démarre</String>
+ <String Id="ShortcutsAndRegistryDlg_AssociateProtocols" Overridable="yes">&Protocoles associés</String>
+
+ <String Id="WelcomeText1" Overridable="yes"><![CDATA[Ce logiciel est developpé par la communauté de APP_NAME ]]></String>
+ <String Id="WelcomeText2" Overridable="yes"><![CDATA[Découvrir notre site : APP_WEB]]></String>
+ <String Id="WelcomeText3" Overridable="yes">/String>
+
+ <String Id="ExitDialogOptionaCheckBoxText" Overridable="yes">Launch [ProductName]</String>
+</WixLocalization>
diff --git a/resources/install/windows/installer-windows.wxs b/resources/install/windows/installer-windows.wxs index 39df4d6..0115c50 100644 --- a/resources/install/windows/installer-windows.wxs +++ b/resources/install/windows/installer-windows.wxs @@ -10,21 +10,23 @@ <Product
Id="*"
Language="1033"
+ Codepage='$(var.codepage)'
Manufacturer="@APP_NAME@"
Name="@APP_NAME@"
UpgradeCode="@WIX_UPGRADE_CODE@"
Version="1.0.0.0">
+<!-- in Language we list all languages we support for localize -->
<Package
Comments="@PKG_COMMENTS@"
Compressed="yes"
Description="@PKG_DESCRIPTION@"
InstallerVersion="200"
InstallScope="perMachine"
- Languages="1033"
+ Languages="1033,1036"
Manufacturer="@APP_NAME@"
Platform="$(var.Platform)"
- SummaryCodepage="1252" />
+ SummaryCodepage='$(var.codepage)' />
<Upgrade Id="@WIX_UPGRADE_CODE@">
<UpgradeVersion
@@ -166,12 +168,12 @@ <Control Id="BannerLine" Type="Line" X="0" Y="44" Width="370" Height="0" />
<Control Id="BottomLine" Type="Line" X="0" Y="234" Width="370" Height="0" />
- <Control Id="ShortcutGroup" Type="GroupBox" X="20" Y="60" Width="330" Height="65" Text="&Create Shortcuts" />
- <Control Id="StartMenuShortcutCheckBox" Type="CheckBox" X="25" Y="75" Width="320" Height="15" Property="CREATE_START_MENU_SHORTCUT" CheckBoxValue="1" Text="S&tart Menu" />
- <Control Id="DesktopShortcutCheckBox" Type="CheckBox" X="25" Y="90" Width="320" Height="15" Property="CREATE_DESKTOP_SHORTCUT" CheckBoxValue="1" Text="&Desktop" />
- <Control Id="StartupShortcutCheckBox" Type="CheckBox" X="25" Y="105" Width="320" Height="15" Property="HAS_STARTUP_REGISTRY" CheckBoxValue="1" Text="&Auto-start when computer restarts or reboots" />
+ <Control Id="ShortcutGroup" Type="GroupBox" X="20" Y="60" Width="330" Height="65" Text="!(loc.ShortcutsAndRegistryDlg_CreateShortcuts)" />
+ <Control Id="StartMenuShortcutCheckBox" Type="CheckBox" X="25" Y="75" Width="320" Height="15" Property="CREATE_START_MENU_SHORTCUT" CheckBoxValue="1" Text="!(loc.ShortcutsAndRegistryDlg_CreateStartMenu)" />
+ <Control Id="DesktopShortcutCheckBox" Type="CheckBox" X="25" Y="90" Width="320" Height="15" Property="CREATE_DESKTOP_SHORTCUT" CheckBoxValue="1" Text="!(loc.ShortcutsAndRegistryDlg_CreateDesktop)" />
+ <Control Id="StartupShortcutCheckBox" Type="CheckBox" X="25" Y="105" Width="320" Height="15" Property="HAS_STARTUP_REGISTRY" CheckBoxValue="1" Text="!(loc.ShortcutsAndRegistryDlg_CreateAutoStart)" />
- <Control Id="RegistryGroup" Type="GroupBox" X="20" Y="130" Width="330" Height="50" Text="&Associate Protocols" />
+ <Control Id="RegistryGroup" Type="GroupBox" X="20" Y="130" Width="330" Height="50" Text="!(loc.ShortcutsAndRegistryDlg_AssociateProtocols)" />
<Control Id="SipRegistryEntriesCheckBox" Type="CheckBox" X="25" Y="145" Width="320" Height="15" Property="CREATE_SIP_REGISTRY_ENTRIES" CheckBoxValue="1" Text="&SIP" />
<!--
The RSS plug-in has been removed from SIP Communicator so it no longer makes
@@ -442,7 +444,7 @@ <Property Id="IS_AUTOUPDATE" Value="0" Hidden="yes" />
<Property Id="WixShellExecTarget" Value="[#run.exe]" />
<Property Id="WIXUI_EXITDIALOGOPTIONALCHECKBOX" Value="1" />
-<Property Id="WIXUI_EXITDIALOGOPTIONALCHECKBOXTEXT" Value="Launch @APP_NAME@" />
+<Property Id="WIXUI_EXITDIALOGOPTIONALCHECKBOXTEXT" Value="!(loc.ExitDialogOptionaCheckBoxText)" />
<Property Id="WIXUI_INSTALLDIR" Value="INSTALLDIR" />
<?include windows_shortcut_specification.wxi ?>
|