Outpost Universe Forums

Projects & Development => Projects => OutpostHD => Topic started by: leeor_net on November 17, 2019, 10:47:39 PM

Title: Guide to Building from Source
Post by: leeor_net on November 17, 2019, 10:47:39 PM
I started putting together a guide for building OutpostHD from source: https://wiki.outpost2.net/doku.php?id=outposthd:building_from_source

Aside from what to do with NAS2D and the data assets, it should be pretty complete. Please let me know if you have any issues with the steps used in this guide.
Title: Re: Guide to Building from Source
Post by: Hooman on November 18, 2019, 01:55:23 PM
Instructions look clear so far.

When cloning the OPHD Git repository, is there an option somewhere to do a recursive clone? If so, that should automatically fetch the NAS2D library code as well. From the command line it is specified with --recursive. From a GUI (maybe TortoiseGit?) there was a checkbox for "recursive".
Title: Re: Guide to Building from Source
Post by: leeor_net on November 18, 2019, 07:43:49 PM
There is, I never really investigated what that option was. Through visual studio there is also a recursive option, I just don't remember exactly where.
Title: Re: Guide to Building from Source
Post by: Goof on November 23, 2019, 06:24:01 AM
Hi guys/girls

Just to add a Prerequisites for non english devs.
When you launch the command
Code: [Select]
vcpkg install glew:x86-windows glew:x64-windows physfs:x86-windows physfs:x64-windows
The tool warn about the missing english language package
Code: [Select]
Warning: The following VS instances are excluded because the English language pack is unavailable.
    C:\Program Files (x86)\Microsoft Visual Studio\2019\Community
Please install the English language pack.

Add the english language to fix it and run the command again .

(https://forum.outpost2.net/index.php?action=dlattach;topic=6321.0;attach=1794;image)
Title: Re: Guide to Building from Source
Post by: Hooman on November 23, 2019, 07:47:33 PM
Huh, I wonder what causes that.

Thank you for the report.
Title: Re: Guide to Building from Source
Post by: leeor_net on February 09, 2020, 11:59:43 AM
I updated the Building From Source article on the wiki. Since we moved everything to using vcpkg for dependencies and have now included NAS2D as part of the OutpostHD solution it should be a lot easier to build.
Title: Re: Guide to Building from Source
Post by: Hooman on February 09, 2020, 01:18:56 PM
I was about to add a note about running the InstallVcpkgDeps.bat file to install the vcpkg dependencies, though I just remembered that's already done automatically now as part of the NAS2D build step.

Does the Git integration with Visual Studio do a recursive Git checkout by default? I'm uncertain if it will really fetch NAS2D by default, or if an extra step is needed there.
Title: Re: Guide to Building from Source
Post by: Goof on February 10, 2020, 01:26:10 AM
It seems to work as i only clone the OPHD repository and import the 2 projects.
Title: Re: Guide to Building from Source
Post by: Vagabond on February 10, 2020, 10:45:28 AM
Quote
Does the Git integration with Visual Studio do a recursive Git checkout by default? I'm uncertain if it will really fetch NAS2D by default, or if an extra step is needed there.

Hooman, I tested this out. When cloning the repository using Visual Studio's built in Git functions, it automatically pulled NAS2D. I could not compile OPHD out of the box because it was missing the SDL dependency. I assume this is because SDL is installed via vcpkg and I don't believe vcpkg dependencies are automatically downloaded like nuget packages, but I didn't look into it at all.

Glad to see work going into streamlining OPHD's build flow.

-Brett
Title: Re: Guide to Building from Source
Post by: leeor_net on February 10, 2020, 07:28:49 PM
I haven't looked at the batch file as I don't have vcpkg installed in the environment so calling vcpkg from the command line results in a "command not found" type of issue so I haven't paid any attention to it. In the build setup on the Wiki I have a guide to install vcpkg, integrate with Visual Studio and then issue the commands to download and build the dependencies.

I'm still annoyed that the ttf and mixer dependencies link against debug sdl2 in release mode, so waiting on a patch for that but I doubt that'll take too long, the vcpkg team seems really responsive to those kinds of issues.