- This topic has 4 replies, 2 voices, and was last updated 11 years, 2 months ago by sdc-support.
-
AuthorPosts
-
PavelMemberHi,
It would be very useful to have automatic variables expansion for properties, launch arguments, .epf and .wrkspc files after client have downloaded them from the server but before they are getting applied to Eclipse installation or workspace.
For example, currently I’m trying to pre-configure JadClipse Jad decompiler in SDC-managed package and I have a problem specifying Jad decompiler location.
http://jadclipse.sourceforge.net/wiki/index.php/Main_Page#InstallationUsing SDC “binary bundles” I can pre-install Jad decompiler binary to the ${eclipse_home}/binary/xyz/jad[.exe]. Unfortunately, JadClipse doesn’t understand variables in the path to decompiler and full path to binary should be explicitly specified.
In my case the Eclipse package installation directory is specified by user, so I don’t know it in advance.
I’d like to have a possibility to specify variable names in the Jad binary location in SDC Admin and then have them automatically expanded on the client side before they’re getting applied to the Eclipse configuration.
For example, for Windows version of the package I’d like to specify
/instance/net.sf.jdtdecompiler.jad/net.sf.jdtdecompiler.jad.cmd= ${eclipse_home}/binary/xyz/jad.exe
in SDC Admin and get it expanded on the client side to something like
/instance/net.sf.jdtdecompiler.jad/net.sf.jdtdecompiler.jad.cmd= C:/Software/BE-CO-Eclipse/binary/xyz/jad.exeI also don’t want to have all variables expanded, but just some of them. It would perfect if I could “mark” necessary variables by adding some prefix like “sdc-expand” to the variable name. For example, Jad binary location would look like:
/instance/net.sf.jdtdecompiler.jad/net.sf.jdtdecompiler.jad.cmd= ${sdc-expand.eclipse_home}/binary/xyz/jad.exeI’d be very grateful if you could give me a .class-task example code or suggest any other way to implement this in SDC Update#2.
Best regards,
Pavel
sdc-supportMemberPavel, we are currently working on an example on how to solve your request. We will post the solution here soon
Thanks
Ignacio
SDC Support
sdc-supportMemberPavel, here it is the example to modify the preferences for JAD decompiler. The file contains the source, as well as an update site in zip format so you can import it to SDC as third party library. You will have to install this plugin on your profile and add a workspace task to configure the workspace. An example of this file is also on the archive.
Best Regards
Ignacio
SDC SupportAttachments:
You must be logged in to view attached files.
sdc-supportMember1. Download and extract the preferenceModifier.zip
2. Import as third party the site.zip (in the extracted files).
3. Import as third party software JAD, use “Package binary contents for delivery”, download the binary from http://www.varaneckas.com/jad/ (First it’s needed to extract, make jad executable and compress on tgz)
4. Import as third party the JAD Decompiler (http://jadclipse.sourceforge.net/update/)
5. Edit the file preference-modifier.epfmod, change the value of library-name to the one you setted for the binary library (step 3)
6. Create a package, add all the third party software previously imported (steps 2,3 and 4) and the preference-modifier.epfmod file as workspace task (ignore the warning).
8. Commit, promote and build.
9. Install and launch the package.
10. Check on Windows -> Preferences -> Java -> Decompilers -> Jad … The path to decompilers should be a valid path to the binary for Jad.Ignacio
SDC Support
sdc-supportMemberWe have updated the example to be a bit more flexible. It now allows you to specify the path within the deployed binary library and specify whether or not the file is an executable (which results in .exe being appended on windows).
Attachments:
You must be logged in to view attached files. -
AuthorPosts