Author Topic: Oxygen not working in subfolders  (Read 6022 times)

0 Members and 1 Guest are viewing this topic.

Alex_Longard

  • Guest
Oxygen not working in subfolders
« on: January 13, 2015, 06:04:10 AM »
Oxygen.dll is in D: \ program files \ OxygenBasic.
Compiles only when moving oxygen.dll and co2 in C: \.

Shows the message: "Error3: file empty or not found D: \ Program"
In versions prior to October 2014, this error was absent.

Sory my bad english, i speak ukrainian and russian.

Charles Pegge

  • Guest
Re: Oxygen not working in subfolders
« Reply #1 on: January 13, 2015, 10:11:47 AM »
Hi Alex,

Welcome to the forum.

You can create a compiled programwhich does not depend on Oxygen.dll by including something like this:

  includepath "$/inc/"
  % filename "t.exe"
  include "rtl32.inc"


The resulting binary will work on any drive or path without oxygen.dll

An example I've just tested, compiled in SCITE on my E drive:

Code: OxygenBasic
  1.   includepath "$/inc/"
  2.   % filename "t.exe"
  3.   include "rtl32.inc"
  4.   include "MinWin.inc"
  5.   '% NoConsole
  6.  '% TryAttachConsole
  7.  include "Console.inc"
  8.   include "ParseUtil.inc"
  9.  
  10.   Color 0xf8
  11.   cls
  12.  
  13.   Function CommandLineArgs() as string
  14.   ====================================
  15.   sys i=1
  16.   string Command, wr, s
  17.   Command=GetCommandLine
  18.   StepWord Command,i 'step over filepath\file
  19.  if ascb=34 then
  20.     s=getword Command,i
  21.     if ascb=34 then
  22.       s=unquote s
  23.     else
  24.       s=mid Command, sttw
  25.     end if
  26.   else
  27.     skipspace Command,i
  28.     s=mid Command,i
  29.   end if
  30.   return s
  31.   end function
  32.  
  33.  
  34.   function DOS(string s)
  35.   ======================
  36.   string c
  37.   static STARTUPINFO         infs
  38.   static PROCESS_INFORMATION infp
  39.   if s then c="cmd.exe /c " else c="cmd.exe "
  40.   CreateProcess null,c+s,0,0,0,0,0,0,@infs,@infp
  41.   WaitForMultipleObjects 1,@infp.hthread,1,-1
  42.   CloseHandle infp.hProcess
  43.   CloseHandle infp.hThread
  44.   end function
  45.  
  46.   function Console(string ti)
  47.   ===========================
  48.   SetConsoleTitle ti
  49.   zstring dt[0x100]
  50.   string s=""
  51.   'GetCurrentDirectory 0xff, strptr dt
  52.  'output GetCommandline() cr cr
  53.  do
  54.     Color 0xf2
  55.     output(dt+chr(2,32))
  56.     Color 0xf0
  57.     s=ltrim rtrim input
  58.     if s
  59.       s=lcase s
  60.       le=len s
  61.       'COMMAND INTERCEPTS
  62.      if s="exit" then exit do
  63.       'if s="?"
  64.      '  output "gxo2 <file>" cr
  65.      '  continue do
  66.      'end if
  67.      if left (s,3)="cd "
  68.         s=ltrim mid s,4
  69.         SetCurrentDirectory s
  70.         continue do
  71.       end if
  72.       Color 0xf3
  73.       DOS s
  74.     end if
  75.   end do
  76.   end function
  77.  
  78.   Console "OxygenBasic Command Prompt"
  79.   FreeConsole
  80.  

I also tried to make a file association between .o2bas and E:\o2progs\OxygenBasic\gxo2.exe for direct executions of o2bas scripts

But unfortunately, it would not allow this to happen.

Alex_Longard

  • Guest
Re: Oxygen not working in subfolders
« Reply #2 on: January 13, 2015, 04:57:45 PM »
Hi Charles!
Very thanks from ansver:)

In the latest versions not working folder if in the name have spaces.

includepath i write on begin source file.

Charles Pegge

  • Guest
Re: Oxygen not working in subfolders
« Reply #3 on: January 14, 2015, 05:36:46 AM »
Hi Alex,

I have fixed the spacey file path issue in Oxygen.dll here: :)

http://www.oxygenbasic.org/o2zips/Oxygen.zip

Code: OxygenBasic
  1. includepath "New Folder/"
  2. include "progfile t.o2bas"
  3.  

 
« Last Edit: January 14, 2015, 08:14:28 AM by Charles Pegge »

Alex_Longard

  • Guest
Re: Oxygen not working in subfolders
« Reply #4 on: January 14, 2015, 06:39:04 AM »
May be a problem in Windows ...
New oxygen.dll show message "file not fount", as the previous version.

On notebook install Win XP sp3 with ansi encoding.
For win7 not enough powerful processor, in seven work correctly.

Alex_Longard

  • Guest
Re: Oxygen not working in subfolders
« Reply #5 on: January 14, 2015, 08:36:23 AM »
On scite new version good work!
If associate *.o2bas with co2.exe show error...

Mike Lobanovsky

  • Guest
Re: Oxygen not working in subfolders
« Reply #6 on: January 14, 2015, 11:58:15 AM »
On scite new version good work!
If associate *.o2bas with co2.exe show error...

Здравствуйте, Алекс!

Так работает у Вас новая версия с пробелами или нет? Должна работать: в аттаче картинка, как O2 успешно собирает у меня проект C:\Program Files\OxygenBasic\projectsA\ToyInterp под Win XP Sp3 Pro Russian. То же самое должны видеть и Вы. В противном случае Ваша установка XP, скорее всего, кривая. Пожалуйста, отпишитесь по-русски.

Ассоциировать расширения .o2bas с компилятором co2.exe пока не представляется возможным. Пожалуйста, используйте штатный редактор SciTE.exe для редактирования, запуска в JIT-режиме и статической компиляции скриптов "Оксиджен Бейсик".

---------------------------------

Hi Alex,

So does the new version work OK for you with spaces? It should; attached below is a snapshot of O2 compiling the C:\Program Files\OxygenBasic\projectsA\ToyInterp project successfully for me under Win XP Sp3 Pro Russian. You should see the same on your computer. Otherwise your XP installation is bad more likely than not. Please respond in Russian.

It is not currently possible to associate .o2bas extensions with the co2.exe compiler. Please use the standard SciTE.exe editor to edit OxygenBasic scripts, run them in a JIT mode, and compile them statically.

.

Alex_Longard

  • Guest
Re: Oxygen not working in subfolders
« Reply #7 on: January 14, 2015, 12:24:56 PM »
Здравствуйте Майк, (извиняюсь если неправильно написал ваше имя на русском)
Несколько последних версий Oxygen неработают при ассоциации расширения файлов с co2 и gxo2, это присутствует только в папках с пробелами.
Раньше oxygen.dll находился по пути D:\program files\programing\oxygenbasic и скрипты компилировались независимо от своего расположения.
Когда переношу папку oxygenbasic на D:\ или C:\ ассоциация срабатывает нормально и скрипты запускаются из любого расположения.

Есть подозрение что сам интерпретатор неможет обрабатывать путь от корневой директории.
В исходниках пока пытаюсь разобраться, Freebasic после Purebasic трудно понять...

PS: текст немогу адекватно перевести на английский, многие слова приходится подсматривать по словарю.

PS: Вы в своем сообщении писали через переводчик или вы русский?

Mike Lobanovsky

  • Guest
Re: Oxygen not working in subfolders
« Reply #8 on: January 14, 2015, 12:58:56 PM »
Чарльз в курсе этих проблем с ассоциацией файлов, но никого это, по большому счету, до сих пор не напрягало. Может быть, имеет смысл просто установить папку O2 в корень и забыть, если только Вы не планируете работать с языком как девелопер, а не юзер.

Я, вообще-то, украинец, всю сознательную жизнь проживший в Беларуси. Украинский, беларуский и русский -- мои родные языки, английским я владею свободно, хуже -- французским, а немецкий читаю и перевожу со словарем.

--------

Charles is aware of these problems with file association but nobody has been paying much attention to it until now. Perhaps it would be reasonable to have the O2 folder installed into the disk root directory and forget it, if only you aren't planning to work with the language as a developer rather than user.

I'm actually a Ukrainian who has lived in Belarus all his conscious life. Ukrainian, Belarusian and Russian are my mother tongues. I'm quite proficient in English and less proficient in French. I can also read and translate some German using a dictionary.

JRS

  • Guest
Re: Oxygen not working in subfolders
« Reply #9 on: January 14, 2015, 01:02:51 PM »
Quote
I'm actually a Ukrainian who has lived in Belarus all his conscious life. Ukrainian, Belarusian and Russian are my mother tongues. I'm quite proficient in English and less proficient in French. I can also read and translate some German using a dictionary.

You and Peter Verhas could have been brothers in another life. I wish you had the chance to know him when his interests were with Script BASIC.

Alex_Longard

  • Guest
Re: Oxygen not working in subfolders
« Reply #10 on: January 14, 2015, 01:08:34 PM »
Я хочу на oxygen написать vst плагин и расширение для аудио-студии reaper чтобы можно было использовать oxygen.dll в качестве интерпретатора для автоматизации.
C++ учил в институте, но уже многое забыл и ненравится синтаксис, а oxygen отлично подходит под мои требования.

Буду тогда использовать oxygen через scite, пока Чарльз что-то не придумает с проблемой пробелов.

PS: Приятно встретить соотечественника :) Я из Донецка, год назад из-за войны перебрался в Киев.

Mike Lobanovsky

  • Guest
Re: Oxygen not working in subfolders
« Reply #11 on: January 14, 2015, 02:37:51 PM »
(Translation of the above)

"I'd like to use Oxygen to develop a VST plugin and an extension for the REAPER audio studio so that Oxygen.dll could be used as an automation interpreter.

I studied C++ at college but have forgotten much of it since. Also I don't like its syntax while Oxygen fits in very well for my purposes.

I'll be using Oxygen through its SciTE until Charles resolves the pathname spaces problem.

P.S. It's nice to meet a compatriot. I'm from Donetsk, Ukraine and I moved to Kiev a year ago due to the war."

----------------------

Добро пожаловать на форум, брат!

Думаю, Оксиджен Бейсик придется Вам по душе. Это очень мощный инструмент для разработки серьезных приложений на достаточно низком уровне в стиле Windows SDK с использованием простого и понятного бейсикоподобного синтаксиса. Чарльз Пегги -- прекрасный разработчик и серьезный авторитет в современном Бейсике и ассемблере. Модификация Oxygen.dll используется также в хорошо известном thinBasic в качестве JIT-компилятора для критичных по времени участков интерпретируемого кода. Джон Спиковски -- менеджер проекта Скрипт Бейсик, где также используются расширения, написанные Чарльзом. ФБСЛ, соразработчиком которого являюсь я, использует два собственных JIT-компилятора -- АНСИ Си и интелоподобный ассемблер -- для таких же целей в интерпретируемой среде ФБСЛ Бейсик.

------------------

Welcome to the forum, brother,

I think you will like OxygenBasic. It is a very powerful instrument for developing serious applications at a sufficiently low level in the Windows SDK style using a simple and clear BASIC syntax. Mr Charles Pegge is a prominent and authoritative developer in contemporary BASIC and assembly domains. A modification of Oxygen.dll is also used in the well-known thinBasic as a JIT compiler for time-critical portions of otherwise interpretative BASIC code. Mr John Spikowski is the project manager of Script BASIC that also enjoys a few extensions written by Charles. FBSL a co-developer of which I am uses two of its own JIT compilers, ANSI C and Intel-style assembler, for similar purposes in FBSL's interpretative BASIC environment.

Aurel

  • Guest
Re: Oxygen not working in subfolders
« Reply #12 on: January 14, 2015, 02:46:57 PM »
strange i understand most of this language ..probably because i know cirilic ..funny ;)

Alex_Longard

  • Guest
Re: Oxygen not working in subfolders
« Reply #13 on: January 14, 2015, 03:49:42 PM »
Thank you Mike!
I've been looking at Oxygen, since found a forum thinbasic.
It was too lazy to learn a new syntax after purebasic and c ++.
Due to the oxygen began to understand many things in assembler and very much hope that Charles would write more detailed help on the language and commands.
Although I learn oxygen of examples and it is much clearer than in other languages ​​.

Aurel

  • Guest
Re: Oxygen not working in subfolders
« Reply #14 on: January 15, 2015, 02:06:54 AM »
Quote
It was too lazy to learn a new syntax
Hi Alex
There is no need to learn new syntax because in fact  there is no something extra new
or ultra special about Oxygen Basic.
Oxgen is really simple to use compiler and you can make programs in many different ways.
Also you can use some alternative editors if you think that work with Scite is strange to you.
And you can always build your programs as standalone exes like i do all the time.
good luck!