📄 dbwix.m4
字号:
<!-- $Id: dbwix.m4,v 1.8 2006/09/14 15:50:50 mjc Exp $
- This file is included by WiX input files to define m4 macros.
- m4 is tricky. It has NO notion of XML comments, so
- take care using these names in comments after they are defined,
- since they will be expanded (probably what you don't want).
-
- Note that this file is shared by multiple installers.
- If you want to change a definition to customize an individual project,
- consider redefining the macro in a local file.
-->
<!-- Some basic UI characteristics -->
m4_define(`DIALOG_WIDTH', `390')
m4_define(`DIALOG_HEIGHT', `320')
m4_define(`BOTTOMSTRIPE_Y', `m4_eval(DIALOG_HEIGHT-32)')
m4_define(`NAVBUTTON_Y', `m4_eval(DIALOG_HEIGHT-23)')
m4_define(`NAVBUTTON_DIM', `X="`$1'" Y="NAVBUTTON_Y" Width="66" Height="17"')
<!-- _YPOS is a running total of the current Y position -->
m4_define(`_YPOS', `0')
m4_define(`SETY', `m4_define(`_YPOS', `$1')')
m4_define(`INCY', `SETY(m4_eval(_YPOS+(`$1')))')
<!-- PARTIALHEIGHT(yheight [, gap=10 ]) -->
m4_define(`PARTIALHEIGHT', `Y="_YPOS" Height="`$1'" INCY(`$1') INCY(_GETGAP(`$2'))')
m4_define(`_GETGAP', `m4_ifelse(`',`$1', 10, `$1')')
m4_define(`FULLHEIGHT', `Y="_YPOS" Height="m4_eval(BOTTOMSTRIPE_Y - _YPOS - 10)"')
<!-- BOTTOM_Y: bottom of the usable area before nav buttons -->
m4_define(`BOTTOM_Y', `m4_eval(BOTTOMSTRIPE_Y - 10)')
m4_define(`DIALOGPROP', `Width="DIALOG_WIDTH" Height="DIALOG_HEIGHT"
Title="[ProductName] - Installer" NoMinimize="yes"')
m4_define(`TOPSTRIPE', `
SETY(`$1')
INCY(10)
<!-- stripe bitmap removed for now until we get better quality bitmaps.
<Control Id="TopStripe" Type="Bitmap"
X="0" Y="0" Width="DIALOG_WIDTH" Height="`$1'" Text="Stripe" />
-->
<Control Id="TopStripeBorder" Type="Line"
X="0" Y="`$1'" Width="DIALOG_WIDTH" Height="0" />
<Control Id="TopTitle" Type="Text"
X="8" Y="6" Width="292" Height="25" Transparent="yes">
<Text>{&MSSansBold8}`$2'</Text>
</Control>
<Control Id="TopText" Type="Text"
X="16" Y="23" Width="m4_eval(DIALOG_WIDTH-34)"
Height="m4_eval(`$1' - 19)" Transparent="yes">
<Text>`$3'</Text>
</Control>')
m4_define(`TEXTCONTROL', `
<Control Id="`$1'" Type="Text"
X="20" Y="_YPOS" Width="m4_eval(DIALOG_WIDTH-42)" Height="`$2'">
<Text>`$3'</Text>
</Control>
INCY(`$2')')
<!-- TEXTCONTROL2 (name,height,text). No newline -->
m4_define(`TEXTCONTROL2', `
<Control Id="`$1'" Type="Text"
X="20" Y="_YPOS" Width="m4_eval(DIALOG_WIDTH-42)" Height="`$2'" Transparent="yes">
<Text>`$3'</Text>
</Control>')
m4_define(`BOTTOMSTRIPE', `
<Control Id="BottomStripeBorder" Type="Line"
X="0" Y="BOTTOMSTRIPE_Y" Width="DIALOG_WIDTH" Height="0" />')
m4_define(`NEWDIALOGEVENT', `
<Publish Event="NewDialog" Value="`$1'">
<![CDATA[1]]>
</Publish>')
m4_define(`SPAWNDIALOGEVENT', `
<Publish Event="SpawnDialog" Value="`$1'">
<![CDATA[1]]>
</Publish>')
<!-- use an arrow only if the text is Back, like this: "< Back" -->
m4_define(`BACKBUTTON_GENERIC', `
<Control Id="`$1'" Type="PushButton"
NAVBUTTON_DIM(170)
Text="m4_ifelse(Back,`$1',< )&`$1'" `$2'>
`$3'
</Control>')
<!-- use an arrow only if the text is Next, like this: "Next >" -->
m4_define(`NEXTBUTTON_GENERIC', `
<Control Id="`$1'" Type="PushButton"
NAVBUTTON_DIM(236)
Default="yes" Text="&`$1'm4_ifelse(Next,`$1', >)" `$2'>
`$3'
</Control>')
m4_define(`CANCELBUTTON_GENERIC', `
<Control Id="`$1'" Type="PushButton"
NAVBUTTON_DIM(308)
Text="`$1'" `$2'>
`$3'
</Control>')
m4_define(`NEXTBUTTON_NOTDEFAULT', `
<Control Id="`$1'" Type="PushButton"
NAVBUTTON_DIM(236)
Default="no" Text="&`$1'm4_ifelse(Next,`$1', >)" `$2'>
`$3'
</Control>')
<!-- typical usages -->
m4_define(`BACKBUTTON_DISABLED', `BACKBUTTON_GENERIC(Back, Disabled="yes")')
m4_define(`BACKBUTTON', `BACKBUTTON_GENERIC(Back, , NEWDIALOGEVENT(`$1'))')
m4_define(`NEXTBUTTON_DISABLED', `NEXTBUTTON_GENERIC(Next, Disabled="yes")')
m4_define(`NEXTBUTTON', `NEXTBUTTON_GENERIC(Next, , NEWDIALOGEVENT(`$1'))')
m4_define(`CANCELBUTTON', `CANCELBUTTON_GENERIC(Cancel, Cancel="yes",
SPAWNDIALOGEVENT(CancelInstallerDlg))')
<!-- a little (imperfect) magic to create some unique GUIDs. -->
m4_define(`_GUIDSUFFIX', `10000000')
m4_define(`_SETGUID', `m4_define(`_GUIDSUFFIX', `$1')')
m4_define(`_GUIDINC', `_SETGUID(m4_eval(_GUIDSUFFIX+1))')
m4_define(`GUID_CREATE_UNIQUE', `_GUIDINC()WIX_DB_GUID_PREFIX()`'_GUIDSUFFIX()')
<!-- These three defines are data values, used by GUID_CREATE_PERSISTENT -->
m4_define(`_WIXDB_PRODUCT', WIX_DB_PRODUCT_NAME)
m4_define(`_WIXDB_VERSION', WIX_DB_VERSION)
m4_define(`_WIXDB_CURDIR', `unknown')
m4_define(`_WIXDB_CURFILE', `unknown')
m4_define(`_WIXDB_SUBDIR', `')
<!-- These defines set the data values above -->
m4_define(`WIX_DB_SET_PRODUCT', `m4_define(`_WIXDB_PRODUCT', `$1')')
m4_define(`WIX_DB_SET_VERSION', `m4_define(`_WIXDB_VERSION', `$1')')
m4_define(`WIX_DB_SET_CURDIR', `m4_define(`_WIXDB_CURDIR', `$1')')
m4_define(`WIX_DB_SET_CURFILE', `m4_define(`_WIXDB_CURFILE', `$1')')
m4_define(`WIX_DB_SET_SUBDIR', `m4_define(`_WIXDB_SUBDIR', `$1')')
m4_define(`_LASTCHAR', `m4_substr(`$1',m4_eval(m4_len(`$1')-1))')
m4_define(`_LOPCHAR', `m4_substr(`$1',0,m4_eval(m4_len(`$1')-1))')
m4_define(`_CHOPNAME', `m4_ifelse(_LASTCHAR(`$1'),/,`$1',`_CHOPNAME(_LOPCHAR(`$1'))')')
m4_define(`WIX_DB_BEGIN_SUBDIR', `WIX_DB_SET_SUBDIR(_WIXDB_SUBDIR/`$1')')
m4_define(`WIX_DB_END_SUBDIR', `WIX_DB_SET_SUBDIR(_LOPCHAR(_CHOPNAME(_WIXDB_SUBDIR)))')
m4_define(`WIX_DB_CLEAR_SUBDIR', `WIX_DB_SET_SUBDIR()')
<!-- Create a GUID from the current product, directory, file -->
m4_define(`WIX_DB_PERSISTENT_GUID', `m4_esyscmd(echo "_WIXDB_PRODUCT @@ _WIXDB_VERSION @@ _WIXDB_CURDIR @@ _WIXDB_SUBDIR @@ _WIXDB_CURFILE" | openssl md5 | sed -e "s/^\(........\)\(....\)\(....\)\(....\)\(....\)\(............\)/\1-\2-\3-\4-\5/")')
m4_define(`DB_LICENSE_INTRO', `The following license applies to this copy of software you are about to install. Please read it carefully before proceeding. Select below the nature of the license by which you will use this product. For more information about Oracle Corporation's licensing please contact us at berkeleydb-info_us@oracle.com')
m4_define(`DB_ENVIRONMENT_INTRO', `[ProductName] will need to modify certain environment variables to work properly. If you elect not to set these variables you may find that some utilities`,' scripts and other parts of [ProductName] won't work properly. Please indicate that you skipped this step if you request support help from us.')
m4_define(`COMMON_PROPERTIES', `
<Property Id="ApplicationUsers"><![CDATA[AnyUser]]></Property>
<Property Id="LicenseType"><![CDATA[Open]]></Property>
<!-- The ARP* properties affect the Add/Remove Programs dialog -->
<Property Id="ARPURLINFOABOUT"><![CDATA[http://www.oracle.com]]></Property>
<Property Id="ARPCONTACT"><![CDATA[berkeleydb-info_us@oracle.com]]></Property>
<Property Id="ARPNOMODIFY"><![CDATA[1]]></Property>
<Property Id="ARPNOREPAIR"><![CDATA[1]]></Property>
<!-- TODO: this icon does not work here -->
<Property Id="ARPPRODUCTION"><![CDATA[IconWeb]]></Property>
<Property Id="INSTALLLEVEL"><![CDATA[200]]></Property>
<Property Id="FullOrCustom"><![CDATA[Full]]></Property>
<Property Id="DiscussionCheck" Hidden="yes"><![CDATA[yes]]></Property>
<Property Id="AnnouncementsCheck" Hidden="yes"><![CDATA[yes]]></Property>
<Property Id="NewsletterCheck" Hidden="yes"><![CDATA[yes]]></Property>
<Property Id="EmailAddress" Hidden="yes"></Property>
<Property Id="SalesContactCheck" Hidden="yes"><![CDATA[yes]]></Property>
<Property Id="EnvironmentSetCheck" Hidden="yes"><![CDATA[1]]></Property>
<Property Id="EnvironmentGenCheck" Hidden="yes"><![CDATA[1]]></Property>
<!-- (PBR) We use DebugCheck to track the state of the debug checkbox -->
<Property Id="DebugCheck" Hidden="yes"><![CDATA[yes]]></Property>
<!-- Part of the build process creates a program instenv.exe
- that is installed into InstUtil and used only by the installer.
- When a user wants to generate a file with environment vars,
- we launch instreg and that program creates it.
-
- The final location of the instenv.exe program is not known
- when we create this property, we set the real value of the
- property later.
-->
<Property Id="InstEnvironmentProgram"><![CDATA[0]]></Property>
<!-- TODO: should not have to hardwire PATH and CLASSPATH here -->
<CustomAction Id="InstEnvironment" Property="InstEnvironmentProgram"
ExeCommand="[INSTALLDIR]\dbvars.bat PATH=[PATHEscValue] CLASSPATH=[CLASSPATHEscValue]" Return="asyncNoWait"/>
<!-- Some properties to aid in debugging.
- Sometimes creating a msg dialog is the easiest way to see the
- value of a property. To make this work when you hit the next
- button, add this to your NEXTBUTTON__GENERIC call:
<Publish Event="DoAction" Value="InstDebug"><![CDATA[1]]></Publish>
-->
<Property Id="DebugUserId">dda</Property>
<Property Id="DebugShowProgram">msg.exe</Property>
<!-- tweek me as needed -->
<CustomAction Id="InstDebug" Property="DebugShowProgram"
ExeCommand="[DebugUserId] InstEnvironmentProgram=[InstEnvironmentProgram]= EnvironmentGenCheck=[EnvironmentGenCheck]= AlwaysInstall=[!AlwaysInstall]=" Return="asyncNoWait" />
<Property Id="NULL" Hidden="yes"></Property>
<Property Id="FeatureList" Hidden="yes"></Property>
<Property Id="DoInstallDebug" Hidden="yes">yes</Property>
<Property Id="DoInstallEnvironment" Hidden="yes">yes</Property>
<Binary Id="OracleLogo" src="WIX_DB_IMAGEDIR\oracle.jpg" />
<Binary Id="Stripe" src="WIX_DB_IMAGEDIR\topstripe.ibd" />
<!-- TODO: does not work yet -->
<Binary Id="IconWeb" src="WIX_DB_IMAGEDIR\caticon.ibd" />
<!-- These are 16x16 Windows ico files -->
<Binary Id="IconCreateDir" src="WIX_DB_IMAGEDIR\foldernew.ibd" />
<Binary Id="IconUp" src="WIX_DB_IMAGEDIR\folderup.ibd" />
')
m4_define(`COMMON_COMPONENTS', `
<Component Id="RequiredCommonFiles"
Guid="545CFE00-93D7-11D9-EAD3-F63F68BDEB1A"
KeyPath="yes" SharedDllRefCount="yes"
Location="either" DiskId="1">
<Registry Id="Ext.Registry" Root="HKCR"
Key=".bdbsc"
Value="Oracle.InformationalShortcut"
Type="string" Action="write" />
<Registry Id="Name.Registry" Root="HKCR"
Key="Oracle.InformationalShortcut"
Value="Oracle Corporation Informational Shortcut"
Type="string" Action="write" />
<Registry Id="Tip.Registry" Root="HKCR"
Key="Oracle.InformationalShortcut" Name="InfoTip"
Value="Oracle Corporation Informational Shortcut"
Type="string" Action="write" />
<Registry Id="NoShow.Registry" Root="HKCR"
Key="Oracle.InformationalShortcut" Name="NeverShowExt"
Type="string" Action="write" />
<Registry Id="Icon.Registry" Root="HKCR"
Key="Oracle.InformationalShortcut\DefaultIcon"
Value="[INSTALLDIR]\installutil\webicon.ico"
Type="string" Action="write" />
<Registry Id="Command.Registry" Root="HKCR"
Key="Oracle.InformationalShortcut\shell\open\command"
Value="rundll32.exe shdocvw.dll,OpenURL %1"
Type="string" Action="write" />
<Registry Id="Explore.Registry" Root="HKCU"
Key="Software\Microsoft\Windows\CurrentVersion\Explorer\FileExts\.bdbsc\OpenWithProgIds\Oracle.InformationalShortcut"
Action="write" />
<Registry Id="HklmExt.Registry" Root="HKLM"
Key="Software\Classes\.bdbsc"
Value="Oracle.InformationalShortcut"
Type="string" Action="write" />
<Registry Id="HklmCommand.Registry" Root="HKLM"
Key="Software\Classes\Oracle.InformationalShortcut\shell\open\command"
Value="rundll32.exe shdocvw.dll,OpenURL %1"
Type="string" Action="write" />
</Component>
')
m4_define(`COMMON_UI_TEXT', `
<!-- These are needed to show various canned text -->
<UIText Id="AbsentPath" />
<UIText Id="NewFolder">Fldr|New Folder</UIText>
<UIText Id="bytes">bytes</UIText>
<UIText Id="GB">GB</UIText>
<UIText Id="KB">KB</UIText>
<UIText Id="MB">MB</UIText>
<UIText Id="MenuAbsent">This feature will not be installed.</UIText>
<UIText Id="MenuAllLocal">This feature, and all subfeatures, will be installed.</UIText>
<UIText Id="MenuLocal">This feature will be installed.</UIText>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -