Execute process/script

MarcusF · 2367

MarcusF

  • Junior Member
  • **
    • Posts: 54
    • Karma: +11/-0
Reply #15 on: July 18, 2022, 08:17:09 PM
It works, I'm just an idiot.

I ran your example and it works fine. Comparing to my own code it looks about the same, should work...

Didn't get any error message when I ran my code, just an empty result.

I had a typo in the path to the installer script, and I had to switch to SYS:. I fixed it and now it runs just fine  :(



magorium

  • Moderator
  • Legendary Member
  • *****
    • Posts: 632
    • Karma: +62/-0
  • Convicted non contributor
Reply #16 on: July 18, 2022, 08:35:01 PM
It works, I'm just an idiot.
Your words.... not  mine   :P

Quote
I ran your example and it works fine. Comparing to my own code it looks about the same, should work...
Thank you for reporting back and glad to hear you got that working.

Quote
I had a typo in the path to the installer script, and I had to switch to SYS:. I fixed it and now it runs just fine  :(
The typo to the script path would probably let installer silently fail at doing its job. Runcommand returning the wrong boolean result value isn't very helpful in that regards.

The use of SYS: instead of the volume name of your boot-device AROS: shouldn't really matter but, could perhaps fail (if it is then it is probably something technical that has to do with file locking as I have seen that fail before).

I apologise for not having shown a defensive programmed example in the first place. This problem could have been solved a lot sooner or perhaps even non-existent if I would have. Perhaps something to keep in mind for yourself as well when you continue your endeavours.


magorium

  • Moderator
  • Legendary Member
  • *****
    • Posts: 632
    • Karma: +62/-0
  • Convicted non contributor
Reply #17 on: July 18, 2022, 08:37:38 PM
Are there any problems with Tinyaros? I create the system of system on Windows with Ultraiso I don't touch any configuration file :-\
Nope, there are no problems with Tiny Aros.


Sorry salvo, it was just a false alarm but for completeness something I had to mention. When you program software there are many things one has to consider, this was just one of those things.


Amiwell

  • Legendary Member
  • *****
    • Posts: 2616
    • Karma: +35/-4
  • Peace
Reply #18 on: July 19, 2022, 04:43:00 AM
ok i understand Magorium :)



AMIGASYSTEM

  • Global Moderator
  • Legendary Member
  • *****
    • Posts: 3740
    • Karma: +69/-2
  • AROS One
    • AROS One
Reply #19 on: July 19, 2022, 11:21:06 AM

PS: i think you already noted it but there is a difference between starting your compiled executable from the shell or when double clicked using the workbench icon. However for both situations i get the installer to run correctly.

magorium, regarding this topic did you read my post QUI (Last post), if it is not understandablewhat I have written see "the whole" the attached video.

https://drive.google.com/file/d/1adeeaqvFnp1Qi8e5SgrurrivqBt1bl_s/view?usp=sharing


magorium

  • Moderator
  • Legendary Member
  • *****
    • Posts: 632
    • Karma: +62/-0
  • Convicted non contributor
Reply #20 on: July 19, 2022, 01:02:09 PM
magorium, regarding this topic did you read my post QUI (Last post), if it is not understandablewhat I have written see "the whole" the attached video.

I understood the issue that you mentioned but that is not a problem when it comes to Free Pascal and this particular matter as mentioned by MarcusF.

Free Pascal knows when it is started from workbench or shell and take the necessary precautions in order to accommodate this situation. However, and that is also true for Free Pascal, if you need a shell environment to pop up in order to invoke a command then you are required to add the tooltype CLI as mentioned in your post.

Not to mention that gcc is a special command in the way that it is actually meant to be run with sh and not a normal Amiga shell/CLI. You can of course but, i would not recommend it. It is ok if the only this you do is show gcc's version number.


AMIGASYSTEM

  • Global Moderator
  • Legendary Member
  • *****
    • Posts: 3740
    • Karma: +69/-2
  • AROS One
    • AROS One
Reply #21 on: July 19, 2022, 02:15:33 PM

Not to mention that gcc is a special command in the way that it is actually meant to be run with sh and not a normal Amiga shell/CLI.
Ok thanks, I wasn't referring to Pascal anyway, I was talking in general, the problem I mentioned happens also with other applications running via Icons on Wanderer, where to work properly you have to add the "CLI" parameter in the Icon Tooltype.

All this must also be done on Amiga OS 3.x, only OS 3.5/3.9 does not need because it has a special Tab that automatically adds the CLI parameter to the icon, see screenshot

Quote
You can of course but, i would not recommend it. It is ok if the only this you do is show gcc's version number.

No GCC but also g ++ work perfectly from Shell in AROS x86, although I am not expert I have compiled some C sources without problems