Annotation of OpenXM/src/kan96xx/Doc/ox-win.sm1, Revision 1.14
1.14 ! takayama 1: %%%%%%%%%%% $OpenXM: OpenXM/src/kan96xx/Doc/ox-win.sm1,v 1.13 2002/01/09 11:32:01 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 {
1.14 ! takayama 37: /ox.ostype (native-windows) def
1.13 takayama 38: }{
1.14 ! takayama 39: [(getenv) (OSTYPE)] extension /ox.ostype set
1.13 takayama 40: } ifelse
41:
1.14 ! takayama 42: ox.ostype (cygwin) eq {
1.13 takayama 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: }{
1.14 ! takayama 51: /oxpath.ox
1.13 takayama 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) [
1.14 ! takayama 103: %%(c:/windows/command/start)
! 104: (start)
! 105: %%[OpenXM_HOME_WIN (\bin\ox)] cat
! 106: oxpath.ox
1.4 takayama 107: (-reverse)
108: (-ox)
1.8 takayama 109: [OpenXM_HOME_WIN (\bin\ox_sm1.exe)] cat
1.4 takayama 110: (-data)
111: data
112: (-control)
113: control
114: (-pass)
115: pass
116: ]
117: [ ] 3] extension
118:
1.2 takayama 119: [(oxCreateClient2) peer 0 pass] extension /ox.ccc set
120: %% 0 means connect from only localhost.
121: (The server is binded to the variable ox.ccc) message
122: ox.ccc.init
123: ] pop
124: popVariables
125: } def
126:
1.9 takayama 127: %% Test
1.11 takayama 128: /asirconnectr_win_test {
1.2 takayama 129: [/in-sm1connectr /pass /peer /data /control ] pushVariables
130: [
1.5 takayama 131: /pass [ ] cat def %% Do not use one time password.
1.2 takayama 132: /peer [(oxGetPort) (localhost)] extension def
133: /data peer 1 get toString def
134: /control peer 3 get toString def
135: peer message
1.5 takayama 136: [control data] message
137: [(forkExec)
138: [OX_LAUNCH
139: (ox_launch)
140: (localhost)
141: (0)
142: control toString
143: data toString
144: (ox_asir)
145: (1)
146: ]
147: [ ]
148: 7 %% 1 1 1
149: ] extension ;
150: [(oxCreateClient2) peer 0 pass] extension /oxasir.ccc set
1.1 takayama 151: %% 0 means connect from only localhost.
1.5 takayama 152: (The server is binded to the variable oxasir.ccc) message
153: %% Initialization code for asir.
1.1 takayama 154: ] pop
155: popVariables
156: } def
157:
1.8 takayama 158: %% Skip it. initializePathNamesForOx
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>