# guide to port



## jmersh (Nov 3, 2012)

If I got a Windows based software and I want to port it to FreeBSD but there are certain Windows based components that it requires, is there any guide to help?


----------



## wblock@ (Nov 3, 2012)

Please give details.


----------



## jmersh (Nov 3, 2012)

I got a point of sale software that is built on C# but requires components such as .Net Microsoft SQL. So I am not sure how to port this over.


----------



## wblock@ (Nov 3, 2012)

To get it to work would require either porting the dependencies (unlikely, with Microsoft) or adapting it to use something already available.  MySQL and PostgreSQL are available, as are others.  Another option would be to require a separate Windows server just for the database.


----------



## UNIXgod (Nov 3, 2012)

Tall order. Just a shot in the dark but I believe the mono project is C#/.NET.  Microsoft SQL may work with wine but that is probably not the route you want to take.

Sounds like a nice migration project for both the database and software. Be prepared for alot of code rewriting or writing your own external C# DSL in ruby or what not.


----------



## jackp (Nov 28, 2012)

F#/C#/.NET developer here -- unless your application makes extensive use of COM, or otherwise requires very specific Win32 APIs, it should likely port over to Mono without too much work. Even if you are interoperating with native code on Windows, there may be an equivalent Mono API you can take advantage of.

There's a Mono tool called the Mono Migration Analyzer (MoMA) which can scan your code and identify possible porting issues.

You'll still need Windows to run your SQL Server database though -- I don't think it runs on Wine.


----------



## jackp (Dec 12, 2012)

I stumbled across an interesting site today -- a blog by a C# developer who also works with Mono and FreeBSD:
http://www.rhyous.com/freebsd-friday/

There are a bunch of good tutorials on the site. Many of them are about getting started with FreeBSD in general, but there are also several about setting up Apache + Mono to host ASP.NET sites on FreeBSD.


----------



## sk8harddiefast (Dec 13, 2012)

I am not sure if wine can make your job but could be an option. Wine is a tool that emulates windows Api on top of X. Theoretically if you can manually install all dependencies are needed, you could make it work under FreeBSD. 
Wine homepage will give you all the answers.


----------

