Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixing WiX UI extension screens: texts, icons, margins, spacing #5

Merged
merged 2 commits into from
Feb 26, 2014
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
### 1.5 (Next Release)

* **Features**:
* **Bugs**:
* **Misc**:
* [#5] (https://github.com/dblock/msiext/pull/5) - Fixed WiX UI extension screens: texts, icons, margins, spacing - [@romanws](https://github.com/romanws).

### 1.4.1114.0 (11/14/2013)

* **Features**:
Expand Down
239 changes: 117 additions & 122 deletions src/WixExtensions/CommonUiExtension/wixlib/DbCreateCredDlg.wxs

Large diffs are not rendered by default.

11 changes: 7 additions & 4 deletions src/WixExtensions/CommonUiExtension/wixlib/GenericErrorDlg.wxs
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,18 @@
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi">
<Fragment xmlns="http://schemas.microsoft.com/wix/2006/wi">
<UI>
<!--
Popup dialog for displaying a custom error message. Set ERROR_MESSAGE to display a custom message.
-->
<!--
Popup dialog for displaying a custom error message.

\param ERROR_TITLE the title for the dialog.
\param ERROR_MESSAGE the message to display in the dialog body.
-->
<Dialog Id="GenericErrorDlg" Width="260" Height="100" Title="[ERROR_TITLE]">
<Control Id="Return" Type="PushButton" X="102" Y="75" Width="56" Height="17" Default="yes" Cancel="yes" Text="OK">
<Publish Event="EndDialog" Value="Return">1</Publish>
</Control>
<Control Id="Text" Type="Text" X="48" Y="15" Width="200" Height="55" Text="[ERROR_MESSAGE]" />
<Control Id="Icon" Type="Icon" X="15" Y="15" Width="24" Height="24" FixedSize="yes" IconSize="32" Text="WixUI_Ico_Exclam" />
<Control Id="Icon" Type="Icon" X="15" Y="15" Width="24" Height="24" FixedSize="yes" IconSize="32" Text="AsiUI_ErrorIco" />
</Dialog>
</UI>
</Fragment>
Expand Down
54 changes: 26 additions & 28 deletions src/WixExtensions/CommonUiExtension/wixlib/RuntimeDbCredDlg.wxs
Original file line number Diff line number Diff line change
Expand Up @@ -11,14 +11,15 @@

<UI>
<Property Id="loc_RuntimeDbCredDlg_IntegratedAuth" Value="!(loc.RuntimeDbCredDlg_IntegratedAuth)" />
<!--
Prompts for runtime database credentials.

\param RUNTIME_DATABASE_LOGON_TYPE one of WinAuth or SqlAuth
\param CHECK_RUNTIME_DATABASE_PERMS yes/no to check perms in ADPRO database
\return RUNTIME_DATABASE_USERNAME database username (with SqlAuth)
\return RUNTIME_DATABASE_PASSWORD detabase password (with SqlAuth)
-->

<!--
Prompts for runtime database credentials.

\param RUNTIME_DATABASE_LOGON_TYPE one of WinAuth or SqlAuth
\param CHECK_RUNTIME_DATABASE_PERMS yes/no to check perms in ADPRO database
\return RUNTIME_DATABASE_USERNAME database username (with SqlAuth)
\return RUNTIME_DATABASE_PASSWORD detabase password (with SqlAuth)
-->
<Dialog Id="RuntimeDbCredDlg" Width="370" Height="270" Title="!(loc.RuntimeDbCredDlg_Header)">

<Control Id="Next" Type="PushButton" X="236" Y="243" Width="56" Height="17" Default="yes" Text="!(loc.WixUINext)">
Expand All @@ -39,15 +40,16 @@
</Control>

<Control Id="Title" Type="Text" X="15" Y="6" Width="200" Height="15" Transparent="yes" NoPrefix="yes" Text="!(loc.RuntimeDbCredDlg_Title)" />
<Control Id="SubTitle" Type="Text" X="25" Y="21" Width="220" Height="20" Transparent="yes" NoPrefix="yes" Text="!(loc.RuntimeDbCredDlg_SubTitle)" />
<Control Id="SubTitle" Type="Text" X="25" Y="23" Width="220" Height="20" Transparent="yes" NoPrefix="yes" Text="!(loc.RuntimeDbCredDlg_SubTitle)" />
<Control Id="BannerBitmap" Type="Bitmap" X="0" Y="0" Width="370" Height="44" TabSkip="no" Text="!(loc.RuntimeDbCredDlg_BannerBitmap)" />
<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="Description1" Type="Text" X="20" Y="55" Width="320" Height="30" Transparent="yes" Text="!(loc.RuntimeDbCredDlg_Description1)" />
<Control Id="Description" Type="Text" X="20" Y="85" Width="320" Height="30" Transparent="yes" Text="!(loc.RuntimeDbCredDlg_Description)" />
<Control Id="Description" Type="Text" X="20" Y="55" Width="330" Height="20" Transparent="yes" Text="!(loc.RuntimeDbCredDlg_Description)" />

<Control Id="SelectorLabel" Type="Text" X="20" Y="83" Width="320" Height="12" Text="!(loc.RuntimeDbCredDlg_SelectorLabel)" />

<Control Id="DatabaseLogonType" Type="RadioButtonGroup" X="20" Y="120" Width="330" Height="30" Property="RUNTIME_DATABASE_LOGON_TYPE">
<Control Id="DatabaseLogonType" Type="RadioButtonGroup" X="20" Y="98" Width="330" Height="30" Property="RUNTIME_DATABASE_LOGON_TYPE">
<RadioButtonGroup Property="RUNTIME_DATABASE_LOGON_TYPE">
<RadioButton Value="WinAuth" X="0" Y="0" Width="330" Height="15" Text="[loc_RuntimeDbCredDlg_IntegratedAuth]" />
<RadioButton Value="SqlAuth" X="0" Y="15" Width="330" Height="15" Text="!(loc.RuntimeDbCredDlg_PasswordAuth)" />
Expand All @@ -58,34 +60,33 @@
<Condition Action="show">LocalDatabaseServer = "yes" OR SERVICE_USERNAME</Condition>
</Control>

<Control Id="WindowsAuthNotAvailable" Type="Text" X="20" Y="120" Width="330" Height="30" Text="!(loc.RuntimeDbCredDlg_WindowsAuthNotAvailable)">
<Control Id="WindowsAuthNotAvailable" Type="Text" X="20" Y="98" Width="330" Height="30" Text="!(loc.RuntimeDbCredDlg_WindowsAuthNotAvailable)">
<Condition Action="show">NOT LocalDatabaseServer = "yes" AND NOT SERVICE_USERNAME</Condition>
<Condition Action="hide">LocalDatabaseServer = "yes" OR SERVICE_USERNAME</Condition>
</Control>

<Control Id="UsernameLabel" Type="Text" X="50" Y="152" Width="50" Height="15" Text="!(loc.RuntimeDbCredDlg_UsernameLabel)">
<Control Id="UsernameLabel" Type="Text" X="40" Y="135" Width="41" Height="10" Text="!(loc.RuntimeDbCredDlg_UsernameLabel)">
<Publish Property="LOGON_VALID" Value="0">1</Publish>
<Condition Action="disable">NOT RUNTIME_DATABASE_LOGON_TYPE = "SqlAuth"</Condition>
<Condition Action="enable">RUNTIME_DATABASE_LOGON_TYPE = "SqlAuth"</Condition>
</Control>

<Control Id="Username" Type="Edit" X="110" Y="152" Width="150" Height="15" Property="RUNTIME_DATABASE_USERNAME" Text="{64}">
<Control Id="Username" Type="Edit" X="81" Y="133" Width="150" Height="15" Property="RUNTIME_DATABASE_USERNAME" Text="{64}">
<Publish Property="LOGON_VALID" Value="0">1</Publish>
<Condition Action="disable">NOT RUNTIME_DATABASE_LOGON_TYPE = "SqlAuth"</Condition>
<Condition Action="enable">RUNTIME_DATABASE_LOGON_TYPE = "SqlAuth"</Condition>
</Control>

<Control Id="PasswordLabel" Type="Text" X="50" Y="170" Width="50" Height="15" Text="!(loc.RuntimeDbCredDlg_PasswordLabel)">
<Control Id="PasswordLabel" Type="Text" X="40" Y="150" Width="41" Height="10" Text="!(loc.RuntimeDbCredDlg_PasswordLabel)">
<Condition Action="disable">NOT RUNTIME_DATABASE_LOGON_TYPE = "SqlAuth"</Condition>
<Condition Action="enable">RUNTIME_DATABASE_LOGON_TYPE = "SqlAuth"</Condition>
</Control>
<Control Id="Password" Password="yes" Type="Edit" X="110" Y="170" Width="150" Height="15" Property="RUNTIME_DATABASE_PASSWORD">
<Control Id="Password" Password="yes" Type="Edit" X="81" Y="148" Width="150" Height="15" Property="RUNTIME_DATABASE_PASSWORD">
<Publish Property="LOGON_VALID" Value="0">1</Publish>
<Condition Action="disable">NOT RUNTIME_DATABASE_LOGON_TYPE = "SqlAuth"</Condition>
<Condition Action="enable">RUNTIME_DATABASE_LOGON_TYPE = "SqlAuth"</Condition>
</Control>

<Control Id="TestButton" Type="PushButton" X="50" Y="200" Width="100" Height="15" Text="!(loc.RuntimeDbCredDlg_TestConnectionLabel)">
<Control Id="TestButton" Type="PushButton" X="40" Y="173" Width="100" Height="15" Text="!(loc.RuntimeDbCredDlg_TestConnectionLabel)">
<!-- Clean up conditional properties -->
<Publish Property="ERROR_MESSAGE">1</Publish>
<Publish Property="ODBC_CONNECTION_ESTABLISHED">1</Publish>
Expand All @@ -96,8 +97,7 @@
<!-- for sql auth user should be not empty-->
<Publish Property="ERROR_MESSAGE" Value="Sql user cannot be empty">RUNTIME_DATABASE_LOGON_TYPE = "SqlAuth" AND NOT RUNTIME_DATABASE_USERNAME</Publish>

<!-- First check that connection can be established.
Use sql user/password for SqlAuth; impersonate as service user for WinAuth. -->
<!-- First check that connection can be established. Use sql user/password for SqlAuth; impersonate as service user for WinAuth. -->
<Publish Property="ODBC_CONNECTION_STRING" Value="Driver=SQL Server;Server=[ODBC_SERVER];Uid=[RUNTIME_DATABASE_USERNAME];Pwd=[RUNTIME_DATABASE_PASSWORD];DATABASE=[RUNTIME_DATABASE_NAME]">NOT ERROR_MESSAGE AND RUNTIME_DATABASE_LOGON_TYPE = "SqlAuth"</Publish>
<Publish Property="ODBC_CONNECTION_STRING" Value="Driver=SQL Server;Server=[ODBC_SERVER];Trusted_Connection=Yes;DATABASE=[RUNTIME_DATABASE_NAME]">NOT ERROR_MESSAGE AND NOT RUNTIME_DATABASE_LOGON_TYPE = "SqlAuth"</Publish>
<Publish Property="IMPERSONATE_USERNAME" Value="[SERVICE_USERNAME]">NOT ERROR_MESSAGE AND NOT RUNTIME_DATABASE_LOGON_TYPE = "SqlAuth"</Publish>
Expand All @@ -106,8 +106,7 @@
<Publish Property="ERROR_MESSAGE" Value="[ODBC_ERROR]">NOT ERROR_MESSAGE AND NOT ODBC_CONNECTION_ESTABLISHED</Publish>
<Publish Property="ERROR_MESSAGE" Value="Cannot connect to database [ODBC_SERVER]">NOT ERROR_MESSAGE AND NOT ODBC_CONNECTION_ESTABLISHED</Publish>

<!-- Second, check that we have proper permissions in the specified database
(select=1,update=2,insert=8,delete=0x10 => 0x1B) -->
<!-- Second, check that we have proper permissions in the specified database (select=1,update=2,insert=8,delete=0x10 => 0x1B) -->
<Publish Property="ODBC_SQL_FLAGS" Value="ODBC_SQL_FLAG_NO_ROWS_RETURN_EMPTY">NOT ERROR_MESSAGE AND CHECK_RUNTIME_DATABASE_PERMS="yes"</Publish>
<Publish Property="ODBC_SQL_QUERY" Value="SELECT 'OK' WHERE (PERMISSIONS(OBJECT_ID('[RUNTIME_DATABASE_PERMS_TABLE]')) &amp; 0x1B) = 0x1B">NOT ERROR_MESSAGE AND CHECK_RUNTIME_DATABASE_PERMS="yes"</Publish>
<Publish Event="DoAction" Value="AsiUI_ODBC_GetString">NOT ERROR_MESSAGE AND CHECK_RUNTIME_DATABASE_PERMS="yes"</Publish>
Expand All @@ -124,22 +123,21 @@
<Condition Action="enable">$(var.DbLogonCanBeValidated)</Condition>
</Control>

<Control Id="TestResult_Success" Type="Icon" IconSize="16" X="165" Y="200" Width="12" Height="12" Text="AsiUI_SuccessIco">
<Control Id="TestResult_Success" Type="Icon" IconSize="16" X="145" Y="174" Width="12" Height="12" Text="AsiUI_SuccessIco">
<Condition Action="hide">LOGON_VALID = "0"</Condition>
<Condition Action="show">LOGON_VALID = "1"</Condition>
</Control>

<Control Id="TestResult_Failure" Type="Icon" IconSize="16" X="165" Y="200" Width="12" Height="12" Text="AsiUI_ErrorIco">
<Control Id="TestResult_Failure" Type="Icon" IconSize="16" X="145" Y="174" Width="12" Height="12" Text="AsiUI_ErrorIco">
<Condition Action="hide">LOGON_VALID = "1" OR $(var.DbLogonCannotBeValidated)</Condition>
<Condition Action="show">LOGON_VALID = "0" AND $(var.DbLogonCanBeValidated)</Condition>
</Control>

<Control Id="TestPrompt" Type="Text" X="185" Y="203" Width="187" Height="10" Text="!(loc.RuntimeDbCredDlg_TestPrompt)">
<Control Id="TestPrompt" Type="Text" X="165" Y="176" Width="185" Height="10" Text="!(loc.RuntimeDbCredDlg_TestPrompt)">
<Condition Action="hide">LOGON_VALID = "1" OR $(var.DbLogonCannotBeValidated)</Condition>
<Condition Action="show">LOGON_VALID = "0" AND $(var.DbLogonCanBeValidated)</Condition>
</Control>

<Control Id="CannotTestConnectionLabel" Type="Text" X="20" Y="223" Width="290" Height="20" Transparent="yes" Text="!(loc.RuntimeDbCredDlg_CannotTestConnectionForLocalSystem)">
<Control Id="CannotTestConnectionLabel" Type="Text" X="20" Y="205" Width="330" Height="20" Transparent="yes" Text="!(loc.RuntimeDbCredDlg_CannotTestConnectionForLocalSystem)">
<Condition Action="show">$(var.DbLogonCannotBeValidated)</Condition>
<Condition Action="hide">$(var.DbLogonCanBeValidated)</Condition>
</Control>
Expand Down
29 changes: 15 additions & 14 deletions src/WixExtensions/CommonUiExtension/wixlib/SelectDbDlg.wxs
Original file line number Diff line number Diff line change
Expand Up @@ -5,35 +5,36 @@
<Property Id="DefaultDatabaseServer" Value="(local)" />

<UI>
<!--
Prompts for database location
Also pre-populates the list of available SQL servers via DMO.
\return DATABASE_SERVER: database server (for MSSQL)
\return ODBC_SERVER: database server suitable for ODBC-based custom actions (for MSSQL)
-->
<!--
Prompts for database location.
Also pre-populates the list of available SQL servers via DMO.

\return DATABASE_SERVER: database server (for MSSQL)
\return ODBC_SERVER: database server suitable for ODBC-based custom actions (for MSSQL)
-->
<Dialog Id="SelectDbDlg" Width="370" Height="270" Title="!(loc.SelectDbDlg_Header)">
<Control Id="BannerBitmap" Type="Bitmap" X="0" Y="0" Width="370" Height="44" TabSkip="no" Text="!(loc.SelectDbDlg_BannerBitmap)" />
<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="Title" Type="Text" X="15" Y="6" Width="200" Height="15" Transparent="yes" NoPrefix="yes" Text="!(loc.SelectDbDlg_Title)" />
<Control Id="SubTitle" Type="Text" X="25" Y="21" Width="200" Height="20" Transparent="yes" NoPrefix="yes" Text="!(loc.SelectDbDlg_SubTitle)" />
<Control Id="SubTitle" Type="Text" X="25" Y="23" Width="200" Height="20" Transparent="yes" NoPrefix="yes" Text="!(loc.SelectDbDlg_SubTitle)" />

<Control Id="Back" Type="PushButton" X="180" Y="243" Width="56" Height="17" Text="!(loc.WixUIBack)" />
<Control Id="Cancel" Type="PushButton" X="304" Y="243" Width="56" Height="17" Cancel="yes" Text="!(loc.WixUICancel)">
<Publish Event="SpawnDialog" Value="CancelDlg">1</Publish>
</Control>

<Control Id="Description" Type="Text" X="20" Y="55" Width="340" Height="30" Text="!(loc.SelectDbDlg_Description)" />
<Control Id="Description" Type="Text" X="20" Y="55" Width="330" Height="40" Text="!(loc.SelectDbDlg_Description)" />

<Control Id="ServerLabel" Type="Text" X="50" Y="90" Width="90" Height="10" Text="!(loc.SelectDbDlg_ServerLabel)" />
<Control Id="Server" Type="ComboBox" X="140" Y="90" Width="140" Height="15" Property="DATABASE_SERVER">
<Control Id="SelectorLabel" Type="Text" X="20" Y="103" Width="90" Height="10" Text="!(loc.SelectDbDlg_SelectorLabel)" />
<Control Id="Server" Type="ComboBox" X="20" Y="115" Width="150" Height="15" Property="DATABASE_SERVER">
<ComboBox Property="DATABASE_SERVER">
<ListItem Text="[DefaultDatabaseServer]" Value="[DefaultDatabaseServer]" />
</ComboBox>
</Control>

<Control Id="ServerBrowse" Type="PushButton" X="290" Y="90" Width="60" Height="15" Text="!(loc.SelectDbDlg_DbBrowse)">
<Control Id="ServerBrowse" Type="PushButton" X="175" Y="115" Width="56" Height="15" Text="!(loc.SelectDbDlg_DbBrowse)">
<Publish Property="DSOP_SCOPE_TYPES" Value="DSOP_SCOPE_TYPE_USER_ENTERED_UPLEVEL_SCOPE|DSOP_SCOPE_TYPE_USER_ENTERED_DOWNLEVEL_SCOPE|DSOP_SCOPE_TYPE_GLOBAL_CATALOG|DSOP_SCOPE_TYPE_EXTERNAL_UPLEVEL_DOMAIN|DSOP_SCOPE_TYPE_EXTERNAL_DOWNLEVEL_DOMAIN">1</Publish>
<Publish Property="DSOP_SCOPE_TYPES" Value="[DSOP_SCOPE_TYPES]|DSOP_SCOPE_TYPE_WORKGROUP|DSOP_SCOPE_TYPE_UPLEVEL_JOINED_DOMAIN|DSOP_SCOPE_TYPE_DOWNLEVEL_JOINED_DOMAIN">1</Publish>
<Publish Property="DSOP_SCOPE_FLAGS">1</Publish>
Expand All @@ -48,8 +49,7 @@
<Publish Property="DATABASE_SERVER" Value="[ComputerName]">DATABASE_SERVER = "(local)"</Publish>
<Publish Property="DATABASE_SERVER" Value="[DATABASE_SERVER]">NOT (DATABASE_SERVER = "(local)")</Publish>

<!-- Make sure server is not empty and there are no '(local)' after the above replacement
(synatx '(local):1234' is not acceptable) -->
<!-- Make sure server is not empty and there are no '(local)' after the above replacement (synatx '(local):1234' is not acceptable) -->
<Publish Property="ERROR_MESSAGE">1</Publish>
<Publish Property="ERROR_MESSAGE" Value="!(loc.SelectDbDlg_EmptyServer)">NOT DATABASE_SERVER</Publish>
<Publish Property="ERROR_MESSAGE" Value="!(loc.SelectDbDlg_InvalidSyntax)"><![CDATA[DATABASE_SERVER >< "(" OR DATABASE_SERVER >< ")"]]></Publish>
Expand All @@ -73,7 +73,7 @@
</Dialog>
</UI>

<!-- Custom actions to populate initial values and available servers list -->
<!-- Custom actions to populate initial values and available servers list. -->
<CustomAction Id="SetDefaultDbServer" Property="DefaultDatabaseServer" Value="[DATABASE_SERVER]" />

<CustomAction Id="SetSqlDmoListLocal" Property="SQLDMO_LIST_LOCAL" Value="[DefaultDatabaseServer]" />
Expand All @@ -90,5 +90,6 @@
<Custom Action="SetSqlDmoListIndex" Before="AsiUI_SQLDMO_ListAvailableSQLServers" />
<Custom Action="AsiUI_SQLDMO_ListAvailableSQLServers" Before="CostInitialize">NOT Installed AND NOT (DBTYPE = "Access")</Custom>
</InstallUISequence>

</Fragment>
</Wix>
Loading