Amazon Contextual Product Ads

Monday, September 30, 2013

Running Windows applications on Unix

There is a need to reduce the cost of expensive Windows Server and licensing costs. How to find a solution that is cost effective and executes code of already pre-built windows applications on UNIX environment.

Solution Approach

Install Ubuntu (or other supported Unix) and wine.Run the specified windows application with Wine on command prompt. Wine converts all windows API calls into its native equivalent function calls and performs action as per the defined API. Hence application is able to perform action as per the desired functionality.

Scenario: Windows application source is available

If access to source code of windows application is provided then an alternate solution of using winlib is used where the source is recompiled thus also improving the performance of the system.

Scenario: Windows application source is not available

To ensure wine can run the application and certain tests need to be run and then wine is ready to use with the application. This is done using a test suite. Once the testing is passed the application is ready for use.

Wine internals

WINE (originally an acronym for "Wine Is Not an Emulator") is a compatibility layer capable of running Windows applications on several POSIX-compliant operating systems, such as Linux, Mac OSX, & BSD. Instead of simulating internal Windows logic like a virtual machine or emulator, Wine translates Windows API calls into POSIX calls on-the-fly, eliminating the performance and memory penalties of other methods and allowing you to cleanly integrate Windows applications into your desktop. And Windows API calls and services also are not emulated, but rather substituted with Linux equivalents that are compiled for x86 and run at full, native speed.
Supported Windows Versions
Windows 3.1 is supported
Most applications executions can be done in the 32bit or 64bit backward compatibility mode.
64bit or 32bit applications
32bit applications are supported although wine can also run 64bit machines
.NET applications
In the recent wine update .net applications are supported

How to run wine

How to run Wine
Usage: wine PROGRAM [ARGUMENTS...] Run the specified program
wine --help Display this help and exit
wine --version Output version information and exit
The first argument should be the name of the file you want wine to execute. If the executable is in the Path
environment variable, you can simply give the executable file name. However, if the executable is not in Path, you
must give the full path to the executable. For example, given a Path of the following:
Path="c:\windows;c:\windows\system;e:\;e:\test;f:\"
You could run the file c:\windows\system\foo.exe with:
$ wine foo.exe

Issues that need to be resolved

  • Missing dll’s
  • Windows Registry
  • Windows Drivers

Benefits

Some of the other benefits Wine can provide over Windows:
•Possible to take advantage of Unix strong points such as stability, flexibility, remote administration while still using the Windows applications you depend on.
•Unix has always made it possible to write powerful scripts. Wine makes it possible to call Windows applications from scripts that can also leverage the Unix environment to its full extent.
•Wine makes it possible to access Windows applications remotely, even if they are a few thousand miles away.
•Wine makes it economical to use thin clients: simply install Wine on a Linux server, and you can access these Windows applications from any X terminal.
•Wine can also be used to make existing Windows applications available on the Web by using VNC and its Java client.
•Wine is Open Source Software, so can be extended it to suit your needs. The code can be fixed after issues are found that prevent the use of windows application.

Open Issues

 The Windows Genuine Advantage system checks for existence of Wine registry keys. Hence executing Microsoft product may not be possible. Custom built software and compiled products that are not commercial product but applications should be possible to run under the wine environment.
2.       Windows update is not supported. Hence updates to packages , bug fixes and security update are not supported.

      References

       www.winehq.org

Conclusion

Hence its possible to reduce cost for applications to be run on Unix with certain restrictions refer to link here

No comments: