Author Topic: Learning to program with Oxygen Basic  (Read 6519 times)

0 Members and 2 Guests are viewing this topic.

Arnold

  • Guest
Re: Learning to program with Oxygen Basic
« Reply #15 on: May 02, 2016, 03:42:44 PM »
Hi kwibus,

I assume SciTe.exe is located in c:\OxygenBasic and there is a file Oxygen.properties in c:\OxygenBasic\ide. Then these modifications should be done in Oxygen.properties:

##
# OXYGEN TOOLS
#
# COMPILE
basco=$(SciteDefaultHome)\gxo2  -c "$(FileNameExt)"
#
# BUILD
basbo=$(SciteDefaultHome)\co2  -a -c -m "$(FileNameExt)"

# RUN FROM SOURCE
basgo=$(SciteDefaultHome)\gxo2 "$(FilePath)"
#
# CONTEXT HELP
basho=hh.exe "$(SciteDefaultHome)\inf\oxygen_help.chm::/wordlink.htm#$(CurrentWord)"
#

For build I use co2 because -a and -i are disabled with gxo2.exe
The difference is removing the quotes from the first argument of COMPILE, BUILD, RUN.


Roland


.

kwibus

  • Guest
Re: Learning to program with Oxygen Basic
« Reply #16 on: May 03, 2016, 08:37:09 AM »
Hi Roland,

Thank you; this answer is exactly what I needed!  :)

I did not have any idea that SciTe.exe has to be placed in the c:\OxygenBasic directory.

And the tip about removing the quotes in the Oxygen.properties file, that is most usefull. This gets the "Tools" working!  ::)

One question though: An .exe, compiled with F7, still needs the oxygen.dll in the same folder. There are also options to compile exe files that do not need the dll, is'nt it? But not in the current SciTe IDE?

Ad

Arnold

  • Guest
Re: Learning to program with Oxygen Basic
« Reply #17 on: May 03, 2016, 10:06:26 AM »
Hi Ad,

I think it does not matter which path is used for OxygenBasic. Important is to respect the structure:
\OxygenBasic
   SciTe.exe
   SciTEGlobal.properties
   ...
   \ide
     Oxygen.properties
    ...

The options in SciTE / Tools are:

F5 Go - This compiles a program.o2bas in memory and starts it by using Oxygen.dll. It is just like using an interpreter.

Ctrl+F7 Compile - This compiles a program.o2bas to an exe file which is dependant of Oxygen.dll. The path is indicated in an oxygen.cfg file. For example in folder examples\DynamicCompile there should be an oxygen.cfg. The path of Oxygen.dll can be specified relative or absolute. If oxygen.cfg is missing or it indicates the wrong path there will be an error message. Thus oxygen.cfg must be created manually in the corresponding folder.

Charles has also provided the possibility to create independant executables. To achieve this the include statement must be used in the .o2bas file:

$ filename "Progname.exe"

#include "$/inc/RTL32.inc"
'#include "$/inc/RTL64.inc" 'for 64 bit exe

Creating 32 bit executables works very fine with me. And creating 64 bit exe seem to work often also. (not always)

To create independant executables I also use F5 - Go in ScTE.

SciTE does not start an exe file automatically. (or I have missed this option). So I change to the folder and start it.

F7 Build - Creates an assembly listing in a separate window. This is interesting for experts. Unfortunately I have not yet reached this stage.

Roland

Arnold

  • Guest
Re: Learning to program with Oxygen Basic
« Reply #18 on: May 03, 2016, 11:39:03 AM »
I forgot to mention that it should also be sufficient to add the path of OxygenBasic to the path environment. Then an extra oxygen.cfg in a folder should not be necessary to run an exe file which is dependant of Oxygen.dll. As I sometimes try out different versions of OxygenBasic in different directories I do not use this option.
« Last Edit: May 03, 2016, 01:01:06 PM by Arnold »