author | Claus Gittinger <cg@exept.de> |
Thu, 24 Nov 2011 12:54:59 +0100 | |
changeset 2305 | c11e70f81f74 |
parent 2277 | 735048b234ea |
child 2353 | fa7400d022a0 |
permissions | -rw-r--r-- |
749 | 1 |
" |
2 |
COPYRIGHT (c) 1996-2011 by Claus Gittinger |
|
3 |
COPYRIGHT (c) 2010-2011 by Jan Vrany, Jan Kurs and Marcel Hlopko |
|
4 |
SWING Research Group, Czech Technical University in Prague |
|
5 |
||
6 |
Parts of the code written by Claus Gittinger are under following |
|
7 |
license: |
|
8 |
||
9 |
This software is furnished under a license and may be used |
|
10 |
only in accordance with the terms of that license and with the |
|
11 |
inclusion of the above copyright notice. This software may not |
|
12 |
be provided or otherwise made available to, or used by, any |
|
13 |
other person. No title to or ownership of the software is |
|
14 |
hereby transferred. |
|
15 |
||
16 |
Parts of the code written at SWING Reasearch Group [1] are MIT licensed: |
|
17 |
||
18 |
Permission is hereby granted, free of charge, to any person |
|
19 |
obtaining a copy of this software and associated documentation |
|
20 |
files (the 'Software'), to deal in the Software without |
|
21 |
restriction, including without limitation the rights to use, |
|
22 |
copy, modify, merge, publish, distribute, sublicense, and/or sell |
|
23 |
copies of the Software, and to permit persons to whom the |
|
24 |
Software is furnished to do so, subject to the following |
|
25 |
conditions: |
|
26 |
||
27 |
The above copyright notice and this permission notice shall be |
|
28 |
included in all copies or substantial portions of the Software. |
|
29 |
||
30 |
THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, |
|
31 |
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES |
|
32 |
OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND |
|
33 |
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT |
|
34 |
HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, |
|
35 |
WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING |
|
36 |
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR |
|
37 |
OTHER DEALINGS IN THE SOFTWARE. |
|
38 |
||
39 |
[1] Code written at SWING Research Group contain a signature |
|
40 |
of one of the above copright owners. |
|
41 |
" |
|
42 |
"{ Package: 'stx:libjava' }" |
|
43 |
||
44 |
Object subclass:#JavaLibraries |
|
45 |
instanceVariableNames:'' |
|
46 |
classVariableNames:'' |
|
47 |
poolDictionaries:'' |
|
48 |
category:'Languages-Java-Support' |
|
49 |
! |
|
50 |
||
51 |
!JavaLibraries class methodsFor:'documentation'! |
|
52 |
||
53 |
copyright |
|
54 |
" |
|
55 |
COPYRIGHT (c) 1996-2011 by Claus Gittinger |
|
56 |
COPYRIGHT (c) 2010-2011 by Jan Vrany, Jan Kurs and Marcel Hlopko |
|
57 |
SWING Research Group, Czech Technical University in Prague |
|
58 |
||
59 |
Parts of the code written by Claus Gittinger are under following |
|
60 |
license: |
|
61 |
||
62 |
This software is furnished under a license and may be used |
|
63 |
only in accordance with the terms of that license and with the |
|
64 |
inclusion of the above copyright notice. This software may not |
|
65 |
be provided or otherwise made available to, or used by, any |
|
66 |
other person. No title to or ownership of the software is |
|
67 |
hereby transferred. |
|
68 |
||
69 |
Parts of the code written at SWING Reasearch Group [1] are MIT licensed: |
|
70 |
||
71 |
Permission is hereby granted, free of charge, to any person |
|
72 |
obtaining a copy of this software and associated documentation |
|
73 |
files (the 'Software'), to deal in the Software without |
|
74 |
restriction, including without limitation the rights to use, |
|
75 |
copy, modify, merge, publish, distribute, sublicense, and/or sell |
|
76 |
copies of the Software, and to permit persons to whom the |
|
77 |
Software is furnished to do so, subject to the following |
|
78 |
conditions: |
|
79 |
||
80 |
The above copyright notice and this permission notice shall be |
|
81 |
included in all copies or substantial portions of the Software. |
|
82 |
||
83 |
THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, |
|
84 |
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES |
|
85 |
OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND |
|
86 |
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT |
|
87 |
HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, |
|
88 |
WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING |
|
89 |
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR |
|
90 |
OTHER DEALINGS IN THE SOFTWARE. |
|
91 |
||
92 |
[1] Code written at SWING Research Group contain a signature |
|
93 |
of one of the above copright owners. |
|
94 |
||
95 |
" |
|
96 |
! ! |
|
97 |
||
98 |
!JavaLibraries class methodsFor:'accessing'! |
|
99 |
||
100 |
directory |
|
101 |
||
102 |
^Java cacheDirectory / 'libs' |
|
103 |
||
104 |
" |
|
105 |
JavaLibraries directory |
|
106 |
" |
|
107 |
||
108 |
"Created: / 08-04-2011 / 16:27:17 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
109 |
! |
|
110 |
||
111 |
url |
|
112 |
||
113 |
^(Smalltalk at:#stx_libjava) svnRepositoryUrlBase , '/libs' |
|
114 |
||
115 |
"Created: / 08-04-2011 / 16:32:12 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
116 |
! ! |
|
117 |
||
118 |
!JavaLibraries class methodsFor:'private'! |
|
119 |
||
120 |
checkoutDirectory |
|
121 |
||
122 |
OperatingSystem getNetworkAddresses size < 2 |
|
123 |
ifTrue: |
|
124 |
[self error: 'No network connection!!'. ^self]. |
|
125 |
||
126 |
(OperatingSystem |
|
127 |
executeCommand:('svn co %1 %2' bindWith: self url with: self directory asString)) |
|
128 |
ifFalse: |
|
129 |
[self error: 'Cannot checkout libraries!!'. ^self]. |
|
130 |
||
131 |
"Created: / 08-04-2011 / 16:38:34 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
132 |
! |
|
133 |
||
134 |
updateDirectory |
|
135 |
||
136 |
OperatingSystem getNetworkAddresses size < 2 |
|
137 |
ifTrue: |
|
138 |
[^self]. |
|
139 |
||
140 |
(OperatingSystem |
|
141 |
executeCommand:('svn update %1 %2' bindWith: self url with: self directory asString)) |
|
142 |
ifFalse: |
|
143 |
[self error: 'Cannot update libraries!!'. ^self]. |
|
144 |
||
145 |
"Created: / 08-04-2011 / 16:38:34 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
146 |
! ! |
|
147 |
||
148 |
!JavaLibraries class methodsFor:'utilities'! |
|
149 |
||
150 |
addToClassPath: jarname |
|
151 |
||
152 |
| dir jar | |
|
153 |
||
154 |
(dir := self directory) exists |
|
155 |
ifFalse:[self update]. |
|
156 |
||
157 |
(jar := dir / jarname) exists |
|
158 |
ifTrue: [Java addToClassPath: jar pathName] |
|
159 |
ifFalse:[self error:'Library ' , jarname , ' not found in ', dir pathName]. |
|
160 |
||
161 |
" |
|
162 |
JavaLibraries addToClassPath:'junit4.jar'. |
|
163 |
Java classPath |
|
164 |
" |
|
165 |
||
166 |
"Created: / 08-04-2011 / 16:49:11 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
167 |
! |
|
168 |
||
169 |
flush |
|
170 |
||
171 |
self directory recursiveRemove |
|
172 |
||
173 |
"Created: / 08-04-2011 / 16:27:32 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
174 |
! |
|
175 |
||
176 |
update |
|
177 |
||
178 |
| dir | |
|
179 |
dir := self directory. |
|
180 |
dir exists |
|
181 |
ifTrue: [self updateDirectory] |
|
182 |
ifFalse:[self checkoutDirectory] |
|
183 |
||
184 |
"Created: / 08-04-2011 / 16:29:17 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
185 |
! ! |
|
186 |
||
187 |
!JavaLibraries class methodsFor:'documentation'! |
|
188 |
||
2277
735048b234ea
fixed: #version_SVN ($ to §)
Claus Gittinger <cg@exept.de>
parents:
2241
diff
changeset
|
189 |
version |
735048b234ea
fixed: #version_SVN ($ to §)
Claus Gittinger <cg@exept.de>
parents:
2241
diff
changeset
|
190 |
^ '$Header: /cvs/stx/stx/libjava/JavaLibraries.st,v 1.3 2011-11-24 11:53:54 cg Exp $' |
735048b234ea
fixed: #version_SVN ($ to §)
Claus Gittinger <cg@exept.de>
parents:
2241
diff
changeset
|
191 |
! |
735048b234ea
fixed: #version_SVN ($ to §)
Claus Gittinger <cg@exept.de>
parents:
2241
diff
changeset
|
192 |
|
2241 | 193 |
version_CVS |
2277
735048b234ea
fixed: #version_SVN ($ to §)
Claus Gittinger <cg@exept.de>
parents:
2241
diff
changeset
|
194 |
^ '$Header: /cvs/stx/stx/libjava/JavaLibraries.st,v 1.3 2011-11-24 11:53:54 cg Exp $' |
2241 | 195 |
! |
196 |
||
749 | 197 |
version_SVN |
2241 | 198 |
^ '§Id: JavaLibraries.st,v 1.1 2011/08/18 19:06:53 vrany Exp §' |
2152 | 199 |
! ! |