Hey Savage check your PM's I sent you the solution for auto-magically installing to FPC
For those interested, here is an exact copy of the PM I sent him:
Well, I found what your looking for.
The fpc.cfg found in the C:\FPC\2.0.4\bin\i386 is NOT what you want. What you are looking for, is the fp.cfg. The other file, fpc.cfg, is really only an example file on how to edit the fp.cfg.
The file originally looks like this:
Code:
# Automaticly created file, don't edit.
#IFDEF NORMAL
-TWin32
-Sg
-Mfpc
-O1
-OG
-Op3
-Ratt
-FuC:\FPC\2.0.4\units\i386-Win32
-FuC:\FPC\2.0.4\units\i386-Win32\*
-FuC:\FPC\2.0.4\units\i386-Win32\rtl
-g-
-p-
-b-
#ENDIF
#IFDEF DEBUG
-TWin32
-Sg
-Mfpc
-Cr
-Ci
-Co
-OG
-Op3
-Ratt
-FuC:\FPC\2.0.4\units\i386-Win32
-FuC:\FPC\2.0.4\units\i386-Win32\*
-FuC:\FPC\2.0.4\units\i386-Win32\rtl
-g
-p-
-b-
#ENDIF
#IFDEF RELEASE
-TWin32
-Sg
-Mfpc
-O1
-O2
-OG
-Op3
-Ratt
-FuC:\FPC\2.0.4\units\i386-Win32
-FuC:\FPC\2.0.4\units\i386-Win32\*
-FuC:\FPC\2.0.4\units\i386-Win32\rtl
-g-
-p-
-b-
#ENDIF
But, as you can see, the ifdef's check the mode. So if you only want to use certain libs in certain modes, this is where you place them. When you are adding new items, you add them as seen below, but to change the type, change the switch before the directory. Example, for a unit, it is Fu.
For an Include (Inc) file, it is Fi, and for libraries and objects respectively, Fl and Fo. For an example, look below. The directories I added were:
//Units\\
C:\UNITS1
I:\MyUnits\UNITS2
//Inc Files\\
C:\INCLUDE FILES1
I:\INC FILES2
//Libs\\
C:\LIBRARIES
I:\Lib\LIBRARIES2
//Objects\\
C:\OBJECTS
I:\Obj\OBJECTS2
Code:
# Automaticly created file, don't edit.
#IFDEF NORMAL
-TWin32
-Sg
-Mfpc
-O1
-OG
-Op3
-Ratt
-FuC:\FPC\2.0.4\units\i386-Win32
-FuC:\FPC\2.0.4\units\i386-Win32\*
-FuC:\FPC\2.0.4\units\i386-Win32\rtl
-g-
-p-
-b-
#ENDIF
#IFDEF DEBUG
-TWin32
-Sg
-Mfpc
-Cr
-Ci
-Co
-OG
-Op3
-Ratt
-FuC:\FPC\2.0.4\units\i386-Win32
-FuC:\FPC\2.0.4\units\i386-Win32\*
-FuC:\FPC\2.0.4\units\i386-Win32\rtl
-FuC:\UNITS1
-FuI:\MyUnits\UNITS2
-FiC:\INCLUDE FILES1
-FiI:\INC FILES2
-FlC:\LIBRARIES
-FlI:\Lib\LIBRARIES2
-FoC:\OBJECTS
-FoI:\Obj\OBJECTS2
-g
-p-
-b-
#ENDIF
#IFDEF RELEASE
-TWin32
-Sg
-Mfpc
-O1
-O2
-OG
-Op3
-Ratt
-FuC:\FPC\2.0.4\units\i386-Win32
-FuC:\FPC\2.0.4\units\i386-Win32\*
-FuC:\FPC\2.0.4\units\i386-Win32\rtl
-g-
-p-
-b-
#ENDIF
Note that they are only in the Debug section, which is because of the compile mode, set in the fp.ini file located in the same directory, is normally set to Debug during production. If the mode is changed, the libraries are no longer accessible...
[code="fp.ini"]
[Compile]
CompileMode=DEBUG <----- I switched this to release, and I could no longer access the edits.
[Editor]
DefaultTabSize=8
DefaultFlags=20599
[/code]
Bookmarks