mirror of
https://github.com/OpenFusionProject/OpenFusion.git
synced 2025-10-02 04:30:06 +00:00
Build multiple packet versions on AppVeyor for Windows (#14)
* Move to PowerShell script for Windows build * Allow CMake to override struct version * PACKET_VERSION option * Rename CNPROTO_CUSTOM to CNPROTO_OVERRIDE Co-authored-by: Raymonf <Raymonf@users.noreply.github.com>
This commit is contained in:
@@ -6,19 +6,19 @@
|
||||
#define _CNS_HPP
|
||||
|
||||
#ifdef _MSC_VER
|
||||
// codecvt_* is deprecated in C++17 and MSVC will throw an annoying warning because of that.
|
||||
// Defining this before anything else to silence it.
|
||||
#define _SILENCE_CXX17_CODECVT_HEADER_DEPRECATION_WARNING
|
||||
// codecvt_* is deprecated in C++17 and MSVC will throw an annoying warning because of that.
|
||||
// Defining this before anything else to silence it.
|
||||
#define _SILENCE_CXX17_CODECVT_HEADER_DEPRECATION_WARNING
|
||||
#endif
|
||||
|
||||
#include <iostream>
|
||||
#include <stdio.h>
|
||||
#include <stdint.h>
|
||||
#ifndef _MSC_VER
|
||||
#include <sys/time.h>
|
||||
#include <sys/time.h>
|
||||
#else
|
||||
// Can't use this in MSVC.
|
||||
#include <time.h>
|
||||
#include <time.h>
|
||||
#endif
|
||||
#include <cstring>
|
||||
#include <string>
|
||||
@@ -31,8 +31,13 @@ std::string U16toU8(char16_t* src);
|
||||
int U8toU16(std::string src, char16_t* des); // returns number of char16_t that was written at des
|
||||
uint64_t getTime();
|
||||
|
||||
//#define CNPROTO_VERSION_0728
|
||||
#define CNPROTO_VERSION_0104
|
||||
// The CNPROTO_OVERRIDE definition is defined by cmake if you use it.
|
||||
// If you don't use cmake, feel free to comment this out and change it around.
|
||||
// Otherwise, use the PACKET_VERSION option (e.g. -DPACKET_VERSION=0104 in the cmake command) to change it.
|
||||
#if !defined(CNPROTO_OVERRIDE)
|
||||
//#define CNPROTO_VERSION_0728
|
||||
#define CNPROTO_VERSION_0104
|
||||
#endif
|
||||
|
||||
#if defined(CNPROTO_VERSION_0104)
|
||||
#include "structs/0104.hpp"
|
||||
|
Reference in New Issue
Block a user