Page 1 of 2 12 LastLast
Results 1 to 10 of 14

Thread: DIR_GetCurrent behaves different with a bundled EXE

  1. #1

    DIR_GetCurrent behaves different with a bundled EXE

    Hi folks,

    I noticed that DIR_GetCurrent will return the main folder of the bundled EXE's drive instead of the folder of the EXE thta it return when you start a script from within thinAIR or by double clicking on it in the explorer.

    Is this a behaviour by design?

    Cheers
    Michael
    Attached Files Attached Files

  2. #2

    Re: DIR_GetCurrent behaves different with a bundled EXE

    Hi Michael,

    sorry but I can't uderstand the issue.
    I downloaded your test example but while running it all seem fine (please se the attached image picture).

    The Bundle changes the working directory (aka the current directory for the bundle process) to the one that holds the executable.
    May be that this is reflected in the next script execution.

    I'm not sure, please let me to verify this assertion.

    Bye,
    Roberto
    Attached Images Attached Images
    http://www.thinbasic.com

  3. #3
    Super Moderator Petr Schreiber's Avatar
    Join Date
    Aug 2005
    Location
    Brno - Czech Republic
    Posts
    7,128
    Rep Power
    732

    Re: DIR_GetCurrent behaves different with a bundled EXE

    Hi Mike,

    do not use DIR_GetCurrent, go for APP_SOURCEPATH, it worked well for me in all possible and even impossible cases.


    Petr

    P.S. I think I just realised on what you work now. Wow.
    Learn 3D graphics with ThinBASIC, learn TBGL!
    Windows 10 64bit - Intel Core i5-3350P @ 3.1GHz - 16 GB RAM - NVIDIA GeForce GTX 1050 Ti 4GB

  4. #4

    Re: DIR_GetCurrent behaves different with a bundled EXE

    Damn, I swear to god, that it didn't work before. Now is does like I expect it to do. Sorry guys for the false alarm.

  5. #5

    Re: DIR_GetCurrent behaves different with a bundled EXE

    Petr,

    if also you discovered (in the past) that the DIR_GetCurrent() function had a wrong behaviour please let us know.

    Thanks,
    Roberto
    http://www.thinbasic.com

  6. #6
    Super Moderator Petr Schreiber's Avatar
    Join Date
    Aug 2005
    Location
    Brno - Czech Republic
    Posts
    7,128
    Rep Power
    732

    Re: DIR_GetCurrent behaves different with a bundled EXE

    Hi Roberto,

    I do not think DIR_GetCurrent works wrong, I just have no use for it ( similar to CURDIR$ in PB, am I right ?).
    I thought what Mikes need might be provided by APP_SOURCEPATH.


    Thanks,
    Petr
    Learn 3D graphics with ThinBASIC, learn TBGL!
    Windows 10 64bit - Intel Core i5-3350P @ 3.1GHz - 16 GB RAM - NVIDIA GeForce GTX 1050 Ti 4GB

  7. #7

    Re: DIR_GetCurrent behaves different with a bundled EXE

    Yes similar, you are right.

    Ciao,
    Roberto
    http://www.thinbasic.com

  8. #8
    thinBasic MVPs kryton9's Avatar
    Join Date
    Nov 2006
    Location
    Naples, Florida & Duluth, Georgia
    Age
    67
    Posts
    3,869
    Rep Power
    404

    Re: DIR_GetCurrent behaves different with a bundled EXE

    P.S. I think I just realised on what you work now. Wow.
    Ok, got me curious and I ran the test program and if I think what it is also DOUBLE WOW!
    Acer Notebook: Win 10 Home 64 Bit, Core i7-4702MQ @ 2.2Ghz, 12 GB RAM, nVidia GTX 760M and Intel HD 4600
    Raspberry Pi 3: Raspbian OS use for Home Samba Server and Test HTTP Server

  9. #9

    Re: DIR_GetCurrent behaves different with a bundled EXE

    Yes, it is a little test for converting thinBasic scripts into PASCAL code. I will see how far I get. thinBasic is so powerful syntax and fucntion wise that it will be hard to cover all the nice tweaks that Eros has put into thinBasic.

  10. #10

    Re: DIR_GetCurrent behaves different with a bundled EXE

    Hey Michael,

    Rome was not built in a day isn't it? So please take your time.

    Ciao,
    Roberto
    http://www.thinbasic.com

Page 1 of 2 12 LastLast

Similar Threads

  1. Bundled exe and command line
    By ErosOlmi in forum thinBundle suggest new features
    Replies: 5
    Last Post: 21-02-2007, 14:04

Members who have read this thread: 0

There are no members to list at the moment.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •