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

1.13    ! takayama    1: %%%%%%%%%%%  $OpenXM: OpenXM/src/kan96xx/Doc/ox-win.sm1,v 1.12 2001/12/28 08:18:23 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: 
                     32: %% This is used in asirconnectr_win
                     33: /OX_LAUNCH (c:\home\asir\bin\ox_launch.exe) def
                     34: %%%%%%%%%%%%%%% end configuration  %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
1.13    ! takayama   35: %% Set constants for windows.
        !            36: [(getenv) (OSTYPE)] extension tag 0 eq {
        !            37:   /oxpath.ostype (native-windows) def
        !            38: }{
        !            39:   [(getenv) (OSTYPE)] extension /oxpath.ostype set
        !            40: } ifelse
        !            41: 
        !            42: oxpath.ostype (cygwin) eq {
        !            43:  /oxpath.ox (bin/ox.exe) def
        !            44:  /oxpath.oxsm1 (bin/ox_sm1.exe) def
        !            45:  /oxpath.oxlog (bin/oxlog.exe) def
        !            46:  /oxpath.xterm (start ) def
        !            47:  /oxpath.null  (  ) def
        !            48:  /oxpath.null00  ( >& /dev/null ) def  %%cf. oxNoX
        !            49:  /oxpath.null00-pure-sh ( 2>&1 >/dev/null) def %%TODO:It does not work in our case
        !            50: }{
        !            51:    /oxpath.ox
        !            52:   [ OpenXM_HOME_WIN
        !            53:     (\bin\ox.exe)
        !            54:   ] cat
        !            55:  def
        !            56: } ifelse
1.4       takayama   57: 
1.8       takayama   58: /sm1connectr {
1.12      takayama   59:  [(getenv) (OSTYPE)] extension tag 0 eq {
                     60:      sm1connectr_win
                     61:  }{
1.9       takayama   62:    [(getenv) (OSTYPE)] extension (cygwin) eq
                     63:    {
                     64:      sm1connectr_cygwin
                     65:    }{
                     66:      sm1connectr_win
                     67:    }ifelse
1.12      takayama   68:  } ifelse
1.9       takayama   69: } def
                     70: 
                     71: %% For cygwin
                     72: /sm1connectr_cygwin {
1.8       takayama   73:  [/in-sm1connectr /pass /peer /data /control ] pushVariables
                     74:  [
                     75:  /pass [(oxGenPass)] extension def
                     76:  /peer [(oxGetPort) (localhost)] extension def
                     77:  /data peer 1 get toString def
                     78:  /control peer 3 get toString def
                     79:  peer message
                     80:  [(start ox ) ( -reverse -ox ) (/home/nobuki/OpenXM/src/kxx/ox_sm1.exe)
                     81:   ( -data ) data ( -control ) control  ( -pass ) pass 
1.9       takayama   82:   ( -wait 2 )
1.8       takayama   83:   oxpath.null
                     84:   ( )] cat system 
                     85:  [(oxCreateClient2) peer 0 pass] extension /ox.ccc set
                     86:                      %% 0 means connect from only localhost. 
                     87:  (The server is binded to the variable ox.ccc) message
                     88:   ox.ccc.init 
                     89:  ] pop
                     90:  popVariables
                     91: } def
                     92: 
1.9       takayama   93: %% For Native windows system
1.4       takayama   94: /sm1connectr_win {
                     95:  [/in-sm1connectr /pass /peer /data /control ] pushVariables
                     96:  [
                     97:  /pass [(oxGenPass)] extension def
                     98:  /peer [(oxGetPort) (localhost)] extension def
                     99:  /data peer 1 get toString def
                    100:  /control peer 3 get toString def
                    101:  peer message
                    102:  [(forkExec) [
                    103:     (c:/windows/command/start)
1.8       takayama  104:     [OpenXM_HOME_WIN  (\bin\ox)] cat
1.4       takayama  105:     (-reverse)
                    106:     (-ox)
1.8       takayama  107:     [OpenXM_HOME_WIN (\bin\ox_sm1.exe)] cat
1.4       takayama  108:     (-data)
                    109:      data
                    110:      (-control)
                    111:      control
                    112:      (-pass)
                    113:      pass
                    114:   ]
                    115:   [  ] 3] extension
                    116: 
1.2       takayama  117:  [(oxCreateClient2) peer 0 pass] extension /ox.ccc set
                    118:                      %% 0 means connect from only localhost. 
                    119:  (The server is binded to the variable ox.ccc) message
                    120:   ox.ccc.init 
                    121:  ] pop
                    122:  popVariables
                    123: } def
                    124: 
1.9       takayama  125: %% Test
1.11      takayama  126: /asirconnectr_win_test {
1.2       takayama  127:  [/in-sm1connectr /pass /peer /data /control ] pushVariables
                    128:  [
1.5       takayama  129:  /pass [ ] cat def  %% Do not use one time password.
1.2       takayama  130:  /peer [(oxGetPort) (localhost)] extension def
                    131:  /data peer 1 get toString def
                    132:  /control peer 3 get toString def
                    133:  peer message
1.5       takayama  134:  [control data] message
                    135:  [(forkExec)
                    136:   [OX_LAUNCH
                    137:    (ox_launch)
                    138:    (localhost)
                    139:    (0)
                    140:    control toString
                    141:    data toString
                    142:    (ox_asir)
                    143:    (1)
                    144:   ]
                    145:   [ ]
                    146:   7 %% 1 1 1
                    147:  ] extension ;
                    148:  [(oxCreateClient2) peer 0 pass] extension /oxasir.ccc set
1.1       takayama  149:                      %% 0 means connect from only localhost. 
1.5       takayama  150:  (The server is binded to the variable oxasir.ccc) message
                    151:   %% Initialization code for asir.
1.1       takayama  152:  ] pop
                    153:  popVariables
                    154: } def
                    155: 
1.8       takayama  156: %% Skip it. initializePathNamesForOx   

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