Menu

#747 Substitution - Path to Geany.exe (Portable Mojo)

v1.25
open
nobody
None
5
2015-04-05
2015-04-01
Mike
No

It would be incredibly useful if in the "Substitutions in commands and working directories", we had an extra character sequence that would fill in the current full path to Geany.exe.

This would save me a ton of work when working on different machines off of my portable use flash drive, as I could then use this to construct a relative path to my JDK install on the same thumb drive.

This would be in addition to the same %, %e, %f, %p stuff.

Related

Feature Requests: #747

Discussion

  • Lex Trotman

    Lex Trotman - 2015-04-02

    On 2 April 2015 at 10:22, Mike mikey021947@users.sf.net wrote:


    [feature-requests:#747] Substitution - Path to Geany.exe (Portable Mojo)

    Status: open
    Group: v1.25
    Created: Wed Apr 01, 2015 11:22 PM UTC by Mike
    Last Updated: Wed Apr 01, 2015 11:22 PM UTC
    Owner: nobody

    It would be incredibly useful if in the "Substitutions in commands and
    working directories", we had an extra character sequence that would fill in
    the current full path to Geany.exe.

    This would save me a ton of work when working on different machines off of
    my portable use flash drive, as I could then use this to construct a
    relative path to my JDK install on the same thumb drive.

    This would be in addition to the same %, %e, %f, %p stuff.

    Unfortunately I'm not sure we have a way of finding the path to our
    executable easily?


    Sent from sourceforge.net because you indicated interest in
    https://sourceforge.net/p/geany/feature-requests/747/

    To unsubscribe from further messages, please visit
    https://sourceforge.net/auth/subscriptions/

     

    Related

    Feature Requests: #747

  • Mike

    Mike - 2015-04-05

    Hey guys,

    I'm not 100% sure if this will be helpful, but I did a search. I'm assuming you guys are running C++, and the target install is always Windows?

    The following stack overflow thread references getting the path to an EXE: http://stackoverflow.com/questions/1528298/get-path-of-executable

    In it they mention a function for windows: GetModuleFileName(), which I believe I may have used back in my C++ days: https://msdn.microsoft.com/en-us/library/windows/desktop/ms683197(v=vs.85).aspx

    You'd pass NULL for the handle, which would give you the exe path to the current running process. Linux solution is mentioned in the stack overflow link, too.

    Does this help?

     

    Last edit: Mike 2015-04-05
    • Lex Trotman

      Lex Trotman - 2015-04-05

      On 5 April 2015 at 22:23, Mike mikey021947@users.sf.net wrote:

      Hey guys,

      I'm not 100% sure if this will be helpful, but I did a search. I'm assuming
      you guys are running C++ and Windows?

      Geany is C and has to support Windows and Linux and experimentally OSX
      if its different to Linux.

      The following stack overflow thread references getting the path to an EXE:
      http://stackoverflow.com/questions/1528298/get-path-of-executable

      In it they mention a function for windows: GetModuleFileName(), which I
      believe I may have used back in my C++ days:
      https://msdn.microsoft.com/en-us/library/windows/desktop/ms683197(v=vs.85).aspx

      You'd pass NULL for the handle, which would give you the exe path to the
      current running process. Linux solution is mentioned in the stack overflow
      link, too.

      Does this help?


      [feature-requests:#747] Substitution - Path to Geany.exe (Portable Mojo)

      Status: open
      Group: v1.25
      Created: Wed Apr 01, 2015 11:22 PM UTC by Mike
      Last Updated: Wed Apr 01, 2015 11:22 PM UTC
      Owner: nobody

      It would be incredibly useful if in the "Substitutions in commands and
      working directories", we had an extra character sequence that would fill in
      the current full path to Geany.exe.

      This would save me a ton of work when working on different machines off of
      my portable use flash drive, as I could then use this to construct a
      relative path to my JDK install on the same thumb drive.

      This would be in addition to the same %, %e, %f, %p stuff.


      Sent from sourceforge.net because you indicated interest in
      https://sourceforge.net/p/geany/feature-requests/747/

      To unsubscribe from further messages, please visit
      https://sourceforge.net/auth/subscriptions/

       

      Related

      Feature Requests: #747


Log in to post a comment.