Archive: Switching Dirshow and ComponentText at runtime


Switching Dirshow and ComponentText at runtime
  Hi!:rolleyes:

It would be fine to decide at runtime to show the DirPage and the Component page (e.g. decide .ononit). So ist there a possibiblity to to do that ?

If not I can try to implement it myself and give out the source!


Regards,
Rocky :igor:


Nope, there's nothing like that at the moment, but it would be useful!


Not quite correct. Using the .onNextPage and .onPrevPage callbacks,
you can skip pages depending on some variable at runtime.

The following code skips the component page, if the given key
in the registry is set.


onInit

StrCpy$9 0
ReadRegStr$8 HKLM "Software\myProg" "InstallPath"
>FunctionEnd

>Function .onNextPage
IntOp$9 $9 + 1
StrCmp$9 2 0 noabort
StrCmp$8 "" noabort
IntOp$9 $9 + 1
Abort 2
noabort:
>FunctionEnd

>Function .onPrevPage
IntOp$9 $9 - 1
StrCmp$9 2 "" noabort
StrCmp$8 "" noabort
IntOp$9 $9 - 1
Abort-2
noabort:
>FunctionEnd
>
-Fritz

Patching tool for new hide pages
  Thanks Fritz!:p

Meanwhile I implemented a runtime feature to hide the licence, component and dir page. I will post it soon to the newsgroup, but I want to migrate it to Nsis 1.95.
For the documentation I would like to ask you for the patch tool. Where can I find it?

Hey - your patches are really interesting - Good work !

Hope to get a reply!;)

Herzliche Gruesse aus Oesterreich!
Danke!!!


It is part of the cygwin dist, available at http://sources.redhat.com/cygwin/

How to use it:[list=1][*]Install cygwin[*]In cywin's bash, mount the NSIS sources in text-mode(!) somewhere (e.g.: mount -t 'C:\Programme\NSIS\Source' /home/fritz/nsis)[*]cd into the source dir[*]Unpack the patches[*]run the command: patch -p0 < nsis-all.patch[/list=1]

It is important, that the sources are mounted in text mode (-t option of the mount command). Otherwise, patch will get screwed up by the DOSish CR/LF's (normally it works with Unix style LF-only).

Or do you mean: How did i create the patches?
-> I use CVS to track NSIS sources and merge my own changes automatically when a new official version is released.
CVS can generate patches between. I'm not shure, if there's a CVS server available for windows. My CVS server runs on Linux. The client is available for windows too:
http://www.cvsgui.org

-Fritz


BTW:

Just found a native patch.exe for Win ...


Whoops!

I was thinking of the text on those pages...you can't change those at runtime...yet... ;)


Hidepages and Select Sections add on
  Hi Justin and all other,:)

I worked on several addons to Nsis 1.95:

HideLicPage,HideCompPage, HideDirPage :

Hide pages on runtime (e.g. .oninit)

SelSection [-]Section [[-]Section] :

Select or deselect sections. Section 1 can't be deselected !!
Maybe it would also be nice to switch to an unselectable status for marking unavailable parts of an installation. Tell me if you are interested!!

My comments:
************
So I am using these addons for installing a complete software
system containig of one or several parts, which may be shipped to somebody or not. So I am making a main installer and spawn components. The spawned components get the install. dir over the command line and should only show the progress bar and not anything else. If such a partial installer is started directly, you will have access to all pages (lic, dir, ....).

Enjoy it,
Andreas
:D


Sources for add on
  Hi!

The sources for the add on!

The patcher can be found on Fritz recent reply !!

Greetings,
Andreas:)


Patching sources
  Hi Fritz,

I documented my changes with the Win32 version of diff.exe, because I didn't succeed with WinCvs. I will try it again, if I have more time.

But do you know how to use the Win32 diff tool recursevly instead of file by file and write an input file for the patch tool?

Regards,
Andreas

:)


Doesn't your diff have a -r option?
If yes:


diff -urwN originaldir modifieddir

u = Produce unified diff, r = recursive, w = ignore whitespace, N (or with some diffs: P) = produce diff for added and deleted files.

If not, then probably get cygwin anyway.

If i need unix tools, i usually use cygwin. cygwin's diff has all important options. And there are much more useful unix tools in cygwin.

What's your problem with wincvs? (Probably via mail?)

Ciao
-Fritz