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

1.21    ! takayama    1: %%%%%%%%%%%  $OpenXM: OpenXM/src/kan96xx/Doc/ox-win.sm1,v 1.20 2002/08/03 06:02:35 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.21    ! takayama   41:     /ox.win.start.0 [(c:\windows\system32\cmd.exe) (/c) (start)] def 
        !            42:     /ox.win.start [ox.win.start.0 aload pop
1.16      takayama   43:                    ox-win.start.iconic { (/min) } { } ifelse ] def
1.15      takayama   44:   }{
1.17      takayama   45:    [(stat) (c:\winnt\system32\cmd.exe)] extension 0 get
                     46:    0 eq {
1.21    ! takayama   47:       /ox.win.start.0 [(c:\winnt\system32\cmd.exe) (/c) (start) ] def
        !            48:       /ox.win.start [ox.win.start.0 aload pop
1.17      takayama   49:                      ox-win.start.iconic { (/min) } { } ifelse ] def
                     50:    }{
1.21    ! takayama   51:      /ox.win.start.0 [ (start) ] def 
        !            52:      /ox.win.start [ ox.win.start.0 aload pop
        !            53:                      ox-win.start.iconic { (/min) } { } ifelse ] def
1.17      takayama   54:    } ifelse
1.15      takayama   55:   } ifelse
                     56: } def
                     57: ox.win.set.start
                     58: 
1.5       takayama   59: %%%%%%%%%%%%%%% end configuration  %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
1.13      takayama   60: %% Set constants for windows.
                     61: 
1.20      takayama   62: ox.ostype 1 get (cygwin) eq {
1.13      takayama   63:  /oxpath.ox (bin/ox.exe) def
                     64:  /oxpath.oxsm1 (bin/ox_sm1.exe) def
                     65:  /oxpath.oxlog (bin/oxlog.exe) def
1.18      takayama   66:  /oxpath.xterm (start /min ) def
1.13      takayama   67:  /oxpath.null  (  ) def
                     68:  /oxpath.null00  ( >& /dev/null ) def  %%cf. oxNoX
                     69:  /oxpath.null00-pure-sh ( 2>&1 >/dev/null) def %%TODO:It does not work in our case
1.20      takayama   70: }{ } ifelse
                     71: 
                     72: ox.ostype 1 get (xcygwin) eq {
                     73:  /oxpath.ox (bin/ox.exe) def
                     74:  /oxpath.oxsm1 (bin/ox_sm1.exe) def
                     75:  /oxpath.oxlog (bin/oxlog.exe) def
                     76:  /oxpath.xterm (/usr/X11R6/bin/xterm -icon -e ) def
                     77:  /oxpath.oxlog.xterm (oxlog /usr/X11R6/bin/xterm -icon -e ) def
                     78:  /oxpath.null  (  ) def
                     79:  /oxpath.null00  ( >& /dev/null ) def  %%cf. oxNoX
                     80:  /oxpath.null00-pure-sh ( 2>&1 >/dev/null) def %%TODO:It does not work in our case
                     81: }{ } ifelse
                     82: 
                     83: ox.ostype 1 get (native) eq {
1.14      takayama   84:   /oxpath.ox
1.13      takayama   85:   [ OpenXM_HOME_WIN
                     86:     (\bin\ox.exe)
                     87:   ] cat
                     88:  def
1.20      takayama   89: }{ } ifelse
1.4       takayama   90: 
1.8       takayama   91: /sm1connectr {
1.20      takayama   92:   ox.ostype 1 get (cygwin) eq {
                     93:     sm1connectr_cygwin
                     94:   }{ } ifelse
                     95:   ox.ostype 1 get (xcygwin) eq {
                     96:     sm1connectr_xcygwin
                     97:   }{ } ifelse
                     98:   ox.ostype 1 get (native) eq {
                     99:     sm1connectr_win
                    100:   }{ } ifelse
1.9       takayama  101: } def
                    102: 
                    103: %% For cygwin
1.20      takayama  104: %% How to debug: 
                    105: %% 1. Use start 'c:\cygwin\cygwin.bat' to create a cygwin window.
                    106: %% 2. Set OpenXM_HOME and run sm1 , (ox.sm1) run, sm1_connectr
                    107: %% 3. In order to kill a process, use ps and kill -9 
1.9       takayama  108: /sm1connectr_cygwin {
1.20      takayama  109:  [/in-sm1connectr /pass /peer /data /control /sss ] pushVariables
1.8       takayama  110:  [
                    111:  /pass [(oxGenPass)] extension def
                    112:  /peer [(oxGetPort) (localhost)] extension def
                    113:  /data peer 1 get toString def
                    114:  /control peer 3 get toString def
                    115:  peer message
1.20      takayama  116:  [ox.win.start { ( ) } map cat ox_backslash_to_slash
                    117:   ( ox ) 
                    118:   ( -reverse -ox ) 
                    119:   [(c:/cygwin) OpenXM_HOME_WIN (/bin/ox_sm1.exe)] cat
                    120: %  (c:/cygwin/home/TakayamaNobuki/OpenXM/bin/ox_sm1.exe)
1.8       takayama  121:   ( -data ) data ( -control ) control  ( -pass ) pass 
1.9       takayama  122:   ( -wait 2 )
1.8       takayama  123:   oxpath.null
1.20      takayama  124:   ( )] cat /sss set 
                    125:   sss message
                    126:   sss system 
1.8       takayama  127:  [(oxCreateClient2) peer 0 pass] extension /ox.ccc set
                    128:                      %% 0 means connect from only localhost. 
                    129:  (The server is binded to the variable ox.ccc) message
                    130:   ox.ccc.init 
                    131:  ] pop
                    132:  popVariables
                    133: } def
                    134: 
1.20      takayama  135: %% How to debug: 
                    136: %% 1. Set a batch file to change directory. Start command window.
                    137: %% 2. Set OpenXMHOMEWIN (cf. debug-tool/asirgui-debug.bat) 
                    138: %%    and run sm1 , (ox.sm1) run, sm1_connectr
1.9       takayama  139: %% For Native windows system
1.4       takayama  140: /sm1connectr_win {
                    141:  [/in-sm1connectr /pass /peer /data /control ] pushVariables
                    142:  [
                    143:  /pass [(oxGenPass)] extension def
                    144:  /peer [(oxGetPort) (localhost)] extension def
                    145:  /data peer 1 get toString def
                    146:  /control peer 3 get toString def
                    147:  peer message
1.15      takayama  148:  (Hello ) message
1.4       takayama  149:  [(forkExec) [
1.15      takayama  150:     ox.win.start   aload pop 
                    151: %%(c:\windows\system32\cmd.exe) (/c) (start)
1.14      takayama  152:     oxpath.ox
1.4       takayama  153:     (-reverse)
                    154:     (-ox)
1.8       takayama  155:     [OpenXM_HOME_WIN (\bin\ox_sm1.exe)] cat
1.4       takayama  156:     (-data)
                    157:      data
                    158:      (-control)
                    159:      control
                    160:      (-pass)
                    161:      pass
                    162:   ]
                    163:   [  ] 3] extension
                    164: 
1.2       takayama  165:  [(oxCreateClient2) peer 0 pass] extension /ox.ccc set
                    166:                      %% 0 means connect from only localhost. 
                    167:  (The server is binded to the variable ox.ccc) message
                    168:   ox.ccc.init 
                    169:  ] pop
                    170:  popVariables
                    171: } def
                    172: 
1.20      takayama  173: %% For cygwin
                    174: /sm1connectr_xcygwin {
                    175:  [/in-sm1connectr_xcygwin /pass /peer /data /control /sss] pushVariables
1.2       takayama  176:  [
1.20      takayama  177:  (Hello) message
                    178:  /pass [(oxGenPass)] extension def
1.2       takayama  179:  /peer [(oxGetPort) (localhost)] extension def
                    180:  /data peer 1 get toString def
                    181:  /control peer 3 get toString def
                    182:  peer message
1.20      takayama  183:  [oxpath.oxlog.xterm  
                    184:   [oxpath.ox] getPathNameSm1  
                    185:   ( -reverse -ox ) 
                    186:   [oxpath.oxsm1] getPathNameSm1
                    187:   ( -data ) data ( -control ) control  ( -pass ) pass 
                    188:   oxpath.null
                    189:   ( &)] cat /sss set
                    190:  sss message 
                    191:  sss system
                    192:  [(oxCreateClient2) peer 0 pass] extension /ox.ccc set
1.1       takayama  193:                      %% 0 means connect from only localhost. 
1.20      takayama  194:  (The server is binded to the variable ox.ccc) message
                    195:   ox.ccc.init 
1.1       takayama  196:  ] pop
                    197:  popVariables
                    198: } def
                    199: 
1.8       takayama  200: %% Skip it. initializePathNamesForOx   

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