Annotation of OpenXM/src/kan96xx/Doc/ox-win_old.sm1, Revision 1.1
1.1 ! takayama 1: %%%%%%%%%%% $OpenXM$
! 2:
! 3: (ox-win.start.noiconic) boundp {
! 4: /ox-win.start.iconic 0 def
! 5: }{
! 6: /ox-win.start.iconic 1 def
! 7: } ifelse
! 8:
! 9: /ox-win.sm1.loaded 1 def
! 10: (ox.sm1.loaded) boundp {
! 11: }{
! 12: [(parse) (ox.sm1) pushfile] extension pop
! 13: } ifelse
! 14:
! 15: $ox-win.sm1, ---OpenXM protocol module for Microsoft Windows 1/9, 2002 (C) N.Takayama.$ message-quiet
! 16:
! 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
! 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
! 24: [(getenv) (OPENXMHOMEWIN)] extension
! 25: /OpenXM_HOME_WIN set
! 26: OpenXM_HOME_WIN tag 0 eq {
! 27: [(getenv) (OpenXM_HOME)] extension
! 28: /OpenXM_HOME_WIN set
! 29: } { } ifelse
! 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
! 37:
! 38: /ox.win.set.start {
! 39: [(stat) (c:\windows\system32\cmd.exe)] extension 0 get
! 40: 0 eq {
! 41: /ox.win.start.0 [(c:\windows\system32\cmd.exe) (/c) (start)] def
! 42: /ox.win.start [ox.win.start.0 aload pop
! 43: ox-win.start.iconic { (/min) } { } ifelse ] def
! 44: }{
! 45: [(stat) (c:\winnt\system32\cmd.exe)] extension 0 get
! 46: 0 eq {
! 47: /ox.win.start.0 [(c:\winnt\system32\cmd.exe) (/c) (start) ] def
! 48: /ox.win.start [ox.win.start.0 aload pop
! 49: ox-win.start.iconic { (/min) } { } ifelse ] def
! 50: }{
! 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
! 54: } ifelse
! 55: } ifelse
! 56: } def
! 57: ox.win.set.start
! 58:
! 59: %%%%%%%%%%%%%%% end configuration %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
! 60: %% Set constants for windows.
! 61:
! 62: ox.ostype 1 get (cygwin) eq {
! 63: /oxpath.ox (bin/ox.exe) def
! 64: /oxpath.oxsm1 (bin/ox_sm1.exe) def
! 65: /oxpath.oxlog (bin/oxlog.exe) def
! 66: /oxpath.xterm (start /min ) def
! 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
! 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 {
! 84: /oxpath.ox
! 85: [ OpenXM_HOME_WIN
! 86: (\bin\ox.exe)
! 87: ] cat
! 88: def
! 89: }{ } ifelse
! 90:
! 91: /sm1connectr {
! 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
! 101: } def
! 102:
! 103: %% For cygwin
! 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
! 108: /sm1connectr_cygwin {
! 109: [/in-sm1connectr /pass /peer /data /control /sss ] pushVariables
! 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
! 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)
! 121: ( -data ) data ( -control ) control ( -pass ) pass
! 122: ( -wait 2 )
! 123: oxpath.null
! 124: ( )] cat /sss set
! 125: sss message
! 126: sss system
! 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:
! 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
! 139: %% For Native windows system
! 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
! 148: (Hello ) message
! 149: [(forkExec) [
! 150: ox.win.start aload pop
! 151: %%(c:\windows\system32\cmd.exe) (/c) (start)
! 152: oxpath.ox
! 153: (-reverse)
! 154: (-ox)
! 155: [OpenXM_HOME_WIN (\bin\ox_sm1.exe)] cat
! 156: (-data)
! 157: data
! 158: (-control)
! 159: control
! 160: (-pass)
! 161: pass
! 162: ]
! 163: [ ] 3] extension
! 164:
! 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:
! 173: %% For cygwin
! 174: /sm1connectr_xcygwin {
! 175: [/in-sm1connectr_xcygwin /pass /peer /data /control /sss] pushVariables
! 176: [
! 177: (Hello) message
! 178: /pass [(oxGenPass)] extension def
! 179: /peer [(oxGetPort) (localhost)] extension def
! 180: /data peer 1 get toString def
! 181: /control peer 3 get toString def
! 182: peer message
! 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
! 193: %% 0 means connect from only localhost.
! 194: (The server is binded to the variable ox.ccc) message
! 195: ox.ccc.init
! 196: ] pop
! 197: popVariables
! 198: } def
! 199:
! 200: %% Skip it. initializePathNamesForOx
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>