mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-08-02 03:06:31 -04:00
fixed compile of retroshare-nogui on windows
must be started from cmd git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@3242 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
parent
fe46d7618a
commit
4001c76ff7
2 changed files with 47 additions and 1 deletions
|
@ -31,6 +31,48 @@
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
#include <sstream>
|
#include <sstream>
|
||||||
|
|
||||||
|
#ifdef WINDOWS_SYS
|
||||||
|
#include <conio.h>
|
||||||
|
#include <stdio.h>
|
||||||
|
|
||||||
|
#define PASS_MAX 512
|
||||||
|
|
||||||
|
char *getpass (const char *prompt)
|
||||||
|
{
|
||||||
|
static char getpassbuf [PASS_MAX + 1];
|
||||||
|
size_t i = 0;
|
||||||
|
int c;
|
||||||
|
|
||||||
|
if (prompt) {
|
||||||
|
fputs (prompt, stderr);
|
||||||
|
fflush (stderr);
|
||||||
|
}
|
||||||
|
|
||||||
|
for (;;) {
|
||||||
|
c = _getch ();
|
||||||
|
if (c == '\r') {
|
||||||
|
getpassbuf [i] = '\0';
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
else if (i < PASS_MAX) {
|
||||||
|
getpassbuf[i++] = c;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (i >= PASS_MAX) {
|
||||||
|
getpassbuf [i] = '\0';
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (prompt) {
|
||||||
|
fputs ("\r\n", stderr);
|
||||||
|
fflush (stderr);
|
||||||
|
}
|
||||||
|
|
||||||
|
return getpassbuf;
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
void NotifyTxt::notifyErrorMsg(int list, int type, std::string msg)
|
void NotifyTxt::notifyErrorMsg(int list, int type, std::string msg)
|
||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
|
|
|
@ -46,6 +46,7 @@ win32-x-g++ {
|
||||||
#################################### Windows #####################################
|
#################################### Windows #####################################
|
||||||
|
|
||||||
win32 {
|
win32 {
|
||||||
|
CONFIG += console
|
||||||
OBJECTS_DIR = temp/obj
|
OBJECTS_DIR = temp/obj
|
||||||
RCC_DIR = temp/qrc
|
RCC_DIR = temp/qrc
|
||||||
UI_DIR = temp/ui
|
UI_DIR = temp/ui
|
||||||
|
@ -53,8 +54,11 @@ win32 {
|
||||||
|
|
||||||
LIBS += ../../libretroshare/src/lib/libretroshare.a
|
LIBS += ../../libretroshare/src/lib/libretroshare.a
|
||||||
LIBS += -L"../../../../lib" -lssl -lcrypto -lpthreadGC2d -lminiupnpc -lz
|
LIBS += -L"../../../../lib" -lssl -lcrypto -lpthreadGC2d -lminiupnpc -lz
|
||||||
LIBS += -lws2_32 -luuid -lole32 -liphlpapi -lcrypt32-cygwin -gdi32
|
LIBS += -lssl -lcrypto -lgpgme -lpthreadGC2d -lminiupnpc -lz
|
||||||
|
LIBS += -lws2_32 -luuid -lole32 -liphlpapi -lcrypt32-cygwin -lgdi32
|
||||||
LIBS += -lole32 -lwinmm
|
LIBS += -lole32 -lwinmm
|
||||||
|
|
||||||
|
DEFINES *= WINDOWS_SYS
|
||||||
}
|
}
|
||||||
|
|
||||||
##################################### MacOS ######################################
|
##################################### MacOS ######################################
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue