added $EXEFILE
git-svn-id: https://svn.code.sf.net/p/nsis/code/NSIS/trunk@5120 212acab6-be3b-0410-9dea-997c60f758d6
This commit is contained in:
parent
b5df399991
commit
f4c9414545
6 changed files with 16 additions and 9 deletions
|
@ -75,6 +75,10 @@ The Windows desktop directory (usually \c{C:\\Windows\\Desktop} but detected at
|
|||
|
||||
The directory containing the installer executable (technically you can modify this variable, but it is probably not a good idea).
|
||||
|
||||
\e{$EXEFILE}
|
||||
|
||||
The base name of the installer executable.
|
||||
|
||||
\e{$EXEPATH}
|
||||
|
||||
The full path of the installer executable.
|
||||
|
|
|
@ -302,9 +302,10 @@ CEXEBuild::CEXEBuild() :
|
|||
m_UserVarNames.add("TEMP",-1); // 25
|
||||
m_UserVarNames.add("PLUGINSDIR",-1); // 26
|
||||
m_UserVarNames.add("EXEPATH",-1); // 27
|
||||
m_UserVarNames.add("HWNDPARENT",-1); // 28
|
||||
m_UserVarNames.add("_CLICK",-1); // 29
|
||||
m_UserVarNames.add("_OUTDIR",1); // 30
|
||||
m_UserVarNames.add("EXEFILE",-1); // 28
|
||||
m_UserVarNames.add("HWNDPARENT",-1); // 29
|
||||
m_UserVarNames.add("_CLICK",-1); // 30
|
||||
m_UserVarNames.add("_OUTDIR",1); // 31
|
||||
|
||||
m_iBaseVarsNum = m_UserVarNames.getnum();
|
||||
|
||||
|
|
|
@ -138,9 +138,8 @@ const char * NSISCALL loadHeaders(int cl_flags)
|
|||
return _LANG_CANTOPENSELF;
|
||||
}
|
||||
|
||||
// make state_exe_directory point to dir.
|
||||
mystrcpy(state_exe_directory, state_exe_path);
|
||||
trimslashtoend(state_exe_directory);
|
||||
mystrcpy(state_exe_file, trimslashtoend(state_exe_directory));
|
||||
|
||||
left = m_length = GetFileSize(db_hFile,NULL);
|
||||
while (left > 0)
|
||||
|
|
|
@ -28,7 +28,8 @@ extern NSIS_STRING g_usrvars[1];
|
|||
# define state_plugins_dir g_usrvars[26]
|
||||
#endif
|
||||
#define state_exe_path g_usrvars[27]
|
||||
#define state_click_next g_usrvars[29]
|
||||
#define state_exe_file g_usrvars[28]
|
||||
#define state_click_next g_usrvars[30]
|
||||
|
||||
extern char g_caption[NSIS_MAX_STRLEN*2];
|
||||
#ifdef NSIS_CONFIG_VISIBLE_SUPPORT
|
||||
|
|
|
@ -260,7 +260,7 @@ char * NSISCALL findchar(char *str, char c)
|
|||
return str;
|
||||
}
|
||||
|
||||
void NSISCALL trimslashtoend(char *buf)
|
||||
char * NSISCALL trimslashtoend(char *buf)
|
||||
{
|
||||
char *p = buf + mystrlen(buf);
|
||||
do
|
||||
|
@ -271,6 +271,8 @@ void NSISCALL trimslashtoend(char *buf)
|
|||
} while (p > buf);
|
||||
|
||||
*p = 0;
|
||||
|
||||
return p + 1;
|
||||
}
|
||||
|
||||
int NSISCALL validpathspec(char *ubuf)
|
||||
|
@ -675,7 +677,7 @@ char * NSISCALL GetNSISString(char *outbuf, int strtab)
|
|||
}
|
||||
else if (nVarIdx == NS_VAR_CODE)
|
||||
{
|
||||
if (nData == 28) // HWNDPARENT
|
||||
if (nData == 29) // $HWNDPARENT
|
||||
myitoa(out, (unsigned int) g_hwnd);
|
||||
else
|
||||
mystrcpy(out, g_usrvars[nData]);
|
||||
|
|
|
@ -86,7 +86,7 @@ char * NSISCALL addtrailingslash(char *str);
|
|||
//char NSISCALL lastchar(const char *str);
|
||||
#define lastchar(str) *CharPrev(str,str+mystrlen(str))
|
||||
char * NSISCALL findchar(char *str, char c);
|
||||
void NSISCALL trimslashtoend(char *buf);
|
||||
char * NSISCALL trimslashtoend(char *buf);
|
||||
char * NSISCALL skip_root(char *path);
|
||||
int NSISCALL is_valid_instpath(char *s);
|
||||
void NSISCALL validate_filename(char *fn);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue