ATTENTION: You are viewing a page formatted for mobile devices; to view the full web page, click HERE.

DonationCoder.com Software > DC Member Programs and Projects

Backend : portable auto-handling by file extension

(1/1)

slowmaker:
I just finished a little helper app called Backend, which allows me to try different text editors while keeping my beloved auto-handling (i.e. runs the appropriate compiler or interpreter depending on the file extension of the currently edited doc). Some editors have this, some don't, some have it but make it really, really painful to use; Backend pretty much fixes that.

If you are a fickle text editor user like I (periodically) am, you might save yourself a bit of aggravation with this.

ewemoa:
Interesting idea.

I was looking through the documentation and backend.ini and the following thoughts occurred:

I use a set up that aspires to be portable and one of the things I do is to launch PStart from a batch file after booting.  The batch file sets some environment variables which then become available to programs I launch via PStart (and I launch FARR from PStart, so FARR gets them too as well as programs launched from FARR).

One of the environment variables I set is called DRIVE and it's set up in the batch file as:


--- ---set DRIVE=%~d0%

and subsequent environment variables refer to DRIVE.  I also have an environment variable named PAR (for portable applications root), which is set as:


--- ---set PAR=%DRIVE%\apps

In backend.ini I notice you have:


--- ---#app_drive_letter#:

as well as:


--- ---_apps

I didn't read backend's source, but if it doesn't already, do you think it might be useful for it to handle environment variables?  My recent thinking is that file and folder path information stored by programs being wired to absolute (or even relative, though that seems a bit nicer) paths is an unhappy situation waiting to happen -- and I've been thinking that environment variable support for such things might lead to happier results.

What do you think?

slowmaker:
My apologies for the slow reply; I've been caught up in not-so-fun stuff for a while, but I'm beginning to regain some spare time now.

And, yes, I've thought about the environment variables angle; I've  considered adding that to Backend eventually, but I'm not sure yet whether it is actually necessary.

For instance, that capability is technically available in the sense that the command  line passed to the system via Backend can call batch files (which is how I typically use it), and of course those batch files can use environment variables as much as they like.

On the other hand, I've got to dive back into the source for Backend anyway to fix a glitch I noticed in how it handles undefined extensions, so I may play with adding the environment vars at that time.

So, the summary answer is that you can sort-of do it already, and I may add a more direct handling of that sort of thing in future.

Navigation

[0] Message Index

Go to full version