added $EXEPATH

git-svn-id: https://svn.code.sf.net/p/nsis/code/NSIS/trunk@5105 212acab6-be3b-0410-9dea-997c60f758d6
This commit is contained in:
kichik 2007-04-19 21:38:11 +00:00
parent 3ab94d5029
commit 0ef9426b45
4 changed files with 11 additions and 5 deletions

View file

@ -130,16 +130,16 @@ const char * NSISCALL loadHeaders(int cl_flags)
HANDLE db_hFile;
GetModuleFileName(NULL, state_exe_directory, NSIS_MAX_STRLEN);
GetModuleFileName(NULL, state_exe_path, NSIS_MAX_STRLEN);
g_db_hFile = db_hFile = myOpenFile(state_exe_directory, GENERIC_READ, OPEN_EXISTING);
g_db_hFile = db_hFile = myOpenFile(state_exe_path, GENERIC_READ, OPEN_EXISTING);
if (db_hFile == INVALID_HANDLE_VALUE)
{
return _LANG_CANTOPENSELF;
}
// make state_exe_directory point to dir, not full exe.
// make state_exe_directory point to dir.
mystrcpy(state_exe_directory, state_exe_path);
trimslashtoend(state_exe_directory);
left = m_length = GetFileSize(db_hFile,NULL);