<html><body><div style="font-family: arial, helvetica, sans-serif; font-size: 12pt; color: #000000"><div>Will try to find another way of doing this. </div><div><br data-mce-bogus="1"></div><div>When the dependency for gambas is created for the install, does that imply that the scripter will be available?</div><div><br data-mce-bogus="1"></div><div data-marker="__SIG_PRE__"><br>Brian G</div><div><br></div><hr id="zwchr" data-marker="__DIVIDER__"><div data-marker="__HEADERS__"><b>From: </b>"Brian" <brian@westwoodsvcs.com><br><b>To: </b>"Gambas mailing list" <user@lists.gambas-basic.org><br><b>Sent: </b>Monday, February 24, 2020 6:39:54 PM<br><b>Subject: </b>Re: [Gambas-user] Update ide Package module for shared libraries, Make installation packages to have preinst and postinst scripts<br></div><div><br></div><div data-marker="__QUOTED_TEXT__"><div dir="auto" style="direction: ltr; margin: 0; padding: 0; font-family: sans-serif; font-size: 11pt; color: black; ">I only want to save major releases i.e. 4.0 to 5.0 as a production applications may use different version of the library. <br>
</div>
<div dir="auto" style="direction: ltr; margin: 0; padding: 0; font-family: sans-serif; font-size: 11pt; color: black; ">Right now every level is removed by an install package only the last one remains. The system shared libraries keep multiple versions for that reason.<br>
<br>
</div>
<div dir="auto" style="direction: ltr; margin: 0; padding: 0; font-family: sans-serif; font-size: 11pt; color: black; ">That's not true about the users ~ lib it keeps all the versions. But not the .Deb file installs.<br>
</div>
<div dir="auto" style="direction: ltr; margin: 0; padding: 0; font-family: sans-serif; font-size: 11pt; color: black; ">I am not moving the files only preventing them from being deleted. <br>
</div>
<div dir="auto" style="direction: ltr; margin: 0; padding: 0; font-family: sans-serif; font-size: 11pt; color: black; ">I am using gbs3 from inside the ide, so it should already be installed. At least I thought so. Oh well. <br>
<br>
<br>
</div>
<div dir="auto" style="direction: ltr; margin: 0; padding: 0; font-family: sans-serif; font-size: 11pt; color: black; "><span id="OutlookSignature"><div dir="auto" style="direction: ltr; margin: 0; padding: 0; font-family: sans-serif; font-size: 11pt; color: black; ">thank you<br>
</div>
<div dir="auto" style="direction: ltr; margin: 0; padding: 0; font-family: sans-serif; font-size: 11pt; color: black; ">brian</div>
</span><br>
</div>
<br><br><br>
<div class="gmail_quote">On Mon, Feb 24, 2020 at 5:56 PM -0800, "Benoît Minisini" <span dir="ltr"><<a href="mailto:g4mba5@gmail.com" target="_blank">g4mba5@gmail.com</a>></span> wrote:<br>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div dir="3D"ltr"">
<pre>Le 25/02/2020 à 02:07, Brian G a écrit :
> Since with Gambas shared libraries we can not use the dh_mkshlib as it
> also changes system paths etc
>
> I would like to add the following code to generate preinst and postinst
> scripts for preserving older versions of shared libraries
>
> This change is from the package.module in the ide , there could be some
> imposed rules for these script regarding how they process the shared
> libraries.
>
> This would be done to preserve applications that use older versions of
> the libraries. Linux shared libraries do allow this and usually create
> a link to the most current as a default version.
>
> This is from the Debian build, But can be added for the others as well.
>
> I am including a testexec library which contains the created scripts as
> examples
>
> Case Project.TYPE_LIBRARY
> Dim PrePostFiles As File
> PrePostFiles = Open sPackagePath &/ "debian/preinst" For Create
> Print #PrePostFiles, "#!/usr/bin/gbs" & System.version
> Print #PrePostFiles, "print \"Gambas Running Pre Install Shared
> Library Process\""
> Print #PrePostFiles, "if not exist(\"/usr/lib/gambas" &
> System.version &/ LCase($sVendor) & "\") then quit 0" ' never
> installed before
> Print #PrePostFiles, "print \"Gambas Running Pre Install Shared
> Library Process Checking for .lib\""
> Print #PrePostFiles, "If Not Exist(\"/usr/lib/gambas" &
> System.version &/ LCase($sVendor) &/ ".lib\") then mkdir
> \"/usr/lib/gambas" & System.version &/ LCase($sVendor) &/ ".lib\""
> Print #PrePostFiles, "print \"Gambas Running Pre Install Shared
> Library Process Checking each file LIKE:" & $sName & "*\""
> Print #PrePostFiles, "For each i as string in
> dir(\"/usr/lib/gambas" & System.version &/ LCase($sVendor) & "\",\"" &
> $sName & "*\",gb.file)"
> Print #PrePostFiles, "Print \"Gambas Pre Install Moving : \" ; i"
> Print #PrePostFiles, "Move \"/usr/lib/gambas" & System.version &/
> LCase($sVendor) & "\" &/ i To \"/usr/lib/gambas" & System.version &/
> LCase($sVendor) &/ ".lib\" &/ i"
> Print #PrePostFiles, "Next"
> Print #PrePostFiles, "print \"Gambas Ending Pre Install Shared
> Library Process\""
> Close #PrePostFiles
> Chmod sPackagePath &/ "debian/preinst" To "rwxr-xr-x"
> PrePostFiles = Open sPackagePath &/ "debian/postinst" For Create
> Print #PrePostFiles, "#!/usr/bin/gbs" & System.version
> Print #PrePostFiles, "print \"Gambas Running Post Install Shared
> Library Process\""
> Print #PrePostFiles, "if not exist(\"/usr/lib/gambas" &
> System.version &/ LCase($sVendor) &/ ".lib\") then quit 0" ' never
> installed before
> Print #PrePostFiles, "For Each i As String In
> Dir(\"/usr/lib/gambas" & System.version &/ LCase($sVendor) &/ ".lib\")"
> Print #PrePostFiles, "Print \"Gambas Post Install Chking Lib: \";i"
> Print #PrePostFiles, "If Not Exist(\"/usr/lib/gambas" &
> System.version &/ LCase($sVendor) & "\" &/ i) Then"
> Print #PrePostFiles, "Print \"Gambas Post Install Making
> Available Lib: \";i"
> Print #PrePostFiles, " Move \"/usr/lib/gambas" & System.version
> &/ LCase($sVendor) &/ ".lib\" &/ i To \"/usr/lib/gambas" &
> System.version &/ LCase($sVendor) & "/\" &/ i"
> Print #PrePostFiles, "Else"
> Print #PrePostFiles, " Kill \"/usr/lib/gambas" & System.version
> &/ LCase($sVendor) &/ ".lib\" &/ i"
> Print #PrePostFiles, " Print\"Gambas Post Install :\"; i ; \" -
> Newer version same level installed\""
> Print #PrePostFiles, "Endif"
> Print #PrePostFiles, "next"
> Close #PrePostFiles
> Chmod sPackagePath &/ "debian/postinst" To "rwxr-xr-x"
> Print #hFile, "src/"; $sName; "/"; $sLibraryName; ".gambas
> usr/lib/gambas" & System.Version; "/"; LCase($sVendor)
> Case Project.TYPE_NORMAL
> .........
>
> Thank You
> Brian G
>
>
> ----[ http://gambaswiki.org/wiki/doc/netiquette ]----
>
Why, when installing a library package, do you want to save a possible
already installed library of the same name ?
The library already has its major and minor version in its name. So you
can already install different versions of the same library.
And doing that breaks the packager, by moving files installed from
another package.
Moreover, you must not use gbs inside a package script.
What the hell is that !?
--
Benoît Minisini
----[ http://gambaswiki.org/wiki/doc/netiquette ]----
</pre>
</div>
</blockquote>
</div>
<br><br>----[ http://gambaswiki.org/wiki/doc/netiquette ]----<br></div></div></body></html>