On Wed, Sep 14, 2011 at 10:11 AM, Oliver Sims < oliver.s...@simsassociates.co.uk> wrote:
> Thanks, Mark, the Visual C++ Express solution worked a treat. > If anyone else is looking to using VC++ Express to compile resource DLLs, > I'd suggest you use the "Visual Studio Command Prompt" that gets installed. > That's because after trying various things, I gave up on getting the > required stuff into my own Path. > There are a number of environment variables that also need to get set, besides just the PATH changes. The "Visual Studio Command Prompt" sets all that stuff for you when you start it. And probably is the easist solution when you first start. >From that command prompt you can also build ooRexx. 1.) Be sure you have the complete build tree from svn, this is the URL: https://oorexx.svn.sourceforge.net/svnroot/oorexx/main/trunk so what I do is: svn co https://oorexx.svn.sourceforge.net/svnroot/oorexx/main/trunk main which puts the build tree in the main directory. I think you man already have that Oliver. If not, check it out in a directory to fool with. 2.) From the Visual Studio command prompt, cd to main, where ever it is on your file system. In main should be the file: makeorx.bat If you just type makeorx.bat it will give you some hints on what you need to set. C:\work\wc\main>makeorx *============================================================== One of the environment variables SRC_DRV or SRC_DIR is not set Set the SRC_DRV variable to the build directory drive letter Set the SRC_DIR variable to the full build directory path e.g. "SET SRC_DRV=F:" "SET SRC_DIR=\oorexx\interpreter_3x" *====================================================== C:\work\wc\main So, using my directory structure as an example, from the Visual Studio command prompt, the steps would be: C:\>C: C:\>cd \work\wc\main C:\work\wc\main>set SRC_DRV=C: C:\work\wc\main>set SRC_DIR=\work\wc\main C:\work\wc\main>makeorx Syntax: makeorx BUILD_TYPE [PACKAGE] [DOC_LOCATION] Where BUILD_TYPE is required and exactly one of DEBUG NODEBUG BOTH ... >From that you see you also need to add the first arg, which could be DEBUG or NODEBUG. C:\work\wc\main>makeorx DEBUG rxapi.exe (process ID: 2808) killed successfully Building Rexxapi..Building OREXXOLE.. Building Rexxutil.. Building rexximage command launcher Building rexx command launcher Building rexxhide command launcher Building rexxpaws command launcher Building rexxc command launcher Building REXX.IMG ... Building RXSUBCOM and RXQUEUE.. Building rxwinsys.dll Building RxSock.. Building RxMath.. Building RXREGEXP... Building HOSTEMU.. Building miscellaneous extensions Building OODIALOG.. >From the above and if you read the file: windows-build.txt in the same directory as makeorx.bat, you should be able to build and create your own ooRexx installation package. It's an interesting exercise when you have some time. At some point you are likely to want to build your own package. -- Mark Miesfeld ------------------------------ > *From:* Mark Miesfeld [mailto:miesf...@gmail.com] > *Sent:* 12 September 2011 14:21 > > *To:* Open Object Rexx Users > *Subject:* Re: [Oorexx-users] FW: ooDialog - Problem with Dialog Icon > inaResDialog. > > Sending my reply to the list also in case anyone is interested. > > Hi Oliver, > > The problem seems to be with resEdit.exe. When I compile the .rc file into > a .dll using Microsoft's tools, things work just fine. > > To compile a .rc file into a .dll file, you need both rc.exe and link.exe. > While rc.exe is included in the Windows SDKs, most of them don't include > link.exe. > > You'd be better off getting the free Visual C++ express. It contains all > the command line tools to both compile a resource-only dll and to compile > any C/C++ program. You can compile the ooRexx package using Visual C++ > express. Download the also free NSIS package and you can build your own > ooRexx installation package on Windows without any problem. > > One reason for compiling your own ooRexx is that the changes we are > committing to ooDialog go into main. Then I have to merge those changes > into switchOODialog before you can access them. If you build your own > ooRexx, you can get the latest changes as soon as they are committed. > > You do not need to know any C or C++ to build a distribution. Once you get > the free tools, building the Windows installation package is as simple as > typing "makeorx.bat" on the command line. If you go that route and have any > problems just ask a few questions. It is not that hard to install Visual > C++ Express, but if you do have a problem a few questions will quickly get > you straightened out. > > Do a google search of: Visual C++ Express and it will take you to the > download of Visual C++ Express. > > Here is a Rexx program I use to compile resource-only DLLs: > > -- Compile a resource script file to a resource only DLL (a binary > resource.) > -- Assumes, the Microsoft tools are in the path. > -- First arg is the resource script file name, without the extension. The > -- second arg is optional and can be used to rename the output DLL file. > use arg cmdLine > if arg(1, 'O') then return doHelp() > parse var cmdLine inFile outFile . > if outFile == "" then outFile = inFile > inFile = inFile'.rc' > if \ haveTools() then return doHelp() > 'rc -r -fo'outFile'.res' inFile > 'link' outFile'.res /NOENTRY /DLL /MACHINE:X86 /OUT:'outFile'.dll' > return 0 > -- Simplistic check for rc.exe to see if the tools are accessible. > ::routine haveTools > 'rc /? > nul 2>&1' > rcRet = RC > if rcRet <> 0 then do > say "rx.exe or link.exe (or both) do not appear to be in the path." > return .false > end > return .true > ::routine doHelp > say > say "makeDLL: compile a resource only DLL using Microsoft's tools." > say 'rc.exe and link.exe must be in the path.' > say > say 'Syntax: makeDll rcFile [outFile]' > say 'where rcFile is the input file, leave off the .rc extension.' > say 'outFile is optional, used to rename the output file.' > say > say 'Examples:' > say 'makeDll OpenWatcom' > say ' Compiles OpenWatcom.rc producing OpenWatcom.dll.' > say > say 'makeDll OpenWatcom OpenWatcomMS' > say ' Compiles OpenWatcom.rc producing OpenWatcomMS.dll.' > return 0 > > On Wed, Sep 7, 2011 at 4:46 PM, Oliver Sims < > oliver.s...@simsassociates.co.uk> wrote: > >> ** >> Mark, please find the files attached. >> >> I wondered if it was a ResEdit problem. >> >> Do you happen to know off-hand whether the free MS development kit can >> compile .rc files into DLLs? >> If so, maybe it would be better to use that. ResEdit does seem to compile >> the DLLs very quietly! >> >> Many thanks, >> >> Oliver >> >> PS - the value for IDI_ICON1 is 101. >> >> PPS - This problem is a long way from being on the critical path, so no >> huge rush. But it's annoying... >> >> >> ------------------------------ >> *From:* Mark Miesfeld [mailto:miesf...@gmail.com] >> *Sent:* 07 September 2011 18:45 >> >> *To:* Open Object Rexx Users >> *Subject:* Re: [Oorexx-users] ooDialog - Problem with Dialog Icon in >> aResDialog. >> >> Hi Oliver, >> >> On Wed, Sep 7, 2011 at 10:59 AM, Oliver Sims < >> oliver.s...@simsassociates.co.uk> wrote: >> >>> Further to my last: I'm using ooDialog 4.2.0 7120 (which I'm almost sure >>> is >>> the latest download - although the download file says it's build 7123). >>> >>> I did some further investigation with the simplest program possible (and >>> with the default ResEdit dialog but with an icon resource added): >>> >>> ================================================ >>> /* Test a Dialog Icon with an RcDialog */ >>> >>> .Application~setDefaults("O", "myDlg.h", .false) >>> dlg = .MyDlg~new("myDlg.rc", "IDD_DIALOG1") >>> dlg~execute("SHOWTOP", "IDI_ICON1") >>> >>> ::requires ooDialog.cls >>> >>> ::class myDlg subclass RcDialog >>> ================================================ >>> >>> This worked fine. My dialog icon was there at the top left of the dialog. >>> >>> Then I compiled a resource DLL (using ResEdit) from the .rc file used >>> with >>> the above, and ran the same program but as a ResDialog: >>> >>> ================================================ >>> /* Test a Dialog Icon with a ResDialog */ >>> .Application~setDefaults("O", "myDlg.h", .false) >>> dlg = .MyDlg~new("myDlg.dll", "IDD_DIALOG1") >>> dlg~execute("SHOWTOP", "IDI_ICON1") >>> >>> ::requires ooDialog.cls >>> >>> ::class myDlg subclass ResDialog >>> ================================================ >>> >>> My dialog icon did not appear - I got the default dialog icon. >>> >>> Any thoughts? >>> >> >> You must be doing something wrong. <grin> >> >> Seriously though, the only thing I can think of is the value of >> IDI_ICON1. Is it less than 16? (Although if it is, it shouldn't have >> worked in the RcDialog.) >> >> You'll need to send me all the files, .rc, .h, etc., so I can take a look >> at them One suspicion is that resEdit is not correctly compiling the .dll >> file. >> >> Send the files to my gmail account. Probably won't be able to reply until >> next week. >> >> -- >> Mark Miesfeld >> >> > > > ------------------------------------------------------------------------------ > BlackBerry® DevCon Americas, Oct. 18-20, San Francisco, CA > Learn about the latest advances in developing for the > BlackBerry® mobile platform with sessions, labs & more. > See new tools and technologies. Register for BlackBerry® DevCon today! > http://p.sf.net/sfu/rim-devcon-copy1 > _______________________________________________ > Oorexx-users mailing list > Oorexx-users@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/oorexx-users > >
------------------------------------------------------------------------------ BlackBerry® DevCon Americas, Oct. 18-20, San Francisco, CA Learn about the latest advances in developing for the BlackBerry® mobile platform with sessions, labs & more. See new tools and technologies. Register for BlackBerry® DevCon today! http://p.sf.net/sfu/rim-devcon-copy1
_______________________________________________ Oorexx-users mailing list Oorexx-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/oorexx-users