mirror of
https://bitbucket.org/librepilot/librepilot.git
synced 2025-01-18 03:52:11 +01:00
changed scripts and added tools for creating multilingual installer
git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@2275 ebee16cc-31ac-478f-84a7-5cbb03baadba
This commit is contained in:
parent
d072c30ba1
commit
be4df7b757
@ -8,11 +8,24 @@ set WixBin=C:\Program Files\Windows Installer XML v3\bin
|
||||
|
||||
"%WixBin%\candle.exe" -nologo "C:\Projects\builds\OpenPilot_Release\packaging\winx86\OpenPilot.wxs" -out OpenPilot.wixobj -ext WixUtilExtension -ext WixUIExtension
|
||||
|
||||
"%WixBin%\light.exe" -nologo OpenPilot.wixobj -cultures:en-us -loc UI_translations\en-us.wxl -dWixUILicenseRtf=license\GPLv3_en.rtf -out OpenPilot_en.msi -ext WixUtilExtension -ext WixUIExtension
|
||||
"%WixBin%\light.exe" -nologo OpenPilot.wixobj -cultures:ru-ru -loc UI_translations\ru-ru.wxl -dWixUILicenseRtf=license\GPLv3_ru.rtf -out OpenPilot_ru.msi -ext WixUtilExtension -ext WixUIExtension
|
||||
"%WixBin%\light.exe" -nologo OpenPilot.wixobj -cultures:de-de -loc UI_translations\de-de.wxl -dWixUILicenseRtf=license\GPLv3_de.rtf -out OpenPilot_de.msi -ext WixUtilExtension -ext WixUIExtension
|
||||
"%WixBin%\light.exe" -nologo OpenPilot.wixobj -cultures:es-es -loc UI_translations\es-es.wxl -dWixUILicenseRtf=license\GPLv3_es.rtf -out OpenPilot_es.msi -ext WixUtilExtension -ext WixUIExtension
|
||||
"%WixBin%\light.exe" -nologo OpenPilot.wixobj -cultures:fr-fr -loc UI_translations\fr-fr.wxl -dWixUILicenseRtf=license\GPLv3_fr.rtf -out OpenPilot_fr.msi -ext WixUtilExtension -ext WixUIExtension
|
||||
"%WixBin%\light.exe" -nologo OpenPilot.wixobj -cultures:zh-tw -loc UI_translations\zh_cn.wxl -loc UI_translations\wixui_zh-tw.wxl -dWixUILicenseRtf=license\GPLv3_zh_cn.rtf -out OpenPilot_zh_ch.msi -ext WixUtilExtension -ext WixUIExtension
|
||||
"%WixBin%\light.exe" -nologo OpenPilot.wixobj -sval -spdb -cultures:en-us -loc UI_translations\en-us.wxl -dWixUILicenseRtf=license\GPLv3_en.rtf -out OpenPilot.msi -ext WixUtilExtension -ext WixUIExtension
|
||||
"%WixBin%\light.exe" -nologo OpenPilot.wixobj -sval -spdb -cultures:ru-ru -loc UI_translations\ru-ru.wxl -dWixUILicenseRtf=license\GPLv3_ru.rtf -out OpenPilot_ru.msi -ext WixUtilExtension -ext WixUIExtension
|
||||
"%WixBin%\light.exe" -nologo OpenPilot.wixobj -sval -spdb -cultures:de-de -loc UI_translations\de-de.wxl -dWixUILicenseRtf=license\GPLv3_de.rtf -out OpenPilot_de.msi -ext WixUtilExtension -ext WixUIExtension
|
||||
"%WixBin%\light.exe" -nologo OpenPilot.wixobj -sval -spdb -cultures:es-es -loc UI_translations\es-es.wxl -dWixUILicenseRtf=license\GPLv3_es.rtf -out OpenPilot_es.msi -ext WixUtilExtension -ext WixUIExtension
|
||||
"%WixBin%\light.exe" -nologo OpenPilot.wixobj -sval -spdb -cultures:fr-fr -loc UI_translations\fr-fr.wxl -dWixUILicenseRtf=license\GPLv3_fr.rtf -out OpenPilot_fr.msi -ext WixUtilExtension -ext WixUIExtension
|
||||
"%WixBin%\light.exe" -nologo OpenPilot.wixobj -sval -spdb -cultures:zh-tw -loc UI_translations\zh_cn.wxl -loc UI_translations\wixui_zh-tw.wxl -dWixUILicenseRtf=license\GPLv3_zh_cn.rtf -out OpenPilot_zh_ch.msi -ext WixUtilExtension -ext WixUIExtension
|
||||
|
||||
|
||||
MsiTools\MsiTran.exe -g OpenPilot.msi OpenPilot_ru.msi ru.mst
|
||||
MsiTools\MsiTran.exe -g OpenPilot.msi OpenPilot_de.msi de.mst
|
||||
MsiTools\MsiTran.exe -g OpenPilot.msi OpenPilot_es.msi es.mst
|
||||
MsiTools\MsiTran.exe -g OpenPilot.msi OpenPilot_fr.msi fr.mst
|
||||
MsiTools\MsiTran.exe -g OpenPilot.msi OpenPilot_zh_ch.msi zn.mst
|
||||
|
||||
MsiTools\wisubstg.vbs OpenPilot.msi ru.mst 1049
|
||||
MsiTools\wisubstg.vbs OpenPilot.msi de.mst 1031
|
||||
MsiTools\wisubstg.vbs OpenPilot.msi es.mst 3082
|
||||
MsiTools\wisubstg.vbs OpenPilot.msi fr.mst 1036
|
||||
MsiTools\wisubstg.vbs OpenPilot.msi zn.mst 1028
|
||||
|
||||
del OpenPilot.wixobj OpenPilot_ru.msi ru.mst OpenPilot_de.msi de.mst OpenPilot_es.msi es.mst OpenPilot_fr.msi fr.mst OpenPilot_zh_ch.msi zn.mst
|
||||
|
BIN
ground/packaging/winx86/MsiTools/MsiTran.Exe
Normal file
BIN
ground/packaging/winx86/MsiTools/MsiTran.Exe
Normal file
Binary file not shown.
101
ground/packaging/winx86/MsiTools/WiSubStg.vbs
Normal file
101
ground/packaging/winx86/MsiTools/WiSubStg.vbs
Normal file
@ -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
|
@ -1,7 +1,7 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi" xmlns:util="http://schemas.microsoft.com/wix/UtilExtension">
|
||||
<Product Id="C5857D7A-D0D7-4EF7-87CC-16E8CCA618CE" Name="OpenPilot GCS" Language="!(loc.LANG)" Version="0.0.0.1" Manufacturer="OpenPilot" UpgradeCode="C72FD8FA-A9FD-483C-890E-A2FDB6C8025F">
|
||||
<Package Description="Test file in a Product" Comments="Simple test" InstallerVersion="200" Compressed="yes" Keywords="Installer OpenPilot" />
|
||||
<Package Description="Test file in a Product" Languages="1033,1031,1028,1036,3082,1049" Comments="Simple test" InstallerVersion="200" Compressed="yes" Keywords="Installer OpenPilot" />
|
||||
<Media Id="1" Cabinet="simple.cab" EmbedCab="yes" />
|
||||
<Directory Id="TARGETDIR" Name="SourceDir">
|
||||
<Directory Id="ProgramFilesFolder" Name="PFiles">
|
||||
@ -134,7 +134,6 @@
|
||||
<ComponentRef Id="qmng4.dll" />
|
||||
<ComponentRef Id="qsvg4.dll" />
|
||||
<ComponentRef Id="qsvgicon4.dll" />
|
||||
<ComponentRef Id="phonon_ds94.dll" />
|
||||
<ComponentRef Id="QtConcurrent.dll" />
|
||||
<ComponentRef Id="QtCore4.dll" />
|
||||
<ComponentRef Id="QtGui4.dll" />
|
||||
|
@ -1,4 +1,6 @@
|
||||
<Include xmlns="http://schemas.microsoft.com/wix/2006/wi">
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Include>
|
||||
|
||||
<Component Id="Aggregation.dll" DiskId="1" Guid="B460AF0D-717A-4167-868C-BDF0DF432CB8">
|
||||
<File Id="Aggregation.dll" Name="Aggregation.dll" Source="..\..\bin\Aggregation.dll" />
|
||||
</Component>
|
||||
@ -29,6 +31,24 @@
|
||||
<Component Id="QExtSerialPort.dll" DiskId="1" Guid="04FA7063-4FE6-48E9-AE09-E08AE1C6941F">
|
||||
<File Id="QExtSerialPort.dll" Name="QExtSerialPort.dll" Source="..\..\bin\QExtSerialPort.dll" />
|
||||
</Component>
|
||||
<Component Id="qgif4.dll" DiskId="1" Guid="3AAB8604-A6DB-4705-B65E-5713843B886E">
|
||||
<File Id="qgif4.dll" Name="qgif4.dll" Source="..\..\bin\qgif4.dll" />
|
||||
</Component>
|
||||
<Component Id="qico4.dll" DiskId="1" Guid="B6EF1C6B-1E58-4127-9511-4B26CC5AA3A8">
|
||||
<File Id="qico4.dll" Name="qico4.dll" Source="..\..\bin\qico4.dll" />
|
||||
</Component>
|
||||
<Component Id="qjpeg4.dll" DiskId="1" Guid="0B4335EB-AF5D-40BC-B9DB-C49E711B1754">
|
||||
<File Id="qjpeg4.dll" Name="qjpeg4.dll" Source="..\..\bin\qjpeg4.dll" />
|
||||
</Component>
|
||||
<Component Id="qmng4.dll" DiskId="1" Guid="5FFED681-3F4D-4D3D-8A93-32E60CCA656D">
|
||||
<File Id="qmng4.dll" Name="qmng4.dll" Source="..\..\bin\qmng4.dll" />
|
||||
</Component>
|
||||
<Component Id="qsvg4.dll" DiskId="1" Guid="22C8BDAF-B1AC-435C-930E-BDCCAB5EE7F7">
|
||||
<File Id="qsvg4.dll" Name="qsvg4.dll" Source="..\..\bin\qsvg4.dll" />
|
||||
</Component>
|
||||
<Component Id="qsvgicon4.dll" DiskId="1" Guid="AB7E00D8-ADD2-4AE0-B778-A828211273FF">
|
||||
<File Id="qsvgicon4.dll" Name="qsvgicon4.dll" Source="..\..\bin\qsvgicon4.dll" />
|
||||
</Component>
|
||||
<Component Id="QtConcurrent.dll" DiskId="1" Guid="DA887E82-83C6-4304-A5FB-1DC2B8227FC4">
|
||||
<File Id="QtConcurrent.dll" Name="QtConcurrent.dll" Source="..\..\bin\QtConcurrent.dll" />
|
||||
</Component>
|
||||
@ -38,6 +58,9 @@
|
||||
<Component Id="QtGui4.dll" DiskId="1" Guid="63DBAE46-9E3D-4D85-B55B-B93F7A74A124">
|
||||
<File Id="QtGui4.dll" Name="QtGui4.dll" Source="..\..\bin\QtGui4.dll" />
|
||||
</Component>
|
||||
<Component Id="qtiff4.dll" DiskId="1" Guid="AE6AF17B-9006-486D-AB37-B30105A9C52F">
|
||||
<File Id="qtiff4.dll" Name="qtiff4.dll" Source="..\..\bin\qtiff4.dll" />
|
||||
</Component>
|
||||
<Component Id="QtNetwork4.dll" DiskId="1" Guid="7A137591-24FA-48C0-BDF9-FE40AEEB89FD">
|
||||
<File Id="QtNetwork4.dll" Name="QtNetwork4.dll" Source="..\..\bin\QtNetwork4.dll" />
|
||||
</Component>
|
||||
@ -79,35 +102,5 @@
|
||||
<File Id="qsqlite4.dll" Name="qsqlite4.dll" Source="..\..\bin\sqldrivers\qsqlite4.dll" />
|
||||
</Component>
|
||||
</Directory>
|
||||
<Directory Id="imageformats" Name="imageformats">
|
||||
<Component Id="qgif4.dll" DiskId="1" Guid="3AAB8604-A6DB-4705-B65E-5713843B886E">
|
||||
<File Id="qgif4.dll" Name="qgif4.dll" Source="..\..\bin\qgif4.dll" />
|
||||
</Component>
|
||||
<Component Id="qico4.dll" DiskId="1" Guid="B6EF1C6B-1E58-4127-9511-4B26CC5AA3A8">
|
||||
<File Id="qico4.dll" Name="qico4.dll" Source="..\..\bin\qico4.dll" />
|
||||
</Component>
|
||||
<Component Id="qjpeg4.dll" DiskId="1" Guid="0B4335EB-AF5D-40BC-B9DB-C49E711B1754">
|
||||
<File Id="qjpeg4.dll" Name="qjpeg4.dll" Source="..\..\bin\qjpeg4.dll" />
|
||||
</Component>
|
||||
<Component Id="qmng4.dll" DiskId="1" Guid="5FFED681-3F4D-4D3D-8A93-32E60CCA656D">
|
||||
<File Id="qmng4.dll" Name="qmng4.dll" Source="..\..\bin\qmng4.dll" />
|
||||
</Component>
|
||||
<Component Id="qsvg4.dll" DiskId="1" Guid="22C8BDAF-B1AC-435C-930E-BDCCAB5EE7F7">
|
||||
<File Id="qsvg4.dll" Name="qsvg4.dll" Source="..\..\bin\qsvg4.dll" />
|
||||
</Component>
|
||||
<Component Id="qtiff4.dll" DiskId="1" Guid="AE6AF17B-9006-486D-AB37-B30105A9C52F">
|
||||
<File Id="qtiff4.dll" Name="qtiff4.dll" Source="..\..\bin\qtiff4.dll" />
|
||||
</Component>
|
||||
</Directory>
|
||||
<Directory Id="iconengines" Name="iconengines">
|
||||
<Component Id="qsvgicon4.dll" DiskId="1" Guid="AB7E00D8-ADD2-4AE0-B778-A828211273FF">
|
||||
<File Id="qsvgicon4.dll" Name="qsvgicon4.dll" Source="..\..\bin\qsvgicon4.dll" />
|
||||
</Component>
|
||||
</Directory>
|
||||
<Directory Id="phonon_backend" Name="phonon_backend">
|
||||
<Component Id="phonon_ds94.dll" DiskId="1" Guid="7EDA779F-AAA9-4817-9813-4184025E660C">
|
||||
<File Id="phonon_ds94.dll" Name="phonon_ds94.dll" Source="..\..\bin\phonon_ds94.dll" />
|
||||
</Component>
|
||||
</Directory>
|
||||
|
||||
</Include>
|
Loading…
x
Reference in New Issue
Block a user