diff options
author | lbsa71 | 2007-11-14 11:22:01 +0000 |
---|---|---|
committer | lbsa71 | 2007-11-14 11:22:01 +0000 |
commit | 61b301cbcdd7e4eab38993f25942a715f69dc966 (patch) | |
tree | 616b408ffa2e958e11ced577af29477a82905121 /OpenSim/Tools | |
parent | removed duplicate cloud.jp2 from bin directory (diff) | |
download | opensim-SC-61b301cbcdd7e4eab38993f25942a715f69dc966.zip opensim-SC-61b301cbcdd7e4eab38993f25942a715f69dc966.tar.gz opensim-SC-61b301cbcdd7e4eab38993f25942a715f69dc966.tar.bz2 opensim-SC-61b301cbcdd7e4eab38993f25942a715f69dc966.tar.xz |
* moved outer tool dir into inner tool dir
Diffstat (limited to 'OpenSim/Tools')
-rw-r--r-- | OpenSim/Tools/Windows/Installer/LICENSE.txt | 25 | ||||
-rw-r--r-- | OpenSim/Tools/Windows/Installer/OpenSim.nsi | 151 | ||||
-rwxr-xr-x | OpenSim/Tools/classaudit.pl | 133 |
3 files changed, 309 insertions, 0 deletions
diff --git a/OpenSim/Tools/Windows/Installer/LICENSE.txt b/OpenSim/Tools/Windows/Installer/LICENSE.txt new file mode 100644 index 0000000..6ad7705 --- /dev/null +++ b/OpenSim/Tools/Windows/Installer/LICENSE.txt | |||
@@ -0,0 +1,25 @@ | |||
1 | Copyright (c) Contributors, http://opensimulator.org/ | ||
2 | See CONTRIBUTORS.TXT for a full list of copyright holders. | ||
3 | |||
4 | Redistribution and use in source and binary forms, with or without | ||
5 | modification, are permitted provided that the following conditions are met: | ||
6 | * Redistributions of source code must retain the above copyright | ||
7 | notice, this list of conditions and the following disclaimer. | ||
8 | * Redistributions in binary form must reproduce the above copyright | ||
9 | notice, this list of conditions and the following disclaimer in the | ||
10 | documentation and/or other materials provided with the distribution. | ||
11 | * Neither the name of the OpenSim Project nor the | ||
12 | names of its contributors may be used to endorse or promote products | ||
13 | derived from this software without specific prior written permission. | ||
14 | |||
15 | THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS AND ANY EXPRESS OR | ||
16 | IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED | ||
17 | WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE | ||
18 | DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY | ||
19 | DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL | ||
20 | DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE | ||
21 | GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS | ||
22 | INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER | ||
23 | IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR | ||
24 | OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF | ||
25 | ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | ||
diff --git a/OpenSim/Tools/Windows/Installer/OpenSim.nsi b/OpenSim/Tools/Windows/Installer/OpenSim.nsi new file mode 100644 index 0000000..d1df7ba --- /dev/null +++ b/OpenSim/Tools/Windows/Installer/OpenSim.nsi | |||
@@ -0,0 +1,151 @@ | |||
1 | !include "MUI.nsh" | ||
2 | |||
3 | Name "OpenSim" | ||
4 | OutFile "OpenSim Setup 0.4.exe" | ||
5 | |||
6 | CRCCheck On | ||
7 | |||
8 | InstallDir "$PROGRAMFILES\OpenSim" | ||
9 | InstallDirRegKey HKCU "Software\OpenSim" "" | ||
10 | |||
11 | ;Vista redirects $SMPROGRAMS to all users without this | ||
12 | RequestExecutionLevel admin | ||
13 | |||
14 | Var MUI_TEMP | ||
15 | Var STARTMENU_FOLDER | ||
16 | |||
17 | !define MUI_LANGDLL_REGISTRY_ROOT "HKCU" | ||
18 | !define MUI_LANGDLL_REGISTRY_KEY "Software\OpenSim" | ||
19 | !define MUI_LANGDLL_REGISTRY_VALUENAME "Installer Language" | ||
20 | |||
21 | !define MUI_ABORTWARNING | ||
22 | |||
23 | !insertmacro MUI_PAGE_WELCOME | ||
24 | !insertmacro MUI_PAGE_LICENSE "LICENSE.txt" | ||
25 | !insertmacro MUI_PAGE_DIRECTORY | ||
26 | |||
27 | !define MUI_STARTMENUPAGE_REGISTRY_ROOT "HKCU" | ||
28 | !define MUI_STARTMENUPAGE_REGISTRY_KEY "Software\OpenSim" | ||
29 | !define MUI_STARTMENUPAGE_REGISTRY_VALUENAME "Start Menu Folder" | ||
30 | |||
31 | !insertmacro MUI_PAGE_STARTMENU Application $STARTMENU_FOLDER | ||
32 | |||
33 | !insertmacro MUI_PAGE_INSTFILES | ||
34 | !insertmacro MUI_PAGE_FINISH | ||
35 | |||
36 | !insertmacro MUI_UNPAGE_WELCOME | ||
37 | !insertmacro MUI_UNPAGE_CONFIRM | ||
38 | !insertmacro MUI_UNPAGE_INSTFILES | ||
39 | !insertmacro MUI_UNPAGE_FINISH | ||
40 | |||
41 | !insertmacro MUI_LANGUAGE "English" | ||
42 | !insertmacro MUI_LANGUAGE "French" | ||
43 | !insertmacro MUI_LANGUAGE "German" | ||
44 | !insertmacro MUI_LANGUAGE "Spanish" | ||
45 | !insertmacro MUI_LANGUAGE "SpanishInternational" | ||
46 | !insertmacro MUI_LANGUAGE "SimpChinese" | ||
47 | !insertmacro MUI_LANGUAGE "TradChinese" | ||
48 | !insertmacro MUI_LANGUAGE "Japanese" | ||
49 | !insertmacro MUI_LANGUAGE "Korean" | ||
50 | !insertmacro MUI_LANGUAGE "Italian" | ||
51 | !insertmacro MUI_LANGUAGE "Dutch" | ||
52 | !insertmacro MUI_LANGUAGE "Danish" | ||
53 | !insertmacro MUI_LANGUAGE "Swedish" | ||
54 | !insertmacro MUI_LANGUAGE "Norwegian" | ||
55 | !insertmacro MUI_LANGUAGE "NorwegianNynorsk" | ||
56 | !insertmacro MUI_LANGUAGE "Finnish" | ||
57 | !insertmacro MUI_LANGUAGE "Greek" | ||
58 | !insertmacro MUI_LANGUAGE "Russian" | ||
59 | !insertmacro MUI_LANGUAGE "Portuguese" | ||
60 | !insertmacro MUI_LANGUAGE "PortugueseBR" | ||
61 | !insertmacro MUI_LANGUAGE "Polish" | ||
62 | !insertmacro MUI_LANGUAGE "Ukrainian" | ||
63 | !insertmacro MUI_LANGUAGE "Czech" | ||
64 | !insertmacro MUI_LANGUAGE "Slovak" | ||
65 | !insertmacro MUI_LANGUAGE "Croatian" | ||
66 | !insertmacro MUI_LANGUAGE "Bulgarian" | ||
67 | !insertmacro MUI_LANGUAGE "Hungarian" | ||
68 | !insertmacro MUI_LANGUAGE "Thai" | ||
69 | !insertmacro MUI_LANGUAGE "Romanian" | ||
70 | !insertmacro MUI_LANGUAGE "Latvian" | ||
71 | !insertmacro MUI_LANGUAGE "Macedonian" | ||
72 | !insertmacro MUI_LANGUAGE "Estonian" | ||
73 | !insertmacro MUI_LANGUAGE "Turkish" | ||
74 | !insertmacro MUI_LANGUAGE "Lithuanian" | ||
75 | !insertmacro MUI_LANGUAGE "Slovenian" | ||
76 | !insertmacro MUI_LANGUAGE "Serbian" | ||
77 | !insertmacro MUI_LANGUAGE "SerbianLatin" | ||
78 | !insertmacro MUI_LANGUAGE "Arabic" | ||
79 | !insertmacro MUI_LANGUAGE "Farsi" | ||
80 | !insertmacro MUI_LANGUAGE "Hebrew" | ||
81 | !insertmacro MUI_LANGUAGE "Indonesian" | ||
82 | !insertmacro MUI_LANGUAGE "Mongolian" | ||
83 | !insertmacro MUI_LANGUAGE "Luxembourgish" | ||
84 | !insertmacro MUI_LANGUAGE "Albanian" | ||
85 | !insertmacro MUI_LANGUAGE "Breton" | ||
86 | !insertmacro MUI_LANGUAGE "Belarusian" | ||
87 | !insertmacro MUI_LANGUAGE "Icelandic" | ||
88 | !insertmacro MUI_LANGUAGE "Malay" | ||
89 | !insertmacro MUI_LANGUAGE "Bosnian" | ||
90 | !insertmacro MUI_LANGUAGE "Kurdish" | ||
91 | !insertmacro MUI_LANGUAGE "Irish" | ||
92 | !insertmacro MUI_LANGUAGE "Uzbek" | ||
93 | !insertmacro MUI_LANGUAGE "Galician" | ||
94 | !insertmacro MUI_LANGUAGE "Afrikaans" | ||
95 | !insertmacro MUI_LANGUAGE "Catalan" | ||
96 | |||
97 | !insertmacro MUI_RESERVEFILE_LANGDLL | ||
98 | |||
99 | Section "Install" | ||
100 | SetOutPath "$INSTDIR" | ||
101 | |||
102 | SetCompress Auto | ||
103 | SetOverwrite IfNewer | ||
104 | File /r "bin\*.*" | ||
105 | |||
106 | WriteRegStr HKCU "Software\OpenSim" "" $INSTDIR | ||
107 | WriteUninstaller "$INSTDIR\Uninstall.exe" | ||
108 | |||
109 | !insertmacro MUI_STARTMENU_WRITE_BEGIN Application | ||
110 | CreateDirectory "$SMPROGRAMS\$STARTMENU_FOLDER" | ||
111 | CreateShortCut "$SMPROGRAMS\$STARTMENU_FOLDER\OpenSim.lnk" "$INSTDIR\OpenSim.exe" | ||
112 | CreateShortCut "$SMPROGRAMS\$STARTMENU_FOLDER\Uninstall.lnk" "$INSTDIR\Uninstall.exe" | ||
113 | !insertmacro MUI_STARTMENU_WRITE_END | ||
114 | |||
115 | WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\OpenSim" "DisplayName" "OpenSim (remove only)" | ||
116 | WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\OpenSim" "UninstallString" "$INSTDIR\Uninstall.exe" | ||
117 | SectionEnd | ||
118 | |||
119 | Function .onInit | ||
120 | !insertmacro MUI_LANGDLL_DISPLAY | ||
121 | FunctionEnd | ||
122 | |||
123 | Section "Uninstall" | ||
124 | Delete "$INSTDIR\*.*" | ||
125 | RMDir /r "$INSTDIR" | ||
126 | |||
127 | !insertmacro MUI_STARTMENU_GETFOLDER Application $MUI_TEMP | ||
128 | |||
129 | Delete "$SMPROGRAMS\$MUI_TEMP\OpenSim.lnk" | ||
130 | Delete "$SMPROGRAMS\$MUI_TEMP\Uninstall.lnk" | ||
131 | |||
132 | ;Delete empty start menu parent diretories | ||
133 | StrCpy $MUI_TEMP "$SMPROGRAMS\$MUI_TEMP" | ||
134 | |||
135 | startMenuDeleteLoop: | ||
136 | ClearErrors | ||
137 | RMDir $MUI_TEMP | ||
138 | GetFullPathName $MUI_TEMP "$MUI_TEMP\.." | ||
139 | |||
140 | IfErrors startMenuDeleteLoopDone | ||
141 | |||
142 | StrCmp $MUI_TEMP $SMPROGRAMS startMenuDeleteLoopDone startMenuDeleteLoop | ||
143 | startMenuDeleteLoopDone: | ||
144 | |||
145 | DeleteRegKey /ifempty HKCU "Software\OpenSim" | ||
146 | DeleteRegKey HKEY_LOCAL_MACHINE "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\OpenSim" | ||
147 | SectionEnd | ||
148 | |||
149 | Function un.onInit | ||
150 | !insertmacro MUI_UNGETLANGUAGE | ||
151 | FunctionEnd | ||
diff --git a/OpenSim/Tools/classaudit.pl b/OpenSim/Tools/classaudit.pl new file mode 100755 index 0000000..efe0069 --- /dev/null +++ b/OpenSim/Tools/classaudit.pl | |||
@@ -0,0 +1,133 @@ | |||
1 | #!/usr/bin/perl | ||
2 | # | ||
3 | # Audit tool for OpenSim class and namespace definitions. | ||
4 | # | ||
5 | # Copyright 2007 IBM | ||
6 | # | ||
7 | # Authors: Sean Dague | ||
8 | # | ||
9 | # Redistribution and use in source and binary forms, with or without | ||
10 | # modification, are permitted provided that the following conditions are met: | ||
11 | # * Redistributions of source code must retain the above copyright | ||
12 | # notice, this list of conditions and the following disclaimer. | ||
13 | # * Redistributions in binary form must reproduce the above copyright | ||
14 | # notice, this list of conditions and the following disclaimer in the | ||
15 | # documentation and/or other materials provided with the distribution. | ||
16 | # * Neither the name of the OpenSim Project nor the | ||
17 | # names of its contributors may be used to endorse or promote products | ||
18 | # derived from this software without specific prior written permission. | ||
19 | # | ||
20 | # THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS AND ANY | ||
21 | # EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED | ||
22 | # WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE | ||
23 | # DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY | ||
24 | # DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES | ||
25 | # (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; | ||
26 | # LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND | ||
27 | # ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | ||
28 | # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS | ||
29 | # SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | ||
30 | |||
31 | use strict; | ||
32 | use File::Find; | ||
33 | use Data::Dumper; | ||
34 | use constant YELLOW => "\033[33m"; | ||
35 | use constant RED => "\033[31m"; | ||
36 | use constant CLEAR => "\033[0m"; | ||
37 | our %totals; | ||
38 | |||
39 | |||
40 | find(\&test, "../OpenSim"); | ||
41 | print Dumper(\%totals); | ||
42 | |||
43 | sub test { | ||
44 | my $file = $File::Find::name; | ||
45 | my $dir = $File::Find::dir; | ||
46 | $file =~ s{^../}{}; #strip off prefix | ||
47 | $dir =~ s{^../}{}; #strip off prefix | ||
48 | |||
49 | return if ($file !~ /\.cs$/); | ||
50 | return if ($file =~ /AssemblyInfo\.cs$/); | ||
51 | |||
52 | print "Processing File: $file\n"; | ||
53 | |||
54 | my $namespace = find_namespace($_); | ||
55 | my $class = find_class($_); | ||
56 | |||
57 | |||
58 | |||
59 | if(cmp_namespace($namespace, $dir) == 1) { | ||
60 | $totals{goodns}++; | ||
61 | } else { | ||
62 | $totals{badns}++; | ||
63 | } | ||
64 | |||
65 | |||
66 | if(cmp_class($namespace, $class, $file) == 1) { | ||
67 | $totals{goodclass}++; | ||
68 | } else { | ||
69 | $totals{badclass}++; | ||
70 | } | ||
71 | print "\n"; | ||
72 | } | ||
73 | |||
74 | sub find_class { | ||
75 | my $file = shift; | ||
76 | my $content = slurp($file); | ||
77 | if ($content =~ /\n\s*(public|private|protected)?\s*(class|interface)\s+(\S+)/) { | ||
78 | return $3; | ||
79 | } | ||
80 | return ""; | ||
81 | } | ||
82 | |||
83 | sub find_namespace { | ||
84 | my $file = shift; | ||
85 | my $content = slurp($file); | ||
86 | |||
87 | if ($content =~ /\bnamespace\s+(\S+)/s) { | ||
88 | return $1; | ||
89 | } | ||
90 | return ""; | ||
91 | } | ||
92 | |||
93 | sub slurp { | ||
94 | my $file = shift; | ||
95 | local(*IN); | ||
96 | local $/ = undef; | ||
97 | |||
98 | open(IN, "$file") or die "Can't open '$file': $!"; | ||
99 | my $content = <IN>; | ||
100 | close(IN); | ||
101 | |||
102 | return $content; | ||
103 | } | ||
104 | |||
105 | sub cmp_class { | ||
106 | my ($ns, $class, $file) = @_; | ||
107 | $class = "$ns.$class"; | ||
108 | my $classtrans = $class; | ||
109 | $classtrans =~ s{\.}{/}g; | ||
110 | $classtrans .= ".cs"; | ||
111 | |||
112 | if($classtrans ne $file) { | ||
113 | error(YELLOW, "CLASS: $class != $file"); | ||
114 | return -1; | ||
115 | } | ||
116 | return 1; | ||
117 | } | ||
118 | |||
119 | sub cmp_namespace { | ||
120 | my ($ns, $dir) = @_; | ||
121 | my $nstrans = $ns; | ||
122 | $nstrans =~ s{\.}{/}g; | ||
123 | |||
124 | if($nstrans ne $dir) { | ||
125 | error(RED, "NS: $ns != $dir"); | ||
126 | return -1; | ||
127 | } | ||
128 | return 1; | ||
129 | } | ||
130 | |||
131 | sub error { | ||
132 | print @_, CLEAR, "\n"; | ||
133 | } | ||