21.04.2014 20:58, Frantisek Hanzlik пишет: > Hello DOSEMU and FreeDOS gurus, > > I'm some time dealing with the idea of writing a program, which should > simplify porting DOS programs which are using some windows supplements > to run on Linux under DOSEMU/FreeDOS. DOS programs, which are still > maintained, are mostly supposed to be run under windows and their > authors often complement them with windows programs, which did some > in DOS problematic tasks (e.g. print to windows printer, sent e-mail, > find free disk space, download something from internet etc.), and > there usually is no support for running these programs under Dosemu+ > DOS. On other hand, many of these supplemental tasks should be simple > solve under Linux too (e.g. print to Linux printer via pcl->ghostscript > filter, send mail via mailx/TB, obtain disk space with shell+df script, > download something with wget etc.). > One such program I'm using and I wonder how to do it, to I can also > use these additional features. My idea is that: > > 1) small DOS program functioning as OS switcher, which I copied as many > times as there are windows programs, under their names. This switcher > will be executed by DOS program instead of the original windows program > - supplement. > > 2) this switcher program will be driven by simple text configuration > file, one line will represent one windows program, and each line will > have three columns: > - program name under which will be this 'switcher' run. > - path to corresponding windows supplement program. > - path to corresponding Linux supplement program/script. When this > path will begin with drive letter, then it will be started as DOS > program, otherwise as Linux program/script. > > 3) this small switcher finds out what name is running, accordingly > looks in the configuration file, and on the basis of whether it > run under DOSEMU or not select proper column - program which should > be started - and run it. Eventual parameters will be simply reused > from those which switcher receive. > > This arrangement (when original DOS program + this switcher will be > on same filesystem, which can be accessed from both Linux and windows) > should allow same functionality when user will work either on Linux or > windows. > > And what I would like like to ask a experts there in lists > - this concept is correct and feasible? > > - In what language should the switch should be programmed? Will be > appropriate to use C and Watcom C for DOS compiler? > > - This switcher should be perhaps as small as possible? But maybe > no - whether it will start Linux or windows program, there will > not be DOS 640 kB memory limitations? Write a simple program that finds out its name and runs a .bat file with the same name. The bat file can then analize your config and run the linux prog via unix.com.
------------------------------------------------------------------------------ Start Your Social Network Today - Download eXo Platform Build your Enterprise Intranet with eXo Platform Software Java Based Open Source Intranet - Social, Extensible, Cloud Ready Get Started Now And Turn Your Intranet Into A Collaboration Platform http://p.sf.net/sfu/ExoPlatform _______________________________________________ Dosemu-devel mailing list Dosemu-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/dosemu-devel