1. Forum moved (you can use login and pass from old forum)
  2. Many discussions moved to the bugtracker

Getting started on Windows / VS 2015

Discussion in 'Coding' started by letwolf, Apr 13, 2020.

  1. letwolf

    letwolf Registered

    Joined:
    Apr 10, 2020
    Messages:
    5
    Likes Received:
    5
    Best Answers:
    0
    I cant find any *.sln or nuget packages inside cloned sources.
    It seems like "just plain C++ files" without any linking to any particular IDE.
    Please help with steps how to set up project in VS2015 .
    Original post from Progpm:
    Source code can be found here:
    https://github.com/OpenApoc/OpenApoc

    Requires:
    • Windows:
      • Visual studio 2015 (or newer)
      • All other requirements are fetched automatically as part of the build in nuget packages or git submodules
    • Linux:
      • GCC 4.9 or clang 3.8 (or newer)
      • CMake
      • SDL2
      • Boost
      • All other requirements are fetched automatically as git submodules

    Once cloned, you can use CMake to configure your build, or if you're using Visual Studio 2015, just open the .sln file
     
    makus likes this.
  2. makus

    makus Designer, forum admin Administrator Designer/Artist

    Joined:
    Sep 24, 2014
    Messages:
    307
    Likes Received:
    58
    Best Answers:
    2
    Heya @letwolf =]
    Happy to see a new fan of the game
    Glad that you wrote on the forum but go to our discord there sit all programmers and fans
    There will definitely answer you the fastest
    https://discord.gg/f8Rayre
     
  3. Atrosha

    Atrosha Member Programmer Tester

    Joined:
    Dec 20, 2018
    Messages:
    6
    Likes Received:
    7
    Best Answers:
    0
    Right from your link...

    Building on Windows
    • Install Visual Studio (2017 or later) with "Desktop Development with C++" workload.
    • Install a Git client eg. Github Desktop.
    • Checkout OpenApoc from GitHub.
    • If you are using the GitHub Desktop client, the submodules should already be setup at first checkout. If not, or if the submodules have been updated, run the following commands in the 'git shell' from the root of the OpenApoc repository. This should reset the submodule checkouts to the latest versions (NOTE: This will overwrite any changes to code in the dependencies/ directory).
    git submodule update --init --recursive
    • All the other dependencies (Boost, SDL2, Qt) need to be supplied separately. Install Vcpkg and run the following command:
      • For x64 builds:
    vcpkg --triplet x64-windows install sdl2 boost-locale boost-program-options boost-uuid boost-crc qt5-base
    • For x86 builds:
    vcpkg --triplet x86-windows install sdl2 boost-locale boost-program-options boost-uuid boost-crc qt5-base
    • For list of all supported by Vcpkg architectures: vcpkg help triplet

    • Copy the original XCom:Apocalypse .iso file into the "data/" directory. This could also be a directory containing all the extracted files from the CD, and it should be named the same (IE the directory should be data/cd.iso/). This is used during the build to extract some data tables.

    • Open the OpenApoc directory in Visual Studio (if you don't have an Open Folder option, generate a project with CMake).

    • Set your configuration to x64-Release or x86-Release (must match your Vcpkg dependencies). Release is recommended as Debug is very slow.

    • Visual Studio should automatically detect and configure CMake appropriately. If you didn't integrate Vcpkg, you will need to manually add it to your CMake Settings file:
      • Visual Studio 2017:
    "variables": [
    {
    "name": "CMAKE_TOOLCHAIN_FILE",
    "value": "<path to vcpkg>\\scripts\\buildsystems\\vcpkg.cmake"
    }
    ]
    • Visual Studio 2019: Build > CMake Settings > Toolchain file > <path to vcpkg>\\scripts\\buildsystems\\vcpkg.cmake

    • Build OpenApoc. If you get errors, clear your cache from the CMake menu and generate again.

    • When running from the Visual Studio UI, the working directory is set to the root of the project, so the data folder should already be in the right place. If you want to run outside of Visual Studio, you need to copy the whole 'data' folder (including the cd.iso file) into the folder openapoc.exe resides in.
     
    letwolf and makus like this.
  4. letwolf

    letwolf Registered

    Joined:
    Apr 10, 2020
    Messages:
    5
    Likes Received:
    5
    Best Answers:
    0
    That's ultra useful. Thank you ! Maybe pin it to "Geting started" topic?
     
    makus likes this.
  5. makus

    makus Designer, forum admin Administrator Designer/Artist

    Joined:
    Sep 24, 2014
    Messages:
    307
    Likes Received:
    58
    Best Answers:
    2
    done . you can add some more info if u like
     
  6. JonnyH

    JonnyH Well-Known Member Official Developer Administrator

    Joined:
    Jul 17, 2014
    Messages:
    183
    Likes Received:
    45
    Best Answers:
    0
    I think that's just copy/paste from the README.md from the github repository - maybe it's best just to link to that, so if it changes we don't have to update everything?

    And maybe change the title of this - Visual Studio 2015 isn't supported and won't work - we need at least an (updated) 2017
     
  7. makus

    makus Designer, forum admin Administrator Designer/Artist

    Joined:
    Sep 24, 2014
    Messages:
    307
    Likes Received:
    58
    Best Answers:
    2

Share This Page