- Fixed all known problems with temporary files and directoroes
- Command line switches work again (/NCRC and /S) - GetTempFileName now takes another argument as base directory (default is $TEMP) - Message boxes work from .onGUIEnd - Some more optimizations git-svn-id: https://svn.code.sf.net/p/nsis/code/NSIS/trunk@2739 212acab6-be3b-0410-9dea-997c60f758d6
This commit is contained in:
parent
21d0160dba
commit
caa31c9cd5
11 changed files with 245 additions and 265 deletions
|
@ -118,7 +118,6 @@ void NSISCALL doRMDir(char *buf, int flags) // 1 - recurse, 2 - rebootok
|
|||
#endif
|
||||
}
|
||||
log_printf2("RMDir: RemoveDirectory(\"%s\")",buf);
|
||||
update_status_text_from_lang(LANG_REMOVEDIR,buf);
|
||||
}
|
||||
#endif//NSIS_SUPPORT_RMDIR
|
||||
|
||||
|
@ -226,6 +225,20 @@ HANDLE NSISCALL myOpenFile(const char *fn, DWORD da, DWORD cd)
|
|||
return CreateFile(fn,da,FILE_SHARE_READ,NULL,cd,0,NULL);
|
||||
}
|
||||
|
||||
char * NSISCALL my_GetTempFileName(char *buf, const char *dir)
|
||||
{
|
||||
int n = 100;
|
||||
while (n--)
|
||||
{
|
||||
char prefix[4] = "nsa";
|
||||
prefix[2] = 'a' + (char)(GetTickCount() % 26);
|
||||
if (GetTempFileName(dir, prefix, 0, buf))
|
||||
return buf;
|
||||
}
|
||||
*buf = 0;
|
||||
return 0;
|
||||
}
|
||||
|
||||
#ifdef NSIS_SUPPORT_MOVEONREBOOT
|
||||
BOOL NSISCALL MoveFileOnReboot(LPCTSTR pszExisting, LPCTSTR pszNew)
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue