Update on Windows shortcut features for ITW

jtesdall jtesdall at mapcon.com
Wed Dec 12 19:39:26 UTC 2018


Jiri Vanek wrote
> On 12/11/18 1:33 AM, jtesdall wrote:
>> I have been through, many trials and tribulations mostly because I am not
>> a
>> Java programmer but rather normally use .Net. Getting the Eclipse
>> debugger
>> to work with ITW on Windows was quite a task and I hope to write a post
>> about how to accomplish it in the near future. Although I am not really
>> sure
>> if I know how I got it working finally. ;0)
>> 
>> I will require a bit of help on some core ITW areas for my code to work
>> correctly in the framework. This I think will mainly be in the LRU area.
>> Here is what I have working and then what I need some help on.
>> 
>> 1. I have Windows shortcuts being created on the Windows desktop and a
>> Menu
>> created with the same shortcut and an uninstall shortcut as well. The
>> shortcuts are created with a external opensource library (.jar) called
>> mslinks since windows shortcuts are a binary file. I hope the ITW
>> community
>> will be ok with utilizing this external jar otherwise my work will not be
>> able to be included. I keep track of shortcuts and menus created in a
>> text
>> file in the root of cache. This work is all done in
>> runtime/ApplicationInstance.java calling the aformentioned jar classes to
>> create the actual shortcut files. 
>> 
>> 2. I have modified the clear/purge cache function to also remove the
>> windows
>> shortcuts and menu. This is done in cache\CacheUtil.java. Like is the
>> default in ITW this removes all cache and all ITW created windows
>> shortcuts
>> and menus.  
>> 
>> 3. The clear cache function and the need to have an uninstall feature in
>> windows per app made me realize I was going to have to add the capability
>> to
>> remove one app at a time and call this from a new Uninstall shortcut and
>> maybe someday from add/remove programs. So I did this by addding the
>> capability of adding a codebase parameter to the -Xclearcache function in
>> Boot.java. I have this working except when it comes to the LRU I have not
>> been able to figure out how to mark a file for deletion so I can call
>> cleanCache. The markfordelete function requires a version parameter I
>> couldn't get figured out what to pass.  So I just loop through the
>> directories and delete the ones that match the codebase parameter I pass
>> to
>> -Xclearcache and then call clearLRUSortedEntries (which removes all
>> entries
>> for all apps). I know these two things are bad but it is working right
>> now
>> for me so ..... I could use some help here to get it right.
>> 
>> 4. The other thing I need help with is building a netx.jar I can use to
>> do
>> some more testing on other windows machines. All functions, up until
>> removing one app at a time, I could build a netx.jar by just copying in
>> the
>> new class files over top of the jar classes. But copying in Boot.class
>> doesn't work. Jiri mentioned I would have to use cygwin but I have no
>> idea
>> how to do this. So I need help building a jar with my updated classes,
>> can I
>> do this on windows? Exporting the jar normally from eclipse also does not
>> work. No linux available so I need to do this on windows if possible.
>> 
>> I think my work is useful if I can get by these two walls and do more
>> testing. Then I can cleanup my code and submit it to the project. Can
>> someone versed in ITW please lend a tired prograammer a hand! Jiri?!?
>> 
>> 
> 
> That is really a lot of work... I had to read it twice and still not 100%
> in it. Congratualtions for
> jumping onto java so quckly :)
> 
> Can you Share your work somehow? I can at least start to work on proper
> inegration of it alongside
> with linux world. As you mentioned earlier, you had modified the
> XDEsktopeEntry and similar.
> Also it wilneed some tuning in maklefiles, as the library you are using is
> not mandatory on linux.
> 
> My experience with cygwin is scare. I got setup environment few years ago 
> and it is the builder for
> ITW since then.  I remember it installed cygwin, and then was clicking
> those checkboxes (in cygwin
> setup) to install some SW. Then added rust and jdk via "normal process"
> (some msi/zips), and placed
> tagsoup and friends on locate-abnle place.... Crap.. This is help I would
> not be happy to hear.
> Added my colleague Michal to CC. He knows this much better then me.
> When in cygwin,
> https://icedtea.classpath.org/wiki/IcedTea-Web#Building_IcedTea-Web should
> be up to
> date.
> 
> Maybe you can for ITW to github for a while? I doubt this will be finished
> in few iterations...
> I'm still on board with this feature, and would liek to see it pushed.
> Unluckily I'm really on wrong
> relationship with windows, so sory for not being able to help you more
> with itw-on -win. I really
> look forward to clean up your code and ensure it works fine in linux.
> 
> Thanx a lot for bravery to step into it.
>   J.
>> 
>> --
>> Sent from:
>> http://openjdk.5641.n7.nabble.com/OpenJDK-Distribution-specific-Packaging-f25548.html
>> 
> 
> 
> -- 
> Jiri Vanek
> Senior QE engineer, OpenJDK QE lead, Mgr.
> Red Hat Czech

> jvanek@

>     M: +420775390109

I would be happy to share code but would like to get it working 100% before
you start working on it for Linux or we will get out synch. I ended up
putting my code in ApplicationInstance.java and CacheUtil.java and left the
XDesktop stuff alone. I would like to send you code snippets and ask you
questions so you can help me work with the LRU and get cache files marked
for deletion correctly. I would like to be able to create a new CacheEntry
so I can call CacheEntry.markfordelete and then call cleanCache, but I
haven't figured it out yet because of the Version parameter. I need help.
Can I email you directly or post questions here which seems a bit
cumbersome?

Ya I have no idea how to proceed to get the jar file built so it works.
Cygwin is a mstery to me and the instructions in the link on the ITW page I
had read and are all about Linux. Hopefully someone can help me get it going
with Eclispse/Windows or maybe you can build me a jar when we get far
enough.



--
Sent from: http://openjdk.5641.n7.nabble.com/OpenJDK-Distribution-specific-Packaging-f25548.html


More information about the distro-pkg-dev mailing list