Re: [Oberon] Oberon 3 on Windows 7, PELinker, Windows executable
From: Dieter [mailto:d.gloetzel@web.de] Sent: Monday, 16 March 2015 11:22 PM To: oberon@lists.inf.ethz.ch Subject: Re: [Oberon] Oberon 3 on Windows 7, PELinker, Windows executable
My application is practically ready on the Oberon side. What do you think? Will I need more Kernel32 routines in order to do my job, namely reading and writing a file?
Maybe not. You already have the 'Files' module in your list of Modules. That seems to be a wrapper around the corresponding Kernel32 routines so you may just be able to use the Files procedures as is. As before, just 'suck it and see'.
Also I write a lot of control information onto the System.Log with the Out-Module. Will this work during the EXE, or do I have to replace the Out- statements by something else, e.g. writing into a third file?
That is different as System.Log is a UI feature. I guess that you would either display the info to the console (like you have done in HelloCon) or, yes, write it to a third file.
Although I always got along without using the Oberon Debugger, I would like to have some more information on how to use it.
I haven't yet needed to use the debugger either - the traps usually have infinitely more information than I need to work out what is going wrong. Somebody else might be prepared to volunteer to help you with the debugger if you find you have a need for it.
============================================= et cetera ============================================= Which Oberon version have you been using, Chris?
ETH PlugIn Oberon for WindowsTM / Win32 2.5 (7.2.2009)
Or should I move to Native Oberon on Linux, which seems to be actively worked upon recently?
If you would prefer to work on Linux rather than Windows that would be an option. I do 99% of my PC-related Oberon work on Windows 7 using the Gardens Point Component Pascal (i.e. Oberon-2+) compiler. It is still supported by John Gough the author and, as it is a .NET based system it currently works on all current 32-bit and 64-bit versions of Windows and more than likely many new versions yet to come. Links to the system are here: http://www.cfbsoftware.com/gpcp Regards, Chris
Hi Chris, this is great news. Thank you so much! It seems that making the PELinker work is more an art than science. I have now a new Version, which tries to read and write a file. The module is: ================================================================================ MODULE InOut; (* IMPORT Files,Oberon,Objects, Strings, Texts,Out; Import for Oberon Version*) IMPORT Kernel32, Files, Oberon,Objects, Strings, Texts; CONST EOR = 0DX; NL = 0AX; BLANK = 20X; TAB = 09X; DBLQUOTE = 22X; VAR cl: Kernel32.LPSTR; commandLine: ARRAY 255 OF CHAR; pos : LONGINT; infilename, outfilename : ARRAY 64 OF CHAR; c : CHAR; ti, to : Texts.Text; R : Texts.Reader; W : Texts.Writer; S : Texts.Scanner; f : Files.File; PROCEDURE strbetween(s : ARRAY OF CHAR; VAR name : ARRAY OF CHAR;VAR pos : LONGINT); VAR i,j : LONGINT; BEGIN i:= pos; WHILE (i < Strings.Length(s) ) & ( s[i] # DBLQUOTE ) DO INC(i) END; (* Find first doublequote *) j := 0; INC(i); WHILE(i < Strings.Length(s) ) & (s[i] # DBLQUOTE) DO name[j] := s[i]; INC(i); INC(j) END; pos := i +1; name[j+1] := 0X; END strbetween; PROCEDURE Storewo( t: Texts.Text; f: Files.File ); (* stores a Texts.Text to disk. but eliminates multiple BLANKs. *) VAR R: Texts.Reader; r: Files.Rider; ch: CHAR; BEGIN Files.Set( r, f, 0 ); Texts.OpenReader( R, t, 0 ); Texts.Read( R, ch ); WHILE ~R.eot DO Files.Write( r, Strings.OberonToISO[ORD( ch )] ); IF ch =Strings.CR THEN Files.Write(r,NL); END; IF (ch = BLANK) THEN WHILE (ch = BLANK) DO Texts.Read( R, ch ); END; ELSE Texts.Read( R, ch ); END; END; END Storewo; BEGIN cl := Kernel32.GetCommandLine(); Kernel32.CopyString(cl, commandLine); pos := 0; strbetween(commandLine,infilename,pos); Kernel32.Str(infilename); Kernel32.Ln(); strbetween(commandLine,outfilename,pos); Kernel32.Str(outfilename); Kernel32.Ln(); Texts.New; ti := Objects.NewObj( Texts.Text ); Texts.Open( ti, infilename ); Texts.OpenReader( R, ti, 0 ); Texts.New; to := Objects.NewObj( Texts.Text ); Texts.OpenWriter( W ); WHILE ~ R.eot DO Texts.Read(R,c) ; Texts.Write(W,c); END; f := Files.New( outfilename); Texts.Append( to, W.buf ); Storewo( to , f ); Files.Close( f ); Files.Register( f ); END InOut.InOut "d:/musix/telemann/telemann.xml" "d:/musix/telemann/telemann.copy"~ ===================================================================================== I tried several versions of the Modules list in PELinker without success. ======================================================================= MODULES Kernel32, Kernel, ADVAPI32, Reals, Registry, Dates, FileDir, AosIO, User32, GDI32, Threads, Files, Modules, Strings, Objects, Displays, Texts, InOut ====================================================================== I tested the Oberon Version, but the linker crashed again. Regards, Dieter System.Free InOut ~ Builder.Compile \s InOut.Mod ~ PELinker.Link InOut.Link ~ RegistryTools.Load InOut.reg
-----Original Message----- From: Dieter [mailto:d.gloetzel@web.de] Sent: Wednesday, 18 March 2015 4:55 AM To: oberon@lists.inf.ethz.ch Subject: Re: [Oberon] Oberon 3 on Windows 7, PELinker, Windows executable
I have now a new Version, which tries to read and write a file.
The module is: ===================================================================== =========== MODULE InOut;
IMPORT Kernel32, Files, Oberon,Objects, Strings, Texts;
Texts is associated with the UI (it imports Display) so you can't use that in a command-line program. You should use the Read and Write routines in the Files module instead. Regards, Chris Chris Burrows CFB Software http://www.cfbsoftware.com
Chris, you are perfectly allright. I will switch to Files-Inpur-Output. Regards, Dieter Am 17.03.2015 um 22:18 schrieb Chris Burrows:
-----Original Message----- From: Dieter [mailto:d.gloetzel@web.de] Sent: Wednesday, 18 March 2015 4:55 AM To: oberon@lists.inf.ethz.ch Subject: Re: [Oberon] Oberon 3 on Windows 7, PELinker, Windows executable
I have now a new Version, which tries to read and write a file.
The module is: ===================================================================== =========== MODULE InOut;
IMPORT Kernel32, Files, Oberon,Objects, Strings, Texts;
Texts is associated with the UI (it imports Display) so you can't use that in a command-line program. You should use the Read and Write routines in the Files module instead.
Regards, Chris
Chris Burrows CFB Software http://www.cfbsoftware.com
-- 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 Chris, after throwing out the Texts-module everything works fine with yout Link-file. I have now my own filecopy routine as windows-exe. What is left to do is, to replace "Texts" by "Files" in my original program (with some 1500 lines of code), and direct the System.Log-output to the DOS console. Thanks a lot, I hope I did not bother you too much and will certainly do less so in the future. Regards, Dieter Am 17.03.2015 um 22:18 schrieb Chris Burrows:
-----Original Message----- From: Dieter [mailto:d.gloetzel@web.de] Sent: Wednesday, 18 March 2015 4:55 AM To: oberon@lists.inf.ethz.ch Subject: Re: [Oberon] Oberon 3 on Windows 7, PELinker, Windows executable
I have now a new Version, which tries to read and write a file.
The module is: ===================================================================== =========== MODULE InOut;
IMPORT Kernel32, Files, Oberon,Objects, Strings, Texts;
Texts is associated with the UI (it imports Display) so you can't use that in a command-line program. You should use the Read and Write routines in the Files module instead.
Regards, Chris
Chris Burrows CFB Software http://www.cfbsoftware.com
-- 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 BTW: Find below the link dependency of ProjectOberon. Eg: - If a module imports Oberon, all 9 modules below it have to be linked into the selfcontained EXE. - If a module imports Texts, all 4 modules below it have to be linked. Jörg -----Original Message----- From: Paul Reed [mailto:paulreed@paddedcell.com] Sent: Donnerstag, 19. März 2015 15:47 To: chris@cfbsoftware.com; ETH Oberon and related systems Subject: Re: [Oberon] Oberon 3 on Windows 7, PELinker, Windows executable
Texts is associated with the UI (it imports Display) so you can't use
that in ... By the way, that dependency is fixed (ie removed) in the 2013 update of Project Oberon. Cheers, Paul -- <mailto:Oberon@lists.inf.ethz.ch> Oberon@lists.inf.ethz.ch mailing list for ETH Oberon and related systems <https://lists.inf.ethz.ch/mailman/listinfo/oberon> https://lists.inf.ethz.ch/mailman/listinfo/oberon
Hi Paul, Thanks for the news. Where do I find the 2013 update of Project Oberon? The latest version known to me is this one: "Win32 2.5 (18.12.2010)". It was not much work to remove Module Texts from my code and work directly with Module Files. Regards, Dieter Am 19.03.2015 um 15:47 schrieb Paul Reed:
Texts is associated with the UI (it imports Display) so you can't use that in ...
By the way, that dependency is fixed (ie removed) in the 2013 update of Project Oberon.
Cheers, Paul
-- 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,
[...] Where do I find the 2013 update of Project Oberon?
http://www.projectoberon.com/ or http://www.inf.ethz.ch/personal/wirth/ProjectOberon/index.html -- Bernhard
-----Original Message----- From: Dieter [mailto:d.gloetzel@web.de] Sent: Monday, March 23, 2015 3:32 PM To: paulreed@paddedcell.com; ETH Oberon and related systems Subject: Re: [Oberon] Oberon 3 on Windows 7, PELinker, Windows executable
Hi Paul,
Thanks for the news. Where do I find the 2013 update of Project Oberon?
The latest version known to me is this one: "Win32 2.5 (18.12.2010)".
It was not much work to remove Module Texts from my code and work directly with Module Files.
Regards, Dieter
Am 19.03.2015 um 15:47 schrieb Paul Reed:
Texts is associated with the UI (it imports Display) so you can't use that in ...
By the way, that dependency is fixed (ie removed) in the 2013 update of Project Oberon.
Cheers, Paul
-- 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
Thanks, Bernhard, I have now created my Windows-Exe, and it does what it should, but the Exe is blown up to 170 MBytes, whereas the original Oberon-Code was only 108 kB. This is kind of a problem, when I want to distribute the exe via email. If anybody has got an idea how to solve this, I will be grateful. Regards, Dieter Am 24.03.2015 um 12:20 schrieb Treutwein Bernhard:
Hi Dieter,
[...] Where do I find the 2013 update of Project Oberon? http://www.projectoberon.com/ or http://www.inf.ethz.ch/personal/wirth/ProjectOberon/index.html
-- Bernhard
-----Original Message----- From: Dieter [mailto:d.gloetzel@web.de] Sent: Monday, March 23, 2015 3:32 PM To: paulreed@paddedcell.com; ETH Oberon and related systems Subject: Re: [Oberon] Oberon 3 on Windows 7, PELinker, Windows executable
Hi Paul,
Thanks for the news. Where do I find the 2013 update of Project Oberon?
The latest version known to me is this one: "Win32 2.5 (18.12.2010)".
It was not much work to remove Module Texts from my code and work directly with Module Files.
Regards, Dieter
Am 19.03.2015 um 15:47 schrieb Paul Reed:
Texts is associated with the UI (it imports Display) so you can't use that in ...
By the way, that dependency is fixed (ie removed) in the 2013 update of Project Oberon.
Cheers, Paul
-- 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
-- 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
-----Original Message----- From: Dieter [mailto:d.gloetzel@web.de] Sent: Wednesday, 25 March 2015 1:08 AM To: oberon@lists.inf.ethz.ch Subject: Re: [Oberon] Oberon 3 on Windows 7, PELinker, Windows executable extremely large!
I have now created my Windows-Exe, and it does what it should, but the Exe is blown up to 170 MBytes, whereas the original Oberon-Code was only 108 kB.
1. How many modules are now listed in the MODULES section of your link file? 2. Which of those modules is the largest and how big is the corresponding .obj file?
This is kind of a problem, when I want to distribute the exe via email.
Attempting to distribute exe's via email should be a last resort because of related security issues. Most email systems will prevent your emails from being sent or delivered. I recommend that you exhaust all other possible means first, Regards, Chris Chris Burrows CFB Software http://www.cfbsoftware.com
Hi Chris, thanks again for your patience. Of course it is stupid to distribute exes via email. I was only thinking of a handful of people whom I know personally. In the end it has to go into the MusixTex repository for download. But even then 170 MB is too much. I include the Link file, which follows your recommendations. ===================================================== MODULES Kernel32, Kernel, ADVAPI32, Reals, Registry, Dates, FileDir, AosIO, Files, Modules, Strings, Cout, Testbed ===================================================== "Testbed" is my original Module and the Module "Cout" is a simple replacement for the Out-Module, which writes into a log-file on disk. The Obj-files of the original Oberon Modules have between 2 and 23 kBytes. The biggest one is my "Testbed" with an Obj-File of 62 kBytes. Regards, Dieter Am 24.03.2015 um 22:27 schrieb Chris Burrows: >> -----Original Message----- >> From: Dieter [mailto:d.gloetzel@web.de] >> Sent: Wednesday, 25 March 2015 1:08 AM >> To: oberon@lists.inf.ethz.ch >> Subject: Re: [Oberon] Oberon 3 on Windows 7, PELinker, Windows >> executable extremely large! >> >> I have now created my Windows-Exe, and it does what it should, but >> the Exe is blown up to 170 MBytes, whereas the original Oberon-Code >> was only >> 108 kB. > 1. How many modules are now listed in the MODULES section of your link file? > > 2. Which of those modules is the largest and how big is the corresponding > .obj file? > >> This is kind of a problem, when I want to distribute the exe via >> email. >> > Attempting to distribute exe's via email should be a last resort because of > related security issues. Most email systems will prevent your emails from > being sent or delivered. I recommend that you exhaust all other possible > means first, > > Regards, > Chris > > Chris Burrows > CFB Software > http://www.cfbsoftware.com > > > > > > > > > > > > > -- > 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 Chris, the size of the exe is quite understandable, because I have several ARRAYs, the biggest of which has approximately 158 MBytes. So the question is, is there a way to distribute the software in a smaller package? Thanks and regards, Dieter Am 24.03.2015 um 22:27 schrieb Chris Burrows: >> -----Original Message----- >> From: Dieter [mailto:d.gloetzel@web.de] >> Sent: Wednesday, 25 March 2015 1:08 AM >> To: oberon@lists.inf.ethz.ch >> Subject: Re: [Oberon] Oberon 3 on Windows 7, PELinker, Windows >> executable extremely large! >> >> I have now created my Windows-Exe, and it does what it should, but >> the Exe is blown up to 170 MBytes, whereas the original Oberon-Code >> was only >> 108 kB. > 1. How many modules are now listed in the MODULES section of your link file? > > 2. Which of those modules is the largest and how big is the corresponding > .obj file? > >> This is kind of a problem, when I want to distribute the exe via >> email. >> > Attempting to distribute exe's via email should be a last resort because of > related security issues. Most email systems will prevent your emails from > being sent or delivered. I recommend that you exhaust all other possible > means first, > > Regards, > Chris > > Chris Burrows > CFB Software > http://www.cfbsoftware.com > > > > > > > > > > > > > -- > 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 did you consider allocating the ARRAYs dynamically with NEW? br Jörg > Am 26.03.2015 um 18:12 schrieb Dieter <d.gloetzel@web.de>: > > Hi Chris, > > the size of the exe is quite understandable, because I have several > ARRAYs, the biggest of which has approximately 158 MBytes. > > So the question is, is there a way to distribute the software in a > smaller package? > > Thanks and regards, > Dieter > > > Am 24.03.2015 um 22:27 schrieb Chris Burrows: >>> -----Original Message----- >>> From: Dieter [mailto:d.gloetzel@web.de] >>> Sent: Wednesday, 25 March 2015 1:08 AM >>> To: oberon@lists.inf.ethz.ch >>> Subject: Re: [Oberon] Oberon 3 on Windows 7, PELinker, Windows >>> executable extremely large! >>> >>> I have now created my Windows-Exe, and it does what it should, but >>> the Exe is blown up to 170 MBytes, whereas the original Oberon-Code >>> was only >>> 108 kB. >> 1. How many modules are now listed in the MODULES section of your link file? >> >> 2. Which of those modules is the largest and how big is the corresponding >> .obj file? >> >>> This is kind of a problem, when I want to distribute the exe via >>> email. >> Attempting to distribute exe's via email should be a last resort because of >> related security issues. Most email systems will prevent your emails from >> being sent or delivered. I recommend that you exhaust all other possible >> means first, >> >> Regards, >> Chris >> >> Chris Burrows >> CFB Software >> http://www.cfbsoftware.com >> >> >> >> >> >> >> >> >> >> >> >> >> -- >> 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 > > > -- > Oberon@lists.inf.ethz.ch mailing list for ETH Oberon and related systems > https://lists.inf.ethz.ch/mailman/listinfo/oberon
Hi Joerg, thanks for the recommendation. This will be my next step. Regards, Dieter Am 26.03.2015 um 19:19 schrieb Jörg Straube: > Hi Dieter > did you consider allocating the ARRAYs dynamically with NEW? > br Jörg > >> Am 26.03.2015 um 18:12 schrieb Dieter <d.gloetzel@web.de>: >> >> Hi Chris, >> >> the size of the exe is quite understandable, because I have several >> ARRAYs, the biggest of which has approximately 158 MBytes. >> >> So the question is, is there a way to distribute the software in a >> smaller package? >> >> Thanks and regards, >> Dieter >> >> >> Am 24.03.2015 um 22:27 schrieb Chris Burrows: >>>> -----Original Message----- >>>> From: Dieter [mailto:d.gloetzel@web.de] >>>> Sent: Wednesday, 25 March 2015 1:08 AM >>>> To: oberon@lists.inf.ethz.ch >>>> Subject: Re: [Oberon] Oberon 3 on Windows 7, PELinker, Windows >>>> executable extremely large! >>>> >>>> I have now created my Windows-Exe, and it does what it should, but >>>> the Exe is blown up to 170 MBytes, whereas the original Oberon-Code >>>> was only >>>> 108 kB. >>> 1. How many modules are now listed in the MODULES section of your link file? >>> >>> 2. Which of those modules is the largest and how big is the corresponding >>> .obj file? >>> >>>> This is kind of a problem, when I want to distribute the exe via >>>> email. >>> Attempting to distribute exe's via email should be a last resort because of >>> related security issues. Most email systems will prevent your emails from >>> being sent or delivered. I recommend that you exhaust all other possible >>> means first, >>> >>> Regards, >>> Chris >>> >>> Chris Burrows >>> CFB Software >>> http://www.cfbsoftware.com >>> >>> >>> >>> >>> >>> >>> >>> >>> >>> >>> >>> >>> -- >>> 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 >> >> >> -- >> Oberon@lists.inf.ethz.ch mailing list for ETH Oberon and related systems >> https://lists.inf.ethz.ch/mailman/listinfo/oberon > -- > 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
participants (6)
-
Chris Burrows -
Dieter -
Jörg -
Jörg Straube -
Paul Reed -
Treutwein Bernhard