[PD-dev] inno setup

Hans-Christoph Steiner hans at eds.org
Wed Jun 3 15:57:08 CEST 2009


Hey Georg,

Sounds great!  Could you submit the patch as a file to the patch  
tracker?  I've had bad luck with patches inline in emails.  Then I'll  
include it.

.hc

On Jun 3, 2009, at 5:11 AM, Georg Werner wrote:

> hi hans,
>
> i made a patch with code to check for a previous version of pd (but  
> only if this is in the same directory you want to install the new  
> one to)
> and offers the possibility to uninstall first.
> cheers
> g.
>
>
> Hans-Christoph Steiner schrieb:
>> Ok, that's a good start!   Could you generate a patch and send it  
>> to me?  Its not hard if you have  SVN installed. I'll bet  
>> TortoiseSVN or other GUIs can do it.  From the command line, you  
>> would do this:
>> cd pure-data/packages/win32_inno/
>> svn diff pd-inno.iss.in   > alwaysoverwrite.patch
>> But the question I have, is that going to cause any problems?  Like  
>> if a file is removed in a new release, and you install the new  
>> version over the old one, will that file still stay there, left  
>> over from the old release?
>> I wonder how people deal with that, perhaps there is a way to  
>> compare two installers, and then configure the new installer to  
>> only delete the files that it must.
>> Perhaps its better to continute this on pd-dev, so others can  
>> participate and its in the archive.
>> .hc
>> On Apr 21, 2009, at 5:40 PM, Georg Werner wrote:
>>> hi,
>>>
>>> i just gave it a shot ;)
>>> i read the documentation and think i found the lines (in pd- 
>>> inno.iss.in) where the problem lies:
>>>
>>> 341 Source: build\bin\*.*; DestDir: {app}\bin; Flags:  
>>> ignoreversion confirmoverwrite recursesubdirs uninsremovereadonly
>>> 342 Source: build\doc\*.*; DestDir: {app}\doc; Flags:  
>>> ignoreversion confirmoverwrite recursesubdirs uninsremovereadonly;  
>>> Attribs: readonly
>>>
>>> i think the confirmoverwrite flag is causing the trouble -  
>>> alwaysoverwrite would be better in this case.
>>>
>>> same in these lines:
>>> 351 Source: build\lib*.dll; DestDir: {sys}; Flags: restartreplace  
>>> confirmoverwrite sharedfile
>>> 352 Source: build\pthread*.dll; DestDir: {sys}; Flags:  
>>> restartreplace confirmoverwrite sharedfile
>>>
>>> hope this helps
>>> cheers
>>> g.
>>>
>>>
>>> Hans-Christoph Steiner schrieb:
>>>> Hey,
>>>> I forgot whether I mentioned this before.  One thing that would  
>>>> improve the newbies experience using Pd-extended on Windows is to  
>>>> make sure that the installer works smoothly.  It uses Inno Setup,  
>>>> which is a nice GUI program that is decently documented.  Want to  
>>>> give that a shot?
>>>> One specific complaint is that you have to uninstall Pd-extended  
>>>> before you can upgrade.  It would be nice if it would  
>>>> automatically overwrite or uninstall the old copy.
>>>> .hc
>>>> ---------------------------------------------------------------------------- Man 
>>>>  has survived hitherto because he was too ignorant to know how to  
>>>> realize his wishes.  Now that he can realize them, he must either  
>>>> change them, or perish.    -William Carlos Williams
>>>
>> ---------------------------------------------------------------------------- "It 
>>  is convenient to imagine a power beyond us because that means we  
>> don't have to examine our own lives.", from "The Idols of  
>> Environmentalism", by Curtis White
> Index: pd-inno.iss.in
> ===================================================================
> --- pd-inno.iss.in	(revision 11314)
> +++ pd-inno.iss.in	(working copy)
> @@ -364,3 +364,25 @@
> ;Source: build\portaudio\*.*; DestDir: {app}\portaudio; Flags:  
> ignoreversion recursesubdirs
> ;Source: build\src\*.*; DestDir: {app}\src; Flags: ignoreversion  
> recursesubdirs
> ;Source: build\tcl\*.*; DestDir: {app}\tcl; Flags: ignoreversion  
> recursesubdirs
> +
> +[Code]
> +function NextButtonClick(CurPageID: Integer): Boolean;
> +var
> +  ResultCode: Integer;
> +begin
> +  case CurPageID of
> +    wpReady:
> +      begin
> +		if(FileExists(ExpandConstant('{app}\unins000.exe'))) then begin
> +			if MsgBox('Found a previous Version of Pure Data at ' +  
> ExpandConstant('{app} ') + #13#13 'Do you want to uninstall it  
> first? (recommended)', mbConfirmation, MB_YESNO) = idYes then begin
> +			if not Exec(ExpandConstant('{app}\unins000.exe'), '', '',  
> SW_SHOWNORMAL, ewWaitUntilTerminated, ResultCode) then
> +            MsgBox('NextButtonClick:' #13#13 'The uninstall file  
> could not be executed. ' + SysErrorMessage(ResultCode) + '.',  
> mbError, MB_OK);
> +			end;
> +		end;
> +        BringToFrontAndRestore();
> +        MsgBox('NextButtonClick:' #13#13 'The normal installation  
> will now start.', mbInformation, MB_OK);
> +      end;
> +  end;
> +
> +  Result := True;
> +end;




----------------------------------------------------------------------------

I have always wished for my computer to be as easy to use as my  
telephone; my wish has come true because I can no longer figure out  
how to use my telephone."  --Bjarne Stroustrup





More information about the Pd-dev mailing list