Windows NT Porting
- Subject:
This documentation deals with the porting of the VRMidtown client and viewer
from SGI to Windows NT, done during Fall Quarter 1998.
- Known Bugs:
- Problem when invalid server is entered
The client/viewer will apparently keep trying to connect to a server
that is not responding, which begins to eat up CPU time on the NT
machine.
- Incorrect exiting
The client/viewer will exit immediately, without sending a disconnect
message to the server. The abandoned client will hang around until
a certain number of packets have been ignored by the (nonexistant)
viewer before killing itself.
- Lack of decent commenting
A good amount of the commenting currently in the NT source is left
over from the SGI code, much of it out of place in the files. What
Windows-specific commentary that is in there is rather cryptic. This
should be changed.
- Incompatibility Issues Encountered:
- Threads
Microsoft has no notion of what IRIX pthreads are. Much the
same way, Microsoft threads, though well-done, have no
similar implementation in IRIX. The changes I made here
were done in two sections: the mutex.h and mutex.c needed
to be re-written to take advantage of MS's built-in
handles for synchronization, and the spot in network.c where
a new thread was created.
- Networking
Not terribly different, the few changes made here were all
in network.c and network.h -- fctrl does not exist in
Windows, and ioctlsocket had to be used to set the socket
as non-blocking.
- Calling procedure
This surprised me. Microsoft doesn't use the standard
convention of argc and argv for windowed programs, instead
any arguments are passed in in a single long string. Rather
than worrying about parsing said string, I made use of the
built-in file functionality inside the WinMain function (MS's
version of main()) to make everything that had been command-
line on the SGI into interactive on the NT machines. This
was done as a wrapper around main(), so as not to vary
too much from the SGI code.
- Future Plans/Suggestions:
- More abstraction
Make the main (changing) part of the code more-or-less platform
independent, and have the platform specific stuff be called in
similar functions.
- Combination of source
Sometime early next quarter, I would like to have the NT source and
the SGI source together in a single source tree, the version being
determined at compile-time by a #define, or a -D in the Makefile. I
believe this is possible at this point, with some effort.
- Easy installation method
When this becomes the client/viewer of choice for 1502 students, it
needs to be easily portable. I have begun researching InstallShield,
and the possibility of using an evaluation version to create a
simple, point-type-and-click install method.
- Better logon screen
Rather than re-typing in the same server time and again, a logon
screen that would save the server and port last connected to, and
put that up as a default would ease use.
- Saved user preferences
Doable through the registry, however, I have researched this very
little.
- Added functionality in 'meta' files
With the advent of user interaction as the client/viewer opens, rather
than reading completely from files, the possibility of creating what
is now 'meta' files from scratch on the fly comes into play.
<< Back to Course View: Fall 1998
|