Joomla 3 custom plugin installation: add a folder with images from zip to images folder - plugins

My custom plugin needs add a folder with images in "images" folder of joomla. Is this possible and if yes how can i tell my install script to take this folder and copy it in images path?

Ok i found a way to do it . In my xml file i added
<media folder="" destination="../images">
<folder>testfolder</folder>
</media>

The primary issues being how to include an archive file with your installation package and then how to deal with zip files using exclusively PHP functionality to un-package and place where you want them.
EDIT
I made an error, the original link didn't contain the required information to create installation scripts to run during your extensions install. The new second link is however specific to doing this. I would recommend storing the images somewhere in you installation package, and manually moving them during installation to where you need them in the images folder using one of the available methods to hook into.
Sorry for the error, good luck!
http://docs.joomla.org/Package
http://docs.joomla.org/J2.5:Developing_a_MVC_Component/Adding_an_install-uninstall-update_script_file

Related

TDS Not Deploying Linked Files

In a web project I added a few static assets as links to files that existed in the code so if they change in one place, they change in the other as well. This was a temporary hack because assets were being provided by someone else. once they were done I was going to add the files in the project instead of having them as links and remove them from the other place they currently exist. I'm pretty sure my problem is that TDS does not see files added as links. It looks like the references to the linked files show up only in the .csproj file and I'm pretty sure TDS deploys whatever physically exists in a project (or at least that's how it seems like it is working). Is there a way to get TDS to recognize files added as a link? I'm using TDS version 5.0.10 and Visual Studio 2013.
I ended up adding the folder that was outside of the project to TDS's file replacement option in order to get it out.

How can I avoid packing my Eclipse plugin in *.jar archive while building Update Site?

I cab export my plugin manually as a folder and I can set option to unpack *.jar after installation from Update Site. But how can I totally avoid using *.jar archives? Is there a way to build Update Site for my plugin with a folder with its contents except *jar archive?
If you use 'features' to build your update site you can specify the 'unpack the plug-in archive after the installation' option in the feature.xml.
However I think this will still loose any execution bit set on files.
Update:
The 'build.properties' file in a feature can specify additional files to put in the root or other directories. You can specify the permissions for these files:
root=file:filename
root.permissions.755=filename
See the Root file Properties help

How to create an entire Eclipse installation package?

Is it possible to create an Eclipse installation package, that contains a bunch of bundles and plugins? If so, how? (Like the ones that are already being offered by Eclipse.org and also from different vendors with their own projects)
The reason I am asking is, that I find it very time-consuming to install a bunch of software into development environment every time I need a clean installation of Eclipse (based on various reasons, corruptions etc.).
So I would like to install all the software I need at once, and save it somewhere else before working with it (as a backup) and if something goes wrong I can install the entire base installation again without being have to handle all the extra software in it.
Thanks!
Eclipse is downloadable as a zip or tar file, so you can dezip it in a folder, add your favorites plugins (their will be store in the eclipse folder in plugins subfolder) and create a new archive with your modified environment (your eclipse folder).
I think It's the simple way to create a backup.
I hope it may help you,
Have a nice day
One option is to use Yoxos, which allows you to create your own package of Eclipse and easily share it (including with yourself).

How to install the Xpand in Eclipse?

I m trying to install Xpand in Eclipse. I am doing it through update manager. However the download stack at around 29%. I use the following link:
http://download.eclipse.org/modeling/m2t/xpand/updates/nightly/
Alternatively I downloaded the zip file from this link:
http://www.eclipse.org/modeling/m2t/downloads/?project=xpand
Then I tried to do install->new software-> Add -> Archive and I pointed at the zip file. I thought that this would gonna work since it uses the local zip file.Again it stucks around 29%.
Now I am thinking to manually add the plug-in to the eclipse but I m not sure how:
The content of the zip are:
- binary(folder)
- features(folder)
- plugins(folder)
- artifact.jar
- content.jar
I know that I have to copy the features and the plugins folder in the corresponding ones in the eclipse folder. However I don`t know what to do with the binary(folder) and the artifact.jar/content.jar files.
Anybody could help me out please?
Thnx
I don't know why the installation is getting stuck at 29%. It may be a firewall/proxy problem on your end, or it may be corrupt metadata in the archive. It's worth following up on the Xpand mailing list or forum.
But, if you want to install it, you can unzip the archive into your dropins folder inside of your eclipse. This will work unless Xpand requires any third party jars.
i use this updatesite for xpand install. and it works well
xpand - http://download.eclipse.org/modeling/m2t/xpand/updates/
go to menu:
help-install new software-(add the link)-select all-finish

How to set reference to the folder which contains multiple jar files?

My environment:
Netbean 6.9.1
Glassfish 3.0.1
Windows 7
Goal:
When my coworkers opens the Netbean Project, the library is already referenced without them manually create library, adding jars into it and reference it.
Detail:
I created Netbean project and the project has reference to few jar files in the folder.
Currently whoever opens the project for the first time, they have to manually create library and refer it to the project.
My project location:
C:\Users\masatosan\Desktop\myProject\myApp
My library location:
C:\Users\masatosan\Desktop\myProject\lib\myLib
The myLib folder contains:
some1.jar
some2.jar
some3.jar
I can achieve my goal if I create reference to individual jar file by defining to project.properties file like below: (creating reference to sqljdbc4.jar)
file.reference.sqljdbc4.jar=../lib/sqljdbc4.jar
javac.classpath=\
${libs.restlib_gfv3ee6.classpath}:\
${file.reference.sqljdbc4.jar}:
But my case is different since I have 3 jars in the myLib folder and wanting to reference them all.
Is it possible to reference all jars in myLib folder?
Please let me know if you need more clarification.
I'm sorry, but it doesn't work that way. When you create a project, you have to add the jar files individually.
However, if you put your lib folder under your project, netbeans will refer to them via relative paths. Then when you share the project (lib directory included), netbeans will be able to automatically find the jar files when the next person uses the project. That way you only have to add jar files once.
Short of using a dependency management tool like maven (which Netbeans has good support for), this is really the best solution. It uses a bit more disk space (obviously), but that's never been a huge issue for me.
I figured how so let me share.
Tool --> Library then library window pop up.
Create library called "MyLib" which contains multiple jars.
Add "MyLib" to your project. This change will be written to project.properties file under nbproject folder.
project.properties file indicates the classpath of lib reference you just added.
It should look like something below
javac.classpath=\
${libs.Excella.classpath}:\
${libs.MyLib.classpath}
Now someone else opens the project from different machine and she just needs to do step#1 and #2, which is to create library with same library name i.e. "MyLib"
I think this is what Bill was saying originally but thought it would be helpful to give step by step instructions since I finally figured .... after long time :D