SUBSIM Radio Room Forums



SUBSIM: The Web's #1 resource for all submarine & naval simulations since 1997

Go Back   SUBSIM Radio Room Forums > Sub/Naval + Other Games > Indie Subsims
Forget password? Reset here

View Poll Results: Would you play OpenSSN on Windows?
Yes, please make OpenSSN available on Windows 14 93.33%
No, I already have subsims I like on Windows 1 6.67%
I don't use Windows 0 0%
Voters: 15. You may not vote on this poll

Reply
 
Thread Tools Display Modes
Old 09-03-11, 01:45 PM   #1
magicstix
Captain
 
Join Date: Aug 2011
Location: Nuclear submarine under the North Pole
Posts: 481
Downloads: 1
Uploads: 0
Default

If you're using only SDL for the graphics it should be a pretty straightforward port...
magicstix is offline   Reply With Quote
Old 09-03-11, 01:50 PM   #2
redtyphoon
Sailor man
 
Join Date: May 2011
Posts: 45
Downloads: 0
Uploads: 0
Default SDL

The SDL library is the only external dependency. So, yes, porting should be fairly straight forward. However, I don't have a Windows box to compile/test with, which gets in the way.
redtyphoon is offline   Reply With Quote
Old 09-03-11, 01:58 PM   #3
magicstix
Captain
 
Join Date: Aug 2011
Location: Nuclear submarine under the North Pole
Posts: 481
Downloads: 1
Uploads: 0
Default

Hmm... I took a look through main.cpp and didn't see anything that would cause trouble under windows. I'll run it through visual studio and see what breaks.
magicstix is offline   Reply With Quote
Old 09-03-11, 02:08 PM   #4
redtyphoon
Sailor man
 
Join Date: May 2011
Posts: 45
Downloads: 0
Uploads: 0
Default Porting

Most of the code should be fine, I've done my best to keep it to standards. The only place where I think there may be trouble is in files.cpp

The files.cpp module tries to find OpenSSN's data files and checks a couple of different places, including the current working directory. Since files are organized differently on Windows than Linux/BSD this function might bomb. I think it will still compile, but it might not return the correct location. Everything else is pretty vanilla.
redtyphoon is offline   Reply With Quote
Old 09-03-11, 02:10 PM   #5
magicstix
Captain
 
Join Date: Aug 2011
Location: Nuclear submarine under the North Pole
Posts: 481
Downloads: 1
Uploads: 0
Default

Which version of SDL are you using? The latest doesnt have the SDL subdirectory tree nor does it have SDL_image.h
magicstix is offline   Reply With Quote
Old 09-03-11, 02:12 PM   #6
magicstix
Captain
 
Join Date: Aug 2011
Location: Nuclear submarine under the North Pole
Posts: 481
Downloads: 1
Uploads: 0
Default

Nevermind... I didn't know it was a second library.
magicstix is offline   Reply With Quote
Old 09-03-11, 02:24 PM   #7
magicstix
Captain
 
Join Date: Aug 2011
Location: Nuclear submarine under the North Pole
Posts: 481
Downloads: 1
Uploads: 0
Default

OK thus far the biggest problems in getting openSSN to compile under MSVC are its use of non-standard C functions.

The biggest offenders are strcasestr and snprintf. They're not in the C89 standard (which MSVC uses). I'm working around them at the moment with macros.

The other offender is "unistd.h" which is a unix-only header file. I've gotten around this with #ifndef WIN32..#endif preventing the compiler from attempting to include the header. MSVC supports the types defined in it natively.
magicstix is offline   Reply With Quote
Old 02-10-12, 09:50 AM   #8
CTarana
Bosun
 
Join Date: Jan 2009
Posts: 68
Downloads: 28
Uploads: 0
Default

I would definately be interested in seeing OpenSSN ported over to WindowsXP, Vista or 7. I use XP myself and the last version of OpenSSN I have works great. I have version 0.7. I just installed copies of MinGW C++ and Microsoft Visual Studio 8 for another project I'm working on. I'm trying to teach myself C++ and Visual Basic so I can port an older Visual Basic 5.5 program and finish it!

ChristopherT
CTarana is offline   Reply With Quote
Old 02-10-12, 10:47 PM   #9
magicstix
Captain
 
Join Date: Aug 2011
Location: Nuclear submarine under the North Pole
Posts: 481
Downloads: 1
Uploads: 0
Default

Quote:
Originally Posted by CTarana View Post
I would definately be interested in seeing OpenSSN ported over to WindowsXP, Vista or 7. I use XP myself and the last version of OpenSSN I have works great. I have version 0.7. I just installed copies of MinGW C++ and Microsoft Visual Studio 8 for another project I'm working on. I'm trying to teach myself C++ and Visual Basic so I can port an older Visual Basic 5.5 program and finish it!

ChristopherT
There's already a windows version out there, it's kinda old though...
magicstix is offline   Reply With Quote
Old 02-12-12, 01:14 PM   #10
CTarana
Bosun
 
Join Date: Jan 2009
Posts: 68
Downloads: 28
Uploads: 0
Default

Where do I install the SDL libraries if I'm going to try to use MinGW C++ to try to compile the source code for version 1.1 of OpenSSN? Mind you this is the first time I've used any sort of compiler! I'm running on WinXP!

Thanks!

ChristopherT
CTarana is offline   Reply With Quote
Old 02-12-12, 08:11 PM   #11
magicstix
Captain
 
Join Date: Aug 2011
Location: Nuclear submarine under the North Pole
Posts: 481
Downloads: 1
Uploads: 0
Default

Quote:
Originally Posted by CTarana View Post
Where do I install the SDL libraries if I'm going to try to use MinGW C++ to try to compile the source code for version 1.1 of OpenSSN? Mind you this is the first time I've used any sort of compiler! I'm running on WinXP!

Thanks!

ChristopherT
If you're using mingw c++ you're probably running under cygwin, correct? In that case you wouldn't be using DLLs, you'd be linking against the .so's.

It'd probably be a better idea to take the source and try to compile it under visual studio.
magicstix is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -5. The time now is 04:14 AM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright © 1995- 2025 Subsim®
"Subsim" is a registered trademark, all rights reserved.