diff options
author | elliott_c <ocielliottc@users.noreply.github.com> | 2007-01-24 19:09:12 +0000 |
---|---|---|
committer | elliott_c <ocielliottc@users.noreply.github.com> | 2007-01-24 19:09:12 +0000 |
commit | cf859440fde48274769b275852fb62955039f5c9 (patch) | |
tree | 3c9379c9a90d6874842c5af96f38fd983772bdeb /registry.pl | |
parent | 3648076de637043a6d14d9fbe7ce92aed67dedcd (diff) | |
download | MPC-cf859440fde48274769b275852fb62955039f5c9.tar.gz |
ChangeLogTag: Wed Jan 24 19:04:58 UTC 2007 Chad Elliott <elliott_c@ociweb.com>
Diffstat (limited to 'registry.pl')
-rwxr-xr-x | registry.pl | 32 |
1 files changed, 26 insertions, 6 deletions
diff --git a/registry.pl b/registry.pl index 538e3b66..15c004fc 100755 --- a/registry.pl +++ b/registry.pl @@ -26,11 +26,11 @@ my($MPC_ROOT) = $FindBin::Bin; $MPC_ROOT =~ s!/!\\!g; my($version) = '1.2'; -my(%types) = ('nmake' => 'NMAKE', - 'bmake' => 'Borland Make', - 'vc6' => 'DSW', - 'vc71' => 'SLN 7.1', - 'vc8' => 'SLN 8.0', +my(%types) = ('nmake' => ['NMAKE', 'NMAKE'], + 'bmake' => ['Borland Make', 'Borland Make'], + 'vc6' => ['DSW', 'DSP'], + 'vc71' => ['SLN 7.1', 'VCPROJ 7.1'], + 'vc8' => ['SLN 8.0', 'VCPROJ 8.0'], ); # ****************************************************************** @@ -88,6 +88,25 @@ sub set_mwc_command { } +sub set_mpc_command { + my($type) = shift; + my($desc) = shift; + my($shell) = 'HKEY_CLASSES_ROOT/mpcfile/shell'; + my($hash) = $Registry->{$shell}; + + if (!defined $hash) { + $Registry->{$shell} = {}; + $hash = $Registry->{$shell}; + } + + my($key) = 'MPC' . uc($type) . '/'; + $hash->{$key} = {'/' => "MPC -> $desc"}; + + $key .= 'command/'; + $hash->{$key} = {'/' => "cmd /c \"$MPC_ROOT\\mpc.pl -type $type %L || pause\""}; +} + + sub delete_key { my($key) = shift; my($val) = $Registry->{$key}; @@ -146,7 +165,8 @@ set_ext_icon('mpc', 1); set_ext_icon('mpb', 1); foreach my $type (keys %types) { - set_mwc_command($type, $types{$type}); + set_mwc_command($type, $types{$type}->[0]); + set_mpc_command($type, $types{$type}->[1]); } print "You may need to log out and then ", |