Merge pull request #1275 from KomodoPlatform/rogue_nocurses

winify rogue
This commit is contained in:
jl777
2019-02-21 18:52:24 -11:00
committed by GitHub
5 changed files with 17 additions and 5 deletions

View File

@@ -32,9 +32,9 @@ build:ubuntu:
variables: variables:
DOCKER_DRIVER: overlay2 DOCKER_DRIVER: overlay2
cache: cache:
key: "${CI_JOB_NAME}${CI_COMMIT_REF_NAME}" key: ${CI_COMMIT_REF_SLUG}
paths: paths:
- depends/built - depends/
script: script:
- zcutil/build.sh -j$(nproc) - zcutil/build.sh -j$(nproc)
- mkdir ${PACKAGE_DIR_LINUX} - mkdir ${PACKAGE_DIR_LINUX}

View File

@@ -3,10 +3,14 @@ cd rogue;
if [ "$HOST" = "x86_64-w64-mingw32" ]; then if [ "$HOST" = "x86_64-w64-mingw32" ]; then
echo building rogue.exe... echo building rogue.exe...
./configure --host=x86_64-w64-mingw32
mkdir ncurses && cd ncurses mkdir ncurses && cd ncurses
echo $PWD
wget https://invisible-island.net/datafiles/release/mingw32.zip wget https://invisible-island.net/datafiles/release/mingw32.zip
unzip mingw32.zip && delete mingw32.zip unzip mingw32.zip && rm mingw32.zip
echo lib archive cleaned
cd .. cd ..
echo $PWD
if make -f Makefile_win "$@"; then if make -f Makefile_win "$@"; then
echo rogue.exe build SUCCESSFUL echo rogue.exe build SUCCESSFUL
cd .. cd ..

View File

@@ -26,10 +26,10 @@ O=o
CC = x86_64-w64-mingw32-gcc CC = x86_64-w64-mingw32-gcc
#CFLAGS=-O2 #CFLAGS=-O2
CFLAGS= -g -O2 -I./ncurses/include CFLAGS= -g -O2 -I./ncurses/include -I./ncurses/include/ncursesw -I../../../depends/x86_64-w64-mingw32/include
#LIBS=-lcurses #LIBS=-lcurses
LIBS = -L./ncurses/lib -lncursesw LIBS = -L./ncurses/lib -lncursesw -lcurl
#RM=rm -f #RM=rm -f
RM = rm -f RM = rm -f

View File

@@ -41,7 +41,11 @@ typedef union _bits256 bits256;
double OS_milliseconds() double OS_milliseconds()
{ {
struct timeval tv; double millis; struct timeval tv; double millis;
#ifdef __MINGW32__
mingw_gettimeofday(&tv,NULL);
#else
gettimeofday(&tv,NULL); gettimeofday(&tv,NULL);
#endif
millis = ((double)tv.tv_sec * 1000. + (double)tv.tv_usec / 1000.); millis = ((double)tv.tv_sec * 1000. + (double)tv.tv_usec / 1000.);
//printf("tv_sec.%ld usec.%d %f\n",tv.tv_sec,tv.tv_usec,millis); //printf("tv_sec.%ld usec.%d %f\n",tv.tv_sec,tv.tv_usec,millis);
return(millis); return(millis);

View File

@@ -705,7 +705,9 @@ md_erasechar()
#elif defined(VERASE) #elif defined(VERASE)
return(_tty.c_cc[VERASE]); /* process erase character */ return(_tty.c_cc[VERASE]); /* process erase character */
#else #else
#ifndef __MINGW32__
return(_tty.sg_erase); /* process erase character */ return(_tty.sg_erase); /* process erase character */
#endif
#endif #endif
} }
@@ -717,7 +719,9 @@ md_killchar()
#elif defined(VKILL) #elif defined(VKILL)
return(_tty.c_cc[VKILL]); return(_tty.c_cc[VKILL]);
#else #else
#ifndef __MINGW32__
return(_tty.sg_kill); return(_tty.sg_kill);
#endif
#endif #endif
} }