mirror of
https://foundry.openuru.org/gitblit/r/CWE-ou-minkata.git
synced 2025-07-14 02:27:40 -04:00
remove pointless "BUILD_TYPE" option... external vs. internal client should really be enough
(this also removes some hard-coded Cyan URLs which depended on that option)
This commit is contained in:
@ -27,28 +27,10 @@ if(CURL_IS_STATIC)
|
||||
endif(CURL_IS_STATIC)
|
||||
|
||||
option(PLASMA_EXTERNAL_RELEASE "Is this release intended for the general public?" OFF)
|
||||
|
||||
if(PLASMA_EXTERNAL_RELEASE)
|
||||
add_definitions(-DPLASMA_EXTERNAL_RELEASE)
|
||||
endif(PLASMA_EXTERNAL_RELEASE)
|
||||
|
||||
set(PLASMA_BUILD_TYPE "Live"
|
||||
CACHE STRING "Which type of client to build")
|
||||
set_property(CACHE PLASMA_BUILD_TYPE PROPERTY STRINGS
|
||||
"Dev" "QA" "Test" "Beta" "Live")
|
||||
|
||||
if(PLASMA_BUILD_TYPE STREQUAL "Dev")
|
||||
add_definitions(-DBUILD_TYPE=BUILD_TYPE_DEV)
|
||||
elseif(PLASMA_BUILD_TYPE STREQUAL "QA")
|
||||
add_definitions(-DBUILD_TYPE=BUILD_TYPE_QA)
|
||||
elseif(PLASMA_BUILD_TYPE STREQUAL "Test")
|
||||
add_definitions(-DBUILD_TYPE=BUILD_TYPE_TEST)
|
||||
elseif(PLASMA_BUILD_TYPE STREQUAL "Beta")
|
||||
add_definitions(-DBUILD_TYPE=BUILD_TYPE_BETA)
|
||||
elseif(PLASMA_BUILD_TYPE STREQUAL "Live")
|
||||
add_definitions(-DBUILD_TYPE=BUILD_TYPE_LIVE)
|
||||
endif(PLASMA_BUILD_TYPE STREQUAL "Dev")
|
||||
|
||||
set(PLASMA_TARGETS "Client"
|
||||
CACHE STRING "Which set of plasma targets to build and use")
|
||||
set_property(CACHE PLASMA_TARGETS PROPERTY STRINGS
|
||||
|
@ -32,8 +32,8 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com
|
||||
#include "Pch.h"
|
||||
#pragma hdrstop
|
||||
|
||||
#if defined(PLASMA_EXTERNAL_RELEASE) && (BUILD_TYPE == BUILD_TYPE_LIVE)
|
||||
// If this is an external live build then don't write log files
|
||||
#if defined(PLASMA_EXTERNAL_RELEASE)
|
||||
// If this is an external build then don't write log files
|
||||
#define ACELOG_NO_LOG_FILES
|
||||
#endif
|
||||
|
||||
@ -84,11 +84,11 @@ static unsigned s_logSize[kNumLogTypes] = {
|
||||
|
||||
static const wchar * s_logNameFmt[kNumLogTypes] = {
|
||||
#ifdef SERVER
|
||||
L"Dbg%02u%02u%02u.%s.log",
|
||||
L"Inf%02u%02u%02u.%s.log",
|
||||
L"Err%02u%02u%02u.%s.log",
|
||||
L"Dbg%02u%02u%02u.log",
|
||||
L"Inf%02u%02u%02u.log",
|
||||
L"Err%02u%02u%02u.log",
|
||||
#else
|
||||
L"%s%02u%02u%02u.%s.log",
|
||||
L"%s%02u%02u%02u.log",
|
||||
#endif
|
||||
};
|
||||
|
||||
@ -176,8 +176,7 @@ static void GetLogFilename (
|
||||
#endif
|
||||
timeDesc.year % 100,
|
||||
timeDesc.month,
|
||||
timeDesc.day,
|
||||
BuildTypeString()
|
||||
timeDesc.day
|
||||
);
|
||||
PathAddFilename(filename, s_directory, filename, chars);
|
||||
}
|
||||
|
@ -32,10 +32,6 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com
|
||||
#include "../Pch.h"
|
||||
#pragma hdrstop
|
||||
|
||||
#ifndef BUILD_TYPE
|
||||
# error "pnProduct not included"
|
||||
#endif
|
||||
|
||||
|
||||
/*****************************************************************************
|
||||
*
|
||||
|
@ -622,7 +622,7 @@ static void StartAuthTcpTest (
|
||||
connect.hdr.connType = (byte) kConnTypeCliToAuth;
|
||||
connect.hdr.hdrBytes = sizeof(connect.hdr);
|
||||
connect.hdr.buildId = BuildId();
|
||||
connect.hdr.buildType = BuildType();
|
||||
connect.hdr.buildType = BUILD_TYPE_LIVE;
|
||||
connect.hdr.branchId = BranchId();
|
||||
connect.hdr.productId = ProductId();
|
||||
connect.data.token = kNilGuid;
|
||||
@ -665,7 +665,7 @@ static void StartFileTcpTest (
|
||||
connect.hdr.connType = kConnTypeCliToFile;
|
||||
connect.hdr.hdrBytes = sizeof(connect.hdr);
|
||||
connect.hdr.buildId = 0;
|
||||
connect.hdr.buildType = BuildType();
|
||||
connect.hdr.buildType = BUILD_TYPE_LIVE;
|
||||
connect.hdr.branchId = BranchId();
|
||||
connect.hdr.productId = ProductId();
|
||||
connect.data.buildId = BuildId();
|
||||
|
@ -344,13 +344,13 @@ void NetLogConn::Connect (
|
||||
connect.hdr.connType = kConnTypeSrvToLog;
|
||||
connect.hdr.hdrBytes = sizeof(connect.hdr);
|
||||
connect.hdr.buildId = BuildId();
|
||||
connect.hdr.buildType = BuildType();
|
||||
connect.hdr.buildType = BUILD_TYPE_LIVE;
|
||||
connect.hdr.branchId = BranchId();
|
||||
connect.hdr.productId = ProductId();
|
||||
connect.data.dataBytes = sizeof(connect.data);
|
||||
connect.data.buildId = BuildId();
|
||||
connect.data.srvType = srvType;
|
||||
connect.data.buildType = BuildType();
|
||||
connect.data.buildType = BUILD_TYPE_LIVE;
|
||||
connect.data.productId = ProductId();
|
||||
|
||||
AsyncSocketConnect(
|
||||
|
@ -14,8 +14,6 @@ set(pnProduct_PRIVATE
|
||||
Private/pnPrBuildId.cpp
|
||||
Private/pnPrBuildString.h
|
||||
Private/pnPrBuildString.cpp
|
||||
Private/pnPrBuildType.h
|
||||
Private/pnPrBuildType.cpp
|
||||
Private/pnPrProductId.h
|
||||
Private/pnPrProductId.cpp
|
||||
)
|
||||
|
@ -36,7 +36,6 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com
|
||||
#include "pnUtils/pnUtils.h"
|
||||
|
||||
#include "pnPrBuildId.h"
|
||||
#include "pnPrBuildType.h"
|
||||
#include "pnPrBranchId.h"
|
||||
#include "pnPrProductId.h"
|
||||
#include "pnPrBuildString.h"
|
||||
|
@ -43,3 +43,12 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com
|
||||
|
||||
unsigned BuildId ();
|
||||
void OverrideBuildId (unsigned buildId);
|
||||
|
||||
|
||||
/*****************************************************************************
|
||||
*
|
||||
* BuildType definition
|
||||
*
|
||||
***/
|
||||
|
||||
#define BUILD_TYPE_LIVE 50
|
||||
|
@ -1,83 +0,0 @@
|
||||
/*==LICENSE==*
|
||||
|
||||
CyanWorlds.com Engine - MMOG client, server and tools
|
||||
Copyright (C) 2011 Cyan Worlds, Inc.
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
You can contact Cyan Worlds, Inc. by email legal@cyan.com
|
||||
or by snail mail at:
|
||||
Cyan Worlds, Inc.
|
||||
14617 N Newport Hwy
|
||||
Mead, WA 99021
|
||||
|
||||
*==LICENSE==*/
|
||||
/*****************************************************************************
|
||||
*
|
||||
* $/Plasma20/Sources/Plasma/NucleusLib/pnProduct/Private/pnPrBuildType.cpp
|
||||
*
|
||||
***/
|
||||
|
||||
#include "../Pch.h"
|
||||
#pragma hdrstop
|
||||
|
||||
|
||||
/*****************************************************************************
|
||||
*
|
||||
* Exports
|
||||
*
|
||||
***/
|
||||
|
||||
//============================================================================
|
||||
unsigned BuildType () {
|
||||
return BUILD_TYPE;
|
||||
}
|
||||
|
||||
//============================================================================
|
||||
const wchar * BuildTypeString () {
|
||||
|
||||
#if BUILD_TYPE == BUILD_TYPE_DEV
|
||||
return L"Dev";
|
||||
#elif BUILD_TYPE == BUILD_TYPE_QA
|
||||
return L"QA";
|
||||
#elif BUILD_TYPE == BUILD_TYPE_TEST
|
||||
return L"Test";
|
||||
#elif BUILD_TYPE == BUILD_TYPE_BETA
|
||||
return L"Beta";
|
||||
#elif BUILD_TYPE == BUILD_TYPE_LIVE
|
||||
return L"Live";
|
||||
#else
|
||||
# error "Unknown build type"
|
||||
#endif
|
||||
|
||||
}
|
||||
|
||||
//============================================================================
|
||||
const wchar *BuildTypeServerStatusPath () {
|
||||
|
||||
#if BUILD_TYPE == BUILD_TYPE_DEV
|
||||
return nil;
|
||||
#elif BUILD_TYPE == BUILD_TYPE_QA
|
||||
return nil;
|
||||
#elif BUILD_TYPE == BUILD_TYPE_TEST
|
||||
return nil;
|
||||
#elif BUILD_TYPE == BUILD_TYPE_BETA
|
||||
return L"/serverstatus/moulbeta.php";
|
||||
#elif BUILD_TYPE == BUILD_TYPE_LIVE
|
||||
return L"/serverstatus/moullive.php";
|
||||
#else
|
||||
# error "Unknown build type"
|
||||
#endif
|
||||
|
||||
}
|
@ -1,62 +0,0 @@
|
||||
/*==LICENSE==*
|
||||
|
||||
CyanWorlds.com Engine - MMOG client, server and tools
|
||||
Copyright (C) 2011 Cyan Worlds, Inc.
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
You can contact Cyan Worlds, Inc. by email legal@cyan.com
|
||||
or by snail mail at:
|
||||
Cyan Worlds, Inc.
|
||||
14617 N Newport Hwy
|
||||
Mead, WA 99021
|
||||
|
||||
*==LICENSE==*/
|
||||
/*****************************************************************************
|
||||
*
|
||||
* $/Plasma20/Sources/Plasma/NucleusLib/pnProduct/Private/pnPrBuildType.h
|
||||
*
|
||||
***/
|
||||
|
||||
#ifdef PLASMA20_SOURCES_PLASMA_NUCLEUSLIB_PNPRODUCT_PRIVATE_PNPRBUILDTYPE_H
|
||||
#error "Header $/Plasma20/Sources/Plasma/NucleusLib/pnProduct/Private/pnPrBuildType.h included more than once"
|
||||
#endif
|
||||
#define PLASMA20_SOURCES_PLASMA_NUCLEUSLIB_PNPRODUCT_PRIVATE_PNPRBUILDTYPE_H
|
||||
|
||||
|
||||
/*****************************************************************************
|
||||
*
|
||||
* BuildType definitions
|
||||
*
|
||||
***/
|
||||
#ifndef BUILD_TYPE
|
||||
#define BUILD_TYPE BUILD_TYPE_DEV
|
||||
#endif
|
||||
|
||||
#define BUILD_TYPE_DEV 10
|
||||
#define BUILD_TYPE_QA 20
|
||||
#define BUILD_TYPE_TEST 30
|
||||
#define BUILD_TYPE_BETA 40
|
||||
#define BUILD_TYPE_LIVE 50
|
||||
|
||||
|
||||
/*****************************************************************************
|
||||
*
|
||||
* BuildType functions
|
||||
*
|
||||
***/
|
||||
|
||||
unsigned BuildType ();
|
||||
const wchar * BuildTypeString ();
|
||||
const wchar * BuildTypeServerStatusPath ();
|
@ -102,13 +102,12 @@ const wchar * ProductLongName () {
|
||||
|
||||
//============================================================================
|
||||
void ProductString (wchar * dest, unsigned destChars) {
|
||||
// Example: "UruLive.Beta.2.214 - External.Release"
|
||||
// Example: "UruLive.2.214 - External.Release"
|
||||
StrPrintf(
|
||||
dest,
|
||||
destChars,
|
||||
L"%s.%s.%u.%u - %s.%s",
|
||||
L"%s.%u.%u - %s.%s",
|
||||
ProductCoreName(),
|
||||
BuildTypeString(),
|
||||
BranchId(),
|
||||
BuildId(),
|
||||
#ifdef PLASMA_EXTERNAL_RELEASE
|
||||
|
@ -73,6 +73,6 @@ const wchar * ProductShortName (); // e.g: L"Uru" (filenam
|
||||
const wchar * ProductLongName (); // e.g: L"Uru: Ages Beyond Myst" (human friendly)
|
||||
|
||||
|
||||
// Returns: "<ProductCoreName>.<BuildTypeString>.<BranchId>.<BuildId>"
|
||||
// Example: "Uru.Beta.3.204"
|
||||
// Returns: "<ProductCoreName>.<BranchId>.<BuildId> - <External|Internal>.<Debug|Release>"
|
||||
// Example: "Uru.3.204 - External.Release"
|
||||
void ProductString (wchar * dest, unsigned destChars);
|
||||
|
@ -366,7 +366,7 @@ static void Connect (const NetAddress & addr, ConnectParam * cp) {
|
||||
connect.hdr.connType = kConnTypeSimpleNet;
|
||||
connect.hdr.hdrBytes = sizeof(connect.hdr);
|
||||
connect.hdr.buildId = BuildId();
|
||||
connect.hdr.buildType = BuildType();
|
||||
connect.hdr.buildType = BUILD_TYPE_LIVE;
|
||||
connect.hdr.branchId = BranchId();
|
||||
connect.hdr.productId = ProductId();
|
||||
connect.data.channelId = cp->channel->GetValue();
|
||||
|
@ -531,11 +531,6 @@ void PathGetUserDirectory (
|
||||
// append the product name
|
||||
PathAddFilename(dst, temp, ProductLongName(), dstChars);
|
||||
|
||||
#if BUILD_TYPE != BUILD_TYPE_LIVE
|
||||
// non-live builds live in a subdir
|
||||
PathAddFilename(dst, dst, BuildTypeString(), dstChars);
|
||||
#endif
|
||||
|
||||
// ensure it exists
|
||||
if (!PathDoesDirectoryExist(dst))
|
||||
PathCreateDirectory(dst, kPathCreateDirFlagEntireTree);
|
||||
|
@ -767,8 +767,8 @@ static void IReadNetIni() {
|
||||
}
|
||||
|
||||
#ifndef PLASMA_EXTERNAL_RELEASE
|
||||
// @@@: Internal dev build only: Drop a default version of the file if not found
|
||||
if (!ini && BuildType() == BUILD_TYPE_DEV) {
|
||||
// @@@: Internal build only: Drop a default version of the file if not found
|
||||
if (!ini) {
|
||||
EFileError fileError;
|
||||
qword fileSize;
|
||||
qword lastWrite;
|
||||
|
@ -1489,7 +1489,7 @@ static void Connect (
|
||||
connect.hdr.connType = kConnTypeCliToAuth;
|
||||
connect.hdr.hdrBytes = sizeof(connect.hdr);
|
||||
connect.hdr.buildId = BuildId();
|
||||
connect.hdr.buildType = BuildType();
|
||||
connect.hdr.buildType = BUILD_TYPE_LIVE;
|
||||
connect.hdr.branchId = BranchId();
|
||||
connect.hdr.productId = ProductId();
|
||||
connect.data.token = conn->token;
|
||||
|
@ -375,7 +375,7 @@ static void Connect (
|
||||
connect.hdr.connType = kConnTypeCliToCsr;
|
||||
connect.hdr.hdrBytes = sizeof(connect.hdr);
|
||||
connect.hdr.buildId = BuildId();
|
||||
connect.hdr.buildType = BuildType();
|
||||
connect.hdr.buildType = BUILD_TYPE_LIVE;
|
||||
connect.hdr.branchId = BranchId();
|
||||
connect.hdr.productId = ProductId();
|
||||
connect.data.dataBytes = sizeof(connect.data);
|
||||
|
@ -502,7 +502,7 @@ static void Connect (CliFileConn * conn) {
|
||||
connect.hdr.connType = kConnTypeCliToFile;
|
||||
connect.hdr.hdrBytes = sizeof(connect.hdr);
|
||||
connect.hdr.buildId = kFileSrvBuildId;
|
||||
connect.hdr.buildType = BuildType();
|
||||
connect.hdr.buildType = BUILD_TYPE_LIVE;
|
||||
connect.hdr.branchId = BranchId();
|
||||
connect.hdr.productId = ProductId();
|
||||
connect.data.buildId = conn->buildId;
|
||||
|
@ -352,7 +352,7 @@ static void Connect (
|
||||
connect.hdr.connType = kConnTypeCliToGame;
|
||||
connect.hdr.hdrBytes = sizeof(connect.hdr);
|
||||
connect.hdr.buildId = BuildId();
|
||||
connect.hdr.buildType = BuildType();
|
||||
connect.hdr.buildType = BUILD_TYPE_LIVE;
|
||||
connect.hdr.branchId = BranchId();
|
||||
connect.hdr.productId = ProductId();
|
||||
connect.data.dataBytes = sizeof(connect.data);
|
||||
|
@ -427,7 +427,7 @@ static void Connect (
|
||||
connect.hdr.connType = kConnTypeCliToGateKeeper;
|
||||
connect.hdr.hdrBytes = sizeof(connect.hdr);
|
||||
connect.hdr.buildId = BuildId();
|
||||
connect.hdr.buildType = BuildType();
|
||||
connect.hdr.buildType = BUILD_TYPE_LIVE;
|
||||
connect.hdr.branchId = BranchId();
|
||||
connect.hdr.productId = ProductId();
|
||||
connect.data.token = conn->token;
|
||||
|
@ -1161,7 +1161,7 @@ bool plSimpleStateVariable::ConvertTo(plSimpleVarDescriptor* toVar, bool force )
|
||||
int cnt = toVar->GetCount() ? toVar->GetCount() : fVar.GetCount();
|
||||
|
||||
if (cnt > fVar.GetCount()) {
|
||||
#if BUILD_TYPE == BUILD_TYPE_DEV
|
||||
#ifndef PLASMA_EXTERNAL_RELEASE
|
||||
FATAL("SDL Convert: array size increased, conversion loses data");
|
||||
#endif
|
||||
// Reallocate new memory (destroys existing variable state)
|
||||
|
Reference in New Issue
Block a user