topbanner_forum
  *

avatar image

Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
  • Friday December 13, 2024, 5:47 pm
  • Proudly celebrating 15+ years online.
  • Donate now to become a lifetime supporting member of the site and get a non-expiring license key for all of our programs.
  • donate

Author Topic: Backend : portable auto-handling by file extension  (Read 6595 times)

slowmaker

  • Supporting Member
  • Joined in 2009
  • **
  • Posts: 51
  • Reinventing the wheel can be fun!
    • View Profile
    • rambling-nerd
    • Read more about this member.
    • Donate to Member
Backend : portable auto-handling by file extension
« on: February 19, 2010, 01:09 PM »
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.
WinXP Home SP3 - PSPad 4.5.4

ewemoa

  • Honorary Member
  • Joined in 2008
  • **
  • Posts: 2,922
    • View Profile
    • Donate to Member
Re: Backend : portable auto-handling by file extension
« Reply #1 on: March 16, 2010, 07:21 AM »
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

  • Supporting Member
  • Joined in 2009
  • **
  • Posts: 51
  • Reinventing the wheel can be fun!
    • View Profile
    • rambling-nerd
    • Read more about this member.
    • Donate to Member
Re: Backend : portable auto-handling by file extension
« Reply #2 on: March 21, 2010, 04:46 PM »
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.
WinXP Home SP3 - PSPad 4.5.4