Oberon 3 on Windows 7, PELinker, Windows executable
Hi, I am new to this list, but do have some 20 years experience with Oberon on Windows. Still there are things which I do not fully understand, e.g. PELinker and Oberon debugger. Right now I am working on an application which translates MusicXML (a proprietary language to describe musical notes) into another input language, called PMX, which in turn generates TeX-code for typesetting notes. Is there anywhere out in Cyber Space someone, who could give me a helping hand on how to use PELinker in order to transform an Oberon-Module into a Windows *.exe, so that I can call it from the WIndows command line in the following form: /myprogram.exe "path to input file" "path to output file"/ Thanks and regards, Dieter
Hi Dieter, Read Chapter 6.6 "Building EXE and DLL Executable Files with Oberon" in the Oberon UserGuide (Docu/UserGuide.Text) for information on how to use PELinker.Tool If you follow those instructions and get stuck let me know how far you got and I'll see if I can help. I would recommend proceeding step by step e.g.: 1. Start with the simple sample that they provide and confirm that you can get that working 2. Write a simple example that accepts filenames as command-line parameters and confirms that the input file exists and checks that the output file doesn't exist. 3. Start working on your actual application, Regards, Chris Chris Burrows CFB Software Oberon for ARM Cortex-M3 and M4 http://www.astrobe.com From: Dieter [mailto:d.gloetzel@web.de] Sent: Friday, 13 March 2015 10:11 PM To: oberon@lists.inf.ethz.ch Subject: [Oberon] Oberon 3 on Windows 7, PELinker, Windows executable Hi, I am new to this list, but do have some 20 years experience with Oberon on Windows. Still there are things which I do not fully understand, e.g. PELinker and Oberon debugger. Right now I am working on an application which translates MusicXML (a proprietary language to describe musical notes) into another input language, called PMX, which in turn generates TeX-code for typesetting notes. Is there anywhere out in Cyber Space someone, who could give me a helping hand on how to use PELinker in order to transform an Oberon-Module into a Windows *.exe, so that I can call it from the WIndows command line in the following form: myprogram.exe "path to input file" "path to output file" Thanks and regards, Dieter
Hi Chris, thanks for your recommendations. I tried, what you told me. But I did not succeed. It seems I am lacking some crucial information. o.k. with the HelloCon-example: Compile->Link->Register->Run and "Hello from Oberon!" appears on the DOS-Console. This example is somewhat limited. It does not tell me how to deal with an executable Oberon Procedure in a Module or maybe several of these in one Module. Then I tried to extend this in a way that the EXE would read a parameter from the command line. Since I do not know the intricacies of the Kernel32-Library, I tried the following: The only idea I had was to try to use the parameter mechanism of Oberon and hope that this would be magically transferred to the executable. ================================================================ MODULE HelloConRead; IMPORT Kernel32, Texts, Oberon; VAR S : Texts.Scanner; BEGIN Texts.OpenScanner(S,Oberon.Par.text, Oberon.Par.pos); Texts.Scan(S); Kernel32.Str(S.s); Kernel32.Ln() END HelloConRead. ============================================================== Is this idea at all correct? A batch solution like << /myprogram.exe "path to input file" "path to output file"/>> would be sufficient for my present task. But could one also produce screen oriented interactive Windows programs from Oberon code? ============================================================== o.k. for the Compiler: Builder.Compile \s HelloConRead.Mod ~ ============================================================== Then I modified the HelloCon.Link statement to include the Oberon and Text modules and changed the OriginalFilename to "HelloConRead.exe" When I call: PELinker.Link HelloConRead.Link ~, there is a crash, and I have no chance to go any further. ============================================ P 100 HALT statement in thread Oberon.Loop BootLinker.Halt PC = 1857 msg = "Imported module not loaded" BootLinker.ReadImport PC = 10781 R = 00416E98H Files.Rider m = 0218E840H BootLinker.ModuleDesc BootLinker.LoadModule PC = 16007 R = 00416E98H Files.Rider base = 4272060 body = NIL ch = 00000000X e = 0 i = 12 imp = 00000000H (BootLinker.ModuleDesc) j = 0 k = 0 m = 0218E840H BootLinker.ModuleDesc mname = "Modules" mno = 3 nofDataLinks = 29 nofLinks = 3 symSize = 1564 t = 0 tmp = 476 BootLinker.Load PC = 18567 R = 00416E98H Files.Rider base = 4272060 f = 02111D00H Files.File fname = "Oberon.Obj" imp = 00000000H (BootLinker.ModuleDesc) m = 0218E840H BootLinker.ModuleDesc name = "Oberon" tag = 000000AFX PELinker.DoLink PC = 22134 F = 0216F260H Files.File R = 00416E98H Files.Rider T = 0215BB00H Texts.TextDesc base = 4272060 context = 0042DBB8H Exceptions.Context done = FALSE mod = 0218E840H BootLinker.ModuleDesc name = 0215C3C0H PELinker.NameList offs = 0 sections = 3 PELinker.Link PC = 23391 S = 00447178H Texts.Scanner T = 0215BB00H Texts.TextDesc done = FALSE Oberon.Call PC = 5931 Mod = 02133D60H Kernel.ModuleDesc P = PELinker.Link PC = 22948 cur = 01E9DE80H Windows.Window (Displays.Display) f = 01F99520H Desktops.DocViewerDesc (Objects.ObjDesc) i = 9 j = 13 name = "Link" new = FALSE par = 02132BC0H Oberon.ParRec res = 1 TextGadgets0.Call PC = 16652 A = 0041F1B8H Objects.AttrMsg F = 01E60B80H TextGadgets.FrameDesc (TextGadgets0.FrameDesc) R = 00447218H Texts.Reader S = 00447178H Texts.Scanner ch = 00000000X chl = 32767 cmd = "" cw = 32767 cx = 0 cy = 0 dlink = 01FA30E0H Documents.DocumentDesc (Objects.ObjDesc) i = 8 j = 0 Am 14.03.2015 um 02:59 schrieb Chris Burrows:
Hi Dieter,
Read Chapter 6.6 "Building EXE and DLL Executable Files with Oberon" in the Oberon UserGuide (Docu/UserGuide.Text) for information on how to use PELinker.Tool
If you follow those instructions and get stuck let me know how far you got and I'll see if I can help. I would recommend proceeding step by step e.g.:
1. Start with the simple sample that they provide and confirm that you can get that working 2. Write a simple example that accepts filenames as command-line parameters and confirms that the input file exists and checks that the output file doesn't exist. 3. Start working on your actual application,
Regards, Chris
Chris Burrows CFB Software Oberon for ARM Cortex-M3 and M4 http://www.astrobe.com
From: Dieter [mailto:d.gloetzel@web.de] Sent: Friday, 13 March 2015 10:11 PM To:oberon@lists.inf.ethz.ch Subject: [Oberon] Oberon 3 on Windows 7, PELinker, Windows executable
Hi,
I am new to this list, but do have some 20 years experience with Oberon on Windows. Still there are things which I do not fully understand, e.g. PELinker and Oberon debugger.
Right now I am working on an application which translates MusicXML (a proprietary language to describe musical notes) into another input language, called PMX, which in turn generates TeX-code for typesetting notes.
Is there anywhere out in Cyber Space someone, who could give me a helping hand on how to use PELinker in order to transform an Oberon-Module into a Windows *.exe, so that I can call it from the WIndows command line in the following form: myprogram.exe "path to input file" "path to output file"
Thanks and regards, Dieter
-- Oberon@lists.inf.ethz.ch mailing list for ETH Oberon and related systems https://lists.inf.ethz.ch/mailman/listinfo/oberon
-- ____________________________________ Dr. Dieter Glötzel Im Rosengarten 27 64367 Mühltal Tel.: 06151 / 360 82 72
Hi, Dieter, Why do you want use exactly Oberon 3 and PELinker? May be that it is not very ideal to solve your task. Another variants to develop *.exe for Windows: 1. OPCL - Oberon Portable Compiler & Linker (ETH Oberon compiler adapted for command-line): https://sourceforge.net/projects/opcl 2. BlackBox Component Builder: http://www.zinnamturm.eu/downloads.htm http://www.oberon.ch/blackbox.html http://blackboxframework.org Component Pascal compiler (from BlackBox): https://sourceforge.net/projects/cp-dev/ ( Component Pascal is a small superset of Oberon-2 ) How to build stand-alone command-line executable under BlackBox: http://zx.oberon2.ru/forum/viewtopic.php?f=34&t=240 Modules CmdLine and Console for BlackBox: https://github.com/Oleg-N-Cher/XDev/blob/master/Bb/Mod/CmdLine.odc https://github.com/Oleg-N-Cher/XDev/blob/master/Bb/Mod/Console.odc 3. XDev - Oberon-2 over translation to C - based on BlackBox and Ofront: https://sourceforge.net/projects/bb-xdev/ Subsystem WinDev for target Windows 32/64 you can download at: https://github.com/Oleg-N-Cher/XDev/ Also there are traditional IDE environments: 4. XDS (Modula-2/Oberon-2 compiler for Windows and Linux): http://www.excelsior-usa.com/xds.html 5. POW! (old and does not install on Win64): http://www.fim.uni-linz.ac.at/pow/ Oberon 3 has not WinApi bindings, if you need it. Bindings to WinApi are present in BlackBox, XDev, XDS and POW! Also BlackBox may uses Windows COM-interfaces. Personally I recommend XDev. It's the one (known for me) Oberon-2 implementation for generating not only 32 bit code, but 64 bit too - for Windows and Linux (except pure translators to C - Ofront, OO2C and XDS-C). Using XDev-style development you can build your code with help of GCC for any target, if you'll need. Now XDev is under development. And I can help you to start with it, just write me e-mail. Dieter wrote:
Hi,
I am new to this list, but do have some 20 years experience with Oberon on Windows. Still there are things which I do not fully understand, e.g. PELinker and Oberon debugger.
Right now I am working on an application which translates MusicXML (a proprietary language to describe musical notes) into another input language, called PMX, which in turn generates TeX-code for typesetting notes.
Is there anywhere out in Cyber Space someone, who could give me a helping hand on how to use PELinker in order to transform an Oberon-Module into a Windows *.exe, so that I can call it from the WIndows command line in the following form: /myprogram.exe "path to input file" "path to output file"/
Thanks and regards, Dieter
------------------------------------------------------------------------
-- Oberon@lists.inf.ethz.ch mailing list for ETH Oberon and related systems https://lists.inf.ethz.ch/mailman/listinfo/oberon
-- Oleg N. Cher VEDAsoft Oberon Club http://zx.oberon2.ru
Hi Oleg, this is the type of information I expected from joining this list. Thank you. The reason for using Oberon 3 and trying to use PELinker is, that I know Oberon 3 for 20 years. And that I am happy with the environment as it is. After all, the PELinker cannot be so bad, because it makes also the Oberon 3-system run on Windows. But it seems fair to assume that, since the last innovation on Oberon 3 (apart from an adaption to Vista and Windows7) is ten years old, this is may be not the future platform for Oberon development. So the question will be, which environment to choose in the long run. My present application is a converter from MusicXML (a proprietary description language for musical notes) into another notes description language called PMX (a tool for generating MusixTeX code). It is almost finished, and I still hope I get my problems sorted out with PELinker. If not, I will have to port my stuff onto one of your proposed environments. The important criterion for me is the porting effort. I am using the Modules "Out, Oberon, Strings, Texts, Objects, Files". And I would hope that there will be similar libraries available in one or the other Oberon environment and that the syntax is 99 % compatible. Regards, Dieter Am 15.03.2015 um 00:35 schrieb Oleg N. Cher:
Hi, Dieter,
Why do you want use exactly Oberon 3 and PELinker? May be that it is not very ideal to solve your task.
Another variants to develop *.exe for Windows:
1. OPCL - Oberon Portable Compiler & Linker (ETH Oberon compiler adapted for command-line):
https://sourceforge.net/projects/opcl
2. BlackBox Component Builder:
http://www.zinnamturm.eu/downloads.htm http://www.oberon.ch/blackbox.html http://blackboxframework.org
Component Pascal compiler (from BlackBox):
https://sourceforge.net/projects/cp-dev/
( Component Pascal is a small superset of Oberon-2 )
How to build stand-alone command-line executable under BlackBox:
http://zx.oberon2.ru/forum/viewtopic.php?f=34&t=240
Modules CmdLine and Console for BlackBox:
https://github.com/Oleg-N-Cher/XDev/blob/master/Bb/Mod/CmdLine.odc https://github.com/Oleg-N-Cher/XDev/blob/master/Bb/Mod/Console.odc
3. XDev - Oberon-2 over translation to C - based on BlackBox and Ofront:
https://sourceforge.net/projects/bb-xdev/
Subsystem WinDev for target Windows 32/64 you can download at:
https://github.com/Oleg-N-Cher/XDev/
Also there are traditional IDE environments:
4. XDS (Modula-2/Oberon-2 compiler for Windows and Linux):
http://www.excelsior-usa.com/xds.html
5. POW! (old and does not install on Win64):
http://www.fim.uni-linz.ac.at/pow/
Oberon 3 has not WinApi bindings, if you need it.
Bindings to WinApi are present in BlackBox, XDev, XDS and POW!
Also BlackBox may uses Windows COM-interfaces.
Personally I recommend XDev. It's the one (known for me) Oberon-2 implementation for generating not only 32 bit code, but 64 bit too - for Windows and Linux (except pure translators to C - Ofront, OO2C and XDS-C). Using XDev-style development you can build your code with help of GCC for any target, if you'll need.
Now XDev is under development. And I can help you to start with it, just write me e-mail.
Dieter wrote:
Hi,
I am new to this list, but do have some 20 years experience with Oberon on Windows. Still there are things which I do not fully understand, e.g. PELinker and Oberon debugger.
Right now I am working on an application which translates MusicXML (a proprietary language to describe musical notes) into another input language, called PMX, which in turn generates TeX-code for typesetting notes.
Is there anywhere out in Cyber Space someone, who could give me a helping hand on how to use PELinker in order to transform an Oberon-Module into a Windows *.exe, so that I can call it from the WIndows command line in the following form: /myprogram.exe "path to input file" "path to output file"/
Thanks and regards, Dieter
------------------------------------------------------------------------
-- Oberon@lists.inf.ethz.ch mailing list for ETH Oberon and related systems https://lists.inf.ethz.ch/mailman/listinfo/oberon
-- Oleg N. Cher VEDAsoft Oberon Club http://zx.oberon2.ru
-- Oberon@lists.inf.ethz.ch mailing list for ETH Oberon and related systems https://lists.inf.ethz.ch/mailman/listinfo/oberon
-- ____________________________________ Dr. Dieter Glötzel Im Rosengarten 27 64367 Mühltal Tel.: 06151 / 360 82 72
Dear Dieter,
I am using the Modules "Out, Oberon, Strings, Texts, Objects, Files". And I would hope that there will be similar libraries available in one or the other Oberon environment and that the syntax is 99 % compatible.
OPCL has the same modules (or similar modules, i.e. Console instead of Out), adapted for command line. I experimented with PELinker from ETH Oberon PlugIn 2.6 Prerelease, it works good. Some info on it you can read here (in Russian, use Google translator): http://zx.oberon2.ru/forum/viewtopic.php?f=15&t=13 http://zx.oberon2.ru/forum/viewtopic.php?f=15&t=11 But I'm not sure that PlugIn/OPCL is compatible with Windows 8/10. Binary compatibility with new OS versions is a problem of Oberon-environments that produce stand-alone executables. So for this purpose I use translation Oberon to C (in XDev). -- Oleg N. Cher VEDAsoft Oberon Club http://zx.oberon2.ru
Dear Treutwein, Treutwein Bernhard пишет:
Dear Oleg,
[...] I experimented with PELinker from ETH Oberon PlugIn 2.6 Prerelease,
where did you get that from?
https://lists.inf.ethz.ch/pipermail/oberon/2011/006266.html Alexander Iljin wrote:
The latest version I got from Emil Zeller: https://github.com/AlexIljin/WinOberon/zipball/v2.6exp
My latest is "ETH Plugin Oberon for Windows(TM) / Win32 2.5 (18.12.2010)".
As I remember, ETH Plugin 2.6 Prerelease shows "2.5" too. Do not let that confuse you. I would like to know the current status of the project, but I was not able to contact with Emil.
regards -- Bernhard
-- Oleg N. Cher VEDAsoft Oberon Club http://zx.oberon2.ru
participants (4)
-
Chris Burrows -
Dieter -
Oleg N. Cher -
Treutwein Bernhard