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

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

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