' Rapid-Q by William Yu (c)1999-2000 . ' ================================================================================ ' Upload_il_tuo_script_su_Rapidq.it ' relative_paths_in_rapidq ****** Overriding path issues ****** One of the most boring things, when you download a source code, is loosing time changing the paths for resources. When you compile your programs, instead, you have to put your source code in the same folder of the ocmpiler. Is it the only way ? No. ****** Step 1 - Files and folders ****** First, we have to give a "structure". Generally, you the following files in the "RapidQ" folder: * RC.EXE * RAPIDQCC.LIB * RAPIDQ32.LIB * RAPIDQ2.LIB * RAPIDQ3.LIB * RAPIDQ4.LIB * RAPIDQ2C.LIB * RAPIDQ3C.LIB * RAPIDQ4C.LIB * RAPIDQ.INC * WIN32API.INC If you have not RapidQx.lib and RapidQxC.lib files is because they are not really necessary. Think about them as "splits" of the main Rapidq32 & RapidQCC. Ok now you have to make a subfolder for inc files and one for Lib files. So now you have something like C:\RapidQ\Lib and C:\RapidQ\Inc Move the lib files in the "Lib" folder (... and the inc files in the "Inc") folder. ****** Step 2 - The many ways to run the program ****** To call the compiler from anywhere, you have to run it as: "C:\RapidQ\rc.exe" -L"C:/RapidQ/Lib" - I"C:/RapidQ/Inc" This is the general form. Of course you have to substitute paths with your own ones. There are some things to keep in mind. * Better if you pass complete paths * Always quote paths (enclose them in " and ") * Leave no blank space between -L and the quote * Leave no blank space between -I and the quote * Better if you use slash ( / ) in paths * For the compiler path, instead, use backslash ( \ ) * ALWAYS set working dir to source code dir * File name path must be absolute. You can use these "rules" to make a batch file, compiling your program. Or, if you like, Make a link and put that info inside the lnk file (always set up source code folder as working folder). You can even integrate the general command line with your code editor. If you use Context ----------------------------------------- - Open Options >> Environment Options - In the "execute" edit put "rc.exe" - in the "Start in" field put the path of rc.exe - For "Parameters" put %n -L"./__lib" -I"./__inc" where __lib and __inc are the directories where you put lib and inc files. - If you want to put your compiled programs in a specific folder Parameters should be %n \%F.exe -L"./__lib" -I"./__inc" If you use JFE ----------------------------------------- - Application -> RC.EXE - Start directory -> the directory where rc.exe is - Parameters -> $PATH\$FILE -L"./__lib" -I"./__inc" where __lib and __inc are the directories where you put lib and inc files. - If you want to put your compiled programs in a specific folder parameters should be $PATH\$FILE \$NAME.exe -L"./__lib" -I"./__inc" ****** And now ? ****** Now you should be able to compile your source code anywhere the files are. But not only * You can put all extended components (generally distributed as "inc" files) in the inc folder, so that they are always available (like QVideo, QListviewEx,...) * You can use relative paths in your source code (and you can compile programs with relative paths) * You can have each project in a separate folder. ' =============================================================================== ' 2003 Holyguard.net - 2007_Abruzzoweb