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

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

Related

NetBeans Include External JAR in Export to Zip

I have a NetBeans project that uses the GSON library. I've tried including the GSON.jar file without requiring future users to separately download it. However it doesn't seem to work. The project looks for the file from the relative path of my computer so the file isn't found on another user's computer. Is there a way to include GSON.jar and "Export to Zip" and keep the reference in the project itself? I'm lost!
Thank you
Exporting a Project to ZIP zips up the project folder only, and not anything outside of the folder, including dependencies. If you include the GSON.jar file in the project folder, then the JAR file will be included in the .ZIP file. It's a good practice anyway since NetBeans will use a relative classpath and thus if you move the project itself NetBeans won't give you an error message when loading the project.

Installing NuGet packages to custom folder in a project in Visual Studio 2015

I have a Visual Studio 2015 solution with many projects. For one of the projects I would like the files from NuGet to download to a specific folder in my project. For example, I intend to use Bootstrap and also Signalr. I would like Bootstrap to download everything into one folder in my application, and not create folders within my project root. For example, I have a folder called 'Libs' in the project and would like those libraries to use 'Libs' as their root folder. This is due to an external build solution that handles everything in the 'Libs' folder.
I've found these docs about using a NuGet.config folder for the solution, but this does not handle my problem. Any ideas?
As far as I'm aware, this isn't possible. Each Nuget package is written with specific instructions on how to install into a project. One of those instructions is where to put files, another example would be what transform to apply to the web.config. Nuget doesn't specify a way to modify these instructions. The only thing you could do would be to modify the packages yourself - download the .nupkg file and open it up as a zip file, you will be able to edit the folder structure from there.

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

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

Define update sites in config.ini file

I'm creating a product based on Eclipse 3.6.2 for our project. The idea is to create an Eclipse installation that has all the plugins we require and all configuration are setup as we need them for the project.
As part of that, I want to make sure our update sites are included, but how can I do that?
If I choose to export preferences update sites are not included. I can export update sites from the preference page and get an XML file with them, but how can I include it in my config.ini file? Or is there some other way?
Goal is, when the user runs the custom Eclipse product our update sites will be in the list of sites. Ideally, the only ones in the list.
You can add a p2.inf file that instructs particular update sites when things are installed:
instructions.configure=\
addRepository(type:0,location:http${#58}//www.eclipse.org/equinox/p2/testing/updateSite);\ addRepository(type:1,location:http${#58}//www.eclipse.org/equinox/p2/testing/updateSite);
This would add www.eclipse.org/equinox/p2/testing/updateSite.
This file (p2.inf) needs to go in the same directory as your MANIFEST.MF file. You can read more about this here.
Since there is a likely chance I'll have to do this again, and no chance I remember how to do it the next time, I'll write down the steps I went through:
I created a p2.inf file with instructions;
instructions.configure=\
org.eclipse.equinox.p2.touchpoint.eclipse.addRepository(type:0,location:http${#58}//<my_url_here>,name:<my_name_here>,enabled:true);\
org.eclipse.equinox.p2.touchpoint.eclipse.addRepository(type:1,location:http${#58}//<my_url_here>,name:<my_name_here>,enabled:true);\
org.eclipse.equinox.p2.touchpoint.eclipse.addRepository(type:0,location:http${#58}//<my_url_here>,name:<my_name_here>,enabled:true);\
org.eclipse.equinox.p2.touchpoint.eclipse.addRepository(type:1,location:http${#58}//<my_url_here>,name:<my_name_here>,enabled:true);`
According to the Eclipse wiki the inf-file could be placed in the same dir as my feature.xml, so that's what I did.
I had a product that consisted of this feature, so I exported the product using Eclipse product export wizard. I made sure to build a repository.
After the build was done, the repository had a content.jar. Inside the content.jar there was a content.xml. Examining it, I could find:
<touchpointData size='1'>
<instructions size='1'>
<instruction key='configure'>
org.eclipse.equinox.p2.touchpoint.eclipse.addRepository(<all my update sites>);
</instruction>
</instructions>
</touchpointData>
So this verified that the export did actually see my p2.inf file and do something with it.
To install from the repository I used an Eclipse Director script:
cmd /c "C:\Program\Eclipse\director\director -consoleLog -bundlepool c:/program/eclipse/eclipse3.6_custom -profileProperties "org.eclipse.update.install.features=true" -i MyProduct.Product -r "file:/C:\eclipse\exported\repository" -d c:/program/eclipse/eclipse3.6_custom -p helios"`
The script installed the product from the repository to the destination.

how to setup the sphinx with netbeans

i have successfully configured sphinx4 with eclipse.
for that these steps i have used.
copy my java and config files to SRC folder
all the necessary jar files (in the lib). the lib folder added to the root of the project
build those jar files (jsapi files too)
change the configuration file and give the proper path
test the java file
but in Netbeans i really dont understand how to do the proper steps. can someone help me. the jar files should be added to "Libraries" rite.
then after adding them how to build them.
in the netbeans it dont show a SRC folder. so all the java files and configuration files should go to Source Packages folder rite.
can someone help me with this. please
If you have sphinx4-1.0beta6 then you can just open the folder up as a netbeans project. Open netbeans, click open project, then navigate to the sphinx folder and open it. It is already a netbeans project file type as of this version. I assume this will work in later versions also. I have no clue why sphinx doesn't say this on their website.
Sphinx4 is a Java library available in OSS repository, so you can use it as any library.
If your project uses maven/gradle, add repository in your project configuration, then add dependency on two packages - sphinx4 core and sphinx4-data. The former is the main library, the latter is required if you want to recognize US English. Then just start writing the code.
If you want to rely on jar files, just download sphinx4-core and sphinx4-data files from the repository and add them as dependency to the project, then start writing code.
If you want to modify or develop sphinx4 itself, install Gradle support in your IDE, then import latest sphinx4 sources as a Gradle project.
For more details and links see the tutorial
http://cmusphinx.sourceforge.net/wiki/tutorialsphinx4
click on Add JAR/Folder
select jar file you want to add