Author Topic: arguments to co2.exe  (Read 798 times)

0 Members and 1 Guest are viewing this topic.

Offline Pierre Bellisle

  • JK-Mitglieder
  • Full Member
  • *
  • Posts: 157
  • User-Rate: +12/-7
arguments to co2.exe
« on: October 28, 2022, 07:37:44 AM »
Hey Charles!

A question for you if you have a minute or two to spare...

My Precompiler send the following:
D:\Dev\Oxygen\o2\co2.exe -32-m "D:\Dev\Oxygen\o2\demos\WinDynDialogs\TabControl.o2bas" "D:\Dev\Oxygen\o2\demos\WinDynDialogs\TabControl.exe" "D:\Dev\Oxygen\o2\~code\Default.res"

I got a O2H messahebox saying [File not found: default.res] but co2.txt say [Okay].

If I copy [default.res] in [D:\Dev\Oxygen\o2\demos\WinDynDialogs\] then all goes well.

Q1) Is it normal to have a messagebox with the [-m] switch ?
Q2) For a .res resource file, is it mandatory to have it in the .02bas folder ? 

Thank you,
Pierre



Offline Roland Stowasser

  • Newbie
  • *
  • Posts: 28
  • User-Rate: +1/-0
Re: arguments to co2.exe
« Reply #1 on: October 28, 2022, 11:01:55 AM »
Hi Pierre,

in WinDynDialog's input box, I started a command window:
cmd

In the cmd window I entered (for my system) this command:
d:\OxygenBasic\co2.exe TabControl.o2bas
This opens the app in jit mode.

these commands at the prompt:

D:\OxygenBasic\demos\WinDynDialogs>d:\OxygenBasic\co2.exe -32 -m TabControl.o2bas TabControl.exe

D:\OxygenBasic\demos\WinDynDialogs>
Okay
D:\OxygenBasic\demos\WinDynDialogs>tabcontrol.exe

will create the exe file and it then can be started.

There is no .res file in this folder directly. It must first be created from a rc file.

Roland

Offline Pierre Bellisle

  • JK-Mitglieder
  • Full Member
  • *
  • Posts: 157
  • User-Rate: +12/-7
Re: arguments to co2.exe
« Reply #2 on: October 29, 2022, 02:21:09 AM »
Hi Roland.

In fact, I have no problem compiling with or without a resource file.
My problem is more when a resource is not in the .o2bas folder.
You can see my command line above...
I'm not sure about Charles intention on Q1 and Q2...

Thank you for your interest.

Online Charles Pegge

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 895
  • User-Rate: +33/-1
    • Charles Pegge
Re: arguments to co2.exe
« Reply #3 on: October 31, 2022, 07:28:01 AM »
Hi Pierre,

The -m switch should switch off the message box

The directory-path for res files currently gets stripped off the file-name. I will fix that on the next release.

Offline Pierre Bellisle

  • JK-Mitglieder
  • Full Member
  • *
  • Posts: 157
  • User-Rate: +12/-7
Re: arguments to co2.exe
« Reply #4 on: November 02, 2022, 07:23:36 AM »
Hi Charles,

Many thanks for the future stripped path adjustement.

For the -m switch, I did put the exact same text from my precompiler as seen above to a .bat file and I still have an o2 message box.
Try this...

Test.bat
Code: [Select]
D:\Dev\Oxygen\o2\co2.exe -32-m "D:\Dev\Oxygen\o2\demos\WinDynDialogs\TabControl.o2bas" "D:\Dev\Oxygen\o2\demos\WinDynDialogs\TabControl.exe" "D:\Dev\Oxygen\o2\~code\~~~Resource.res"

pause


Online Charles Pegge

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 895
  • User-Rate: +33/-1
    • Charles Pegge
Re: arguments to co2.exe
« Reply #5 on: November 02, 2022, 12:59:52 PM »
Yes, I see that this error message is emitted directly from reso.inc, instead of being added to the error buffer.

It will be fixed on the next update.

Offline Pierre Bellisle

  • JK-Mitglieder
  • Full Member
  • *
  • Posts: 157
  • User-Rate: +12/-7
Re: arguments to co2.exe
« Reply #6 on: November 02, 2022, 08:54:41 PM »
Great !
Many thanks Charles...   ~:-]

Offline Pierre Bellisle

  • JK-Mitglieder
  • Full Member
  • *
  • Posts: 157
  • User-Rate: +12/-7
Re: arguments to co2.exe
« Reply #7 on: November 05, 2022, 02:21:00 AM »
Just tested 50P13,
FullFileName works fine, MessageBox no more.

Thanks...

Offline Pierre Bellisle

  • JK-Mitglieder
  • Full Member
  • *
  • Posts: 157
  • User-Rate: +12/-7
Re: arguments to co2.exe
« Reply #8 on: December 30, 2022, 07:11:18 AM »
Hi Charles,
I found another error o2 message box while using the -m silent switch.

It came when I did a typo, see next line... 
function DlgProc( sys hDlg, uint uMsg, sys wParam, lParam ) as Typo CALLBACK

Note also the negative column number.

Regard,
Pierre


Online Charles Pegge

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 895
  • User-Rate: +33/-1
    • Charles Pegge
Re: arguments to co2.exe
« Reply #9 on: December 30, 2022, 10:11:23 AM »
Hi Pierre,

I found the -m switch worked okay with this error: the message was routed to the console. Perhaps something wrong in the command line?

Offline Pierre Bellisle

  • JK-Mitglieder
  • Full Member
  • *
  • Posts: 157
  • User-Rate: +12/-7
Re: arguments to co2.exe
« Reply #10 on: December 31, 2022, 03:52:22 AM »
Charles,

Very sorry about this, you are right!
I had a bug in my precompiler and did not test enough.

Regard, Pierre