author | Bob Rosenberg <bob.rosenberg@nokia.com> |
Wed, 13 Oct 2010 16:21:25 +0100 | |
changeset 7 | 3c36c452f013 |
parent 1 | b538b70cbe51 |
permissions | -rw-r--r-- |
1
b538b70cbe51
Move rest of the swconfigmdw package components to oss repository.
terytkon
parents:
diff
changeset
|
1 |
# Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). |
b538b70cbe51
Move rest of the swconfigmdw package components to oss repository.
terytkon
parents:
diff
changeset
|
2 |
# All rights reserved. |
b538b70cbe51
Move rest of the swconfigmdw package components to oss repository.
terytkon
parents:
diff
changeset
|
3 |
# This component and the accompanying materials are made available |
b538b70cbe51
Move rest of the swconfigmdw package components to oss repository.
terytkon
parents:
diff
changeset
|
4 |
# under the terms of "Eclipse Public License v1.0" |
b538b70cbe51
Move rest of the swconfigmdw package components to oss repository.
terytkon
parents:
diff
changeset
|
5 |
# which accompanies this distribution, and is available |
b538b70cbe51
Move rest of the swconfigmdw package components to oss repository.
terytkon
parents:
diff
changeset
|
6 |
# at the URL "http://www.eclipse.org/legal/epl-v10.html". |
b538b70cbe51
Move rest of the swconfigmdw package components to oss repository.
terytkon
parents:
diff
changeset
|
7 |
# |
b538b70cbe51
Move rest of the swconfigmdw package components to oss repository.
terytkon
parents:
diff
changeset
|
8 |
# Initial Contributors: |
b538b70cbe51
Move rest of the swconfigmdw package components to oss repository.
terytkon
parents:
diff
changeset
|
9 |
# Nokia Corporation - initial contribution. |
b538b70cbe51
Move rest of the swconfigmdw package components to oss repository.
terytkon
parents:
diff
changeset
|
10 |
# |
b538b70cbe51
Move rest of the swconfigmdw package components to oss repository.
terytkon
parents:
diff
changeset
|
11 |
# Contributors: |
b538b70cbe51
Move rest of the swconfigmdw package components to oss repository.
terytkon
parents:
diff
changeset
|
12 |
# |
b538b70cbe51
Move rest of the swconfigmdw package components to oss repository.
terytkon
parents:
diff
changeset
|
13 |
# Description: |
b538b70cbe51
Move rest of the swconfigmdw package components to oss repository.
terytkon
parents:
diff
changeset
|
14 |
# |
b538b70cbe51
Move rest of the swconfigmdw package components to oss repository.
terytkon
parents:
diff
changeset
|
15 |
|
b538b70cbe51
Move rest of the swconfigmdw package components to oss repository.
terytkon
parents:
diff
changeset
|
16 |
my $installScript = $ARGV[0] ? $ARGV[0] : "my_systemmodeltoolkit.nsi"; |
b538b70cbe51
Move rest of the swconfigmdw package components to oss repository.
terytkon
parents:
diff
changeset
|
17 |
|
b538b70cbe51
Move rest of the swconfigmdw package components to oss repository.
terytkon
parents:
diff
changeset
|
18 |
my $productName = "SystemModelToolkit"; |
b538b70cbe51
Move rest of the swconfigmdw package components to oss repository.
terytkon
parents:
diff
changeset
|
19 |
my $productVersion = "1.1"; |
b538b70cbe51
Move rest of the swconfigmdw package components to oss repository.
terytkon
parents:
diff
changeset
|
20 |
|
b538b70cbe51
Move rest of the swconfigmdw package components to oss repository.
terytkon
parents:
diff
changeset
|
21 |
my $depDir = ".."; # The location of Dep directory |
b538b70cbe51
Move rest of the swconfigmdw package components to oss repository.
terytkon
parents:
diff
changeset
|
22 |
|
b538b70cbe51
Move rest of the swconfigmdw package components to oss repository.
terytkon
parents:
diff
changeset
|
23 |
# all directory pathnames are relative to DepToolkit\Dep |
b538b70cbe51
Move rest of the swconfigmdw package components to oss repository.
terytkon
parents:
diff
changeset
|
24 |
my @subDirsToInstall = ("src\\svg"); |
b538b70cbe51
Move rest of the swconfigmdw package components to oss repository.
terytkon
parents:
diff
changeset
|
25 |
my %individualFilesToInstall = (); |
b538b70cbe51
Move rest of the swconfigmdw package components to oss repository.
terytkon
parents:
diff
changeset
|
26 |
|
b538b70cbe51
Move rest of the swconfigmdw package components to oss repository.
terytkon
parents:
diff
changeset
|
27 |
my @filesToUnistall = (); # w.r.t the root of installation directory |
b538b70cbe51
Move rest of the swconfigmdw package components to oss repository.
terytkon
parents:
diff
changeset
|
28 |
my @dirsToUnistall = (); # w.r.t the root of installation directory |
b538b70cbe51
Move rest of the swconfigmdw package components to oss repository.
terytkon
parents:
diff
changeset
|
29 |
|
b538b70cbe51
Move rest of the swconfigmdw package components to oss repository.
terytkon
parents:
diff
changeset
|
30 |
CreateInstallScript(); |
b538b70cbe51
Move rest of the swconfigmdw package components to oss repository.
terytkon
parents:
diff
changeset
|
31 |
|
b538b70cbe51
Move rest of the swconfigmdw package components to oss repository.
terytkon
parents:
diff
changeset
|
32 |
sub CreateInstallScript() |
b538b70cbe51
Move rest of the swconfigmdw package components to oss repository.
terytkon
parents:
diff
changeset
|
33 |
{ |
b538b70cbe51
Move rest of the swconfigmdw package components to oss repository.
terytkon
parents:
diff
changeset
|
34 |
open (SCRIPT, ">$installScript") or die "Cannot open $installScript to write to: $!"; |
b538b70cbe51
Move rest of the swconfigmdw package components to oss repository.
terytkon
parents:
diff
changeset
|
35 |
print SCRIPT Header(); |
b538b70cbe51
Move rest of the swconfigmdw package components to oss repository.
terytkon
parents:
diff
changeset
|
36 |
print SCRIPT InstallationTextSection(); |
b538b70cbe51
Move rest of the swconfigmdw package components to oss repository.
terytkon
parents:
diff
changeset
|
37 |
print SCRIPT Middle(); |
b538b70cbe51
Move rest of the swconfigmdw package components to oss repository.
terytkon
parents:
diff
changeset
|
38 |
print SCRIPT UninstallationTextSection(); |
b538b70cbe51
Move rest of the swconfigmdw package components to oss repository.
terytkon
parents:
diff
changeset
|
39 |
} |
b538b70cbe51
Move rest of the swconfigmdw package components to oss repository.
terytkon
parents:
diff
changeset
|
40 |
|
b538b70cbe51
Move rest of the swconfigmdw package components to oss repository.
terytkon
parents:
diff
changeset
|
41 |
sub InstallationTextSection() |
b538b70cbe51
Move rest of the swconfigmdw package components to oss repository.
terytkon
parents:
diff
changeset
|
42 |
{ |
b538b70cbe51
Move rest of the swconfigmdw package components to oss repository.
terytkon
parents:
diff
changeset
|
43 |
my $text = "\n;--------------------------- INSTALL SECTION ---------------------------\nSection \"Install Files\" SEC01\n\n"; |
b538b70cbe51
Move rest of the swconfigmdw package components to oss repository.
terytkon
parents:
diff
changeset
|
44 |
|
b538b70cbe51
Move rest of the swconfigmdw package components to oss repository.
terytkon
parents:
diff
changeset
|
45 |
my $directory = "src\\svg"; |
b538b70cbe51
Move rest of the swconfigmdw package components to oss repository.
terytkon
parents:
diff
changeset
|
46 |
|
b538b70cbe51
Move rest of the swconfigmdw package components to oss repository.
terytkon
parents:
diff
changeset
|
47 |
# Copy the main script, DrawSvg.pl into the root of installtion directory: |
b538b70cbe51
Move rest of the swconfigmdw package components to oss repository.
terytkon
parents:
diff
changeset
|
48 |
$text .= " SetOutPath \"\$INSTDIR\"\n"; |
b538b70cbe51
Move rest of the swconfigmdw package components to oss repository.
terytkon
parents:
diff
changeset
|
49 |
$text .= " SetOverwrite try\n"; |
b538b70cbe51
Move rest of the swconfigmdw package components to oss repository.
terytkon
parents:
diff
changeset
|
50 |
$text .= " File \"$depDir\\$directory\\DrawSvg.pl\"\n"; |
b538b70cbe51
Move rest of the swconfigmdw package components to oss repository.
terytkon
parents:
diff
changeset
|
51 |
push @filesToUnistall, "DrawSvg.pl"; |
b538b70cbe51
Move rest of the swconfigmdw package components to oss repository.
terytkon
parents:
diff
changeset
|
52 |
$text .= " File \"$depDir\\$directory\\distribution.policy\"\n"; |
b538b70cbe51
Move rest of the swconfigmdw package components to oss repository.
terytkon
parents:
diff
changeset
|
53 |
push @filesToUnistall, "distribution.policy"; |
b538b70cbe51
Move rest of the swconfigmdw package components to oss repository.
terytkon
parents:
diff
changeset
|
54 |
$text .= "\n"; |
b538b70cbe51
Move rest of the swconfigmdw package components to oss repository.
terytkon
parents:
diff
changeset
|
55 |
|
b538b70cbe51
Move rest of the swconfigmdw package components to oss repository.
terytkon
parents:
diff
changeset
|
56 |
# rest of the svg files' in SVG |
b538b70cbe51
Move rest of the swconfigmdw package components to oss repository.
terytkon
parents:
diff
changeset
|
57 |
$text .= " SetOutPath \"\$INSTDIR\\svg\"\n"; |
b538b70cbe51
Move rest of the swconfigmdw package components to oss repository.
terytkon
parents:
diff
changeset
|
58 |
$text .= " SetOverwrite try\n"; |
b538b70cbe51
Move rest of the swconfigmdw package components to oss repository.
terytkon
parents:
diff
changeset
|
59 |
opendir DIR, "$depDir\\$directory" or die "Directory $depDir\\$directory doesn't exist...\n"; |
b538b70cbe51
Move rest of the swconfigmdw package components to oss repository.
terytkon
parents:
diff
changeset
|
60 |
my @files = readdir DIR; |
b538b70cbe51
Move rest of the swconfigmdw package components to oss repository.
terytkon
parents:
diff
changeset
|
61 |
closedir DIR; |
b538b70cbe51
Move rest of the swconfigmdw package components to oss repository.
terytkon
parents:
diff
changeset
|
62 |
foreach my $file (@files) |
b538b70cbe51
Move rest of the swconfigmdw package components to oss repository.
terytkon
parents:
diff
changeset
|
63 |
{ |
b538b70cbe51
Move rest of the swconfigmdw package components to oss repository.
terytkon
parents:
diff
changeset
|
64 |
#next if $file =~ m/^\.+$/; |
b538b70cbe51
Move rest of the swconfigmdw package components to oss repository.
terytkon
parents:
diff
changeset
|
65 |
#next if -d $file; # no sub-directories need installing |
b538b70cbe51
Move rest of the swconfigmdw package components to oss repository.
terytkon
parents:
diff
changeset
|
66 |
#next if lc $file eq "drawsvg.pl"; # .pl script goes in the root of installation (covered above). |
b538b70cbe51
Move rest of the swconfigmdw package components to oss repository.
terytkon
parents:
diff
changeset
|
67 |
|
b538b70cbe51
Move rest of the swconfigmdw package components to oss repository.
terytkon
parents:
diff
changeset
|
68 |
# only install the .pm, .xsl, .xml, .ini and .policy files |
b538b70cbe51
Move rest of the swconfigmdw package components to oss repository.
terytkon
parents:
diff
changeset
|
69 |
next if lc $file !~ m/\.xsl$/ and |
b538b70cbe51
Move rest of the swconfigmdw package components to oss repository.
terytkon
parents:
diff
changeset
|
70 |
lc $file !~ m/\.xml$/ and |
b538b70cbe51
Move rest of the swconfigmdw package components to oss repository.
terytkon
parents:
diff
changeset
|
71 |
lc $file !~ m/\.pm$/ and |
b538b70cbe51
Move rest of the swconfigmdw package components to oss repository.
terytkon
parents:
diff
changeset
|
72 |
lc $file !~ m/\.ini$/ and |
b538b70cbe51
Move rest of the swconfigmdw package components to oss repository.
terytkon
parents:
diff
changeset
|
73 |
lc $file !~ m/\.policy$/; |
b538b70cbe51
Move rest of the swconfigmdw package components to oss repository.
terytkon
parents:
diff
changeset
|
74 |
|
b538b70cbe51
Move rest of the swconfigmdw package components to oss repository.
terytkon
parents:
diff
changeset
|
75 |
$text .= " File \"$depDir\\$directory\\$file\"\n"; |
b538b70cbe51
Move rest of the swconfigmdw package components to oss repository.
terytkon
parents:
diff
changeset
|
76 |
push @filesToUnistall, "svg\\$file"; |
b538b70cbe51
Move rest of the swconfigmdw package components to oss repository.
terytkon
parents:
diff
changeset
|
77 |
} |
b538b70cbe51
Move rest of the swconfigmdw package components to oss repository.
terytkon
parents:
diff
changeset
|
78 |
$text .= "\n"; |
b538b70cbe51
Move rest of the swconfigmdw package components to oss repository.
terytkon
parents:
diff
changeset
|
79 |
push @dirsToUnistall, "svg"; |
b538b70cbe51
Move rest of the swconfigmdw package components to oss repository.
terytkon
parents:
diff
changeset
|
80 |
|
b538b70cbe51
Move rest of the swconfigmdw package components to oss repository.
terytkon
parents:
diff
changeset
|
81 |
# now copy the common files: |
b538b70cbe51
Move rest of the swconfigmdw package components to oss repository.
terytkon
parents:
diff
changeset
|
82 |
$directory = "src\\common"; |
b538b70cbe51
Move rest of the swconfigmdw package components to oss repository.
terytkon
parents:
diff
changeset
|
83 |
$text .= " SetOutPath \"\$INSTDIR\\common\"\n"; |
b538b70cbe51
Move rest of the swconfigmdw package components to oss repository.
terytkon
parents:
diff
changeset
|
84 |
$text .= " SetOverwrite try\n"; |
b538b70cbe51
Move rest of the swconfigmdw package components to oss repository.
terytkon
parents:
diff
changeset
|
85 |
@files = ("DepConstants.pm", "Logger.pm", "LogItem.pm", "distribution.policy"); |
b538b70cbe51
Move rest of the swconfigmdw package components to oss repository.
terytkon
parents:
diff
changeset
|
86 |
foreach my $file (@files) |
b538b70cbe51
Move rest of the swconfigmdw package components to oss repository.
terytkon
parents:
diff
changeset
|
87 |
{ |
b538b70cbe51
Move rest of the swconfigmdw package components to oss repository.
terytkon
parents:
diff
changeset
|
88 |
$text .= " File \"$depDir\\$directory\\$file\"\n"; |
b538b70cbe51
Move rest of the swconfigmdw package components to oss repository.
terytkon
parents:
diff
changeset
|
89 |
push @filesToUnistall, "common\\$file"; |
b538b70cbe51
Move rest of the swconfigmdw package components to oss repository.
terytkon
parents:
diff
changeset
|
90 |
} |
b538b70cbe51
Move rest of the swconfigmdw package components to oss repository.
terytkon
parents:
diff
changeset
|
91 |
$text .= "\n"; |
b538b70cbe51
Move rest of the swconfigmdw package components to oss repository.
terytkon
parents:
diff
changeset
|
92 |
push @dirsToUnistall, "common"; |
b538b70cbe51
Move rest of the swconfigmdw package components to oss repository.
terytkon
parents:
diff
changeset
|
93 |
|
b538b70cbe51
Move rest of the swconfigmdw package components to oss repository.
terytkon
parents:
diff
changeset
|
94 |
$directory = "resources\\installed\\Xalan"; |
b538b70cbe51
Move rest of the swconfigmdw package components to oss repository.
terytkon
parents:
diff
changeset
|
95 |
$text .= " SetOutPath \"\$INSTDIR\\resources\\installed\\Xalan\"\n"; |
b538b70cbe51
Move rest of the swconfigmdw package components to oss repository.
terytkon
parents:
diff
changeset
|
96 |
$text .= " SetOverwrite try\n"; |
b538b70cbe51
Move rest of the swconfigmdw package components to oss repository.
terytkon
parents:
diff
changeset
|
97 |
opendir DIR, "$depDir\\$directory" or die "Directory $depDir\\$directory doesn't exist...\n"; |
b538b70cbe51
Move rest of the swconfigmdw package components to oss repository.
terytkon
parents:
diff
changeset
|
98 |
my @files = readdir DIR; |
b538b70cbe51
Move rest of the swconfigmdw package components to oss repository.
terytkon
parents:
diff
changeset
|
99 |
closedir DIR; |
b538b70cbe51
Move rest of the swconfigmdw package components to oss repository.
terytkon
parents:
diff
changeset
|
100 |
foreach my $file (@files) |
b538b70cbe51
Move rest of the swconfigmdw package components to oss repository.
terytkon
parents:
diff
changeset
|
101 |
{ |
b538b70cbe51
Move rest of the swconfigmdw package components to oss repository.
terytkon
parents:
diff
changeset
|
102 |
next if $file =~ m/^\.+$/; |
b538b70cbe51
Move rest of the swconfigmdw package components to oss repository.
terytkon
parents:
diff
changeset
|
103 |
next if -d $file; # no sub-directories need installing |
b538b70cbe51
Move rest of the swconfigmdw package components to oss repository.
terytkon
parents:
diff
changeset
|
104 |
$text .= " File \"$depDir\\$directory\\$file\"\n"; |
b538b70cbe51
Move rest of the swconfigmdw package components to oss repository.
terytkon
parents:
diff
changeset
|
105 |
push @filesToUnistall, "$directory\\$file"; |
b538b70cbe51
Move rest of the swconfigmdw package components to oss repository.
terytkon
parents:
diff
changeset
|
106 |
} |
b538b70cbe51
Move rest of the swconfigmdw package components to oss repository.
terytkon
parents:
diff
changeset
|
107 |
$text .= "\n"; |
b538b70cbe51
Move rest of the swconfigmdw package components to oss repository.
terytkon
parents:
diff
changeset
|
108 |
|
b538b70cbe51
Move rest of the swconfigmdw package components to oss repository.
terytkon
parents:
diff
changeset
|
109 |
# now copy the common files: |
b538b70cbe51
Move rest of the swconfigmdw package components to oss repository.
terytkon
parents:
diff
changeset
|
110 |
$directory = "resources\\auxiliary"; |
b538b70cbe51
Move rest of the swconfigmdw package components to oss repository.
terytkon
parents:
diff
changeset
|
111 |
$text .= " SetOutPath \"\$INSTDIR\\resources\\auxiliary\"\n"; |
b538b70cbe51
Move rest of the swconfigmdw package components to oss repository.
terytkon
parents:
diff
changeset
|
112 |
$text .= " SetOverwrite try\n"; |
b538b70cbe51
Move rest of the swconfigmdw package components to oss repository.
terytkon
parents:
diff
changeset
|
113 |
opendir DIR, "$depDir\\$directory" or die "Directory $depDir\\$directory doesn't exist...\n"; |
b538b70cbe51
Move rest of the swconfigmdw package components to oss repository.
terytkon
parents:
diff
changeset
|
114 |
my @files = readdir DIR; |
b538b70cbe51
Move rest of the swconfigmdw package components to oss repository.
terytkon
parents:
diff
changeset
|
115 |
closedir DIR; |
b538b70cbe51
Move rest of the swconfigmdw package components to oss repository.
terytkon
parents:
diff
changeset
|
116 |
foreach my $file (@files) |
b538b70cbe51
Move rest of the swconfigmdw package components to oss repository.
terytkon
parents:
diff
changeset
|
117 |
{ |
b538b70cbe51
Move rest of the swconfigmdw package components to oss repository.
terytkon
parents:
diff
changeset
|
118 |
next if $file =~ m/^\.+$/; |
b538b70cbe51
Move rest of the swconfigmdw package components to oss repository.
terytkon
parents:
diff
changeset
|
119 |
next if -d $file; # no sub-directories need installing |
b538b70cbe51
Move rest of the swconfigmdw package components to oss repository.
terytkon
parents:
diff
changeset
|
120 |
$text .= " File \"$depDir\\$directory\\$file\"\n"; |
b538b70cbe51
Move rest of the swconfigmdw package components to oss repository.
terytkon
parents:
diff
changeset
|
121 |
push @filesToUnistall, "$directory\\$file"; |
b538b70cbe51
Move rest of the swconfigmdw package components to oss repository.
terytkon
parents:
diff
changeset
|
122 |
} |
b538b70cbe51
Move rest of the swconfigmdw package components to oss repository.
terytkon
parents:
diff
changeset
|
123 |
$text .= "\n"; |
b538b70cbe51
Move rest of the swconfigmdw package components to oss repository.
terytkon
parents:
diff
changeset
|
124 |
|
b538b70cbe51
Move rest of the swconfigmdw package components to oss repository.
terytkon
parents:
diff
changeset
|
125 |
# remember all the resource directories for deletion: |
b538b70cbe51
Move rest of the swconfigmdw package components to oss repository.
terytkon
parents:
diff
changeset
|
126 |
push @dirsToUnistall, "resources\\installed\\Xalan"; |
b538b70cbe51
Move rest of the swconfigmdw package components to oss repository.
terytkon
parents:
diff
changeset
|
127 |
push @dirsToUnistall, "resources\\installed"; |
b538b70cbe51
Move rest of the swconfigmdw package components to oss repository.
terytkon
parents:
diff
changeset
|
128 |
push @dirsToUnistall, "resources\\auxiliary"; |
b538b70cbe51
Move rest of the swconfigmdw package components to oss repository.
terytkon
parents:
diff
changeset
|
129 |
push @dirsToUnistall, "resources"; |
b538b70cbe51
Move rest of the swconfigmdw package components to oss repository.
terytkon
parents:
diff
changeset
|
130 |
|
b538b70cbe51
Move rest of the swconfigmdw package components to oss repository.
terytkon
parents:
diff
changeset
|
131 |
# finally the documentation: |
b538b70cbe51
Move rest of the swconfigmdw package components to oss repository.
terytkon
parents:
diff
changeset
|
132 |
$directory = "docs"; |
b538b70cbe51
Move rest of the swconfigmdw package components to oss repository.
terytkon
parents:
diff
changeset
|
133 |
$text .= " SetOutPath \"\$INSTDIR\\docs\"\n"; |
b538b70cbe51
Move rest of the swconfigmdw package components to oss repository.
terytkon
parents:
diff
changeset
|
134 |
$text .= " SetOverwrite try\n"; |
b538b70cbe51
Move rest of the swconfigmdw package components to oss repository.
terytkon
parents:
diff
changeset
|
135 |
@files = ("Building the System Model.doc", "distribution.policy", "dep.css", "sample_drawsvg.ini", "SystemModelToolkitInstaller_main.jpg", "user_guide_system_model_toolkit.html"); |
b538b70cbe51
Move rest of the swconfigmdw package components to oss repository.
terytkon
parents:
diff
changeset
|
136 |
foreach my $file (@files) |
b538b70cbe51
Move rest of the swconfigmdw package components to oss repository.
terytkon
parents:
diff
changeset
|
137 |
{ |
b538b70cbe51
Move rest of the swconfigmdw package components to oss repository.
terytkon
parents:
diff
changeset
|
138 |
$text .= " File \"$depDir\\$directory\\$file\"\n"; |
b538b70cbe51
Move rest of the swconfigmdw package components to oss repository.
terytkon
parents:
diff
changeset
|
139 |
push @filesToUnistall, "docs\\$file"; |
b538b70cbe51
Move rest of the swconfigmdw package components to oss repository.
terytkon
parents:
diff
changeset
|
140 |
} |
b538b70cbe51
Move rest of the swconfigmdw package components to oss repository.
terytkon
parents:
diff
changeset
|
141 |
$text .= "\n"; |
b538b70cbe51
Move rest of the swconfigmdw package components to oss repository.
terytkon
parents:
diff
changeset
|
142 |
push @dirsToUnistall, "docs"; |
b538b70cbe51
Move rest of the swconfigmdw package components to oss repository.
terytkon
parents:
diff
changeset
|
143 |
|
b538b70cbe51
Move rest of the swconfigmdw package components to oss repository.
terytkon
parents:
diff
changeset
|
144 |
$text .= "\nSectionEnd\n;-------------------------------------------------------\n\n"; |
b538b70cbe51
Move rest of the swconfigmdw package components to oss repository.
terytkon
parents:
diff
changeset
|
145 |
return $text; |
b538b70cbe51
Move rest of the swconfigmdw package components to oss repository.
terytkon
parents:
diff
changeset
|
146 |
} |
b538b70cbe51
Move rest of the swconfigmdw package components to oss repository.
terytkon
parents:
diff
changeset
|
147 |
|
b538b70cbe51
Move rest of the swconfigmdw package components to oss repository.
terytkon
parents:
diff
changeset
|
148 |
sub UninstallationTextSection() |
b538b70cbe51
Move rest of the swconfigmdw package components to oss repository.
terytkon
parents:
diff
changeset
|
149 |
{ |
b538b70cbe51
Move rest of the swconfigmdw package components to oss repository.
terytkon
parents:
diff
changeset
|
150 |
my $text = "\n;--------------------------- UNISTALL SECTION ---------------------------\nSection Uninstall\n\n"; |
b538b70cbe51
Move rest of the swconfigmdw package components to oss repository.
terytkon
parents:
diff
changeset
|
151 |
$text .= " Delete \"\$INSTDIR\\uninst.exe\"\n"; |
b538b70cbe51
Move rest of the swconfigmdw package components to oss repository.
terytkon
parents:
diff
changeset
|
152 |
|
b538b70cbe51
Move rest of the swconfigmdw package components to oss repository.
terytkon
parents:
diff
changeset
|
153 |
foreach $file (@filesToUnistall) |
b538b70cbe51
Move rest of the swconfigmdw package components to oss repository.
terytkon
parents:
diff
changeset
|
154 |
{ |
b538b70cbe51
Move rest of the swconfigmdw package components to oss repository.
terytkon
parents:
diff
changeset
|
155 |
$text .= " Delete \"\$INSTDIR\\$file\"\n"; |
b538b70cbe51
Move rest of the swconfigmdw package components to oss repository.
terytkon
parents:
diff
changeset
|
156 |
} |
b538b70cbe51
Move rest of the swconfigmdw package components to oss repository.
terytkon
parents:
diff
changeset
|
157 |
|
b538b70cbe51
Move rest of the swconfigmdw package components to oss repository.
terytkon
parents:
diff
changeset
|
158 |
$text .= "\n"; |
b538b70cbe51
Move rest of the swconfigmdw package components to oss repository.
terytkon
parents:
diff
changeset
|
159 |
foreach $directory (@dirsToUnistall) |
b538b70cbe51
Move rest of the swconfigmdw package components to oss repository.
terytkon
parents:
diff
changeset
|
160 |
{ |
b538b70cbe51
Move rest of the swconfigmdw package components to oss repository.
terytkon
parents:
diff
changeset
|
161 |
$text .= " RMDir \"\$INSTDIR\\$directory\"\n"; |
b538b70cbe51
Move rest of the swconfigmdw package components to oss repository.
terytkon
parents:
diff
changeset
|
162 |
} |
b538b70cbe51
Move rest of the swconfigmdw package components to oss repository.
terytkon
parents:
diff
changeset
|
163 |
|
b538b70cbe51
Move rest of the swconfigmdw package components to oss repository.
terytkon
parents:
diff
changeset
|
164 |
$text .= <<TEXT; |
b538b70cbe51
Move rest of the swconfigmdw package components to oss repository.
terytkon
parents:
diff
changeset
|
165 |
RMDir "\$INSTDIR" |
b538b70cbe51
Move rest of the swconfigmdw package components to oss repository.
terytkon
parents:
diff
changeset
|
166 |
|
b538b70cbe51
Move rest of the swconfigmdw package components to oss repository.
terytkon
parents:
diff
changeset
|
167 |
DeleteRegKey \${PRODUCT_UNINST_ROOT_KEY} "\${PRODUCT_UNINST_KEY}" |
b538b70cbe51
Move rest of the swconfigmdw package components to oss repository.
terytkon
parents:
diff
changeset
|
168 |
SetAutoClose true |
b538b70cbe51
Move rest of the swconfigmdw package components to oss repository.
terytkon
parents:
diff
changeset
|
169 |
SectionEnd |
b538b70cbe51
Move rest of the swconfigmdw package components to oss repository.
terytkon
parents:
diff
changeset
|
170 |
;------------------------------------------------------- |
b538b70cbe51
Move rest of the swconfigmdw package components to oss repository.
terytkon
parents:
diff
changeset
|
171 |
|
b538b70cbe51
Move rest of the swconfigmdw package components to oss repository.
terytkon
parents:
diff
changeset
|
172 |
|
b538b70cbe51
Move rest of the swconfigmdw package components to oss repository.
terytkon
parents:
diff
changeset
|
173 |
TEXT |
b538b70cbe51
Move rest of the swconfigmdw package components to oss repository.
terytkon
parents:
diff
changeset
|
174 |
return $text; |
b538b70cbe51
Move rest of the swconfigmdw package components to oss repository.
terytkon
parents:
diff
changeset
|
175 |
} |
b538b70cbe51
Move rest of the swconfigmdw package components to oss repository.
terytkon
parents:
diff
changeset
|
176 |
|
b538b70cbe51
Move rest of the swconfigmdw package components to oss repository.
terytkon
parents:
diff
changeset
|
177 |
sub Header() |
b538b70cbe51
Move rest of the swconfigmdw package components to oss repository.
terytkon
parents:
diff
changeset
|
178 |
{ |
b538b70cbe51
Move rest of the swconfigmdw package components to oss repository.
terytkon
parents:
diff
changeset
|
179 |
return <<TEXT; |
b538b70cbe51
Move rest of the swconfigmdw package components to oss repository.
terytkon
parents:
diff
changeset
|
180 |
|
b538b70cbe51
Move rest of the swconfigmdw package components to oss repository.
terytkon
parents:
diff
changeset
|
181 |
; Script generated by the HM NIS Edit Script Wizard. |
b538b70cbe51
Move rest of the swconfigmdw package components to oss repository.
terytkon
parents:
diff
changeset
|
182 |
|
b538b70cbe51
Move rest of the swconfigmdw package components to oss repository.
terytkon
parents:
diff
changeset
|
183 |
; HM NIS Edit Wizard helper defines |
b538b70cbe51
Move rest of the swconfigmdw package components to oss repository.
terytkon
parents:
diff
changeset
|
184 |
!define PRODUCT_NAME "$productName" |
b538b70cbe51
Move rest of the swconfigmdw package components to oss repository.
terytkon
parents:
diff
changeset
|
185 |
!define PRODUCT_VERSION "$productVersion" |
b538b70cbe51
Move rest of the swconfigmdw package components to oss repository.
terytkon
parents:
diff
changeset
|
186 |
!define PRODUCT_PUBLISHER "Symbian Software Ltd" |
b538b70cbe51
Move rest of the swconfigmdw package components to oss repository.
terytkon
parents:
diff
changeset
|
187 |
!define PRODUCT_WEB_SITE "http://www.symbian.com" |
b538b70cbe51
Move rest of the swconfigmdw package components to oss repository.
terytkon
parents:
diff
changeset
|
188 |
!define PRODUCT_UNINST_KEY "Software\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\\${PRODUCT_NAME}" |
b538b70cbe51
Move rest of the swconfigmdw package components to oss repository.
terytkon
parents:
diff
changeset
|
189 |
!define PRODUCT_UNINST_ROOT_KEY "HKLM" |
b538b70cbe51
Move rest of the swconfigmdw package components to oss repository.
terytkon
parents:
diff
changeset
|
190 |
|
b538b70cbe51
Move rest of the swconfigmdw package components to oss repository.
terytkon
parents:
diff
changeset
|
191 |
; MUI 1.67 compatible ------ |
b538b70cbe51
Move rest of the swconfigmdw package components to oss repository.
terytkon
parents:
diff
changeset
|
192 |
!include "MUI.nsh" |
b538b70cbe51
Move rest of the swconfigmdw package components to oss repository.
terytkon
parents:
diff
changeset
|
193 |
|
b538b70cbe51
Move rest of the swconfigmdw package components to oss repository.
terytkon
parents:
diff
changeset
|
194 |
; MUI Settings |
b538b70cbe51
Move rest of the swconfigmdw package components to oss repository.
terytkon
parents:
diff
changeset
|
195 |
!define MUI_ABORTWARNING |
b538b70cbe51
Move rest of the swconfigmdw package components to oss repository.
terytkon
parents:
diff
changeset
|
196 |
!define MUI_ICON "\${NSISDIR}\\Contrib\\Graphics\\Icons\\modern-install-full.ico" |
b538b70cbe51
Move rest of the swconfigmdw package components to oss repository.
terytkon
parents:
diff
changeset
|
197 |
!define MUI_UNICON "\${NSISDIR}\\Contrib\\Graphics\\Icons\\modern-uninstall-full.ico" |
b538b70cbe51
Move rest of the swconfigmdw package components to oss repository.
terytkon
parents:
diff
changeset
|
198 |
|
b538b70cbe51
Move rest of the swconfigmdw package components to oss repository.
terytkon
parents:
diff
changeset
|
199 |
; Welcome page |
b538b70cbe51
Move rest of the swconfigmdw package components to oss repository.
terytkon
parents:
diff
changeset
|
200 |
!define MUI_WELCOMEPAGE_TEXT "This wizard will guide you through the installation of $productName $productVersion\\n\\nClick Next to continue..." |
b538b70cbe51
Move rest of the swconfigmdw package components to oss repository.
terytkon
parents:
diff
changeset
|
201 |
!insertmacro MUI_PAGE_WELCOME |
b538b70cbe51
Move rest of the swconfigmdw package components to oss repository.
terytkon
parents:
diff
changeset
|
202 |
; License page |
b538b70cbe51
Move rest of the swconfigmdw package components to oss repository.
terytkon
parents:
diff
changeset
|
203 |
!define MUI_LICENSEPAGE_CHECKBOX |
b538b70cbe51
Move rest of the swconfigmdw package components to oss repository.
terytkon
parents:
diff
changeset
|
204 |
!insertmacro MUI_PAGE_LICENSE "license.txt" |
b538b70cbe51
Move rest of the swconfigmdw package components to oss repository.
terytkon
parents:
diff
changeset
|
205 |
; Directory page |
b538b70cbe51
Move rest of the swconfigmdw package components to oss repository.
terytkon
parents:
diff
changeset
|
206 |
!insertmacro MUI_PAGE_DIRECTORY |
b538b70cbe51
Move rest of the swconfigmdw package components to oss repository.
terytkon
parents:
diff
changeset
|
207 |
; Instfiles page |
b538b70cbe51
Move rest of the swconfigmdw package components to oss repository.
terytkon
parents:
diff
changeset
|
208 |
!insertmacro MUI_PAGE_INSTFILES |
b538b70cbe51
Move rest of the swconfigmdw package components to oss repository.
terytkon
parents:
diff
changeset
|
209 |
; Finish page |
b538b70cbe51
Move rest of the swconfigmdw package components to oss repository.
terytkon
parents:
diff
changeset
|
210 |
!insertmacro MUI_PAGE_FINISH |
b538b70cbe51
Move rest of the swconfigmdw package components to oss repository.
terytkon
parents:
diff
changeset
|
211 |
|
b538b70cbe51
Move rest of the swconfigmdw package components to oss repository.
terytkon
parents:
diff
changeset
|
212 |
; Uninstaller pages |
b538b70cbe51
Move rest of the swconfigmdw package components to oss repository.
terytkon
parents:
diff
changeset
|
213 |
!insertmacro MUI_UNPAGE_INSTFILES |
b538b70cbe51
Move rest of the swconfigmdw package components to oss repository.
terytkon
parents:
diff
changeset
|
214 |
|
b538b70cbe51
Move rest of the swconfigmdw package components to oss repository.
terytkon
parents:
diff
changeset
|
215 |
; Language files |
b538b70cbe51
Move rest of the swconfigmdw package components to oss repository.
terytkon
parents:
diff
changeset
|
216 |
!insertmacro MUI_LANGUAGE "English" |
b538b70cbe51
Move rest of the swconfigmdw package components to oss repository.
terytkon
parents:
diff
changeset
|
217 |
|
b538b70cbe51
Move rest of the swconfigmdw package components to oss repository.
terytkon
parents:
diff
changeset
|
218 |
; MUI end ------ |
b538b70cbe51
Move rest of the swconfigmdw package components to oss repository.
terytkon
parents:
diff
changeset
|
219 |
|
b538b70cbe51
Move rest of the swconfigmdw package components to oss repository.
terytkon
parents:
diff
changeset
|
220 |
Name "\${PRODUCT_NAME} \${PRODUCT_VERSION}" |
b538b70cbe51
Move rest of the swconfigmdw package components to oss repository.
terytkon
parents:
diff
changeset
|
221 |
OutFile "SystemModelToolkitInstaller.exe" |
b538b70cbe51
Move rest of the swconfigmdw package components to oss repository.
terytkon
parents:
diff
changeset
|
222 |
InstallDir "D:\\SystemModelToolkit" |
b538b70cbe51
Move rest of the swconfigmdw package components to oss repository.
terytkon
parents:
diff
changeset
|
223 |
InstallDirRegKey HKLM "\${PRODUCT_DIR_REGKEY}" "" |
b538b70cbe51
Move rest of the swconfigmdw package components to oss repository.
terytkon
parents:
diff
changeset
|
224 |
ShowInstDetails show |
b538b70cbe51
Move rest of the swconfigmdw package components to oss repository.
terytkon
parents:
diff
changeset
|
225 |
ShowUnInstDetails show |
b538b70cbe51
Move rest of the swconfigmdw package components to oss repository.
terytkon
parents:
diff
changeset
|
226 |
|
b538b70cbe51
Move rest of the swconfigmdw package components to oss repository.
terytkon
parents:
diff
changeset
|
227 |
TEXT |
b538b70cbe51
Move rest of the swconfigmdw package components to oss repository.
terytkon
parents:
diff
changeset
|
228 |
} |
b538b70cbe51
Move rest of the swconfigmdw package components to oss repository.
terytkon
parents:
diff
changeset
|
229 |
|
b538b70cbe51
Move rest of the swconfigmdw package components to oss repository.
terytkon
parents:
diff
changeset
|
230 |
sub Middle() |
b538b70cbe51
Move rest of the swconfigmdw package components to oss repository.
terytkon
parents:
diff
changeset
|
231 |
{ |
b538b70cbe51
Move rest of the swconfigmdw package components to oss repository.
terytkon
parents:
diff
changeset
|
232 |
return <<TEXT; |
b538b70cbe51
Move rest of the swconfigmdw package components to oss repository.
terytkon
parents:
diff
changeset
|
233 |
|
b538b70cbe51
Move rest of the swconfigmdw package components to oss repository.
terytkon
parents:
diff
changeset
|
234 |
Section -Post |
b538b70cbe51
Move rest of the swconfigmdw package components to oss repository.
terytkon
parents:
diff
changeset
|
235 |
WriteUninstaller "\$INSTDIR\\uninst.exe" |
b538b70cbe51
Move rest of the swconfigmdw package components to oss repository.
terytkon
parents:
diff
changeset
|
236 |
WriteRegStr \${PRODUCT_UNINST_ROOT_KEY} "\${PRODUCT_UNINST_KEY}" "DisplayName" "\$(^Name)" |
b538b70cbe51
Move rest of the swconfigmdw package components to oss repository.
terytkon
parents:
diff
changeset
|
237 |
WriteRegStr \${PRODUCT_UNINST_ROOT_KEY} "\${PRODUCT_UNINST_KEY}" "UninstallString" "\$INSTDIR\\uninst.exe" |
b538b70cbe51
Move rest of the swconfigmdw package components to oss repository.
terytkon
parents:
diff
changeset
|
238 |
WriteRegStr \${PRODUCT_UNINST_ROOT_KEY} "\${PRODUCT_UNINST_KEY}" "DisplayVersion" "\${PRODUCT_VERSION}" |
b538b70cbe51
Move rest of the swconfigmdw package components to oss repository.
terytkon
parents:
diff
changeset
|
239 |
WriteRegStr \${PRODUCT_UNINST_ROOT_KEY} "\${PRODUCT_UNINST_KEY}" "URLInfoAbout" "\${PRODUCT_WEB_SITE}" |
b538b70cbe51
Move rest of the swconfigmdw package components to oss repository.
terytkon
parents:
diff
changeset
|
240 |
WriteRegStr \${PRODUCT_UNINST_ROOT_KEY} "\${PRODUCT_UNINST_KEY}" "Publisher" "\${PRODUCT_PUBLISHER}" |
b538b70cbe51
Move rest of the swconfigmdw package components to oss repository.
terytkon
parents:
diff
changeset
|
241 |
SectionEnd |
b538b70cbe51
Move rest of the swconfigmdw package components to oss repository.
terytkon
parents:
diff
changeset
|
242 |
|
b538b70cbe51
Move rest of the swconfigmdw package components to oss repository.
terytkon
parents:
diff
changeset
|
243 |
|
b538b70cbe51
Move rest of the swconfigmdw package components to oss repository.
terytkon
parents:
diff
changeset
|
244 |
Function un.onUninstSuccess |
b538b70cbe51
Move rest of the swconfigmdw package components to oss repository.
terytkon
parents:
diff
changeset
|
245 |
HideWindow |
b538b70cbe51
Move rest of the swconfigmdw package components to oss repository.
terytkon
parents:
diff
changeset
|
246 |
MessageBox MB_ICONINFORMATION|MB_OK "\$(^Name) was successfully removed from your computer." |
b538b70cbe51
Move rest of the swconfigmdw package components to oss repository.
terytkon
parents:
diff
changeset
|
247 |
FunctionEnd |
b538b70cbe51
Move rest of the swconfigmdw package components to oss repository.
terytkon
parents:
diff
changeset
|
248 |
|
b538b70cbe51
Move rest of the swconfigmdw package components to oss repository.
terytkon
parents:
diff
changeset
|
249 |
Function un.onInit |
b538b70cbe51
Move rest of the swconfigmdw package components to oss repository.
terytkon
parents:
diff
changeset
|
250 |
MessageBox MB_ICONQUESTION|MB_YESNO|MB_DEFBUTTON2 "Are you sure you want to completely remove \$(^Name) and all of its components?" IDYES +2 |
b538b70cbe51
Move rest of the swconfigmdw package components to oss repository.
terytkon
parents:
diff
changeset
|
251 |
Abort |
b538b70cbe51
Move rest of the swconfigmdw package components to oss repository.
terytkon
parents:
diff
changeset
|
252 |
FunctionEnd |
b538b70cbe51
Move rest of the swconfigmdw package components to oss repository.
terytkon
parents:
diff
changeset
|
253 |
|
b538b70cbe51
Move rest of the swconfigmdw package components to oss repository.
terytkon
parents:
diff
changeset
|
254 |
TEXT |
b538b70cbe51
Move rest of the swconfigmdw package components to oss repository.
terytkon
parents:
diff
changeset
|
255 |
} |
b538b70cbe51
Move rest of the swconfigmdw package components to oss repository.
terytkon
parents:
diff
changeset
|
256 |
|
b538b70cbe51
Move rest of the swconfigmdw package components to oss repository.
terytkon
parents:
diff
changeset
|
257 |
exit; |