Double-click on .STE file to open (+ command-line arguments)

Status: Implemented

Created by titen96 07 Jun 2010 20:07

rating: +1+x

**STE **

i just wanted to know if this was a bug or not


wdavatar?user=tsangk
tsangk

07 Jun 2010 22:27. Edited 0 times. (Edit, Permalink)
Nope… not a bug.
The .ste extension has not been registered with the registry yet. STE doesn't automatically do that…
Also - the .ste is actually also a CS3 Dreamweaver File - called "site".

Included page "inc:signature" does not exist (create it now)

wdavatar?user=leiger
leiger

07 Jun 2010 23:35. Edited 0 times. (Edit, Permalink)
I don't think manually setting up STE as the app to be associated with .ste files works either. If I accept a filename as a parameter from the command line, that might make that work… will have to look into it.

Included page "inc:signature" does not exist (create it now)

wdavatar?user=
(user deleted)

08 Jun 2010 23:47. Edited 1 times. (Edit, Permalink)

If I accept a filename as a parameter from the command line, that might make that work…

That should work as long as you can pass the filename to the routine that opens a file. The bigger issue (at least in Windows) is that *.jar files are not recognized as valid win32 apps.

You could create a batch file, I suppose, to launch STE something like this:

:: ste.bat
:: STE batch file launcher
@echo off
if %1!==! goto editonly
:: we have a filename - try to open it
call c:\utils\ste.jar %1
goto exit
:editonly
:: no filename passed - just open the editor
call c:\utils\ste.jar
:exit
exit

Then you could call the batch file from the command line like so:
c:\>ste.bat myfile.ste

Note: This assumes you have ste.jar in a folder that is located in your path. I like to put utilities like this in a utils folder and then add that folder to my %path% environment variable.

You should also be able to create a shortcut to the bat file and then use drag and drop to drop any text file on a shortcut to the bat file.

Of course, none of this will work unless/until Shane figures out how to read a command line parameter. ;)

Once this is working, I found a slick open source utility to convert jar files to a Windows executable:
Launch4j Executable Wrapper
It hasn't been updated in a couple of years, but in a very quick test, it worked great. I gave it 3 parameters:

  • input jar file name
  • output exe file name
  • minimum jre version required (BTW, what is the minimum? I used 1.6.0 and that seems to work fine)

It took off and created a working exe of STE in no time. I realize converting a jar to exe kind of defeats the purpose of java and cross-platform compatibility, but if you're only going to use it on a Windows PC, then this is a viable way to create an exe that can be associated with *.ste files, create shortcuts, etc.

Included page "inc:signature" does not exist (create it now)

wdavatar?user=leiger
leiger

09 Jun 2010 00:00. Edited 3 times. (Edit, Permalink)
The command line parameter part is easy (at least, if I can pass the filename to the main editor class, it's easy…), just wasn't sure if it'd end up being a solution for this problem or not.

I haven't used batch files that often, so I'm glad you know what you're talking about :) Will see if I can get it working in a way that doesn't require too much to set up (so that the tutorial in the doc's section isn't too long).

Edit: If I really wanted to make it easy, I could probably write a separate JAR file just for generating the batch file etc!!! ;-)

Included page "inc:signature" does not exist (create it now)

wdavatar?user=leiger
leiger

09 Jun 2010 00:09. Edited 1 times. (Edit, Permalink)

Ed Johnson wrote:

  • minimum jre version required (BTW, what is the minimum? I used 1.6.0 and that seems to work fine)

That's in the documentation ;-)

Note: STE is incompatible with versions of the JRE that were released before version 6.


Can you please test the Help options that launch this website in a browser? That is the only part that requires the latest version of the JRE.

Included page "inc:signature" does not exist (create it now)

wdavatar?user=leiger
leiger

04 Jul 2010 14:00. Edited 0 times. (Edit, Permalink)
Wow, I'm talking to myself in this thread! ;-)

I'm fairly certain now after doing a bit of searching and experimenting that it is impossible to do this with just a JAR file. I can make it so that you can create a shortcut that will launch a certain file using STE by providing the filename as a parameter, but that doesn't seem to be enough to allow it to be defined as the default for a specific file type. Not even "Open with…" will work.

I have applied for a free license of Excelsior JET. As well as some performance improvements, it should hopefully open up a few more possibilities… including this wish finally being able to be implemented! :)

There is a possibility that using Excelsior might prevent me from accessing the Wikidot API as it might be incompatible with the libraries I need to do that. If that is the case then it's a deal-breaker. I'm enquiring about that at the moment.

Cheers,
Shane

Included page "inc:signature" does not exist (create it now)

wdavatar?user=
(user deleted)

05 Jul 2010 01:58. Edited 0 times. (Edit, Permalink)

Wow, I'm talking to myself in this thread! ;-)

I find that sometimes that's the only way to have an intelligent conversation!

It's a bummer that associating *.ste files with STE is such a challenge. One of the best features of most editors I use is the ability to add them to the context menu (edit with STE and open with STE would be very handy).

Included page "inc:signature" does not exist (create it now)

wdavatar?user=leiger
leiger

09 Jul 2010 13:51. Edited 0 times. (Edit, Permalink)
This has been partially implemented in version 2. You are now able to create a shortcut that will launch a given file automatically in STE when you click on it. If you need help with getting this to work, let me know and I'll get a documentation page written up with instructions for you.

There seems to be no way at the current point in time to allow dynamic launching (launching of files without knowing the name of the file beforehand) as JAR files are not considered to be proper applications on most operating systems. As I mentioned above this is partially implemented though… so if you are launching STE using the console you can provide a filename as a parameter and it should launch that file when STE starts.

Not being able to show the STE logo in the taskbar when the app is running is a part of the same problem… I'm restricted to using the JDK/JRE icon only.

So, I'm going to mark this as IMPLEMENTED because I've done as much as I can here for now.

Included page "inc:signature" does not exist (create it now)

Post Reply

Add reply on "Double-click on .STE file to open (+ command-line arguments)"

CSS Theme, Images and Code on this website are © Shane Smith 2010-2012. All forum posts by users and documentation licensed under Creative Commons BY-NC-SA 3.0 License.