[BACK]Return to ox-win.sm1 CVS log [TXT][DIR] Up to [local] / OpenXM / src / kan96xx / Doc

Annotation of OpenXM/src/kan96xx/Doc/ox-win.sm1, Revision 1.16

1.16    ! takayama    1: %%%%%%%%%%%  $OpenXM: OpenXM/src/kan96xx/Doc/ox-win.sm1,v 1.15 2002/07/29 05:02:58 takayama Exp $
        !             2: 
        !             3: (ox-win.start.noiconic) boundp {
        !             4:   /ox-win.start.iconic 0 def
        !             5: }{
        !             6:   /ox-win.start.iconic 1 def
        !             7: } ifelse
1.7       takayama    8: 
1.9       takayama    9: /ox-win.sm1.loaded 1 def
1.10      takayama   10: (ox.sm1.loaded) boundp {
1.9       takayama   11: }{
                     12:   [(parse) (ox.sm1) pushfile] extension pop
                     13: } ifelse
1.7       takayama   14: 
1.13      takayama   15: $ox-win.sm1, ---OpenXM protocol module for Microsoft Windows 1/9, 2002  (C) N.Takayama.$ message-quiet
1.7       takayama   16: 
1.1       takayama   17: %%%%%%%%%%%% Configuration: Specify your server path
                     18: %%%%% ox, ox_sm1, oxlog are contained in kxx.tgz
                     19: %%%%% These should be under /usr/local/lib/sm1 or LOAD_SM1_PATH
1.5       takayama   20: 
                     21: %% This variable is used in sm1connectr_win
                     22: %% It should be set, for example, to c:/cygwin/home/nobuki/OpenXM
                     23: %% See  kan96xx/win/websm1.bat
1.4       takayama   24: [(getenv) (OPENXMHOMEWIN)] extension
                     25: /OpenXM_HOME_WIN set
1.6       takayama   26: OpenXM_HOME_WIN tag 0 eq {
                     27:   [(getenv) (OpenXM_HOME)] extension
                     28:   /OpenXM_HOME_WIN set
                     29: } { } ifelse
1.13      takayama   30: OpenXM_HOME_WIN tag 0 eq {
                     31:   %% Hard encoding:
                     32:   /OpenXM_HOME_WIN
                     33:    (\OpenXM-win)
                     34: %  (\cygwin\home\nobuki\OpenXM\misc\packages\Windows\OpenXM-win)    
                     35:   def
                     36: } { } ifelse
1.5       takayama   37: 
1.15      takayama   38: /ox.win.set.start {
                     39:   [(stat) (c:\windows\system32.cmd.exe)] extension 0 get
                     40:   null eq {
1.16    ! takayama   41:     /ox.win.start [(c:\windows\system32\cmd.exe) (/c) (start) 
        !            42:                    ox-win.start.iconic { (/min) } { } ifelse ] def
1.15      takayama   43:   }{
1.16    ! takayama   44:     /ox.win.start [ (start) ox-win.start.iconic { (/min) } { } ifelse ] def
1.15      takayama   45:   } ifelse
                     46: } def
                     47: ox.win.set.start
                     48: 
1.5       takayama   49: %% This is used in asirconnectr_win
                     50: /OX_LAUNCH (c:\home\asir\bin\ox_launch.exe) def
                     51: %%%%%%%%%%%%%%% end configuration  %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
1.13      takayama   52: %% Set constants for windows.
                     53: [(getenv) (OSTYPE)] extension tag 0 eq {
1.14      takayama   54:   /ox.ostype (native-windows) def
1.13      takayama   55: }{
1.14      takayama   56:   [(getenv) (OSTYPE)] extension /ox.ostype set
1.13      takayama   57: } ifelse
                     58: 
1.14      takayama   59: ox.ostype (cygwin) eq {
1.13      takayama   60:  /oxpath.ox (bin/ox.exe) def
                     61:  /oxpath.oxsm1 (bin/ox_sm1.exe) def
                     62:  /oxpath.oxlog (bin/oxlog.exe) def
1.16    ! takayama   63:  /oxpath.xterm ox.win.start { ( ) } map cat def
1.13      takayama   64:  /oxpath.null  (  ) def
                     65:  /oxpath.null00  ( >& /dev/null ) def  %%cf. oxNoX
                     66:  /oxpath.null00-pure-sh ( 2>&1 >/dev/null) def %%TODO:It does not work in our case
                     67: }{
1.14      takayama   68:   /oxpath.ox
1.13      takayama   69:   [ OpenXM_HOME_WIN
                     70:     (\bin\ox.exe)
                     71:   ] cat
                     72:  def
                     73: } ifelse
1.4       takayama   74: 
1.8       takayama   75: /sm1connectr {
1.12      takayama   76:  [(getenv) (OSTYPE)] extension tag 0 eq {
                     77:      sm1connectr_win
                     78:  }{
1.9       takayama   79:    [(getenv) (OSTYPE)] extension (cygwin) eq
                     80:    {
                     81:      sm1connectr_cygwin
                     82:    }{
                     83:      sm1connectr_win
                     84:    }ifelse
1.12      takayama   85:  } ifelse
1.9       takayama   86: } def
                     87: 
                     88: %% For cygwin
                     89: /sm1connectr_cygwin {
1.8       takayama   90:  [/in-sm1connectr /pass /peer /data /control ] pushVariables
                     91:  [
                     92:  /pass [(oxGenPass)] extension def
                     93:  /peer [(oxGetPort) (localhost)] extension def
                     94:  /data peer 1 get toString def
                     95:  /control peer 3 get toString def
                     96:  peer message
1.15      takayama   97:  [ox.win.start   aload pop 
                     98:   ( ox ) ( -reverse -ox ) (/home/nobuki/OpenXM/src/kxx/ox_sm1.exe)
1.8       takayama   99:   ( -data ) data ( -control ) control  ( -pass ) pass 
1.9       takayama  100:   ( -wait 2 )
1.8       takayama  101:   oxpath.null
                    102:   ( )] cat system 
                    103:  [(oxCreateClient2) peer 0 pass] extension /ox.ccc set
                    104:                      %% 0 means connect from only localhost. 
                    105:  (The server is binded to the variable ox.ccc) message
                    106:   ox.ccc.init 
                    107:  ] pop
                    108:  popVariables
                    109: } def
                    110: 
1.9       takayama  111: %% For Native windows system
1.4       takayama  112: /sm1connectr_win {
                    113:  [/in-sm1connectr /pass /peer /data /control ] pushVariables
                    114:  [
                    115:  /pass [(oxGenPass)] extension def
                    116:  /peer [(oxGetPort) (localhost)] extension def
                    117:  /data peer 1 get toString def
                    118:  /control peer 3 get toString def
                    119:  peer message
1.15      takayama  120:  (Hello ) message
1.4       takayama  121:  [(forkExec) [
1.15      takayama  122:     ox.win.start   aload pop 
                    123: %%(c:\windows\system32\cmd.exe) (/c) (start)
1.14      takayama  124:     oxpath.ox
1.4       takayama  125:     (-reverse)
                    126:     (-ox)
1.8       takayama  127:     [OpenXM_HOME_WIN (\bin\ox_sm1.exe)] cat
1.4       takayama  128:     (-data)
                    129:      data
                    130:      (-control)
                    131:      control
                    132:      (-pass)
                    133:      pass
                    134:   ]
                    135:   [  ] 3] extension
                    136: 
1.2       takayama  137:  [(oxCreateClient2) peer 0 pass] extension /ox.ccc set
                    138:                      %% 0 means connect from only localhost. 
                    139:  (The server is binded to the variable ox.ccc) message
                    140:   ox.ccc.init 
                    141:  ] pop
                    142:  popVariables
                    143: } def
                    144: 
1.9       takayama  145: %% Test
1.11      takayama  146: /asirconnectr_win_test {
1.2       takayama  147:  [/in-sm1connectr /pass /peer /data /control ] pushVariables
                    148:  [
1.5       takayama  149:  /pass [ ] cat def  %% Do not use one time password.
1.2       takayama  150:  /peer [(oxGetPort) (localhost)] extension def
                    151:  /data peer 1 get toString def
                    152:  /control peer 3 get toString def
                    153:  peer message
1.5       takayama  154:  [control data] message
                    155:  [(forkExec)
                    156:   [OX_LAUNCH
                    157:    (ox_launch)
                    158:    (localhost)
                    159:    (0)
                    160:    control toString
                    161:    data toString
                    162:    (ox_asir)
                    163:    (1)
                    164:   ]
                    165:   [ ]
                    166:   7 %% 1 1 1
                    167:  ] extension ;
                    168:  [(oxCreateClient2) peer 0 pass] extension /oxasir.ccc set
1.1       takayama  169:                      %% 0 means connect from only localhost. 
1.5       takayama  170:  (The server is binded to the variable oxasir.ccc) message
                    171:   %% Initialization code for asir.
1.1       takayama  172:  ] pop
                    173:  popVariables
                    174: } def
                    175: 
1.8       takayama  176: %% Skip it. initializePathNamesForOx   

FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>