Commit Graph

83 Commits

Author SHA1 Message Date
florian
971d7baa8a * patch by Cyrax: Quote path - which is passed to Windres or alike program, resolves #36526 2022-04-08 22:42:05 +02:00
svenbarth
f3541984ee * make sure that the resource compiler related globals are reset
git-svn-id: trunk@46399 -
2020-08-12 19:08:31 +00:00
svenbarth
b88d12c7b9 + add option -FF to force the use of fpcres as RC compiler
Note: if we merge this to 3.2.x then we can switch to this by default once 3.2.2 is released

git-svn-id: trunk@46398 -
2020-08-12 19:08:25 +00:00
Jonas Maebe
e7d1a77f9a * rename the ARM/AArch64-Darwin targets to ARM/AArch64-iOS
* rename the m68k/PowerPC-MacOS targets to m68k/PowerPC-MacOSClassic
  * repurpose the AArch64/Darwin target for AArch64/macOS
   o make AArch64-Darwin default target for a hosted AArch64-Darwin compiler

git-svn-id: trunk@45758 -
2020-07-10 21:52:24 +00:00
Károly Balogh
e6aed467b5 renamed script unit to cscript to avoid namespace conflict with univint package on Darwin. this makes it possible to build the textmode IDE on Darwin
git-svn-id: trunk@37598 -
2017-11-17 11:27:19 +00:00
Jonas Maebe
7bc66a5142 + ELF/ppc64le resource support
git-svn-id: trunk@30218 -
2015-03-14 18:36:32 +00:00
Jonas Maebe
6b9b575b74 * choose between arm (little endian) and armeb for fpcres based on the
target_info rather than based on the source_info

git-svn-id: trunk@30217 -
2015-03-14 18:36:29 +00:00
Jonas Maebe
00ea5e1636 * made maybequoted_for_script() public
* added script_fpcres identifier
  * always quote file names for fpcres using double quotes, as it doesn't
    support single quotes (mantis #26866)

git-svn-id: trunk@28881 -
2014-10-19 16:34:43 +00:00
Jonas Maebe
14cfe770a4 * replaced most (if not all) remaining fields/parameters in the compiler
that deal with paths/filenames with TPathStr (= ansistring) to prevent
    cutting off long paths (no change in speed when compiling the compiler,
    1% extra memory usage)

git-svn-id: trunk@21120 -
2012-04-29 17:36:23 +00:00
Jonas Maebe
02413c8a57 * moved maybequoted() from cutils to cfileutl and let its behaviour vary
based on the actual target platform rather than always on the host
    platform
  * on Unix, use single rather than double quotes for quoting, so it also
    properly handles $, ! and `, which keep their special meaning when
    appearing in scripts inside double quotes
  * since sysutils.executeprocess() can only deal with double-quoted
    strings in parameters, re-quote parameters on Unix when they turn
    out not to be for scripts but for direct execution (which is most
    of the time, but unfortunately doing the reverse is not possible
    because parameters used in scripts sometimes contain script-specific
    code that must not be quoted, such as `cat link.res`)
   -> always use cfileutl.RequotedExecuteProcess() rather than
    sysutils.ExecuteProcess() in the compiler (added a bunch of dummy
    ExecuteProcess string constants to common units to prevent accidental
    usage)

git-svn-id: branches/jvmbackend@20901 -
2012-04-16 19:52:36 +00:00
Jonas Maebe
f6ddabde85 + "raw" resource support for the JVM target. The "raw" means that no
resource compilation happens and that the standard FPC resource
    helpers are not available. What happens is that all files specified
    in {$r xxx} statements are packed together into an <appname>.jar
    file, under the namespace "org.freepascal.rawresources". They
    can be loaded using the java.lang.Class.getResource/getResourceAsStream()
    api

git-svn-id: branches/jvmbackend@18776 -
2011-08-20 08:34:57 +00:00
Jonas Maebe
ec8c7b4888 + when compiling for Darwin/ARM, pass the subarchitecture to the linker.
The old linker option to accept object files from all subarchitecture
    types no longer works.
  + support for subarchitectures in fcl-res/fpcres

git-svn-id: trunk@18070 -
2011-08-02 20:41:39 +00:00
florian
0c62133d38 * patch by Mattias Gaertner to allow to override how the compiler reads source/ppu files, resolves #18740
git-svn-id: trunk@17255 -
2011-04-05 20:10:09 +00:00
paul
3cd29858ba compiler, utils: pass tlb resources to fpcres
git-svn-id: trunk@15002 -
2010-03-11 03:01:24 +00:00
giulio2
dc4769adf3 Patch from Paul and Dmitry: properly quote resource list file parameter for fpcres
(fixes resource compilation when spaces are in the path)

git-svn-id: trunk@14824 -
2010-01-29 12:19:05 +00:00
Vincent Snijders
d3fdf8b17f * fixed calling windres: don't create short names with forward slashes for output file name, becaause it fails, if the output file does not yet exist. Short names are only required for parameters that windres pass on to the preprocessor.
git-svn-id: trunk@12549 -
2009-01-15 22:35:17 +00:00
Vincent Snijders
a3fcf74c4d * pass parameters to windres using short path names and forward slashes (issue #12645)
git-svn-id: trunk@12545 -
2009-01-13 19:50:02 +00:00
yury
69d1b4813c * Fixed .res resources handling when -o switch is used to specify executable full path and name in the same folder where .res files are located. Mantis #12856.
git-svn-id: trunk@12437 -
2008-12-25 10:14:34 +00:00
yury
ba081ab36f * Improved finding of resource compiler during cross-compilation.
git-svn-id: trunk@10745 -
2008-04-21 11:13:13 +00:00
michael
e9b3f7feb9 Merged revisions 10507-10509 via svnmerge from
svn+ssh://svn.freepascal.org/FPC/svn/fpc/branches/resources

........
  r10507 | giulio | 2008-03-19 11:13:54 +0100 (Wed, 19 Mar 2008) | 2 lines
  
  properly handle resource files with spaces in their path
........
  r10509 | giulio | 2008-03-20 13:07:31 +0100 (Thu, 20 Mar 2008) | 2 lines
  
  * Strip off path from resource file name when resource file is copied to output directory (fixes #11022)
........

git-svn-id: trunk@10516 -
2008-03-20 19:59:18 +00:00
michael
174de3eab1 Merged revisions 9693-10480 via svnmerge from
svn+ssh://svn.freepascal.org/FPC/svn/fpc/branches/resources

........
  r9694 | michael | 2008-01-09 21:31:18 +0100 (Wed, 09 Jan 2008) | 1 line
  
  * Initial check-in
........
  r9695 | michael | 2008-01-09 21:35:58 +0100 (Wed, 09 Jan 2008) | 1 line
  
  * New version from Giulio Bernardi
........
  r9697 | michael | 2008-01-09 21:41:54 +0100 (Wed, 09 Jan 2008) | 1 line
  
  * Patch from Giulio Bernardi with resource support
........
  r9698 | michael | 2008-01-09 21:46:33 +0100 (Wed, 09 Jan 2008) | 1 line
  
  * Patch from Giulio Bernardi to add more resource testing
........
  r9699 | michael | 2008-01-09 21:57:26 +0100 (Wed, 09 Jan 2008) | 1 line
  
  * New tool from Giulio Bernardi
........
  r9700 | michael | 2008-01-09 21:58:23 +0100 (Wed, 09 Jan 2008) | 1 line
  
  * New tool from Giulio Bernardi
........
  r9701 | michael | 2008-01-09 22:01:54 +0100 (Wed, 09 Jan 2008) | 1 line
  
  * Added fcl-res
........
  r9702 | michael | 2008-01-09 22:01:58 +0100 (Wed, 09 Jan 2008) | 1 line
  
  * Added fcl-res
........
  r9703 | michael | 2008-01-10 08:54:26 +0100 (Thu, 10 Jan 2008) | 1 line
  
  * Fixed double code
........
  r9704 | jonas | 2008-01-10 10:59:20 +0100 (Thu, 10 Jan 2008) | 2 lines
  
    - removed duplicate code
........
  r9705 | jonas | 2008-01-10 11:25:21 +0100 (Thu, 10 Jan 2008) | 2 lines
  
    + added missing fcl-res dependencies
........
  r9706 | jonas | 2008-01-10 11:58:30 +0100 (Thu, 10 Jan 2008) | 2 lines
  
    + dependencies for fpintres and fpextres
........
  r9707 | yury | 2008-01-10 12:47:51 +0100 (Thu, 10 Jan 2008) | 3 lines
  
  * Fixed compilation of resource, which is included in a unit located in different folder than main source.
  * .res files must be copied to units output folder, otherwise .res files will not be found when only compiled units path is available and compiler does not know anything about sources folder.
  * Improved resource related error messages.
........
  r9708 | michael | 2008-01-10 12:52:13 +0100 (Thu, 10 Jan 2008) | 1 line
  
  * Removed double source after end.
........
  r9709 | michael | 2008-01-10 12:52:48 +0100 (Thu, 10 Jan 2008) | 1 line
  
  * No longer needed
........
  r9710 | tom_at_work | 2008-01-10 22:09:08 +0100 (Thu, 10 Jan 2008) | 1 line
  
  * properly align FPC_RESLOCATION so that linking does not fail on some architectures (e.g. ppc64)
........
  r9711 | tom_at_work | 2008-01-10 23:53:12 +0100 (Thu, 10 Jan 2008) | 1 line
  
  * fix splitting of 64 bit load/stores from/to unaligned memory locations into multiple load/stores, which in some cases generated wrong code
........
  r9712 | michael | 2008-01-11 11:00:08 +0100 (Fri, 11 Jan 2008) | 1 line
  
  * Fixed bug in BSS section on 64-bit platforms
........
  r9720 | giulio | 2008-01-12 10:02:04 +0100 (Sat, 12 Jan 2008) | 1 line
  
  Updated fcl-res documentation: occurrences of reslib changed to fcl-res.
........
  r9740 | giulio | 2008-01-13 19:36:44 +0100 (Sun, 13 Jan 2008) | 3 lines
  
   - Don't try to compile resources on systems with a non windows-like resource support.
   - Don't add the .or file to the list of object files if resource compiling failed.
........
  r10201 | giulio | 2008-02-04 11:35:44 +0100 (Mon, 04 Feb 2008) | 5 lines
  
  * resource compiling supported on OS/2 via wrc
  * CompileResourceFiles and CollectResourceFiles don't do target-specific checks anymore
  * refactored a bit
........
  r10389 | giulio | 2008-02-25 21:32:52 +0100 (Mon, 25 Feb 2008) | 2 lines
  
  Deleted test file which was committed by mistake
........
  r10472 | giulio | 2008-03-10 12:22:18 +0100 (Mon, 10 Mar 2008) | 2 lines
  
  changed define FPC_HAS_RESOURCES to FPC_HAS_WINLIKERESOURCES
........

git-svn-id: trunk@10481 -
2008-03-12 21:33:48 +00:00
Vincent Snijders
bc7e54c3f0 * search preprocessor binary and add it as command line parameter for windres, so that the cpp doesn't need to be on the path
git-svn-id: trunk@8670 -
2007-09-28 19:53:19 +00:00
yury
1159ee9744 * Small improvement to previous commit.
git-svn-id: trunk@8325 -
2007-08-28 21:06:15 +00:00
yury
614dbe6a8c * Fixed inclusion of multiple resource files with icons or cursors. Patch by Sergei Gorelkin modified by me to reduce memory usage. Bug #9459.
git-svn-id: trunk@8324 -
2007-08-28 20:54:32 +00:00
michael
bedf0151cc * Implemented support for custom RC compiler and .RES linker
git-svn-id: trunk@8164 -
2007-07-25 12:06:57 +00:00
yury
11b56e2cc8 * Fixed previous commit: loop through all resources in .res file.
git-svn-id: trunk@7827 -
2007-06-26 18:08:06 +00:00
yury
ca81009e5e * Properly handle .res files, which are not fully correct.
* Better error handling while working with resource files.
* Compile .rc files included in the main module before collecting all resources.

git-svn-id: trunk@7825 -
2007-06-26 17:41:24 +00:00
daniel
9adb202a92 * Rework the constexprint to allow operations from low(int64) to high(qword).
+ Some initial work on a formaldef which also carries the typinfo of a parameter.

git-svn-id: trunk@7639 -
2007-06-13 07:41:18 +00:00
yury
eac1c293e4 * fixed "EInOutError : File not found" exception if .rc file not found.
git-svn-id: trunk@7624 -
2007-06-10 13:04:56 +00:00
yury
2b84a4643a * Fixed bug #6501: multiple resource files are correctly linked to executable.
It is done in the following way:

When unit is compiled, .rc file are compiled to .res and list of unit's resource files is stored in .ppu
Before final linking all program's .res files are collected into global .res file (.res files are easily concatenated). 
Then this global .res files is compiled to single .or file, which is linked to executable. 
As a result global resource index is created and the problem is fixed.

Old resource processing behavior still supported when tresinfo.rcbin is not set for target.
New resource processing is activated for windows and linux. Cross compiled windres can be used to compile .rc files on linux.

git-svn-id: trunk@7515 -
2007-05-29 15:51:02 +00:00
peter
a58797f989 * use linkunitofiles instead of linkotherofiles to prevent path from being stored in ppu
git-svn-id: trunk@7490 -
2007-05-27 15:27:08 +00:00
Vincent Snijders
e18966c372 * write resource object file to unit output directory
git-svn-id: trunk@7276 -
2007-05-05 19:04:43 +00:00
florian
c2db154121 * forgotten commit
git-svn-id: trunk@6565 -
2007-02-19 19:42:22 +00:00
florian
4ceadcbc6e + infrastructure for target specific resourcefile classes
git-svn-id: trunk@6564 -
2007-02-19 19:02:21 +00:00
tom_at_work
106fe68ce6 * renamed TStringList to TCmdStrList, in general use TCmdStr instead of shortstrings to fix bug #6351
git-svn-id: trunk@6215 -
2007-01-26 22:29:39 +00:00
peter
7a2e0da7bd * extra parameter for file searching functions
that indicate if the cache shall be used or not
  * fixed compile of non-x86 targets

git-svn-id: trunk@5115 -
2006-10-31 10:56:58 +00:00
peter
cb246eb781 * Remove dos,strings units, use SysUtils instead
* replace split* functions with Extract* functions
  * Add Directory caching

git-svn-id: trunk@5102 -
2006-10-30 23:29:35 +00:00
florian
85d63d9fa9 * settings refactored
git-svn-id: trunk@5094 -
2006-10-30 18:02:58 +00:00
Tomas Hajny
a62c1faa2d + output is flushed before launching external utilities
git-svn-id: trunk@3539 -
2006-05-15 00:28:55 +00:00
peter
d69ad5d84d * cleanup external/nolink options
git-svn-id: trunk@3375 -
2006-04-29 21:49:37 +00:00
Jonas Maebe
f8ecc6d359 * link_allways -> link_always (forgot to commit as well :)
git-svn-id: trunk@2598 -
2006-02-15 16:51:05 +00:00
florian
46097d7679 + wince resource compiler support
* fixed some resource compiler stuff

git-svn-id: trunk@1056 -
2005-09-06 20:28:03 +00:00
michael
3392189fb0 + Implemented resources for ELF
git-svn-id: trunk@956 -
2005-08-28 09:35:35 +00:00
florian
469f2d1020 * windres isn't called anymore with an empty include parameter, fixes 4205
* -vd prints windres command line

git-svn-id: trunk@781 -
2005-08-02 21:05:36 +00:00
fpc
790a4fe2d3 * log and id tags removed
git-svn-id: trunk@42 -
2005-05-21 09:42:41 +00:00
fpc
50778076c3 initial import
git-svn-id: trunk@1 -
2005-05-16 18:37:41 +00:00
peter
baa6032362 * maybequoted for windres args 2005-03-04 16:49:14 +00:00
peter
e417e34496 * truncate log 2005-02-14 17:13:06 +00:00
olle
f5f6d7bf36 + Mac style resource files can now be included in MacOS 2005-01-24 18:10:20 +00:00
mazen
e90d8a42e3 * USE_SYSUTILS merged successfully : cycles with and without defines
* Need to be optimized in performance
2004-10-14 18:16:17 +00:00