[Gambas-user] About library and component packaging in Gambas 3

Bruce Bruen bbruen at ...2308...
Wed May 2 06:54:05 CEST 2012


Hi folks!

(I'm getting pretty excited about the packager now.)


Benoît,

Please consider this little change for the autotools packager code in
the IDE.

We use a lot of common images in our projects.  Corporate identity etc
etc blah blah...  Rather than have copies of all these in the projects
we symbolic link them in.  (So we only have one set of images to manage
not lots!)

Unfortunately, the links created in the IDE are relative to the project
directory,  e.g. PHlogo.png would be linked in referencing something
like "../../common/images/logos/paddys-hill/PHlogo.png"

When the project is copied to the temporary build dir in the packaging
process, these links are now incorrect.

The following diff (also attached) corrects this by adding the L option
to the cp command so that symbolic links are snapped.

Index: Package.module
===================================================================
--- Package.module    (revision 4702) 
+++ Package.module    (working copy) 
@@ -1383,7 +1383,7 @@
   Try sCmd = Scan(Project.GetCompileCommand(True, Not
Project.KeepDebugInfo, False), "*/bin/gbc" & System.Version & " *")[1]
 
   'Mkdir sBuildDir &/ Project.Name
-  Shell "cp -r " & Shell$(Project.Dir) & " " & Shell$(sBuildDir &/
Project.Name) Wait  
+  Shell "cp -rL " & Shell$(Project.Dir) & " " & Shell$(sBuildDir &/
Project.Name) Wait  
   sFile = Replace(File.Load("install/acinclude.m4"), "$(VERSION)",
CStr(System.Version))
   sFile = Replace(sFile, "$(PACKAGE_VERSION)", $sVersion)
   sFile = Replace(sFile, "$(EXTRA_TEST)", Project.ExtraAutoconfTest)


regards
Bruce
-------------- next part --------------
A non-text attachment was scrubbed...
Name: pkg1.diff
Type: text/x-patch
Size: 750 bytes
Desc: not available
URL: <http://lists.gambas-basic.org/pipermail/user/attachments/20120502/1df524e3/attachment.bin>


More information about the User mailing list