[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.15

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

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