Page 1 of 3 123 LastLast
Results 1 to 10 of 26

Thread: Question(s) about the bundler

  1. #1

    Question(s) about the bundler

    Firstly, let me apologise if this stuff is a repeat of something which has gone before, I tried searching but to no avail!

    I want the bundled exe to extract to the system temp location.
    (I've tried using %temp% but unfortunately it fails.)

    Another option for now is this:
    • Is it possible for me to replicate the current bundler in another exe?

    Could I un-upx the bundle and extract it, getting each of the individual bundles components and then re-bundle them with another SFX utility.
    This would give me the option of not only choosing the extraction location but would afford me the opportunity to possibly change the icon and alter the description, file version etc. too!

    My main reason for asking is that I'd like to ensure that my bundle has the possibility of running on an unknown sytem from read-only media. The icon and stuff are just after-thoughts due to reading previous requests hare along those lines.

  2. #2
    thinBasic MVPs
    Join Date
    May 2007
    Location
    UK
    Posts
    1,427
    Rep Power
    159

    Re: Question(s) about the bundler

    I've done that before.

    I made a bundle that extracted to the current location and then used winrar to make an SFX with icon and told that to extract to the %TEMP%.

    it works.

    Home Desktop : Windows 7 - Intel Pentium (D) - 3.0 Ghz - 2GB - Geforce 6800GS
    Home Laptop : WinXP Pro SP3 - Intel Centrino Duo - 1.73 Ghz - 2 GB - Intel GMA 950
    Home Laptop : Windows 10 - Intel(R) Core(TM) i5-4210U CPU @ 1.70GHz, 2401 Mhz, 2 Core(s), 4 Logical Processor(s) - 4 GB - Intel HD 4400
    Work Desktop : Windows 10 - Intel I7 - 4 Ghz - 8GB - Quadro Fx 370

  3. #3
    thinBasic author ErosOlmi's Avatar
    Join Date
    Sep 2004
    Location
    Milan - Italy
    Age
    57
    Posts
    8,777
    Rep Power
    10

    Re: Question(s) about the bundler

    Quote Originally Posted by Big Jon
    Firstly, let me apologise if this stuff is a repeat of something which has gone before, I tried searching but to no avail!
    No apologize please. If you need something, it is right to ask.

    Quote Originally Posted by Big Jon
    I want the bundled exe to extract to the system temp location.
    (I've tried using %temp% but unfortunately it fails.)
    I'm sorry, using system variables is not supported but it could be a very nice addition.

    Quote Originally Posted by Big Jon
    Another option for now is this:
    • Is it possible for me to replicate the current bundler in another exe?

    Could I un-upx the bundle and extract it, getting each of the individual bundles components and then re-bundle them with another SFX utility.
    This would give me the option of not only choosing the extraction location but would afford me the opportunity to possibly change the icon and alter the description, file version etc. too!

    My main reason for asking is that I'd like to ensure that my bundle has the possibility of running on an unknown sytem from read-only media. The icon and stuff are just after-thoughts due to reading previous requests hare along those lines.
    If you bundle the exe with the option to not delete file after execution, you can get all the files needed and than bundle into a different way.
    I've not tested but try the following sequence:
    • bundle the exe with not flag in delete after execution. Leave the flag to obfuscate otherwise you will distribute source code
    • copy executable into an empty directory
    • execute it and exit
    • you should now be able to see all needed files in the new directory.
      If not able to see all files, either you didn't uncheck "delete after run" flag during bundling or you have to activate in your Explorer the options to show system and hidden files
    • bundle the files using a different way able to execute thinBasic.exe (or thinbasicc.exe) followed by the script name.
      Attention, script name will have a different name, usually randomly generated but with extension .tbasicx (for GUI version) or .tbasiccx(for console version) . You can change the name


    Let me know if you succeed or not.

    Ciao
    Eros

    PS: just to let you know, adding a new icon to the bundled exe and version informations is something we have into the todo list but so far we where not able to add due to UPX compression. Hope to be able to do it in future release.
    www.thinbasic.com | www.thinbasic.com/community/ | help.thinbasic.com
    Windows 10 Pro for Workstations 64bit - 32 GB - Intel(R) Xeon(R) W-10855M CPU @ 2.80GHz - NVIDIA Quadro RTX 3000

  4. #4

    Re: Question(s) about the bundler

    Thanks for the ideas!

    Michael, I'd already contemplated the option of repackaging the package, I'd sooner that was my last option however.

    As for Eros's idea, that really sounded like the way to go. I have however fallen at the first hurdle!

    For some reason, whatever box I uncheck from the defaults, be it deletion after run, files compression, or obfuscate in any combination, my executable is built but upon running it does not complete. (the console output is correct but it seems to hang right at the end only completing if I press the enter key or type exit at the flashing cursor. In any case no files appear at any time in the extraction directory.

    As soon as the bundle is made with those three default options it works flawlessly. Is this a bug in the software?

  5. #5
    thinBasic author ErosOlmi's Avatar
    Join Date
    Sep 2004
    Location
    Milan - Italy
    Age
    57
    Posts
    8,777
    Rep Power
    10

    Re: Question(s) about the bundler

    Big Jon,

    I just installed a new fresh thinBasic 1.6.0.0 in a computer (XP Sp2) and the steps I suggested seems working fine.

    Let see if all is ok.
    What OS do you use?
    If Win2K or above than all is ok. If win9x than we need further considerations.

    Did you checked to show system files in Explorer? How to do:
    Open Explorer
    1. On the Tools menu in Windows Explorer, click Folder Options.
    2. Click the View tab.
    3. Under Hidden files and folders, click Show hidden files and folders.
    If all ok, you will now be able to see system files in folders.

    Now follow my previous steps with the following flags when bundling:
    Obfuscate main scrip: YES
    Compress all files: YES
    Ask before extract: NO
    Delete after run: NO

    Move the bundled exe into an empty folder.
    Execute your bundle exe and close it.
    You should be able to see a set of files. Those files are the one needed to be bundled.

    Because you mentioned you are bundling a console application, please do not use .tbasicc extension unless your application needs to work with standard input or standard output. .tbasicc extension is used in order to be executed by thinBasicC.exe that will connect input/output channels. This is mainly used for CGI applications or scripts that need to be piped at the command prompt with other applications.

    Use instead .tbasic extension. Console window will work just fine.

    Let me know if those indications are of any help.
    Eros
    www.thinbasic.com | www.thinbasic.com/community/ | help.thinbasic.com
    Windows 10 Pro for Workstations 64bit - 32 GB - Intel(R) Xeon(R) W-10855M CPU @ 2.80GHz - NVIDIA Quadro RTX 3000

  6. #6

    Re: Question(s) about the bundler

    Okay thanks for sticking with me, I've now managed to capture the bundled files. The problem was that I needed to uncheck Hide protected operating system files, since the files were atttributed with Archive, System and Hidden in my Vista OS.

    The executable I was making needed to output to an NT Command Script and thus needed the tbasicc extension.

    The odd problem is that executing the version using default settings in a cmd window outputs to console and exits to the prompt again, the other versions do not get back to a prompt they output and just sit there. However if I run the executable as a command in for instance a for loop, my output is as expected and the prompt is returned to. Is there a reason for this behaviour?

    Examples:-
    ------------------------------
    Using Defaults:
    ------------------------------
    C:\Users\BigJon>MyConApp.exe
    Value1a Value1b
    Value2a Value2b
    Value3a Value3b
    Value4a Value4b
    Value5a Value5b

    C:\Users\BigJon>_
    ------------------------------
    Any change from Defaults:
    ------------------------------
    C:\Users\BigJon>MyConApp.exe
    Value1a Value1b
    Value2a Value2b
    Value3a Value3b
    Value4a Value4b
    Value5a Value5b
    _
    ------------------------------
    Either Method:
    ------------------------------
    C:\Users\BigJon>@FOR /F "TOKENS=1*" %A IN ('MyConApp.exe') DO @ECHO."%A" "%B"
    "Value1a" "Value1b"
    "Value2a" "Value2b"
    "Value3a" "Value3b"
    "Value4a" "Value4b"
    "Value5a" "Value5b"

    C:\Users\BigJon>_
    ------------------------------
    I hope that helps to better explain my small problem.

    PS. I'll let you know how I got on with my home-made SFX.

  7. #7
    thinBasic author ErosOlmi's Avatar
    Join Date
    Sep 2004
    Location
    Milan - Italy
    Age
    57
    Posts
    8,777
    Rep Power
    10

    Re: Question(s) about the bundler

    So the bundling file detection is ok now. One problem solved.

    I'm trying to understand the strange behave. What do you mean by "using default settings"?

    Thanks
    Eros
    www.thinbasic.com | www.thinbasic.com/community/ | help.thinbasic.com
    Windows 10 Pro for Workstations 64bit - 32 GB - Intel(R) Xeon(R) W-10855M CPU @ 2.80GHz - NVIDIA Quadro RTX 3000

  8. #8

    Re: Question(s) about the bundler

    Invoke the Bundle Builder and leave the check marks in Obfuscate main script, Compress all files and Delete after run as they are shown by default.

  9. #9
    thinBasic author ErosOlmi's Avatar
    Join Date
    Sep 2004
    Location
    Milan - Italy
    Age
    57
    Posts
    8,777
    Rep Power
    10

    Re: Question(s) about the bundler

    Jon,

    can you please use .tBasic extension instead of .tBasicc and test.
    I've the impression the strange behave is due to some standard output setup handled by thinBasicc.exe

    Sorry for those so many tests but not easy to understand without the code.

    Ciao
    Eros
    www.thinbasic.com | www.thinbasic.com/community/ | help.thinbasic.com
    Windows 10 Pro for Workstations 64bit - 32 GB - Intel(R) Xeon(R) W-10855M CPU @ 2.80GHz - NVIDIA Quadro RTX 3000

  10. #10

    Re: Question(s) about the bundler

    When I use .tbasic I'm not really sure what happens, I get a new console flash open and close. The console window from which I performed the command does however return to a prompt. If I use the .tbasic extension and use a For loop as in the example above, nothing is returned as a result.

    I'm not sure if changing my code may fix this, is there for instance an alternative way of outputting my data. Currently I'm using PRINTL!

Page 1 of 3 123 LastLast

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
  •