Enrico Forestieri wrote:
Angus Leeming <[EMAIL PROTECTED]> writes:
2 Launching LyX at the end of the installer as
!define PRODUCT_BAT "$INSTDIR\bin\lyx.bat"
!define MUI_FINISHPAGE_RUN "${PRODUCT_BAT}"
works perfectly well, but I get a bloody great cmd window in the
background. How do I make it go away?
Still to resolve.
Angus
Launching the last command in the bat file with "start" should do the trick.
$ cat lyx.bat
@echo off
rem
rem some stuff here
rem
start lyx.exe ....
Enrico
I'm afraid that doesn't work. But anyway, I went a different route:
!define MUI_FINISHPAGE_RUN
!define MUI_FINISHPAGE_TEXT "$(FinishPageMessage)"
!define MUI_FINISHPAGE_RUN_TEXT "$(FinishPageRun)"
!define MUI_FINISHPAGE_RUN_FUNCTION "LaunchProduct"
!insertmacro MUI_PAGE_FINISH
Function LaunchProduct
lyx_configure::set_env LANG $LangCode
Exec ${PRODUCT_EXE}
FunctionEnd
where lyx_configure is a .dll containing (among other things):
// Set an environment variable
extern "C"
void __declspec(dllexport) set_env(HWND hwndParent, int string_size,
char *variables, stack_t **stacktop)
{
EXDLL_INIT();
std::string const var_name = pop_from_stack();
std::string const var_value = pop_from_stack();
SetEnvironmentVariableA(var_name.c_str(), var_value.c_str());
pushstring("0");
}
Angus