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:
parent
3ab94d5029
commit
0ef9426b45
4 changed files with 11 additions and 5 deletions
|
@ -73,7 +73,11 @@ The Windows desktop directory (usually \c{C:\\Windows\\Desktop} but detected at
|
|||
|
||||
\e{$EXEDIR}
|
||||
|
||||
The location of the installer executable (technically you can modify this variable, but it is probably not a good idea).
|
||||
The directory containing the installer executable (technically you can modify this variable, but it is probably not a good idea).
|
||||
|
||||
\e{$EXEPATH}
|
||||
|
||||
The full path of the installer executable.
|
||||
|
||||
\e{$\{NSISDIR\}}
|
||||
|
||||
|
|
|
@ -304,6 +304,7 @@ CEXEBuild::CEXEBuild() :
|
|||
m_UserVarNames.add("HWNDPARENT",-1); // 27
|
||||
m_UserVarNames.add("_CLICK",-1); // 28
|
||||
m_UserVarNames.add("_OUTDIR",1); // 29
|
||||
m_UserVarNames.add("EXEPATH",-1); // 30
|
||||
|
||||
m_iBaseVarsNum = m_UserVarNames.getnum();
|
||||
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -28,6 +28,7 @@ extern NSIS_STRING g_usrvars[1];
|
|||
# define state_plugins_dir g_usrvars[26]
|
||||
#endif
|
||||
#define state_click_next g_usrvars[28]
|
||||
#define state_exe_path g_usrvars[30]
|
||||
|
||||
extern char g_caption[NSIS_MAX_STRLEN*2];
|
||||
#ifdef NSIS_CONFIG_VISIBLE_SUPPORT
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue