Compiling Edit
GavinWraith (26) 1563 posts |
For the purposes of experimentation I wanted to compile Edit as an application, by itself. I could never get the ROOL build machinery working, alas. In my latest efforts I note that in Tungsten.castle.RiscOS.Sources.Apps.Edit.c.message the lines #include EditIntern/txtoptmenu.h and #include EditIntern/message.h upset the compiler as it cannot find the files (nor can I!). Seeing that ROOL have compiled Edit, those files, and possibly others whose absence my compiler has not yet flagged, must be around somewhere. Have I got the wrong distribution? Can anybody help? |
GavinWraith (26) 1563 posts |
Apologies for the noise. Found what I was looking for using Locate in Tungsten.castle.RiscOS.Sources.Lib.RISC_OSLib.rlib and Edit has successfully compiled. |
Jeffrey Lee (213) 6048 posts |
Did you run into any problems in particular? Disregarding that fact that !UnTarBz2 seems to be slightly broken (for me it keeps placing random files/folders in wrong places or fails to apply filetypes properly), after downloading the archive you’d normally need to follow the following steps:
Before doing any build of any kind (even if you’re using the numerous ’!Mk’, ’!MkSA’, etc. scripts which come with each component), you need to make sure that your main C/C++ tools haven’t been seen and that you’ve launched Builder and selected the appropriate build directory & environment. This will make sure everything is set up properly for the build (e.g. the path to the exported headers is set up, the compiler is using the right compiler flags, etc.). You might find that things work if you don’t follow these steps to the letter (e.g. if you’re compiling with your main C/C++ tools instead of allowing !Builder to set everything up), but don’t be surprised if one day you find that something is broken :) (Most of the above information is probably on the wiki somewhere, but the fact that people keep coming to the forums with problems – and that I can never find a page which succinctly explains everything – suggests that the docs on the wiki could probably do with a few improvements making) |
GavinWraith (26) 1563 posts |
Thanks for this info. It was a while ago that I tried the build system; I think it was Perl that was misbehaving, despite my efforts to hide the version I already had. I will try again and let you know. Actually what I was/am trying to do is a little bit orthogonal to the build system. I want to embed Lua into Edit, so that when a file of type &18c or with a first line beginning ”#! lua” is dragged into an Edit window, the text of the dragged window, instead of being appended to that of the target window, is interpreted as a function from strings to strings which is then applied to the text of the target window. I rather fear that I may have to look at the source of RISC_OSLib rather than Edit to modify the handler for DATALOADs for txtwin objects. It is part of an exercise to make apps more scriptable. |
Trevor Johnson (329) 1645 posts |
In the interim, I’ve linked to those 10 steps from the Build FAQ Most of it should be in How to build RISC OS but I expect some of the finer points are missing. |
Trevor Johnson (329) 1645 posts |
|_\2<^. Building RISC OS| |<^{width:15em}. [[Technical notes]]|<^. Technical information on building and porting RISC OS|
|
Trevor Johnson (329) 1645 posts |
|
Steve Revill (20) 1361 posts |
Here are some relevant pages from the wiki: |
Jeffrey Lee (213) 6048 posts |
And here’s my good deed for the day: A first draft of a page describing Builder. I’ll probably tweak it some more tomorrow (e.g. it could probably do with linking to better explanations of products files/components files/environment files). Suggestions/feedback welcome! |
Peter van der Vos (95) 115 posts |
As a first time builder, the confusing part for me was the merging of the directories. I have figured it out now. Maybe an example would help. Goto the RISC OS Open site : http://www.riscosopen.org/content/downloads/other-zipfiles Download the UnTarBZ2 From “Source code archives” download the OMAP tar file (16 MB) Create a directory ’$.Work’ and extract the tar file to this directory. In Work you wil have the directories Autobuild, castle, mixed, OMAP3DEV, RiscOS and Utilities. Please correct me if I am wrong: From the castle and mixed directories, copy the RiscOS directories to the RiscOS directory in ‘Work’ so the get merged. Open de OMAP3Dev directory. Here you find bsd, castle, gpl, mixed and Products. The first 4 directories also contains RiscOS directories. Merge them with the one in Work. Now you are ready to use the Builder application which can be found in the merged RiscOS directory in Apps. |
Jeffrey Lee (213) 6048 posts |
One of the problems at the moment is that the version of tar supplied with UnTarBZ2 doesn’t extract the archives properly, so you’ll end up with a set of folders that are a bit trickier to merge than they should be. So taking into account the broken version of tar, the correct way of merging the folders would be as follows:
Now you should have everything merged together and you’re ready to run !Builder from $.Work.RiscOS.Apps. Also be aware that another problem with the broken version of tar is that some files might have had random characters added to their name when they were extracted. Apart from being named wrong, this would have also prevented their filetype from being set correctly. E.g. when I extracted a copy of the Tungsten sources I had a text file called !Sprites,ff9000640. So the way to fix any files like that is to remove the whole ,xxx extension and set the filetype appropriately (the correct filetype will be given by the first three characters of the ,xxx extension). Of course you can avoid most of the above problems by extracting the files on a PC and copying them to your RO machine over the network (assuming your fileserver software supports the ,xxx method used to encode the filetypes; I think most of them do). Just be sure to run EraseCVS to clean up the CVS folders after you’ve merged everything together (UnTarBZ2 runs EraseCVS automatically, so there’s no need to run it if you’ve used that). |
Peter van der Vos (95) 115 posts |
Extracting the files using OmniClient over NFS works, but it takes a long time. There was one file in …Dekstop.Wimp.TestO with strange characters (arrows) in the filename which couldn’t be copied but I don’t think it matters. |
Peter van der Vos (95) 115 posts |
OK, fixed tar. UnTarBZ2 now extracts to a single directory. It wasn’t really tar’s fault. The record in the archive is too small to hold a filename more than 100 characters. |