Browse Source

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)
diafero 14 years ago
parent
commit
9c28eca30f
  1. 18
      CMakeLists.txt
  2. 15
      Sources/Plasma/NucleusLib/pnAsyncCoreExe/pnAceLog.cpp
  3. 4
      Sources/Plasma/NucleusLib/pnNetBase/Private/pnNbSrvs.cpp
  4. 4
      Sources/Plasma/NucleusLib/pnNetDiag/pnNdTcp.cpp
  5. 4
      Sources/Plasma/NucleusLib/pnNetLog/pnNlCli.cpp
  6. 2
      Sources/Plasma/NucleusLib/pnProduct/CMakeLists.txt
  7. 1
      Sources/Plasma/NucleusLib/pnProduct/Private/pnPrAllIncludes.h
  8. 9
      Sources/Plasma/NucleusLib/pnProduct/Private/pnPrBuildId.h
  9. 83
      Sources/Plasma/NucleusLib/pnProduct/Private/pnPrBuildType.cpp
  10. 62
      Sources/Plasma/NucleusLib/pnProduct/Private/pnPrBuildType.h
  11. 5
      Sources/Plasma/NucleusLib/pnProduct/Private/pnPrProductId.cpp
  12. 4
      Sources/Plasma/NucleusLib/pnProduct/Private/pnPrProductId.h
  13. 2
      Sources/Plasma/NucleusLib/pnSimpleNet/pnSimpleNet.cpp
  14. 5
      Sources/Plasma/NucleusLib/pnUtils/Private/Win32/pnUtW32Path.cpp
  15. 4
      Sources/Plasma/PubUtilLib/plNetClientComm/plNetClientComm.cpp
  16. 2
      Sources/Plasma/PubUtilLib/plNetGameLib/Private/plNglAuth.cpp
  17. 2
      Sources/Plasma/PubUtilLib/plNetGameLib/Private/plNglCsr.cpp
  18. 2
      Sources/Plasma/PubUtilLib/plNetGameLib/Private/plNglFile.cpp
  19. 2
      Sources/Plasma/PubUtilLib/plNetGameLib/Private/plNglGame.cpp
  20. 2
      Sources/Plasma/PubUtilLib/plNetGameLib/Private/plNglGateKeeper.cpp
  21. 2
      Sources/Plasma/PubUtilLib/plSDL/plStateVariable.cpp

18
CMakeLists.txt

@ -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

15
Sources/Plasma/NucleusLib/pnAsyncCoreExe/pnAceLog.cpp

@ -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);
}

4
Sources/Plasma/NucleusLib/pnNetBase/Private/pnNbSrvs.cpp

@ -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
/*****************************************************************************
*

4
Sources/Plasma/NucleusLib/pnNetDiag/pnNdTcp.cpp

@ -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();

4
Sources/Plasma/NucleusLib/pnNetLog/pnNlCli.cpp

@ -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(

2
Sources/Plasma/NucleusLib/pnProduct/CMakeLists.txt

@ -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
)

1
Sources/Plasma/NucleusLib/pnProduct/Private/pnPrAllIncludes.h

@ -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"

9
Sources/Plasma/NucleusLib/pnProduct/Private/pnPrBuildId.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

83
Sources/Plasma/NucleusLib/pnProduct/Private/pnPrBuildType.cpp

@ -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
}

62
Sources/Plasma/NucleusLib/pnProduct/Private/pnPrBuildType.h

@ -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 ();

5
Sources/Plasma/NucleusLib/pnProduct/Private/pnPrProductId.cpp

@ -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

4
Sources/Plasma/NucleusLib/pnProduct/Private/pnPrProductId.h

@ -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);

2
Sources/Plasma/NucleusLib/pnSimpleNet/pnSimpleNet.cpp

@ -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();

5
Sources/Plasma/NucleusLib/pnUtils/Private/Win32/pnUtW32Path.cpp

@ -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);

4
Sources/Plasma/PubUtilLib/plNetClientComm/plNetClientComm.cpp

@ -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;

2
Sources/Plasma/PubUtilLib/plNetGameLib/Private/plNglAuth.cpp

@ -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;

2
Sources/Plasma/PubUtilLib/plNetGameLib/Private/plNglCsr.cpp

@ -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);

2
Sources/Plasma/PubUtilLib/plNetGameLib/Private/plNglFile.cpp

@ -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;

2
Sources/Plasma/PubUtilLib/plNetGameLib/Private/plNglGame.cpp

@ -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);

2
Sources/Plasma/PubUtilLib/plNetGameLib/Private/plNglGateKeeper.cpp

@ -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;

2
Sources/Plasma/PubUtilLib/plSDL/plStateVariable.cpp

@ -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)

Loading…
Cancel
Save