Permalink
Browse files

fix travis/appveyor: tools flag included.

  • Loading branch information...
schnek authored and Zyres committed Sep 13, 2018
1 parent 78bb288 commit 2e935dea5f8f13a418d82862228384ee58d27d96
View
@@ -18,7 +18,7 @@ env:
- TRAVIS_EMPTY_JOB_WORKAROUND=true
before_install:
- if [ "$COMPILER" = "g++-6" ]; then export CXX="g++-6" CC="gcc-6"; fi
- if [ "$COMPILER" = "g++-6" ]; then export CXX="g++-6" CC="gcc-6"; fi
- if [ "$COMPILER" = "clang++-3.8" ]; then export CXX="clang++-3.8" CC="clang-3.8"; fi
matrix:
@@ -101,7 +101,7 @@ matrix:
install:
- mkdir ascemu_build
- cd ascemu_build
- cmake ../ -DCMAKE_BUILD_TYPE=Release -DBUILD_WITH_WARNINGS=0 -DBUILD_TOOLS=0 -DASCEMU_VERSION=${ASC_VERSION} -DWITH_EXPERIMENTAL_FILESYSTEM=1
- cmake ../ -DCMAKE_BUILD_TYPE=Release -DBUILD_WITH_WARNINGS=0 -DBUILD_TOOLS=1 -DASCEMU_VERSION=${ASC_VERSION} -DWITH_EXPERIMENTAL_FILESYSTEM=1
before_script:
- ${CXX} --version
@@ -117,4 +117,3 @@ script:
# - cat /home/travis/build/AscEmu/AscEmu/ascemu_build/cov-int/build-log.txt
# - echo "===================================================================================================="
# - cat /home/travis/build/AscEmu/AscEmu/ascemu_build/cov-int/scm_log.txt
View
@@ -31,5 +31,5 @@ before_build:
build_script:
- cmd: mkdir ascemu_build
- cmd: cd ascemu_build
- cmd: cmake ../ -G "%VS_VER%" -DBUILD_WITH_WARNINGS=1 -DCMAKE_BUILD_TYPE=%CONFIGURATION% -DBUILD_TOOLS=0 -DASCEMU_VERSION=%ASC_VERSION% -DWITH_EXPERIMENTAL_FILESYSTEM=1
- cmd: cmake ../ -G "%VS_VER%" -DBUILD_WITH_WARNINGS=0 -DCMAKE_BUILD_TYPE=%CONFIGURATION% -DBUILD_TOOLS=1 -DASCEMU_VERSION=%ASC_VERSION% -DWITH_EXPERIMENTAL_FILESYSTEM=1
- cmd: msbuild Ascemu.sln
@@ -17,6 +17,8 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#define ERROR_PATH_NOT_FOUND ERROR_FILE_NOT_FOUND
#define _CRT_SECURE_NO_DEPRECATE
#include <stdio.h>
@@ -30,7 +32,6 @@
#else
#include <sys/stat.h>
#include <unistd.h>
#define ERROR_PATH_NOT_FOUND ERROR_FILE_NOT_FOUND
#endif
#include "StormLib.h"
@@ -41,7 +42,7 @@
#include <fcntl.h>
#if defined( __GNUC__ )
#define _open open
#define _open open
#define _close close
#ifndef O_BINARY
#define O_BINARY 0
@@ -68,8 +69,10 @@ typedef struct
map_id *map_ids;
uint16 *areas;
uint16 *LiqType;
char output_path[128] = ".";
char input_path[128] = ".";
#define MAX_PATH_LENGTH 128
char output_path[MAX_PATH_LENGTH] = ".";
char input_path[MAX_PATH_LENGTH] = ".";
uint32 maxAreaId = 0;
// **************************************************
@@ -97,7 +100,7 @@ float CONF_flat_liquid_delta_limit = 0.001f; // If max - min less this value - l
uint32 CONF_TargetBuild = 15595; // 4.3.4.15595
// List MPQ for extract maps from
// List MPQ for extract from / Version 15595
char const* CONF_mpq_list[] =
{
"world.MPQ",
@@ -140,12 +143,6 @@ TCHAR const* LocalesT[LOCALES_COUNT] =
void CreateDir(std::string const& path)
{
if (chdir(path.c_str()) == 0)
{
chdir("../");
return;
}
#ifdef _WIN32
_mkdir(path.c_str());
#else
@@ -17,6 +17,8 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#define ERROR_PATH_NOT_FOUND ERROR_FILE_NOT_FOUND
#define _CRT_SECURE_NO_DEPRECATE
#include "../../src/world/WorldConf.h"
@@ -41,7 +43,7 @@
#include <fcntl.h>
#if defined( __GNUC__ )
#define _open open
#define _open open
#define _close close
#ifndef O_BINARY
#define O_BINARY 0
@@ -66,6 +68,7 @@ typedef struct
map_id *map_ids;
uint16 *areas;
uint16 *LiqType;
#define MAX_PATH_LENGTH 128
char output_path[MAX_PATH_LENGTH] = ".";
char input_path[MAX_PATH_LENGTH] = ".";
@@ -94,35 +97,33 @@ float CONF_flat_height_delta_limit = 0.005f; // If max - min less this value - s
float CONF_flat_liquid_delta_limit = 0.001f; // If max - min less this value - liquid surface is flat
// List MPQ for extract from / Version 8606
const char* CONF_mpq_list[] = {
char const* CONF_mpq_list[] =
{
"dbc.MPQ",
"terrain.MPQ",
"patch.MPQ",
"patch-2.MPQ",
};
static const char* const langs[] = {"enGB", "enUS", "deDE", "esES", "frFR", "koKR", "zhCN", "zhTW", "enCN", "enTW", "esMX", "ruRU" };
#define LANG_COUNT 12
#define LOCALES_COUNT 12
void CreateDir( const std::string& Path )
char const* Locales[LOCALES_COUNT] =
{
if(chdir(Path.c_str()) == 0)
{
chdir("../");
return;
}
"enGB", "enUS",
"deDE", "esES",
"frFR", "koKR",
"zhCN", "zhTW",
"enCN", "enTW",
"esMX", "ruRU"
};
int ret;
#ifdef _WIN32
ret = _mkdir( Path.c_str());
#else
ret = mkdir( Path.c_str(), 0777 );
#endif
if (ret != 0)
{
printf("Fatal Error: Could not create directory %s check your permissions", Path.c_str());
exit(1);
}
void CreateDir(std::string const& path)
{
#ifdef _WIN32
_mkdir(path.c_str());
#else
mkdir(path.c_str(), S_IRWXU | S_IRWXG | S_IRWXO); // 0777
#endif
}
bool FileExists( const char* FileName )
@@ -1027,7 +1028,7 @@ void LoadLocaleMPQFiles(int const locale)
{
char filename[512];
sprintf(filename,"%s/Data/%s/locale-%s.MPQ", input_path, langs[locale], langs[locale]);
sprintf(filename,"%s/Data/%s/locale-%s.MPQ", input_path, Locales[locale], Locales[locale]);
new MPQArchive(filename);
for(int i = 1; i < 5; ++i)
@@ -1036,7 +1037,7 @@ void LoadLocaleMPQFiles(int const locale)
if(i > 1)
sprintf(ext, "-%i", i);
sprintf(filename,"%s/Data/%s/patch-%s%s.MPQ", input_path, langs[locale], langs[locale], ext);
sprintf(filename,"%s/Data/%s/patch-%s%s.MPQ", input_path, Locales[locale], Locales[locale], ext);
if(FileExists(filename))
new MPQArchive(filename);
}
@@ -20,24 +20,25 @@
#define _CRT_SECURE_NO_DEPRECATE
#include "adt.h"
#include <cstring>
// Helper
int holetab_h[4] = {0x1111, 0x2222, 0x4444, 0x8888};
int holetab_v[4] = {0x000F, 0x00F0, 0x0F00, 0xF000};
// Helper
int holetab_h[4] = { 0x1111, 0x2222, 0x4444, 0x8888 };
int holetab_v[4] = { 0x000F, 0x00F0, 0x0F00, 0xF000 };
u_map_fcc MHDRMagic = { {'R','D','H','M'} };
u_map_fcc MCINMagic = { {'N','I','C','M'} };
u_map_fcc MH2OMagic = { {'O','2','H','M'} };
u_map_fcc MCNKMagic = { {'K','N','C','M'} };
u_map_fcc MCVTMagic = { {'T','V','C','M'} };
u_map_fcc MCLQMagic = { {'Q','L','C','M'} };
u_map_fcc MHDRMagic = { { 'R', 'D', 'H', 'M' } };
u_map_fcc MCINMagic = { { 'N', 'I', 'C', 'M' } };
u_map_fcc MH2OMagic = { { 'O', '2', 'H', 'M' } };
u_map_fcc MCNKMagic = { { 'K', 'N', 'C', 'M' } };
u_map_fcc MCVTMagic = { { 'T', 'V', 'C', 'M' } };
u_map_fcc MCLQMagic = { { 'Q', 'L', 'C', 'M' } };
bool isHole(int holes, int i, int j)
{
int testi = i / 2;
int testj = j / 4;
if(testi > 3) testi = 3;
if(testj > 3) testj = 3;
if (testi > 3) testi = 3;
if (testj > 3) testj = 3;
return (holes & holetab_h[testi] & holetab_v[testj]) != 0;
}
@@ -17,6 +17,8 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#define ERROR_PATH_NOT_FOUND ERROR_FILE_NOT_FOUND
#define _CRT_SECURE_NO_DEPRECATE
#include "../../src/world/WorldConf.h"
@@ -41,7 +43,7 @@
#include <fcntl.h>
#if defined( __GNUC__ )
#define _open open
#define _open open
#define _close close
#ifndef O_BINARY
#define O_BINARY 0
@@ -66,6 +68,7 @@ typedef struct
map_id *map_ids;
uint16 *areas;
uint16 *LiqType;
#define MAX_PATH_LENGTH 128
char output_path[MAX_PATH_LENGTH] = ".";
char input_path[MAX_PATH_LENGTH] = ".";
@@ -94,35 +97,33 @@ float CONF_flat_height_delta_limit = 0.005f; // If max - min less this value - s
float CONF_flat_liquid_delta_limit = 0.001f; // If max - min less this value - liquid surface is flat
// List MPQ for extract from / Version 8606
const char* CONF_mpq_list[] = {
char const* CONF_mpq_list[] =
{
"common.MPQ",
"expansion.MPQ",
"patch.MPQ",
"patch-2.MPQ",
};
static const char* const langs[] = {"enGB", "enUS", "deDE", "esES", "frFR", "koKR", "zhCN", "zhTW", "enCN", "enTW", "esMX", "ruRU" };
#define LANG_COUNT 12
#define LOCALES_COUNT 12
void CreateDir( const std::string& Path )
char const* Locales[LOCALES_COUNT] =
{
if(_chdir(Path.c_str()) == 0)
{
_chdir("../");
return;
}
"enGB", "enUS",
"deDE", "esES",
"frFR", "koKR",
"zhCN", "zhTW",
"enCN", "enTW",
"esMX", "ruRU"
};
int ret;
#ifdef _WIN32
ret = _mkdir( Path.c_str());
#else
ret = mkdir( Path.c_str(), 0777 );
#endif
if (ret != 0)
{
printf("Fatal Error: Could not create directory %s check your permissions", Path.c_str());
exit(1);
}
void CreateDir(std::string const& path)
{
#ifdef _WIN32
_mkdir(path.c_str());
#else
mkdir(path.c_str(), S_IRWXU | S_IRWXG | S_IRWXO); // 0777
#endif
}
bool FileExists( const char* FileName )
@@ -205,7 +206,7 @@ void HandleArgs(int argc, char * arg[])
uint32 ReadBuild(int locale)
{
// include build info file also
std::string filename = std::string("component.wow-")+langs[locale]+".txt";
std::string filename = std::string("component.wow-")+Locales[locale]+".txt";
//printf("Read %s file... ", filename.c_str());
MPQFile m(filename.c_str());
@@ -1048,14 +1049,14 @@ void ExtractDBCFiles(int locale, bool basicLocale)
CreateDir(path);
if(!basicLocale)
{
path += langs[locale];
path += Locales[locale];
path += "/";
CreateDir(path);
}
// extract Build info file
{
std::string mpq_name = std::string("component.wow-") + langs[locale] + ".txt";
std::string mpq_name = std::string("component.wow-") + Locales[locale] + ".txt";
std::string filename = path + mpq_name;
ExtractFile(mpq_name.c_str(), filename);
@@ -1081,7 +1082,7 @@ void LoadLocaleMPQFiles(int const locale)
{
char filename[512];
sprintf(filename,"%s/Data/%s/locale-%s.MPQ", input_path, langs[locale], langs[locale]);
sprintf(filename,"%s/Data/%s/locale-%s.MPQ", input_path, Locales[locale], Locales[locale]);
new MPQArchive(filename);
for(int i = 1; i < 5; ++i)
@@ -1090,7 +1091,7 @@ void LoadLocaleMPQFiles(int const locale)
if(i > 1)
sprintf(ext, "-%i", i);
sprintf(filename,"%s/Data/%s/patch-%s%s.MPQ", input_path, langs[locale], langs[locale], ext);
sprintf(filename,"%s/Data/%s/patch-%s%s.MPQ", input_path, Locales[locale], Locales[locale], ext);
if(FileExists(filename))
new MPQArchive(filename);
}
@@ -1124,13 +1125,13 @@ int main(int argc, char * arg[])
int FirstLocale = -1;
uint32 build = 0;
for (int i = 0; i < LANG_COUNT; i++)
for (int i = 0; i < LOCALES_COUNT; i++)
{
char tmp1[512];
sprintf(tmp1, "%s/Data/%s/locale-%s.MPQ", input_path, langs[i], langs[i]);
sprintf(tmp1, "%s/Data/%s/locale-%s.MPQ", input_path, Locales[i], Locales[i]);
if (FileExists(tmp1))
{
printf("Detected locale: %s\n", langs[i]);
printf("Detected locale: %s\n", Locales[i]);
//Open MPQs
LoadLocaleMPQFiles(i);
@@ -1167,7 +1168,7 @@ int main(int argc, char * arg[])
if (CONF_extract & EXTRACT_MAP)
{
printf("Using locale: %s\n", langs[FirstLocale]);
printf("Using locale: %s\n", Locales[FirstLocale]);
// Open MPQs
LoadLocaleMPQFiles(FirstLocale);
Oops, something went wrong.

0 comments on commit 2e935de

Please sign in to comment.