summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorcalkinsc <calkinsc@a3e5c962-4219-0410-a828-e124f845ac39>2010-11-03 14:55:16 +0000
committercalkinsc <calkinsc@a3e5c962-4219-0410-a828-e124f845ac39>2010-11-03 14:55:16 +0000
commita1ccee821e91c9b35785defbbff3562a33357d77 (patch)
treee7924793621545b9f5ffcd95b7e4be8302456a58
parent6459fc7546c2f8cbef937f591340503377f5b12a (diff)
downloadMPC-a1ccee821e91c9b35785defbbff3562a33357d77.tar.gz
Wed Nov 3 14:53:37 UTC 2010 Charles Calkins <calkinsc@ociweb.com>
* docs/templates/wix.txt: * modules/CDT6WorkspaceCreator.pm: * modules/TemplateParser.pm: * modules/VC7WorkspaceCreator.pm: * modules/WixProjectCreator.pm: * modules/WixWorkspaceCreator.pm: * templates/wix.mpd: * templates/wix.mpt: * templates/wixcs.mpd: * templates/wixcs.mpt: Extended the "wix" project type to support C#, decorated names, internationalized .NET resources, and generation of components and groups based on configurations and platforms.
-rw-r--r--ChangeLog17
-rw-r--r--docs/templates/wix.txt7
-rw-r--r--modules/CDT6WorkspaceCreator.pm2
-rw-r--r--modules/TemplateParser.pm3
-rw-r--r--modules/VC7WorkspaceCreator.pm2
-rw-r--r--modules/WixProjectCreator.pm140
-rw-r--r--modules/WixWorkspaceCreator.pm88
-rw-r--r--templates/wix.mpd119
-rw-r--r--templates/wix.mpt12
-rw-r--r--templates/wixcs.mpd59
-rw-r--r--templates/wixcs.mpt4
11 files changed, 433 insertions, 20 deletions
diff --git a/ChangeLog b/ChangeLog
index f874211e..15c2cda2 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,20 @@
+Wed Nov 3 14:53:37 UTC 2010 Charles Calkins <calkinsc@ociweb.com>
+
+ * docs/templates/wix.txt:
+ * modules/CDT6WorkspaceCreator.pm:
+ * modules/TemplateParser.pm:
+ * modules/VC7WorkspaceCreator.pm:
+ * modules/WixProjectCreator.pm:
+ * modules/WixWorkspaceCreator.pm:
+ * templates/wix.mpd:
+ * templates/wix.mpt:
+ * templates/wixcs.mpd:
+ * templates/wixcs.mpt:
+
+ Extended the "wix" project type to support C#, decorated names,
+ internationalized .NET resources, and generation of components
+ and groups based on configurations and platforms.
+
Wed Nov 3 14:31:32 UTC 2010 Adam Mitz <mitza@ociweb.com>
* modules/StringProcessor.pm:
diff --git a/docs/templates/wix.txt b/docs/templates/wix.txt
index d7565bd4..6ae25765 100644
--- a/docs/templates/wix.txt
+++ b/docs/templates/wix.txt
@@ -4,6 +4,13 @@
//
// Please try to keep this alphabetically sorted.
//
+// for the original wix support
guid = The value for this variable is generated during project generation.
install_location = A space separated list of installation directories.
source_directory = The value of either exeout, dllout, or libout with the variable portion converted to a suitable value for WIX.
+// if wix_extended=1 is set
+exclude = If true (1), no components are generated for WiX for this project
+guid = The value for this variable is generated during project generation.
+install_location = A space separated list of installation directories.
+make_group = If true (1), a top-level group is created that references all components of all of the project's project dependencies.
+com_register = If true (1), instruct WiX to register the project as a COM server
diff --git a/modules/CDT6WorkspaceCreator.pm b/modules/CDT6WorkspaceCreator.pm
index 46650513..33642190 100644
--- a/modules/CDT6WorkspaceCreator.pm
+++ b/modules/CDT6WorkspaceCreator.pm
@@ -71,7 +71,7 @@ sub write_comps {
$self->{'seen_deps'} = {};
foreach my $project ($self->sort_dependencies($self->get_projects(), 0)) {
- my($pname, $rawdeps, $guid, $language, $custom_only, $nocross, $managed, @cfgs) = @{$$info{$project}};
+ my($pname, $rawdeps, $guid, $language, $custom_only, $nocross, $managed, $make_group, @cfgs) = @{$$info{$project}};
print $fh "$pname ",
Cwd::abs_path($self->mpc_dirname($project)), '/.project', $crlf;
$self->add_dependencies($creator, $project);
diff --git a/modules/TemplateParser.pm b/modules/TemplateParser.pm
index a5d6d172..85dc6705 100644
--- a/modules/TemplateParser.pm
+++ b/modules/TemplateParser.pm
@@ -2145,6 +2145,9 @@ sub collect_data {
## the project is 'managed' or not.
$prjc->update_project_info($self, 1, ['managed']);
+ ## For WiX, only generate top-level groups for projects marked with "make_group"
+ $prjc->update_project_info($self, 1, ['make_group']);
+
## Some Windows based projects can't deal with certain version
## values. So, for those we provide a translated version.
my $version = $prjc->get_assignment('version');
diff --git a/modules/VC7WorkspaceCreator.pm b/modules/VC7WorkspaceCreator.pm
index 1249a1dc..4cd4fc94 100644
--- a/modules/VC7WorkspaceCreator.pm
+++ b/modules/VC7WorkspaceCreator.pm
@@ -143,7 +143,7 @@ sub write_comps {
## Project Information
foreach my $project (@list) {
- my($pname, $rawdeps, $guid, $language, $custom_only, $nocross, $managed, @cfgs) = @{$$pjs{$project}};
+ my($pname, $rawdeps, $guid, $language, $custom_only, $nocross, $managed, $make_group, @cfgs) = @{$$pjs{$project}};
my $pguid = $guids{$language};
my $deps = $self->get_validated_ordering($project);
my($name, $proj) = $self->adjust_names($pname, $project, $language);
diff --git a/modules/WixProjectCreator.pm b/modules/WixProjectCreator.pm
index 1b349e97..9383111f 100644
--- a/modules/WixProjectCreator.pm
+++ b/modules/WixProjectCreator.pm
@@ -2,8 +2,7 @@ package WixProjectCreator;
# ************************************************************
# Description : A Wix Project Creator
-# Author : James H. Hill
-# Create Date : 6/23/2009
+# Author : James H. Hill / Charles Calkins
# ************************************************************
# ************************************************************
@@ -20,9 +19,41 @@ use vars qw(@ISA);
@ISA = qw(XMLProjectBase WinProjectBase ProjectCreator);
# ************************************************************
+# Data Section
+# ************************************************************
+
+my %info = (Creator::cplusplus => {'ext' => '.wxi',
+ 'dllexe' => 'wix',
+ 'libexe' => 'wix',
+ 'dll' => 'wix',
+ 'lib' => 'wix',
+ 'template' => 'wix',
+ },
+ Creator::csharp => {'ext' => '.wxi',
+ 'dllexe' => 'wixcs',
+ 'libexe' => 'wixcs',
+ 'dll' => 'wixcs',
+ 'lib' => 'wixcs',
+ 'template' => 'wixcs',
+ },
+ );
+
+# ************************************************************
# Subroutine Section
# ************************************************************
+sub languageSupported {
+ return defined $info{$_[0]->get_language()};
+}
+
+sub convert_all_variables {
+ return 1;
+}
+
+sub requires_forward_slashes {
+ return 1;
+}
+
sub expand_variables_from_template_values {
return 1;
}
@@ -35,6 +66,54 @@ sub convert_slashes {
return 0;
}
+
+sub is_culture_code {
+ my $culture_code = shift;
+
+ # from http://sharpertutorials.com/list-of-culture-codes/
+ my @culture_codes = (
+ 'af', 'hu-HU', 'af-ZA', 'is', 'sq', 'is-IS',
+ 'sq-AL', 'id', 'ar', 'id-ID', 'ar-DZ', 'it',
+ 'ar-BH', 'it-IT', 'ar-EG', 'it-CH', 'ar-IQ', 'ja',
+ 'ar-JO', 'ja-JP', 'ar-KW', 'kn', 'ar-LB', 'kn-IN',
+ 'ar-LY', 'kk', 'ar-MA', 'kk-KZ', 'ar-OM', 'kok',
+ 'ar-QA', 'kok-IN', 'ar-SA', 'ko', 'ar-SY', 'ko-KR',
+ 'ar-TN', 'ky', 'ar-AE', 'ky-KG', 'ar-YE', 'lv',
+ 'hy', 'lv-LV', 'hy-AM', 'lt', 'az', 'lt-LT',
+ 'az-AZ-Cyrl', 'mk', 'az-AZ-Latn', 'mk-MK', 'eu', 'ms',
+ 'eu-ES', 'ms-BN', 'be', 'ms-MY', 'be-BY', 'mr',
+ 'bg', 'mr-IN', 'bg-BG', 'mn', 'ca', 'mn-MN',
+ 'ca-ES', 'no', 'zh-HK', 'nb-NO', 'zh-MO', 'nn-NO',
+ 'zh-CN', 'pl', 'zh-CHS', 'pl-PL', 'zh-SG', 'pt',
+ 'zh-TW', 'pt-BR', 'zh-CHT', 'pt-PT', 'hr', 'pa',
+ 'hr-HR', 'pa-IN', 'cs', 'ro', 'cs-CZ', 'ro-RO',
+ 'da', 'ru', 'da-DK', 'ru-RU', 'div', 'sa',
+ 'div-MV', 'sa-IN', 'nl', 'sr-SP-Cyrl', 'nl-BE', 'sr-SP-Latn',
+ 'nl-NL', 'sk', 'en', 'sk-SK', 'en-AU', 'sl',
+ 'en-BZ', 'sl-SI', 'en-CA', 'es', 'en-CB', 'es-AR',
+ 'en-IE', 'es-BO', 'en-JM', 'es-CL', 'en-NZ', 'es-CO',
+ 'en-PH', 'es-CR', 'en-ZA', 'es-DO', 'en-TT', 'es-EC',
+ 'en-GB', 'es-SV', 'en-US', 'es-GT', 'en-ZW', 'es-HN',
+ 'et', 'es-MX', 'et-EE', 'es-NI', 'fo', 'es-PA',
+ 'fo-FO', 'es-PY', 'fa', 'es-PE', 'fa-IR', 'es-PR',
+ 'fi', 'es-ES', 'fi-FI', 'es-UY', 'fr', 'es-VE',
+ 'fr-BE', 'sw', 'fr-CA', 'sw-KE', 'fr-FR', 'sv',
+ 'fr-LU', 'sv-FI', 'fr-MC', 'sv-SE', 'fr-CH', 'syr',
+ 'gl', 'syr-SY', 'gl-ES', 'ta', 'ka', 'ta-IN',
+ 'ka-GE', 'tt', 'de', 'tt-RU', 'de-AT', 'te',
+ 'de-DE', 'te-IN', 'de-LI', 'th', 'de-LU', 'th-TH',
+ 'de-CH', 'tr', 'el', 'tr-TR', 'el-GR', 'uk',
+ 'gu', 'uk-UA', 'gu-IN', 'ur', 'he', 'ur-PK',
+ 'he-IL', 'uz', 'hi', 'uz-UZ-Cyrl', 'hi-IN', 'uz-UZ-Latn',
+ 'hu', 'vi');
+
+ return 1 if (exists {map { $_ => 1 } @culture_codes}->{$culture_code});
+ return 0;
+}
+
+
+
+
sub fill_value {
my($self, $name) = @_;
@@ -81,40 +160,73 @@ sub fill_value {
return $source;
}
+ elsif ($name eq 'cultures') {
+
+ my $crlf = $self->crlf();
+
+ # iterate over resx_files, make list of culture abbreviations
+ my @resx_files = $self->get_component_list('resx_files');
+
+ my %cultures = ();
+ foreach my $resx_file (@resx_files) {
+ my @parts = split('\.', $resx_file);
+ if ($parts[-1] eq 'resx') { # if the file is a .resx file
+ if (is_culture_code($parts[-2])) { # if a culture is specified
+ $cultures{$parts[-2]} = 1; # remember that culture
+ }
+ else {
+ $cultures{'_neutral_'} = 1; # have a neutral culture
+ }
+ }
+ }
+ # flatten into a string
+ my $found_cultures = '';
+ foreach my $culture (keys %cultures) {
+ $found_cultures = $found_cultures . $culture . ' ';
+ }
+
+ return $found_cultures;
+ }
return undef;
}
+
+sub get_info_hash {
+ my($self, $key) = @_;
+
+ ## If we have the setting in our information map, the use it.
+ return $info{$key} if (defined $info{$key});
+}
+
sub project_file_extension {
- return '.wxi';
+ return $_[0]->get_info_hash($_[0]->get_language())->{'ext'};
}
sub get_dll_exe_template_input_file {
- #my $self = shift;
- return 'wix';
+ return $_[0]->get_info_hash($_[0]->get_language())->{'dllexe'};
}
sub get_lib_exe_template_input_file {
- #my $self = shift;
- return 'wix';
+ return $_[0]->get_info_hash($_[0]->get_language())->{'libexe'};
}
-sub get_lib_template_input_file {
- #my $self = shift;
- return 'wix';
+sub get_dll_template_input_file {
+ return $_[0]->get_info_hash($_[0]->get_language())->{'dll'};
}
-sub get_dll_template_input_file {
- #my $self = shift;
- return 'wix';
+sub get_lib_template_input_file {
+ return $_[0]->get_info_hash($_[0]->get_language())->{'lib'};
}
+
sub get_template {
- return 'wix';
+ return $_[0]->get_info_hash($_[0]->get_language())->{'template'};
}
+
1;
diff --git a/modules/WixWorkspaceCreator.pm b/modules/WixWorkspaceCreator.pm
index 5ea4fe0a..b0a95f8b 100644
--- a/modules/WixWorkspaceCreator.pm
+++ b/modules/WixWorkspaceCreator.pm
@@ -14,6 +14,7 @@ use strict;
use WixProjectCreator;
use WorkspaceCreator;
use WinWorkspaceBase;
+use File::Basename;
use vars qw(@ISA);
@ISA = qw(WinWorkspaceBase WorkspaceCreator);
@@ -53,11 +54,18 @@ sub write_comps {
# print the target for clean
- foreach my $project ($self->sort_dependencies($self->get_projects())) {
+ foreach my $project ($self->sort_dependencies($self->get_projects(), 0)) {
print $fh " <?include $project ?>", $crlf;
}
}
+
+sub normalize {
+ my $val = shift;
+ $val =~ tr/ \t\/\\\-$()./_/;
+ return $val;
+}
+
sub post_workspace {
my($self, $fh) = @_;
my $info = $self->get_project_info();
@@ -69,14 +77,86 @@ sub post_workspace {
' <ComponentGroup Id="',
$self->get_workspace_name(), '">', $crlf;
- foreach my $project ($self->sort_dependencies($self->get_projects())) {
+ foreach my $project ($self->sort_dependencies($self->get_projects(), 0)) {
print $fh ' <ComponentGroupRef Id="ComponentGroup.',
$$info{$project}->[0], '" />', $crlf;
}
print $fh ' </ComponentGroup>', $crlf,
- ' </Fragment>', $crlf,
- '</Include>', $crlf;
+ ' </Fragment>', $crlf;
+
+
+
+ print $fh $crlf;
+
+ # For every project marked with "make_group", create a ComponentGroup that references all dependencies
+ my %project_dependencies = ();
+ my $projects = $self->get_projects();
+ my @list = $self->sort_dependencies($projects, 0);
+ foreach my $project (@list) {
+ my $deps = $self->get_validated_ordering($project);
+ $project_dependencies{$project} = [ @$deps ];
+ }
+
+ # for each project, find all dependencies
+ foreach my $project (keys %project_dependencies) {
+ # foreach my $cfg (@cfgs_main) -> <configuration|platform> could be <Debug|AnyCPU Release|AnyCPU> or <Debug|Win32 Release|Win32 Debug|x64 Release|x64>
+ my($pname_main, $rawdeps_main, $guid_main, $language_main, $custom_only_main, $nocross_main, $managed_main, $make_group_main, @cfgs_main) = @{$$info{$project}};
+
+ # only generate a group if "make_group = 1"
+ if ($make_group_main) {
+ my %all_deps = (); # all dependencies used by any project referenced by $project
+ my @dep_stack = ($project);
+ while (my $top = pop @dep_stack) {
+ # add current project to dependencies (use hash key as set)
+ $all_deps{$top} = 1;
+ my $deps = $project_dependencies{$top};
+ foreach my $dep (@$deps) {
+ # add current project's dependencies to stack for processing, if not already processed
+ push(@dep_stack, $dep) if !exists $all_deps{$dep};
+ }
+ }
+
+ # for every config/platform pairing, emit a MainGroup
+ foreach my $cfg (@cfgs_main) {
+ my ($config, $platform) = split('\|', $cfg);
+
+ print $fh ' <Fragment>'.$crlf;
+ print $fh ' <ComponentGroup Id="MainGroup.'.normalize($config).'_'.normalize($platform).'_'.$pname_main.'">'.$crlf;
+
+ # add main project - pattern is "ComponentGroup.<Debug|Release>_<Win32|x64|AnyCPU>_<projectname>"
+ print $fh ' <ComponentGroupRef Id="ComponentGroup.'.normalize($config).'_'.normalize($platform).'_'.$pname_main.'" />'.$crlf;
+
+ # loop over each dependency, and obtain its parameters
+ foreach my $dep (keys %all_deps) {
+ foreach my $p (@{$self->{'projects'}}) {
+ if ($dep eq $self->{'project_info'}->{$p}->[0] || $dep eq $self->mpc_basename($p)) {
+ my($pname_dep, $rawdeps_dep, $guid_dep, $language_dep, $custom_only_dep, $nocross_dep, $managed_dep, $make_group_main, @cfgs_dep) = @{$$info{$p}};
+
+ # add dependency - include AnyCPU if no dependency configuration matches exactly (if the AnyCPU platform exists, that is)
+ my $pform = $platform;
+ if (!exists {map { $_ => 1 } @cfgs_dep}->{$config.'|'.$pform}) {
+ $pform = 'AnyCPU';
+ }
+ if (exists {map { $_ => 1 } @cfgs_dep}->{$config.'|'.$pform}) {
+ print $fh ' <ComponentGroupRef Id="ComponentGroup.'.normalize($config).'_'.normalize($pform).'_'.$pname_dep.'" />'.$crlf;
+ }
+
+ last;
+ }
+ }
+ }
+
+ print $fh ' </ComponentGroup>'.$crlf;
+ print $fh ' </Fragment>'.$crlf;
+ print $fh $crlf;
+ }
+
+ }
+ }
+
+
+ print $fh '</Include>'.$crlf;
}
1;
diff --git a/templates/wix.mpd b/templates/wix.mpd
index 04c21695..3e660a56 100644
--- a/templates/wix.mpd
+++ b/templates/wix.mpd
@@ -1,6 +1,124 @@
<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
<Include>
<%marker(top)%>
+<%if(wix_extended)%>
+<%foreach(platforms)%>
+<%foreach(configurations)%>
+<%if(!exclude)%>
+<%comment("Only put one component in a fragment. If, say, both the debug and release components are in the")%>
+<%comment("same fragment, and just the debug component is used in an installer, the release component will")%>
+<%comment("be identified as unused, and an error generated. That is, it seems that referencing any component")%>
+<%comment("in a fragment causes the entire fragment to be pulled in, and any unused component in the fragment will be flagged as an error")%>
+ <Fragment Id="<%normalize(configuration)%>_<%normalize(platform)%>_<%project_name%>">
+ <ComponentGroup Id="ComponentGroup.<%normalize(configuration)%>_<%normalize(platform)%>_<%project_name%>">
+<%if(!no_binary)%>
+ <ComponentRef Id="<%normalize(configuration)%>_<%normalize(platform)%><%foreach(name, install_location)%>_<%name%><%endfor%>.<%if(type_is_dynamic)%><%normalize(libname_prefix)%><%normalize(sharedname)%><%if(use_lib_modifier)%><%lib_modifier%><%endif%><%dll_ext%><%else%><%normalize(exename)%><%if(use_exe_modifier)%><%lib_modifier%><%endif%><%exe_ext%><%endif%>" />
+<%endif%>
+<%if(gme_install || gme_decorator)%>
+ <ComponentRef Id="gme.component.<%gme_progid%>" />
+<%endif%>
+<%if(gme_paradigm)%>
+ <ComponentRef Id="gme.paradigm.<%paradigm_name%>" />
+<%endif%>
+<%if(install_resources)%>
+<%foreach(resource_files)%>
+ <ComponentRef Id="<%project_name%><%foreach(name, install_location)%>.<%name%><%endfor%>.<%normalize(resource_file)%>" />
+<%endfor%>
+<%endif%>
+<%foreach(components)%>
+ <ComponentRef Id="<%component%>" />
+<%endfor%>
+ </ComponentGroup>
+
+ <DirectoryRef Id="INSTALLDIR">
+<%marker(component_top)%>
+<%if(!no_binary)%>
+<%foreach(name, install_location)%>
+ <Directory Id="<%project_name%>.binary.<%forcount%>.<%name%>" Name="<%name%>">
+<%endfor%>
+ <Component Id="<%normalize(configuration)%>_<%normalize(platform)%>.<%if(type_is_dynamic)%><%normalize(libname_prefix)%><%normalize(sharedname)%><%if(use_lib_modifier)%><%lib_modifier%><%endif%><%dll_ext%><%else%><%normalize(exename)%><%if(use_exe_modifier)%><%lib_modifier%><%endif%><%exe_ext%><%endif%>" Guid="*">
+ <File Id="<%normalize(configuration)%>_<%normalize(platform)%>_<%if(type_is_dynamic)%><%normalize(libname_prefix)%><%normalize(sharedname)%>_dll<%else%><%normalize(exename)%>_exe<%endif%>"
+ Name="<%if(type_is_dynamic)%><%libname_prefix%><%sharedname%><%if(use_lib_modifier)%><%lib_modifier%><%endif%><%dll_ext%><%else%><%exename%><%if(use_exe_modifier)%><%lib_modifier%><%endif%><%exe_ext%><%endif%>"
+ Source="<%if(type_is_dynamic)%><%if(dllout)%><%full_path(dllout)%>/<%else%><%full_path(libout)%>/<%endif%><%else%><%if(type_is_static)%><%full_path(libout)%>/<%else%><%if(exeout)%><%full_path(exeout)%>/<%if(windows_style)%><%output_dir("Debug")%>/<%endif%><%else%><%if(windows_style)%><%output_dir("Debug")%>/<%else%><%output_dir(".")%>/<%endif%><%endif%><%endif%><%endif%><%if(type_is_dynamic)%><%libname_prefix%><%sharedname%><%if(use_lib_modifier)%><%lib_modifier%><%endif%><%dll_ext%><%else%><%exename%><%if(use_exe_modifier)%><%lib_modifier%><%endif%><%exe_ext%><%endif%>"
+ DiskId="<%diskid(1)%>"
+<%if(com_register)%>
+ SelfRegCost="1"
+<%endif%>
+ />
+ </Component>
+<%foreach(name, install_location)%>
+ </Directory>
+<%endfor%>
+<%endif%>
+
+<%if(gme_install || gme_decorator)%>
+ <Component Id="gme.component.<%gme_progid%>" Guid="<%gme_uuid%>">
+<%if(gme_install)%>
+ <RegistryKey Root="<%gme_register(HKLM)%>" Key="SOFTWARE\GME\Components\<%gme_progid%>" Action="createAndRemoveOnUninstall">
+ <RegistryValue Name="Description" Type="string" Value="<%gme_description%>" Action="write" />
+<%if(gme_has_icon)%>
+ <RegistryValue Name="Icon" Type="string" Value="<%gme_icon(,IDI_COMPICON)%>" Action="write" />
+<%endif%>
+ <RegistryValue Name="Paradigm" Type="string" Value="<%foreach(gme_paradigms)%><%gme_paradigm%><%fornotlast(",")%><%endfor%>" Action="write" />
+ <RegistryValue Name="Tooltip" Type="string" Value="<%gme_tooltip%>" Action="write" />
+ <RegistryValue Name="Type" Type="integer" Value="<%gme_component_type(1)%>" Action="write" />
+ </RegistryKey>
+
+ <RegistryKey Root="<%gme_register(HKLM)%>" Key="SOFTWARE\GME\Components\<%gme_progid%>\Associated" Action="create">
+<%foreach(gme_paradigms)%>
+ <RegistryValue Name="<%gme_paradigm%>" Type="string" Action="write" Value="" />
+<%endfor%>
+ </RegistryKey>
+<%endif%>
+ <RegistryKey Root="<%gme_register(HKLM)%>" Key="SOFTWARE\Classes\<%gme_progid%>" Action="createAndRemoveOnUninstall">
+ <RegistryValue Type="string" Value="<%gme_description%>" />
+ </RegistryKey>
+
+ <RegistryKey Root="<%gme_register(HKLM)%>" Key="SOFTWARE\Classes\<%gme_progid%>\CLSID" Action="create">
+ <RegistryValue Type="string" Value="{<%gme_uuid%>}" />
+ </RegistryKey>
+
+ <RegistryKey Root="<%gme_register(HKLM)%>" Key="SOFTWARE\Classes\CLSID\{<%gme_uuid%>}" Action="createAndRemoveOnUninstall">
+ <RegistryValue Type="string" Value="<%if(gme_description)%><%gme_description%><%else%><%gme_progid%><%endif%>" />
+ </RegistryKey>
+
+ <RegistryKey Root="<%gme_register(HKLM)%>" Key="SOFTWARE\Classes\CLSID\{<%gme_uuid%>}\InProcServer32" Action="create">
+ <RegistryValue Type="string" Value="[INSTALLDIR]<%foreach(name, install_location)%><%name%>\<%endfor%><%sharedname%>.dll" />
+ </RegistryKey>
+
+ <RegistryKey Root="<%gme_register(HKLM)%>" Key="SOFTWARE\Classes\CLSID\{<%gme_uuid%>}\ProgID" Action="create">
+ <RegistryValue Type="string" Value="<%gme_progid%>" />
+ </RegistryKey>
+ </Component>
+<%endif%>
+<%if(gme_paradigm)%>
+<%foreach(name, install_location)%>
+ <Directory Id="<%project_name%>.<%paradigm_name%>.<%forcount%>.<%name%>" Name="<%name%>">
+<%endfor%>
+ <Component Id="gme.paradigm.<%paradigm_name%>" Guid="<%paradigm_guid%>">
+ <File Name="<%paradigm_file%>"
+ Source="<%full_path(paradigm_file)%>"
+ DiskId="<%diskid(1)%>" />
+
+ <RegistryKey Root="<%gme_register(HKLM)%>" Key="SOFTWARE\GME\Paradigms\<%paradigm_name%>" Action="createAndRemoveOnUninstall">
+ <RegistryValue Name="CurrentVersion" Type="string" Value="{<%paradigm_guid%>}" Action="write" />
+ </RegistryKey>
+
+ <RegistryKey Root="<%gme_register(HKLM)%>" Key="SOFTWARE\GME\Paradigms\<%paradigm_name%>\{<%paradigm_guid%>}" Action="createAndRemoveOnUninstall">
+ <RegistryValue Name="ConnStr" Type="string" Value="MGA=[INSTALLDIR]<%foreach(name, install_location)%><%name%>\<%endfor%><%paradigm_file%>" />
+ </RegistryKey>
+ </Component>
+<%foreach(name, install_location)%>
+ </Directory>
+<%endfor%>
+<%endif%>
+<%marker(component_bottom)%>
+ </DirectoryRef>
+ </Fragment>
+<%endif%>
+<%endfor%>
+<%endfor%>
+<%else%>
<Fragment Id="<%project_name%>">
<ComponentGroup Id="ComponentGroup.<%project_name%>">
<%if(!no_binary)%>
@@ -118,5 +236,6 @@
<%marker(component_bottom)%>
</DirectoryRef>
</Fragment>
+<%endif%>
<%marker(bottom)%>
</Include>
diff --git a/templates/wix.mpt b/templates/wix.mpt
index 300ea4b2..1bc279ae 100644
--- a/templates/wix.mpt
+++ b/templates/wix.mpt
@@ -2,3 +2,15 @@
// $Id$
conditional_include "common"
+conditional_include "windowscommon"
+
+configurations = Debug Release
+
+conditional_include "vc10platforms"
+
+Release {
+}
+
+Debug {
+ debug_prj = 1
+}
diff --git a/templates/wixcs.mpd b/templates/wixcs.mpd
new file mode 100644
index 00000000..dd003728
--- /dev/null
+++ b/templates/wixcs.mpd
@@ -0,0 +1,59 @@
+<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<Include>
+<%marker(top)%>
+<%foreach(platforms)%>
+<%foreach(configurations)%>
+<%if(!exclude)%>
+<%comment("Only put one component in a fragment. If, say, both the debug and release components are in the")%>
+<%comment("same fragment, and just the debug component is used in an installer, the release component will")%>
+<%comment("be identified as unused, and an error generated. That is, it seems that referencing any component")%>
+<%comment("in a fragment causes the entire fragment to be pulled in, and any unused component in the fragment will be flagged as an error")%>
+ <Fragment Id="<%normalize(configuration)%>_<%normalize(platform)%>_<%project_name%>">
+ <ComponentGroup Id="ComponentGroup.<%normalize(configuration)%>_<%normalize(platform)%>_<%if(exename || sharedname || staticname)%><%if(exename)%><%exename%><%else%><%libname_prefix%><%if(sharedname)%><%sharedname%><%else%><%staticname%><%endif%><%endif%><%else%><%project_name%><%endif%>">
+<%if(!no_binary)%>
+ <ComponentRef Id="<%normalize(configuration)%>_<%normalize(platform)%>_<%if(exename || sharedname || staticname)%><%if(exename)%><%exename%><%else%><%libname_prefix%><%if(sharedname)%><%sharedname%><%else%><%staticname%><%endif%><%endif%><%else%><%project_name%><%endif%><%if(exename)%><%exe_ext%><%else%><%dll_ext%><%endif%>" />
+<%endif%>
+<%foreach(cultures)%>
+<%if(compares(culture, _neutral_))%>
+<%comment("Do nothing here - the neutral culture will be built as the primary output of the project")%>
+<%else%>
+ <ComponentRef Id="<%normalize(configuration)%>_<%normalize(platform)%>_<%project_name%>_<%normalize(culture)%>" />
+<%endif%>
+<%endfor%>
+ </ComponentGroup>
+
+ <DirectoryRef Id="INSTALLDIR">
+<%marker(component_top)%>
+<%if(!no_binary)%>
+ <Component Id="<%normalize(configuration)%>_<%normalize(platform)%>_<%if(exename || sharedname || staticname)%><%if(exename)%><%exename%><%else%><%libname_prefix%><%if(sharedname)%><%sharedname%><%else%><%staticname%><%endif%><%endif%><%else%><%project_name%><%endif%><%if(exename)%><%exe_ext%><%else%><%dll_ext%><%endif%>" Guid="*">
+ <File Id="<%normalize(configuration)%>_<%normalize(platform)%>_<%if(exename || sharedname || staticname)%><%if(exename)%><%exename%><%else%><%libname_prefix%><%if(sharedname)%><%sharedname%><%else%><%staticname%><%endif%><%endif%><%else%><%project_name%><%endif%><%if(exename)%><%exe_ext%><%else%><%dll_ext%><%endif%>"
+ Name="<%if(exename || sharedname || staticname)%><%if(exename)%><%exename%><%else%><%libname_prefix%><%if(sharedname)%><%sharedname%><%else%><%staticname%><%endif%><%endif%><%else%><%project_name%><%endif%><%if(exename)%><%exe_ext%><%else%><%dll_ext%><%endif%>"
+ Source="<%if(exename)%><%if(exeout)%><%full_path(exeout)%><%if(windows_style)%>/<%output_dir%><%endif%><%else%>./<%output_dir%><%endif%><%else%><%if(dllout)%><%full_path(dllout)%><%else%><%full_path(libout)%><%endif%>/<%output_dir%><%endif%>/<%if(exename || sharedname || staticname)%><%if(exename)%><%exename%><%else%><%libname_prefix%><%if(sharedname)%><%sharedname%><%else%><%staticname%><%endif%><%endif%><%else%><%project_name%><%endif%><%if(exename)%><%exe_ext%><%else%><%dll_ext%><%endif%>"
+ DiskId="<%diskid(1)%>" />
+ </Component>
+<%endif%>
+
+<%foreach(cultures)%>
+<%if(compares(culture, _neutral_))%>
+<%comment("Do nothing here - the neutral culture will be built as the primary output of the project")%>
+<%else%>
+ <Directory Id="<%project_name%>.<%normalize(culture)%>.<%forcount%>" Name="<%culture%>">
+ <Component Id="<%normalize(configuration)%>_<%normalize(platform)%>_<%project_name%>_<%normalize(culture)%>" Guid="*">
+ <File Id="<%normalize(configuration)%>_<%normalize(platform)%>_<%project_name%>_<%normalize(culture)%>"
+ Name="<%project_name%>.resources.dll"
+ Source="<%if(exename)%><%if(exeout)%><%full_path(exeout)%><%if(windows_style)%>/<%output_dir%><%endif%><%else%>./<%output_dir%><%endif%><%else%><%if(dllout)%><%full_path(dllout)%><%else%><%full_path(libout)%><%endif%>/<%output_dir%><%endif%>/<%culture%>/<%project_name%>.resources.dll"
+ DiskId="<%diskid(1)%>" />
+ </Component>
+ </Directory>
+<%endif%>
+<%endfor%>
+
+<%marker(component_bottom)%>
+ </DirectoryRef>
+ </Fragment>
+
+<%endif%>
+<%endfor%>
+<%endfor%>
+<%marker(bottom)%>
+</Include>
diff --git a/templates/wixcs.mpt b/templates/wixcs.mpt
new file mode 100644
index 00000000..547d0804
--- /dev/null
+++ b/templates/wixcs.mpt
@@ -0,0 +1,4 @@
+// -*- MPC -*-
+// $Id$
+
+conditional_include "vc8csharp"