Writing Java Plugins for Total Commander

Discuss and announce Total Commander plugins, addons and other useful tools here, both their usage and their development.

Moderators: Hacker, petermad, Stefan2, white

User avatar
frenky
Senior Member
Senior Member
Posts: 250
Joined: 2005-07-30, 19:36 UTC

Post by *frenky »

kenchis wrote:It seems no one is interested anymore?
Not true.
This is quite interesting plugin for me.

Keep up the good work.
kenchis
Junior Member
Junior Member
Posts: 53
Joined: 2006-02-04, 11:44 UTC
Location: Berlin
Contact:

Post by *kenchis »

majkinetor ! wrote:
It is about making old family pictures bring back to life as DVD videos.
You need 10 months for that ?
Its about 10.000 Photos (Dias)
1. Scan them
2. Make the qualitiy better
3. Make the show
4. Make intro/outro
5. Fill with nice Animations
6. Make about 12 DVDs

Thats a lot of work.
Hope i will make it good until the 80th birthday of Grandma.
Gruß,
Kenchi
User avatar
majkinetor !
Power Member
Power Member
Posts: 1580
Joined: 2006-01-18, 07:56 UTC
Contact:

Post by *majkinetor ! »

1. Hire someone to scan them all (easy)
2. Organise them in categories by quolity (easy)
3. Make correction script for each category (easy)
4. Make scripts to handle intro/outro/show for all of them (advanced)
5. Fill with nice animations (manually, hard)
6. Make 12 DVDs (easy)

It is lot of work, but still not 10 months...
.... your familly do picture a lot..
Habemus majkam!
kenchis
Junior Member
Junior Member
Posts: 53
Joined: 2006-02-04, 11:44 UTC
Location: Berlin
Contact:

Post by *kenchis »

Hi Frenky,

Could you give me some help for the plugin?

I have got a problem with the fsExtractCustomIcon function.
I want to return a HICON, but i dont know what the best solution is.
1. Should Java create an icon and convert it to hicon (what format is that?) or
2. Should Java return the icon name and native C should load this.

i tried 2nd for simplicity,
but my C-code does not work:

if (strlen(iconName) > 0)
{
HICON myIcon = NULL;
if(ExtractFlags & 1) {
myIcon = (HICON)LoadImage(theDll, MAKEINTRESOURCE(iconName), IMAGE_ICON, 16, 16, 0);
TheIcon = &myIcon;
} else {
myIcon = (HICON)LoadImage(theDll, MAKEINTRESOURCE(iconName), IMAGE_ICON, 32, 32, 0);
TheIcon = &myIcon;
}
}
====================
I found this somewhere in the forum.
Does that mean, that the icon has to be located in my DLL?
I want better a solution, where it can be loaded from my plugin directory.

Thank you for support,

Kenchi
kenchis
Junior Member
Junior Member
Posts: 53
Joined: 2006-02-04, 11:44 UTC
Location: Berlin
Contact:

Post by *kenchis »

Hi everyone,

Last version for now: Version 0.9 is available.
The error messages are now translatable.
This version is error fixed as good as i could.
WFX support is finished. Only Icons are unsupported.

This project is closed for now until December 2006.

Thank you for your help, comments and beta testing.
Special Thanks to Frenky, Coolwater and all the nice people that i forgot to mention. You helped a lot to make installation and usability as good as possible.

Kind Regards,
Kenchi
Gruß,
Kenchi
kenchis
Junior Member
Junior Member
Posts: 53
Joined: 2006-02-04, 11:44 UTC
Location: Berlin
Contact:

Post by *kenchis »

Hi folks,

Against my own thoughts i have
version 1.0 released.

Seems i have too much time to waste ;-)

WLX and WFX is ready now except for icons.
I dont know how to do this. It seems you dont know either.
Did anyone write a Java plugin himself or should i post in a Java forum better? My plugins seem somehow incomplete to fit anyones needs. Perhaps you can do better.

Kind regards,
Ken

Features list:
  • New Email file system plugin added (pop3, IMAP).
    New OLE plugin added (show OLE capable application content, e.g. .doc, .xls, .ppt, etc.).
    Image viewer pplugin added (*.bmp, *.ico, *.gif, *.jpeg, *.png)
    Adapter classes inserted (WLXPluginAdapter, WFXPluginAdapter) with must-have methods, to extend your own plugins.
    New native methods added to call Total Commander functions (fsLog, fsRequest, fsSetProgress). This gives you the possibility to use FTP console window, call custom dialogues or set a progress bar.
    Last few methods added (fsInit, fsStatusInfo, ...). WFX API is complete, except handling of custom icons.
    INI file is cleaned (only values that make sense to the user are left).
    Java messages are shown not in UTF-8 anymore, but in the default codepage (e.g. german umlauts are corrected now).
    Internal: C- source code looks much better now.
User avatar
Lefteous
Power Member
Power Member
Posts: 9537
Joined: 2003-02-09, 01:18 UTC
Location: Germany
Contact:

Post by *Lefteous »

2kenchis
Thanks for the update!
Some questions/remarks:

1) Why is the plug-in packed as tgz? This is quite unusual.
2) How to activate more than one FS plug-in at once?
3) I tried to connect to an IMAP account. TC closed when trying to connect.
4) You could post your plug-in plug-in on totalcmd.net to make it more popular for other developers/users.
kenchis
Junior Member
Junior Member
Posts: 53
Joined: 2006-02-04, 11:44 UTC
Location: Berlin
Contact:

Post by *kenchis »

1) Why is the plug-in packed as tgz? This is quite unusual.
2) How to activate more than one FS plug-in at once?
3) I tried to connect to an IMAP account. TC closed when trying to connect.
4) You could post your plug-in plug-in on totalcmd.net to make it more popular for other developers/users.
1.) I wanted to compress the archive to make the download size smaller.
2.) To activate more than one WFX plugin one must re-install the plugin in a different folder. Then change the INI file (CLASS=...) to change the Java Implementation.
3.) If the URL connection string is somehow invalid, the plugin can crash, perhaps an exception is uncaught (bug). I tested with an IMAP account and it worked well for me...
4.) Yes, i should post there to address more people. I think Java plugins will be popular for developers, since writing them is quite easy for Java developers. The user is not interested in developer techniques, but in the plugins, if they are useful.

Kind regards,
Ken

P.S. thank you for your response. Sometimes it seems, that writing posts here is like a monolog. :-)
kenchis
Junior Member
Junior Member
Posts: 53
Joined: 2006-02-04, 11:44 UTC
Location: Berlin
Contact:

Post by *kenchis »

2Lefteous:
You could post your plug-in plug-in on totalcmd.net to make it more popular for other developers/users.
Now you can view project status here:
www.totalcmd.net
refer to "Java Plugin Interface 1.0"

I got a sub-domain and FTP access to release new versions :-)

It seems many people there are interested or just curiously.

Best Regards,
Ken
User avatar
Lefteous
Power Member
Power Member
Posts: 9537
Joined: 2003-02-09, 01:18 UTC
Location: Germany
Contact:

Post by *Lefteous »

2kenchis
Hi,

thanks for version 1.2 :-)

You should really announce updates also here!

On totalcmd.net you asked:
what do you expect?
- A better system integration. Installing a java plug-in should work just like a normal plug-in installation.
- A basic readme file.
- as always: A smaller package
kenchis
Junior Member
Junior Member
Posts: 53
Joined: 2006-02-04, 11:44 UTC
Location: Berlin
Contact:

Post by *kenchis »

2Lefteous
Yes, I forgot to announce my new version here.
But in the future i will do so.
About the installation you ment,
i am thinking of a better possibility:
  • An open source installer (exe) is double clicked and one can choose the java plugins to install.
    For each selected plugin a seperate plugin folder is created with an INI file and a pre-configured class-name:
    For example: (if two plugins were selected)

    Code: Select all

      C:\Programs\Total Commander\wlx\Disassembler\(DLL,INI,etc...)
      C:\Programs\Total Commander\wfx\EMail\(DLL,INI,etc...)
      ...
      
    Each plugin will then be added to the Total Commander.
If the Online-Installer could download the packages that are only needed,
the download size would depend on the users selection.

About the readme file: i am a little bit lazy ;-)
But i will do it somewhere in the future.
Perhaps someone else has some time left?

Additionally i think about a better solution to start the JVM (this is very time consuming, also it is done only the first time).
I think about a Java Server always running in the background...

There is still a little work to be done and my time is very shorten.

Best wishes (happy easter),

Ken
User avatar
tbeu
Power Member
Power Member
Posts: 1354
Joined: 2003-07-04, 07:52 UTC
Location: Germany
Contact:

How about NSIS?

Post by *tbeu »

An open source installer (exe) is double clicked
NSIS is my first choice installer... Let me know if you need a hand for scripting NSI.

tbeu
TC plugins: Autodesk 3ds Max / Inventor / Revit Preview, FileInDir, ImageMetaData (JPG Comment/EXIF/IPTC/XMP), MATLAB MAT-file Viewer, Mover, SetFolderDate, Solid Edge Preview, Zip2Zero and more
kenchis
Junior Member
Junior Member
Posts: 53
Joined: 2006-02-04, 11:44 UTC
Location: Berlin
Contact:

Post by *kenchis »

2tbeu

Thank you for your hint. It seems this is a very powerful tool.
The main features include online installation possibility and
a very small installer core.
If i get problems with their scripting language, i will ask you then.

Kind regards,
Ken
kenchis
Junior Member
Junior Member
Posts: 53
Joined: 2006-02-04, 11:44 UTC
Location: Berlin
Contact:

Update with online installers

Post by *kenchis »

Hi community,

I updated Java Plugin Interface on www.totalcmd.net .
Now there are a couple of online installers available.
Please can you test it for me?

Kind regards,
Ken

P.S. Features:
- russion error messages (UTF-8)
- exceptions are caught in native code
- bug fixes
- developed with Eclipse/Maven(M2Eclipse) and NSIS

missing feature:
- if one plugin is in use, no other plugin can be used until next start of TC
- CVS Server for source access/developer instructions
kenchis
Junior Member
Junior Member
Posts: 53
Joined: 2006-02-04, 11:44 UTC
Location: Berlin
Contact:

Next Release 1.4

Post by *kenchis »

Hi to everybody,

next version 1.4 is ready on totalcmd.net

Now you can install some java plugins (at the same time) sharing one virtual machine.

This is the last release before my holiday in June.

Next step:
Now i try to get source code access to anybody interested in the project,
i will ask for CVS access on the totalcmd.net server.

Best regards,
Ken
Post Reply