Added API for compiler host to choose a different output path on output error

git-svn-id: https://svn.code.sf.net/p/nsis/code/NSIS/trunk@7169 212acab6-be3b-0410-9dea-997c60f758d6
This commit is contained in:
anders_k 2020-04-20 17:21:04 +00:00
parent 13121dacfe
commit 322c7ac6d2
6 changed files with 131 additions and 15 deletions

View file

@ -64,6 +64,7 @@ void LogMessage(HWND hwnd,const TCHAR *str);
void ErrorMessage(HWND hwnd,const TCHAR *str);
void CenterOnParent(HWND hwnd);
void SetDialogFocus(HWND hDlg, HWND hCtl); // Use this and not SetFocus()!
#define DlgRet(hDlg, val) ( SetWindowLongPtr((hDlg), DWLP_MSGRESULT, (val)) | TRUE )
HWND GetComboEdit(HWND hCB);
#define DisableItems(hwnd) EnableDisableItems(hwnd, 0)
#define EnableItems(hwnd) EnableDisableItems(hwnd, 1)
@ -90,6 +91,18 @@ void BuildMRUMenus();
void LoadMRUFile(int position);
void ClearMRUList();
struct FSPath {
template<class T> static inline bool IsAgnosticSeparator(const T c) { return '\\' == c || '/' == c; }
template<class T> static T* FindLastComponent(T*p) // Note: Returns "" for "dir\"
{
for (T *sep = 0, *start = p;; ++p)
if (!*p)
return sep ? ++sep : start;
else if (IsAgnosticSeparator(*p))
sep = p;
}
};
bool FileExists(const TCHAR *fname);
bool OpenUrlInDefaultBrowser(HWND hwnd, LPCSTR Url);