fixed bug #1701290 - linux FTBFS: stubs and librarylocal

git-svn-id: https://svn.code.sf.net/p/nsis/code/NSIS/trunk@5088 212acab6-be3b-0410-9dea-997c60f758d6
This commit is contained in:
kichik 2007-04-16 20:15:00 +00:00
parent 4f35575dd6
commit 24f43a6214
2 changed files with 15 additions and 7 deletions

View file

@ -6,12 +6,15 @@
*/ */
#include <windows.h> #include "../../../Source/Platform.h"
#include <stdio.h> #include <stdio.h>
#include <iostream> #include <iostream>
#include <fstream> #include <fstream>
#include <direct.h>
#include "../../../Source/ResourceEditor.h" #include "../../../Source/ResourceEditor.h"
#include "../../../Source/ResourceVersionInfo.h"
#include "../../../Source/winchar.h" #include "../../../Source/winchar.h"
using namespace std; using namespace std;
@ -141,8 +144,8 @@ int main(int argc, char* argv[])
mode = argv[1]; mode = argv[1];
filename = argv[2]; filename = argv[2];
char buf[MAX_PATH]; char buf[1024];
GetCurrentDirectory(MAX_PATH, buf); getcwd(buf, 1024);
filepath = buf; filepath = buf;
if ((filename.substr(0, 1).compare("\\") != 0) && (filename.substr(1, 1).compare(":") != 0)) { if ((filename.substr(0, 1).compare("\\") != 0) && (filename.substr(1, 1).compare(":") != 0)) {
@ -184,14 +187,15 @@ int main(int argc, char* argv[])
// Validate filename // Validate filename
WIN32_FIND_DATA wfd; ifstream fs(filepath.c_str());
HANDLE hFind = FindFirstFile(filepath.c_str(), &wfd);
if (hFind != INVALID_HANDLE_VALUE) if (fs.is_open())
{ {
filefound = 1; filefound = 1;
FindClose(hFind); fs.close();
} }
// Work
int versionfound = 0; int versionfound = 0;
DWORD low = 0, high = 0; DWORD low = 0, high = 0;

View file

@ -550,6 +550,10 @@ typedef DWORDLONG ULONGLONG,*PULONGLONG;
# define HKEY_DYN_DATA ((HKEY)0x80000006) # define HKEY_DYN_DATA ((HKEY)0x80000006)
#endif #endif
#ifndef KEY_WOW64_64KEY
# define KEY_WOW64_64KEY 0x100
#endif
// show modes // show modes
#ifndef SW_SHOWNORMAL #ifndef SW_SHOWNORMAL