Source Code Compiler Upgrade (VS2015 / VS2017?) - Server Development

Results 1 to 2 of 2
  1. #1
    Source Code Compiler Upgrade (VS2015 / VS2017?) - Server Development Future is offline
    SupervisorRank
    Dec 2011 Join Date
    1,827Posts

    Source Code Compiler Upgrade (VS2015 / VS2017?) - Server Development


    RaGEZONE Recommends

    RaGEZONE Recommends

    So @Taiga and me have been spending the past week on getting the released AVA source to compile and run on VS2015 because neither of use has or is willing to install VS2003.

    Please Note
    This is a fun project for us with the goal to release a working version on up-to-date compilers. All research information will be released once the source works (compiles & runs as expected). Please refrain from PMing us or spamming this topic with non-contributing replies. PMs will be ignored and all non-contributing posts will be deleted for the sake of productive development. Our development progress will be discussed in this thread and not per PM.

    Progress
    We've currently got the whole "ServerLib" solution compiling. Not all of the server projects are running flawlessly yet though (see the pic below). This might be the result of some code we disabled / undefined.

    Disabling Code
    To make things compile we removed / disabled the following things:

    Service Installation
    Spoiler:
    Code:
    ´´´//////////////////////////////////////////////////////////////////////////
    // GNServiceOption
    
    GNIMP_OPT_BEGIN(GNServiceOption, GNService, _T("Service Installation Options"))
        GNIMP_OPT(Install, _T("/Install"), _T("Service Installation"))
        GNIMP_OPT(Auto, _T("/Auto"), _T("Service installation (automatic option)"))
        GNIMP_OPT(Uninstall, _T("/Uninstall"), _T("Remove service"))
    GNIMP_OPT_END()
    
    
    //////////////////////////////////////////////////////////////////////////
    //
    This (yes we've translated it) errors out with the compiler error:
    C4867 non-standard syntax; use '&' to create a pointer to member
    The preprocessor definitions causing this:
    Code:
    #define GNIMP_OPT_BEGIN(CLS, NAME, DESC) \
        LPCTSTR CLS::OptName() { static LPCTSTR name = _T(#NAME); return name; } \
        LPCTSTR CLS::OptDesc() { static LPCTSTR desc = DESC; return desc; } \
        GNOptionHandler::OptInfo* CLS::GetOptInfos() \
        { \
            static OptInfo infos[] = {
    #define GNIMP_OPT(NAME, USAGE, DESC) \
                { _T(#NAME), (GNOptionHandler::HandlerFN)Set##NAME, USAGE, DESC },
    #define GNIMP_OPT_END() \
                { NULL, NULL, NULL, NULL } \
            }; \
            return infos; \
        }
    This is likely caused by standard updates which don't allow such legacy anymore. We've tried multiple ways to reference and dereference the Handler method pointer, with no success. Shouldn't be too difficult to solve, however, as it's just service installation, we skipped it for now.


    PMS
    Spoiler:
    We've undefined the
    Code:
    _USE_PMS
    definitions as it's pulling some library(ies) we don't have (not included in the release). This is probably third party software which is available somewhere, but we skipped it too for now.

    Important: It appears that this library was calling the Windows Sockets (WSA) startup routine (WSAStartup) for some projects. In order to make WSA functions work after removing the library, we had to call WSAStartup prior to any WSA API function calls and WSACleanup on cleanup.


    Deprecation / Upgrades / Standard changed
    Some of you might be familiar with this, in order to support older std libraries, std functions and standard legacy changes, some compiler deprecation warnings / errors have to be disabled, or alternatively, functions have to be rewritten / upgraded (which we didn't do for now).

    Compiler Error C3203
    Spoiler:
    We had one or two instances where template type and inheritance legacy was changed which resulted in some C3203 compiler errors on their class definitions. See Compiler Error C3203 for reference.

    We sadly don't remember which class that was right now, but we did something to the effect of changing:
    Code:
    template <typename T>
    class X { ... };
    
    template <typename T>
    class Y : public X<T>
    to

    Code:
    template <typename T>
    class X { ... };
    
    template <typename T>
    class Y : public X<Y<T>>
    Feedback if that solves the error for you is welcomed.


    Disabling Deprecation Warnings / Erros
    Spoiler:
    In order to avoid deprecation errors on deprecated standard libraries and functions, and to ignore the change of the windows time_t type from 64bit back to 32bit, we added the following 2 preprocessor definitions. This is common procedure for older VC++ projects:

    Code:
    _SILENCE_STDEXT_HASH_DEPRECATION_WARNINGS
    _USE_32BIT_TIME_T


    Changed Linker Reference Optimization
    Spoiler:
    Some library projects won't compile because the projects have the linker flag /OPT set to /OPT:NOREF, which keeps functions and data that are never referenced.
    Changing this to /OPT:REF, which eliminates functions and data that are never referenced, solves the incompatibility with another linker flag and makes it link successfully.


    Servers
    The servers seem to be windows processes by what we uncovered by now. The servers report / log to the GNLogger project / application via Data Copy. So once started, you'll see what the server services are doing in the GNLogger application:



    To-Do
    We've been concentrating on the servers for now, afterwards we'd need to get Unreal Engine 3 to fully test and run the Client. We also need to restore the given Oracle databases to be able to fully test the server applications. Some servers currently crash or wont start up properly, we still need to debug these cases.

    I hope I kinda covered our current development progress. @Taiga feel free to add what I'm missing.




    Quote Originally Posted by A Wise Man
    P-Servers are NOT dead. Bugs need squishing. Quests need fixing. Unfortunately, majority of people don't know the difference between a computer and a toaster so...


  2. #2
    ◝(⁰▿⁰)◜Smile◝ (⁰▿⁰)◜ Taiga is offline
    ModeratorRank
    May 2007 Join Date
    InternetLocation
    2,469Posts

    Re: Source Code Compiler Upgrade (VS2015 / VS2017?) - Server Development

    This has been discontinued.




Advertisement