Uwe Stöhr wrote:
Hello Angus,

I encountered an installer unpleasantness:

When I set the path to e.g. the sh.exe, go to the next step, python, and then backwards to the MSYS step, the installer looses the path information for the sh.exe and jumps to the install option. I expect that the setted path is still the default and that the installer don't jump to the inststll option. Because if the path is correct, I want to continue without setting the path again.

Btw. What do I need to fix such bugs by myself?

Woo!

See below for where to find lyx_installer.nsi et al. You'll probably need to edit download.nsh so that it checks the registry setting only if ${ExePath} is empty:

!macro DownloadEnter_Private ExePath RegistryKey RegistrySubKey RemoveFromPath AddtoPath Required DownloadLabel HomeLabel PageHeader PageDescription
 !define skipBackupLbl "skipBackup_${__LINE__}"

-  StrCpy ${ExePath} ""
-  ReadRegStr ${ExePath} HKLM "${RegistryKey}" "${RegistrySubKey}"
+  ${if} ${ExePath} == ""
+    ReadRegStr ${ExePath} HKLM "${RegistryKey}" "${RegistrySubKey}"
+  ${endif}

I installed NSIS and need your source (and possibly a hint from you to sail around NSIS cliffs). Where is it stored in the CVS?

development\Win32\packaging

See the README for a complete list of everything I do after I have run "make install" to create a tree ready for packaging. I suspect that it's sufficient for you to simply copy your installed LyX tree to the equivalent of J:\Programs\LyX, ready to be packaged again. Ie, you can skip everything that the README suggests you do exceptfor the final step, building the installer.

The installer code lives in

development\Win32\packaging\installer\lyx_installer.nsi

You'll need to also rebuild lyx_path_prefix.dll. See the description at the top of lyx_path_prefix.C. It's possible that compilation will fail. If so, you'll have to edit NSIS/Contrib/ExDLL/exdll.h, so:

-typedef {
+typedef struct exec_flags_ {
   int autoclose;
   int all_user_var;
   int exec_error;
   int abort;
   int exec_reboot;
   int reboot_called;
   int XXX_cur_insttype; // deprecated
   int XXX_insttype_changed; // deprecated
   int silent;
   int instdir_error;
   int rtl;
   int errlvl;
 } exec_flags;

 typedef struct {
-  exec_flags *exec_flags;
+  struct exec_flags_ *exec_flags;
   int (__stdcall *ExecuteCodeSegment)(int, HWND);
 } extra_parameters;

(This bug has been fixed in NSIS 2.07b)

Angus

Reply via email to