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

1.18    ! takayama    1: %%%%%%%%%%%  $OpenXM: OpenXM/src/kan96xx/Doc/ox-win.sm1,v 1.17 2002/07/31 01:03:02 takayama Exp $
1.16      takayama    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 {
1.17      takayama   39:   [(stat) (c:\windows\system32\cmd.exe)] extension 0 get
                     40:   0 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.17      takayama   44:    [(stat) (c:\winnt\system32\cmd.exe)] extension 0 get
                     45:    0 eq {
                     46:       /ox.win.start [(c:\winnt\system32\cmd.exe) (/c) (start) 
                     47:                      ox-win.start.iconic { (/min) } { } ifelse ] def
                     48:    }{
                     49:      /ox.win.start [ (start) ox-win.start.iconic { (/min) } { } ifelse ] def
                     50:    } ifelse
1.15      takayama   51:   } ifelse
                     52: } def
                     53: ox.win.set.start
                     54: 
1.5       takayama   55: %% This is used in asirconnectr_win
                     56: /OX_LAUNCH (c:\home\asir\bin\ox_launch.exe) def
                     57: %%%%%%%%%%%%%%% end configuration  %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
1.13      takayama   58: %% Set constants for windows.
                     59: [(getenv) (OSTYPE)] extension tag 0 eq {
1.14      takayama   60:   /ox.ostype (native-windows) def
1.13      takayama   61: }{
1.14      takayama   62:   [(getenv) (OSTYPE)] extension /ox.ostype set
1.13      takayama   63: } ifelse
                     64: 
1.14      takayama   65: ox.ostype (cygwin) eq {
1.13      takayama   66:  /oxpath.ox (bin/ox.exe) def
                     67:  /oxpath.oxsm1 (bin/ox_sm1.exe) def
                     68:  /oxpath.oxlog (bin/oxlog.exe) def
1.18    ! takayama   69:  /oxpath.xterm (start /min ) def
1.13      takayama   70:  /oxpath.null  (  ) def
                     71:  /oxpath.null00  ( >& /dev/null ) def  %%cf. oxNoX
                     72:  /oxpath.null00-pure-sh ( 2>&1 >/dev/null) def %%TODO:It does not work in our case
                     73: }{
1.14      takayama   74:   /oxpath.ox
1.13      takayama   75:   [ OpenXM_HOME_WIN
                     76:     (\bin\ox.exe)
                     77:   ] cat
                     78:  def
                     79: } ifelse
1.4       takayama   80: 
1.8       takayama   81: /sm1connectr {
1.12      takayama   82:  [(getenv) (OSTYPE)] extension tag 0 eq {
                     83:      sm1connectr_win
                     84:  }{
1.9       takayama   85:    [(getenv) (OSTYPE)] extension (cygwin) eq
                     86:    {
                     87:      sm1connectr_cygwin
                     88:    }{
                     89:      sm1connectr_win
                     90:    }ifelse
1.12      takayama   91:  } ifelse
1.9       takayama   92: } def
                     93: 
                     94: %% For cygwin
                     95: /sm1connectr_cygwin {
1.8       takayama   96:  [/in-sm1connectr /pass /peer /data /control ] pushVariables
                     97:  [
                     98:  /pass [(oxGenPass)] extension def
                     99:  /peer [(oxGetPort) (localhost)] extension def
                    100:  /data peer 1 get toString def
                    101:  /control peer 3 get toString def
                    102:  peer message
1.18    ! takayama  103:  [oxpath.xterm
        !           104:   ( ox ) ( -reverse -ox ) OpenXM_HOME_WIN (bin/ox_sm1.exe)
1.8       takayama  105:   ( -data ) data ( -control ) control  ( -pass ) pass 
1.9       takayama  106:   ( -wait 2 )
1.8       takayama  107:   oxpath.null
                    108:   ( )] cat system 
                    109:  [(oxCreateClient2) peer 0 pass] extension /ox.ccc set
                    110:                      %% 0 means connect from only localhost. 
                    111:  (The server is binded to the variable ox.ccc) message
                    112:   ox.ccc.init 
                    113:  ] pop
                    114:  popVariables
                    115: } def
                    116: 
1.9       takayama  117: %% For Native windows system
1.4       takayama  118: /sm1connectr_win {
                    119:  [/in-sm1connectr /pass /peer /data /control ] pushVariables
                    120:  [
                    121:  /pass [(oxGenPass)] extension def
                    122:  /peer [(oxGetPort) (localhost)] extension def
                    123:  /data peer 1 get toString def
                    124:  /control peer 3 get toString def
                    125:  peer message
1.15      takayama  126:  (Hello ) message
1.4       takayama  127:  [(forkExec) [
1.15      takayama  128:     ox.win.start   aload pop 
                    129: %%(c:\windows\system32\cmd.exe) (/c) (start)
1.14      takayama  130:     oxpath.ox
1.4       takayama  131:     (-reverse)
                    132:     (-ox)
1.8       takayama  133:     [OpenXM_HOME_WIN (\bin\ox_sm1.exe)] cat
1.4       takayama  134:     (-data)
                    135:      data
                    136:      (-control)
                    137:      control
                    138:      (-pass)
                    139:      pass
                    140:   ]
                    141:   [  ] 3] extension
                    142: 
1.2       takayama  143:  [(oxCreateClient2) peer 0 pass] extension /ox.ccc set
                    144:                      %% 0 means connect from only localhost. 
                    145:  (The server is binded to the variable ox.ccc) message
                    146:   ox.ccc.init 
                    147:  ] pop
                    148:  popVariables
                    149: } def
                    150: 
1.9       takayama  151: %% Test
1.11      takayama  152: /asirconnectr_win_test {
1.2       takayama  153:  [/in-sm1connectr /pass /peer /data /control ] pushVariables
                    154:  [
1.5       takayama  155:  /pass [ ] cat def  %% Do not use one time password.
1.2       takayama  156:  /peer [(oxGetPort) (localhost)] extension def
                    157:  /data peer 1 get toString def
                    158:  /control peer 3 get toString def
                    159:  peer message
1.5       takayama  160:  [control data] message
                    161:  [(forkExec)
                    162:   [OX_LAUNCH
                    163:    (ox_launch)
                    164:    (localhost)
                    165:    (0)
                    166:    control toString
                    167:    data toString
                    168:    (ox_asir)
                    169:    (1)
                    170:   ]
                    171:   [ ]
                    172:   7 %% 1 1 1
                    173:  ] extension ;
                    174:  [(oxCreateClient2) peer 0 pass] extension /oxasir.ccc set
1.1       takayama  175:                      %% 0 means connect from only localhost. 
1.5       takayama  176:  (The server is binded to the variable oxasir.ccc) message
                    177:   %% Initialization code for asir.
1.1       takayama  178:  ] pop
                    179:  popVariables
                    180: } def
                    181: 
1.8       takayama  182: %% Skip it. initializePathNamesForOx   

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