LicenceBox.st
changeset 5924 ddd06fc11405
parent 4661 f4b3a9ed36a7
equal deleted inserted replaced
5923:f14f15fe8894 5924:ddd06fc11405
       
     1 "{ Encoding: utf8 }"
       
     2 
     1 "
     3 "
     2  COPYRIGHT (c) 1996 by eXept Software AG
     4  COPYRIGHT (c) 1996 by eXept Software AG
     3 	      All Rights Reserved
     5 	      All Rights Reserved
     4 
     6 
     5  This software is furnished under a license and may be used
     7  This software is furnished under a license and may be used
     8  be provided or otherwise made available to, or used by, any
    10  be provided or otherwise made available to, or used by, any
     9  other person.  No title to or ownership of the software is
    11  other person.  No title to or ownership of the software is
    10  hereby transferred.
    12  hereby transferred.
    11 "
    13 "
    12 "{ Package: 'stx:libwidg2' }"
    14 "{ Package: 'stx:libwidg2' }"
       
    15 
       
    16 "{ NameSpace: Smalltalk }"
    13 
    17 
    14 DialogBox subclass:#LicenceBox
    18 DialogBox subclass:#LicenceBox
    15 	instanceVariableNames:'accepted destroySemaphore fileName textView'
    19 	instanceVariableNames:'accepted destroySemaphore fileName textView'
    16 	classVariableNames:'LicenceRejectSignal'
    20 	classVariableNames:'LicenceRejectSignal'
    17 	poolDictionaries:''
    21 	poolDictionaries:''
   247     "get filename of licence file"
   251     "get filename of licence file"
   248 
   252 
   249     |relName|
   253     |relName|
   250 
   254 
   251     fileName isNil ifTrue:[
   255     fileName isNil ifTrue:[
   252 	fileName := relName := resources at:'LICENCEFILE' default:nil.
   256         relName := resources at:'LICENCEFILE' default:nil.
   253 	fileName isNil ifTrue:[
   257         relName isNil ifTrue:[
   254 	    Smalltalk releaseIdentification = 'ST/X_free_demo_vsn' ifTrue:[
   258             relName := 'english/LICENCE_STX.html'.
   255 		relName := 'doc/online/english/LICENCE_DEMO_STX.html'.
   259         ].
   256 	    ] ifFalse:[
   260         (fileName := Smalltalk packageDirectory / '..' / 'doc/online' / relName)
   257 		relName := 'doc/online/english/LICENCE_STX.html'.
   261         exists ifTrue:[
   258 	    ].
   262             ^ fileName
   259 	    fileName := relName.
   263         ].
   260 	].
   264         
   261 
   265         {
   262 	fileName asFilename exists ifFalse:[
   266             'doc/online/',relName .
   263 	    fileName := Smalltalk getSystemFileName:relName.
   267         } do:[:eachTry |    
   264 	    fileName isNil ifTrue:[
   268             fileName := Smalltalk getSystemFileName:eachTry.
   265 		fileName := Smalltalk getSystemFileName:('../' , relName).
   269             (fileName notNil and:[ fileName asFilename exists ]) ifTrue:[
   266 		fileName isNil ifTrue:[
   270                 ^ fileName
   267 		    fileName := Smalltalk getSystemFileName:('../../' , relName).
   271             ].
   268 		    fileName isNil ifTrue:[
   272         ].
   269 			fileName := Smalltalk getSystemFileName:'doc/online/german/LICENCE_STX.html'.
   273         fileName := nil.
   270 			fileName isNil ifTrue:[
       
   271 			    fileName := '../../doc/online/german/LICENCE_STX.html'.
       
   272 			]
       
   273 		    ]
       
   274 		].
       
   275 	    ].
       
   276 	].
       
   277 	fileName asFilename exists ifFalse:[
       
   278 	    fileName := nil
       
   279 	].
       
   280     ].
   274     ].
   281     ^ fileName
   275     ^ fileName
   282 
   276 
   283     "
   277     "
   284      LicenceBox new licenceFile
   278      LicenceBox new licenceFile
   337 ! !
   331 ! !
   338 
   332 
   339 !LicenceBox class methodsFor:'documentation'!
   333 !LicenceBox class methodsFor:'documentation'!
   340 
   334 
   341 version
   335 version
   342     ^ '$Header: /cvs/stx/stx/libwidg2/LicenceBox.st,v 1.30 2014-09-25 19:43:38 stefan Exp $'
   336     ^ '$Header$'
   343 !
   337 !
   344 
   338 
   345 version_CVS
   339 version_CVS
   346     ^ '$Header: /cvs/stx/stx/libwidg2/LicenceBox.st,v 1.30 2014-09-25 19:43:38 stefan Exp $'
   340     ^ '$Header$'
   347 ! !
   341 ! !
   348 
   342 
   349 
   343 
   350 LicenceBox initialize!
   344 LicenceBox initialize!