|
57 | 57 | # Remove 'v' prefix if present |
58 | 58 | MAJOR=${MAJOR#v} |
59 | 59 |
|
60 | | - # Create resource file (works on Linux too with FPC) |
| 60 | + # Create resource file |
61 | 61 | cat > filefind.rc << EOF |
62 | 62 | #define VER_FILEVERSION $MAJOR,$MINOR,$PATCH,$BUILD |
63 | 63 | #define VER_PRODUCTVERSION $MAJOR,$MINOR,$PATCH,$BUILD |
@@ -94,19 +94,15 @@ jobs: |
94 | 94 | END |
95 | 95 | EOF |
96 | 96 |
|
97 | | - # Install windres for compiling resources on Linux |
| 97 | + # Try to compile resource file, but build without if it fails |
| 98 | + echo "Attempting to compile resources..." |
98 | 99 | sudo apt-get install -y binutils-mingw-w64 |
99 | 100 |
|
100 | | - # Compile resource file if windres is available, otherwise build without resources |
101 | | - if command -v x86_64-w64-mingw32-windres >/dev/null 2>&1; then |
102 | | - x86_64-w64-mingw32-windres filefind.rc filefind.res 2>/dev/null || echo "windres failed, building without resources" |
103 | | - if [ -f filefind.res ]; then |
104 | | - fpc -O2 -Xs -XX -CX -WR filefind.res filefind.lpr |
105 | | - else |
106 | | - fpc -O2 -Xs -XX -CX filefind.lpr |
107 | | - fi |
| 101 | + if x86_64-w64-mingw32-windres filefind.rc filefind.res 2>/dev/null && [ -f filefind.res ]; then |
| 102 | + echo "Resources compiled successfully, building with version info" |
| 103 | + fpc -O2 -Xs -XX -CX -WR filefind.res filefind.lpr |
108 | 104 | else |
109 | | - echo "windres not available, building without resources" |
| 105 | + echo "Resource compilation failed, building without version info" |
110 | 106 | fpc -O2 -Xs -XX -CX filefind.lpr |
111 | 107 | fi |
112 | 108 |
|
|
0 commit comments