version 1.9, 2001/12/28 01:20:25 |
version 1.21, 2002/10/01 13:00:33 |
|
|
%%%%%%%%%%% $OpenXM: OpenXM/src/kan96xx/Doc/ox-win.sm1,v 1.8 2001/08/22 03:23:25 takayama Exp $
|
%%%%%%%%%%% $OpenXM: OpenXM/src/kan96xx/Doc/ox-win.sm1,v 1.20 2002/08/03 06:02:35 takayama Exp $
|
|
|
|
(ox-win.start.noiconic) boundp {
|
|
/ox-win.start.iconic 0 def
|
|
}{
|
|
/ox-win.start.iconic 1 def
|
|
} ifelse
|
|
|
/ox-win.sm1.loaded 1 def
|
/ox-win.sm1.loaded 1 def
|
/ox.sm1.loaded boundp {
|
(ox.sm1.loaded) boundp {
|
}{
|
}{
|
[(parse) (ox.sm1) pushfile] extension pop
|
[(parse) (ox.sm1) pushfile] extension pop
|
} ifelse
|
} ifelse
|
|
|
$ox-win.sm1, ---OpenXM protocol module for Microsoft Windows 08/22, 2001 (C) N.Takayama.$ message-quiet
|
$ox-win.sm1, ---OpenXM protocol module for Microsoft Windows 1/9, 2002 (C) N.Takayama.$ message-quiet
|
|
|
%%%%%%%%%%%% Configuration: Specify your server path
|
%%%%%%%%%%%% Configuration: Specify your server path
|
%%%%% ox, ox_sm1, oxlog are contained in kxx.tgz
|
%%%%% ox, ox_sm1, oxlog are contained in kxx.tgz
|
Line 21 OpenXM_HOME_WIN tag 0 eq { |
|
Line 27 OpenXM_HOME_WIN tag 0 eq { |
|
[(getenv) (OpenXM_HOME)] extension
|
[(getenv) (OpenXM_HOME)] extension
|
/OpenXM_HOME_WIN set
|
/OpenXM_HOME_WIN set
|
} { } ifelse
|
} { } ifelse
|
|
OpenXM_HOME_WIN tag 0 eq {
|
|
%% Hard encoding:
|
|
/OpenXM_HOME_WIN
|
|
(\OpenXM-win)
|
|
% (\cygwin\home\nobuki\OpenXM\misc\packages\Windows\OpenXM-win)
|
|
def
|
|
} { } ifelse
|
|
|
%% This is used in asirconnectr_win
|
/ox.win.set.start {
|
/OX_LAUNCH (c:\home\asir\bin\ox_launch.exe) def
|
[(stat) (c:\windows\system32\cmd.exe)] extension 0 get
|
|
0 eq {
|
|
/ox.win.start.0 [(c:\windows\system32\cmd.exe) (/c) (start)] def
|
|
/ox.win.start [ox.win.start.0 aload pop
|
|
ox-win.start.iconic { (/min) } { } ifelse ] def
|
|
}{
|
|
[(stat) (c:\winnt\system32\cmd.exe)] extension 0 get
|
|
0 eq {
|
|
/ox.win.start.0 [(c:\winnt\system32\cmd.exe) (/c) (start) ] def
|
|
/ox.win.start [ox.win.start.0 aload pop
|
|
ox-win.start.iconic { (/min) } { } ifelse ] def
|
|
}{
|
|
/ox.win.start.0 [ (start) ] def
|
|
/ox.win.start [ ox.win.start.0 aload pop
|
|
ox-win.start.iconic { (/min) } { } ifelse ] def
|
|
} ifelse
|
|
} ifelse
|
|
} def
|
|
ox.win.set.start
|
|
|
%%%%%%%%%%%%%%% end configuration %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
%%%%%%%%%%%%%%% end configuration %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
/oxpath.ox (bin/ox.exe) def
|
%% Set constants for windows.
|
/oxpath.oxsm1 (bin/ox_sm1.exe) def
|
|
/oxpath.oxlog (bin/oxlog.exe) def
|
|
/oxpath.xterm (start ) def
|
|
/oxpath.null ( ) def
|
|
/oxpath.null00 ( >& /dev/null ) def %%cf. oxNoX
|
|
/oxpath.null00-pure-sh ( 2>&1 >/dev/null) def %%TODO:It does not work in our case
|
|
|
|
|
ox.ostype 1 get (cygwin) eq {
|
|
/oxpath.ox (bin/ox.exe) def
|
|
/oxpath.oxsm1 (bin/ox_sm1.exe) def
|
|
/oxpath.oxlog (bin/oxlog.exe) def
|
|
/oxpath.xterm (start /min ) def
|
|
/oxpath.null ( ) def
|
|
/oxpath.null00 ( >& /dev/null ) def %%cf. oxNoX
|
|
/oxpath.null00-pure-sh ( 2>&1 >/dev/null) def %%TODO:It does not work in our case
|
|
}{ } ifelse
|
|
|
|
ox.ostype 1 get (xcygwin) eq {
|
|
/oxpath.ox (bin/ox.exe) def
|
|
/oxpath.oxsm1 (bin/ox_sm1.exe) def
|
|
/oxpath.oxlog (bin/oxlog.exe) def
|
|
/oxpath.xterm (/usr/X11R6/bin/xterm -icon -e ) def
|
|
/oxpath.oxlog.xterm (oxlog /usr/X11R6/bin/xterm -icon -e ) def
|
|
/oxpath.null ( ) def
|
|
/oxpath.null00 ( >& /dev/null ) def %%cf. oxNoX
|
|
/oxpath.null00-pure-sh ( 2>&1 >/dev/null) def %%TODO:It does not work in our case
|
|
}{ } ifelse
|
|
|
|
ox.ostype 1 get (native) eq {
|
|
/oxpath.ox
|
|
[ OpenXM_HOME_WIN
|
|
(\bin\ox.exe)
|
|
] cat
|
|
def
|
|
}{ } ifelse
|
|
|
/sm1connectr {
|
/sm1connectr {
|
[(getenv) (OSTYPE)] extension (cygwin) eq
|
ox.ostype 1 get (cygwin) eq {
|
{
|
sm1connectr_cygwin
|
sm1connectr_cygwin
|
}{ } ifelse
|
}{
|
ox.ostype 1 get (xcygwin) eq {
|
sm1connectr_win
|
sm1connectr_xcygwin
|
}ifelse
|
}{ } ifelse
|
|
ox.ostype 1 get (native) eq {
|
|
sm1connectr_win
|
|
}{ } ifelse
|
} def
|
} def
|
|
|
%% For cygwin
|
%% For cygwin
|
|
%% How to debug:
|
|
%% 1. Use start 'c:\cygwin\cygwin.bat' to create a cygwin window.
|
|
%% 2. Set OpenXM_HOME and run sm1 , (ox.sm1) run, sm1_connectr
|
|
%% 3. In order to kill a process, use ps and kill -9
|
/sm1connectr_cygwin {
|
/sm1connectr_cygwin {
|
[/in-sm1connectr /pass /peer /data /control ] pushVariables
|
[/in-sm1connectr /pass /peer /data /control /sss ] pushVariables
|
[
|
[
|
/pass [(oxGenPass)] extension def
|
/pass [(oxGenPass)] extension def
|
/peer [(oxGetPort) (localhost)] extension def
|
/peer [(oxGetPort) (localhost)] extension def
|
/data peer 1 get toString def
|
/data peer 1 get toString def
|
/control peer 3 get toString def
|
/control peer 3 get toString def
|
peer message
|
peer message
|
[(start ox ) ( -reverse -ox ) (/home/nobuki/OpenXM/src/kxx/ox_sm1.exe)
|
[ox.win.start { ( ) } map cat ox_backslash_to_slash
|
|
( ox )
|
|
( -reverse -ox )
|
|
[(c:/cygwin) OpenXM_HOME_WIN (/bin/ox_sm1.exe)] cat
|
|
% (c:/cygwin/home/TakayamaNobuki/OpenXM/bin/ox_sm1.exe)
|
( -data ) data ( -control ) control ( -pass ) pass
|
( -data ) data ( -control ) control ( -pass ) pass
|
( -wait 2 )
|
( -wait 2 )
|
oxpath.null
|
oxpath.null
|
( )] cat system
|
( )] cat /sss set
|
|
sss message
|
|
sss system
|
[(oxCreateClient2) peer 0 pass] extension /ox.ccc set
|
[(oxCreateClient2) peer 0 pass] extension /ox.ccc set
|
%% 0 means connect from only localhost.
|
%% 0 means connect from only localhost.
|
(The server is binded to the variable ox.ccc) message
|
(The server is binded to the variable ox.ccc) message
|
Line 64 OpenXM_HOME_WIN tag 0 eq { |
|
Line 132 OpenXM_HOME_WIN tag 0 eq { |
|
popVariables
|
popVariables
|
} def
|
} def
|
|
|
|
%% How to debug:
|
|
%% 1. Set a batch file to change directory. Start command window.
|
|
%% 2. Set OpenXMHOMEWIN (cf. debug-tool/asirgui-debug.bat)
|
|
%% and run sm1 , (ox.sm1) run, sm1_connectr
|
%% For Native windows system
|
%% For Native windows system
|
/sm1connectr_win {
|
/sm1connectr_win {
|
[/in-sm1connectr /pass /peer /data /control ] pushVariables
|
[/in-sm1connectr /pass /peer /data /control ] pushVariables
|
Line 73 OpenXM_HOME_WIN tag 0 eq { |
|
Line 145 OpenXM_HOME_WIN tag 0 eq { |
|
/data peer 1 get toString def
|
/data peer 1 get toString def
|
/control peer 3 get toString def
|
/control peer 3 get toString def
|
peer message
|
peer message
|
|
(Hello ) message
|
[(forkExec) [
|
[(forkExec) [
|
(c:/windows/command/start)
|
ox.win.start aload pop
|
[OpenXM_HOME_WIN (\bin\ox)] cat
|
%%(c:\windows\system32\cmd.exe) (/c) (start)
|
|
oxpath.ox
|
(-reverse)
|
(-reverse)
|
(-ox)
|
(-ox)
|
[OpenXM_HOME_WIN (\bin\ox_sm1.exe)] cat
|
[OpenXM_HOME_WIN (\bin\ox_sm1.exe)] cat
|
Line 96 OpenXM_HOME_WIN tag 0 eq { |
|
Line 170 OpenXM_HOME_WIN tag 0 eq { |
|
popVariables
|
popVariables
|
} def
|
} def
|
|
|
%% Test
|
%% For cygwin
|
/asirconnectr_win {
|
/sm1connectr_xcygwin {
|
[/in-sm1connectr /pass /peer /data /control ] pushVariables
|
[/in-sm1connectr_xcygwin /pass /peer /data /control /sss] pushVariables
|
[
|
[
|
/pass [ ] cat def %% Do not use one time password.
|
(Hello) message
|
|
/pass [(oxGenPass)] extension def
|
/peer [(oxGetPort) (localhost)] extension def
|
/peer [(oxGetPort) (localhost)] extension def
|
/data peer 1 get toString def
|
/data peer 1 get toString def
|
/control peer 3 get toString def
|
/control peer 3 get toString def
|
peer message
|
peer message
|
[control data] message
|
[oxpath.oxlog.xterm
|
[(forkExec)
|
[oxpath.ox] getPathNameSm1
|
[OX_LAUNCH
|
( -reverse -ox )
|
(ox_launch)
|
[oxpath.oxsm1] getPathNameSm1
|
(localhost)
|
( -data ) data ( -control ) control ( -pass ) pass
|
(0)
|
oxpath.null
|
control toString
|
( &)] cat /sss set
|
data toString
|
sss message
|
(ox_asir)
|
sss system
|
(1)
|
[(oxCreateClient2) peer 0 pass] extension /ox.ccc set
|
]
|
|
[ ]
|
|
7 %% 1 1 1
|
|
] extension ;
|
|
[(oxCreateClient2) peer 0 pass] extension /oxasir.ccc set
|
|
%% 0 means connect from only localhost.
|
%% 0 means connect from only localhost.
|
(The server is binded to the variable oxasir.ccc) message
|
(The server is binded to the variable ox.ccc) message
|
%% Initialization code for asir.
|
ox.ccc.init
|
] pop
|
] pop
|
popVariables
|
popVariables
|
} def
|
} def
|