fix win32 build

This commit is contained in:
Chris Cromer 2020-04-19 14:05:05 -04:00
parent b93a3246e0
commit d3aa8a559e
Signed by: cromer
GPG Key ID: 39CC813FF3C8708A
2 changed files with 5 additions and 4 deletions

View File

@ -1,6 +1,7 @@
TEMPLATE = app
CONFIG = qt warn_on release thread
#CONFIG = qt warn_on debug thread
#CONFIG += static # win32 static linking
# DEFINES += QT_DLL QT_THREAD_SUPPORT # win32
QMAKE_CXXFLAGS += -Wno-unused-result
HEADERS = agicommands.h \

View File

@ -302,8 +302,8 @@ int Game::from_template(string name)
struct _finddata_t c_file;
long hFile;
if ((hFile = _findfirst(tmp, &c_file)) != -1L) do {
sprintf(tmp2,"%s/%s",templatedir.c_str(),c_file.name);
cfilename = tmp2;
sprintf(tmp,"%s/%s",templatedir.c_str(),c_file.name);
cfilename = tmp;
#else
glob_t globbuf;
glob(tmp, 0, NULL, &globbuf);
@ -335,8 +335,8 @@ int Game::from_template(string name)
sprintf(tmp,"%s/src/*",templatedir.c_str());
#ifdef _WIN32
if ((hFile = _findfirst(tmp, &c_file)) != -1L) do {
sprintf(tmp2,"%s/src/%s",templatedir.c_str(),c_file.name);
cfilename = tmp2;
sprintf(tmp,"%s/src/%s",templatedir.c_str(),c_file.name);
cfilename = tmp;
#else
glob(tmp, 0, NULL, &globbuf);
for(i=0;i<(int)globbuf.gl_pathc;i++){ //copy template src subdirectory