Creating an eclipse plugin without gui: what am I missing? - eclipse

I'm creating an eclipse plugin using java code generated via a Makefile (yes, I know ant). The final target of my makefile is a zip containing the following structure (I used the plugin for javacc as an inspiration):
$ unzip -l myplugin_2015.02.16.zip
Archive: myplugin_2015.02.16.zip
Length Date Time Name
--------- ---------- ----- ----
0 02-16-2015 09:30 feature/
0 02-16-2015 09:30 feature/myplugin.feature_2015.02.16/
474 02-16-2015 09:30 feature/myplugin.feature_2015.02.16/feature.xml
0 02-16-2015 09:30 plugins/
0 02-16-2015 09:30 plugins/myplugin_2015.02.16/
0 02-16-2015 09:30 plugins/myplugin_2015.02.16/META-INF/
527 02-16-2015 09:30 plugins/myplugin_2015.02.16/META-INF/MANIFEST.MF
492 02-16-2015 09:30 plugins/myplugin_2015.02.16/plugin.xml
23079 02-16-2015 09:30 plugins/myplugin_2015.02.16/idp192.jar
--------- -------
24572 9 files
No I'd like to import this zip in eclipse as a new plugin. When I run eclipse->install-new-software->Add->archive it fails with "no software size found for jar:... , do you wish do edit location ?".
I suspect I need to wrap this zip in a site file ? is there a minimal way to create this 'site' archive ? or is there a simplier solution , something missing in my plugin.zip ? Most important, I don't want to use any GUI.
Thank you for your help

fixed a few hours later: just moving my *.jar to eclipse/plugin fixed the problem.

Related

How do I exclude a subfolder of a subfolder in compress-archive

I want to zip a folder containing files, and subfolders containing more files and more subfolders. But I want exclude just one subfolder of a subfolder. I have seen many various complicated answers but none seem to really work on this scenario.
folder structure
temp/
a/
aa/
aaa/
aaaa/
filesinaaaa.txt
filesinaaa.txt
filesinaa.txt
at.txt
b/
bb/
bt.txt
c.txt
I want to exclude all files in a/aa/aaa/ while keeping the resulting zip in the same dir structure. And if possible remove the files that were included in the zip.
So result expected is
temp/
a/
aa/
aaa/
aaaa/
filesinaaaa.txt
filesinaaa.txt
result.zip
In linux it is as simple as
cd temp
zip -rm result.zip . -x "a/aa/aaa/*"
what is the simplest way to do this in powershell?
answers i've tried do not really work on subfolder of a subfolder.
Exclude sub-directories from Compress-Archive Powershell Cmd
How do I exclude a folder in compress-archive
over complicated result
Archive folder without some subfolders and files using PowerShell
You can use 7z CLI to do so, here is the doc explaining the usage of -x option in 7z
Showing an example of the option below for reference
The directory structure explained in the question:
C:\Users\adam_\Desktop\temp〉dir -R
a b c.txt
./a:
aa at.txt
./a/aa:
aaa filesinaa.txt
./a/aa/aaa:
aaaa filesinaaa.txt
./a/aa/aaa/aaaa:
filesinaaaa.txt
./b:
bb bt.txt
./b/bb:
Creating the archive:
PS C:\Users\adam_\Desktop\temp> 7z a -tzip result.zip . -x!a/aa/aaa/*
7-Zip 19.00 (x64) : Copyright (c) 1999-2018 Igor Pavlov : 2019-02-21
Scanning the drive:
5 folders, 4 files, 63 bytes (1 KiB)
Creating archive: result.zip
Add new data to archive: 5 folders, 4 files, 63 bytes (1 KiB)
Files read from disk: 4
Archive size: 1217 bytes (2 KiB)
Everything is Ok
Result archive details:
PS C:\Users\adam_\Desktop\temp> 7z l .\result.zip
7-Zip 19.00 (x64) : Copyright (c) 1999-2018 Igor Pavlov : 2019-02-21
Scanning the drive for archives:
1 file, 1217 bytes (2 KiB)
Listing archive: .\result.zip
--
Path = .\result.zip
Type = zip
Physical Size = 1217
Date Time Attr Size Compressed Name
------------------- ----- ------------ ------------ ------------------------
2022-05-05 09:48:37 D.... 0 0 a
2022-05-05 09:48:12 D.... 0 0 a\aa
2022-05-05 09:47:45 D.... 0 0 a\aa\aaa
2022-05-05 09:48:12 ....A 13 13 a\aa\filesinaa.txt
2022-05-05 09:48:37 ....A 13 13 a\at.txt
2022-05-05 09:49:20 D.... 0 0 b
2022-05-05 09:48:58 D.... 0 0 b\bb
2022-05-05 09:49:20 ....A 19 19 b\bt.txt
2022-05-05 09:49:56 ....A 18 18 c.txt
------------------- ----- ------------ ------------ ------------------------
2022-05-05 09:49:56 63 63 4 files, 5 folders

How do I start SourceTree 2 from the command line on Windows?

SourceTree 2.0 is substantially different from SourceTree 1 in that it uses a rolling release model - eg:
$ ls $env:LOCALAPPDATA\sourcetree
Directory: C:\Users\mike\AppData\Local\sourcetree
Mode LastWriteTime Length Name
---- ------------- ------ ----
d----- 27/04/2017 17:12 app-2.0.19.1
d----- 09/05/2017 10:44 app-2.0.20.1
d----- 09/05/2017 10:44 packages
-a---- 08/05/2017 16:25 3225 SquirrelSetup.log
-a---- 18/04/2017 23:51 1518408 Update.exe
So there's no static directory for SourceTree executables anymore.
Previous versions of SourceTree included an 'stree' command but the 'Install Command Line Tools' option but this is MacOS only.
How do I start SourceTree 2 from the command line on Windows?
Got it. As Steve Streeting mentions here you can get the current path the active version of SourceTree 2 from the registry.
Combining that with some powershell gives:
function stree {
$SourceTreeCommand = (Get-ItemProperty HKCU:\Software\Classes\sourcetree\shell\open\command).'(default)'.split()[0].replace('"','')
& $SourceTreeCommand -f .
}

Get Jar/Java from INSTALL4J .exe

Hi Im new to install4j so forgive my misunderstandings, I have a x64 .exe that was built using INSTALL4J is there any way to get the java/jar out of it? does everything get compiled to PE64? This is the 7zip list of the .exe archive:
Date Time Attr Size Compressed Name
------------------- ----- ------------ ------------ ------------------------
2014-12-03 16:37:21 ..... 173056 173056 .text
2014-12-03 16:37:21 ..... 40960 40960 .rdata
2014-12-03 16:37:21 ..... 9216 9216 .data
2014-12-03 16:37:21 ..... 7680 7680 .pdata
..... 1612 1612 .rsrc\0\version.txt
..... 302 302 .rsrc\1033\DIALOG\101
..... 1188 1188 .rsrc\0\MANIFEST\1
2014-12-03 16:37:21 ..... 2048 2048 .reloc
2014-12-03 16:37:21 ..... 7384 7384 CERTIFICATE
2014-12-03 16:37:21 ..... 3072 3072 [0]
------------------- ----- ------------ ------------ ------------------------
2014-12-03 16:37:21 246518 246518 10 files
There is no PK value as per here
And another thing how do you debug such an .exe windbg can makes sense of it and a java debugger cannot see the process?
Launchers generated by install4j do not contain the JAR files, they use JNI to create the JVM and they include external JAR files into the classpath. You can run the launcher with the /create-i4j-log argument to see what it is doing.

Update package version (openocd) in buildroot

I'm working in a project that uses buildroot-2012.11 to generate a Linux image for an embedded system.
I need to configure openocd for a JTAG debugger that uses an FTDI chip (FT2232D).
I realized that this buildroot version integrate openocd-0.5.0 and the latest openocd release is 0.9.0. I'm interested in updating to this version since I want to use ftdi interface driver instead of ft2232 (deprecated).
I tried to accomplish that by modifying /package/openocd/openocd.mk on the lines:
OPENOCD_VERSION:=0.9.0
OPENOCD_CONF_OPT += --enable-ftdi
The new openocd files where downloaded successfully but when it tries to install it and apply openocd-0001-fix-cross-compilation-host-libsub-was-used-before.patch I got:
Applying openocd-0001-fix-cross-compilation-host-libsub-was-used-before.patch using patch:
can't find file to patch at input line 17
Perhaps you used the wrong -p or --strip option?
The text leading up to this was:
--------------------------
|From 3728c4af7f6303ccedab56ec220797f8f290580e Mon Sep 17 00:00:00 2001
|From: Jean-Christophe PLAGNIOL-VILLARD <plagnioj#jcrosoft.com>
|Date: Wed, 10 Aug 2011 00:17:29 +0800
|Subject: [PATCH] fix cross compilation: host libsub was used before
|
|tested in buildroot
|
|Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj#jcrosoft.com>
|---
| configure.in | 7 +++++--
| 1 files changed, 5 insertions(+), 2 deletions(-)
|
|diff --git a/configure.in b/configure.in
|index dfa1e8f..cfe2218 100644
|--- a/configure.in
|+++ b/configure.in
--------------------------
File to patch: configure.in
configure.in: No such file or directory
If I skipped the patch the building process stop and I'm not able to generate the images.
I've doing some research on the internet and I couldn't find how to do this correctly.
Maybe one obvious solution could be updating the buildroot version but since there is a lot of other people development with the current version I'm not in a position of taking that decision right now.
I'll do appreciate any help.
Upgrade your Buildroot release. 2015.08 already has OpenOCD 0.8.0 and it should be trivial to update to 0.9.0. Plus you will benefit from the numerous improvements and updates that have been made between 2012.11 and 2015.08.

Framework selection how to?

Could somebody tell what do I have to add as framework if I want to have the latest/newest version?
In this particular case, they are all the same.
You can check it by doing:
ls -al /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator6.0.sdk/usr/lib/libz* and you'll get the following:
lrwxr-xr-x 1 root wheel 16 Sep 20 13:58 libz.1.1.3.dylib -> libz.1.2.5.dylib
-rwxr-xr-x 1 root wheel 79104 Sep 20 13:58 libz.1.2.5.dylib
lrwxr-xr-x 1 root wheel 16 Sep 20 13:58 libz.1.dylib -> libz.1.2.5.dylib
lrwxr-xr-x 1 root wheel 16 Sep 20 13:58 libz.dylib -> libz.1.2.5.dylib
as a more general rule, the one without a version number is a symbolic link to the latest version.
Its very simple
in iOS 6 SDK, goto Target > Build Phases > Link Binary with Libraries > click + > and type the required framework name > double click the framework.