Skip to content

Commit 960117f

Browse files
committed
dev
1 parent c3abf60 commit 960117f

File tree

6 files changed

+54
-112
lines changed

6 files changed

+54
-112
lines changed

.github/workflows/build.yml

Lines changed: 46 additions & 85 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: build
1+
name: build
22

33
on:
44
push:
@@ -19,116 +19,77 @@ jobs:
1919
fail-fast: false
2020
matrix:
2121
config:
22-
# note: names must equal Simba build modes
23-
- name: Win64
24-
runs-on: windows-latest
25-
binary: Simba-Win64.exe
26-
test: Simba-Win64.exe
27-
28-
- name: Win64 DebugInfo
29-
runs-on: windows-latest
30-
binary: Simba-Win64-Debug.exe
31-
test: Simba-Win64-Debug.exe
22+
- name: Mac Custom
23+
runs-on: macos-15-intel
24+
build-mode: Mac
25+
binary: Simba-Mac.dmg
26+
url: https://github.com/LongDirtyAnimAlf/Reiniero-fpcup/releases/download/v2.4.0g/fpclazup-x86_64-darwin
3227

33-
- name: Win32
34-
runs-on: windows-latest
35-
binary: Simba-Win32.exe
36-
test: Simba-Win32.exe
28+
- name: Mac arm64
29+
runs-on: macos-26
30+
build-mode: Mac Arm
31+
binary: Simba-Mac-Arm.dmg
32+
url: https://github.com/LongDirtyAnimAlf/Reiniero-fpcup/releases/download/v2.4.0g/fpclazup-aarch64-darwin
3733

38-
- name: Linux
39-
runs-on: ubuntu-22.04
40-
binary: Simba-Linux64
41-
test: Simba-Linux64
42-
43-
- name: Linux Arm
44-
runs-on: ubuntu-22.04-arm
45-
binary: Simba-Linux
46-
#test: Simba-Linux MatchTemplateMask test fails, investigate later
47-
48-
- name: Mac Arm
49-
runs-on: macos-14
50-
binary: Simba-Mac-Arm.dmg
51-
#test: Simba MatchTemplateMask test fails, investigate later
52-
53-
# GitHub removing macos 13 causes this problem on newer runners:
54-
# "non-private labels cannot appear between .cfi_startproc / .cfi_endproc pairs"
55-
# Fixed in new FPC but that will never release... (sort of like this project xD)
56-
# Just comment out since x86 macos is quickly not existent in the year of 2025.
57-
# - name: Mac
58-
# runs-on: macos-13
59-
# binary: Simba-Mac.dmg
60-
6134
steps:
6235
- uses: actions/[email protected]
6336
with:
6437
submodules: true
6538

66-
- name: Install Lazarus (Mac Arm)
67-
if: matrix.config.name == 'Mac Arm'
68-
uses: ollydev/[email protected]
39+
- name: Restore
40+
id: restore-cache
41+
uses: actions/cache/restore@v4
6942
with:
70-
laz-url: https://sourceforge.net/projects/lazarus/files/Lazarus%20macOS%20aarch64/Lazarus%204.4/lazarus-darwin-aarch64-4.4.zip
71-
fpc-url: |
72-
https://sourceforge.net/projects/lazarus/files/Lazarus%20macOS%20aarch64/Lazarus%204.4/fpc-3.2.2.intelarm64-macosx.dmg
43+
path: ${{ runner.temp }}/fpclazup
44+
key: ${{ matrix.config.name }}
7345

74-
- name: Install Lazarus (Linux)
75-
if: matrix.config.name == 'Linux'
76-
uses: ollydev/[email protected]
77-
with:
78-
laz-url: https://sourceforge.net/projects/lazarus/files/Lazarus%20Linux%20amd64%20DEB/Lazarus%204.4/lazarus-project_4.4.0-0_amd64.deb
79-
fpc-url: |
80-
https://sourceforge.net/projects/lazarus/files/Lazarus%20Linux%20amd64%20DEB/Lazarus%204.4/fpc-laz_3.2.2-210709_amd64.deb
81-
https://sourceforge.net/projects/lazarus/files/Lazarus%20Linux%20amd64%20DEB/Lazarus%204.4/fpc-src_3.2.2-210709_amd64.deb
82-
83-
- name: Install Lazarus (Linux Arm)
84-
if: matrix.config.name == 'Linux Arm'
85-
uses: ollydev/[email protected]
86-
with:
87-
laz-url: https://sourceforge.net/projects/lazarus/files/Lazarus%20Linux%20arm64%20DEB/Lazarus%204.4/lazarus-project_4.4.0-0_arm64.deb
88-
fpc-url: |
89-
https://sourceforge.net/projects/lazarus/files/Lazarus%20Linux%20arm64%20DEB/Lazarus%204.4/fpc-laz_3.2.3-240813_arm64.deb
90-
https://sourceforge.net/projects/lazarus/files/Lazarus%20Linux%20arm64%20DEB/Lazarus%204.4/fpc-src_3.2.3-240813_arm64.deb
46+
- name: Install Lazarus
47+
working-directory: ${{ runner.temp }}
48+
if: steps.restore-cache.outputs.cache-hit != 'true'
49+
run: |
50+
curl --retry 5 -L -o installer ${{ matrix.config.url }}
51+
chmod +x installer
52+
./installer --lazOPT="-g -gl -gw2 -O1" --fpcOPT="-g -gl -gw2 -O1" --only=docker --lazVersion="stable.gitlab" --fpcVersion="trunk.gitlab" --installdir=fpclazup --noconfirm --verbose
9153
92-
- name: Install Lazarus (Win32)
93-
if: startsWith(matrix.config.name, 'Win32') == true
94-
uses: ollydev/[email protected]
95-
with:
96-
laz-url: https://sourceforge.net/projects/lazarus/files/Lazarus%20Windows%2032%20bits/Lazarus%204.4/lazarus-4.4-fpc-3.2.2-win32.exe
54+
#git clone https://gitlab.com/freepascal.org/fpc/source fpclazup/fpc
55+
# Use a known working trunk commit
56+
#git -C fpclazup/fpc checkout de30ac10d4f228c5d4915c49d48715063ea55787
57+
#./installer --lazOPT="-g -gl -gw -O1" --fpcOPT="-g -gl -gw -O1" --only=FPCBuildOnly,LazarusGetOnly,LazBuild,LazarusConfigOnly --lazVersion="stable.gitlab" --installdir=fpclazup --noconfirm --verbose
58+
59+
- name: Add custom to path
60+
run: |
61+
echo "${{ runner.temp }}/fpclazup/lazarus/" >> $GITHUB_PATH
9762
98-
- name: Install Lazarus (Win64)
99-
if: startsWith(matrix.config.name, 'Win64') == true
100-
uses: ollydev/[email protected]
63+
- name: Save Lazarus
64+
if: steps.restore-cache.outputs.cache-hit != 'true'
65+
uses: actions/cache/save@v4
10166
with:
102-
laz-url: https://sourceforge.net/projects/lazarus/files/Lazarus%20Windows%2064%20bits/Lazarus%204.4/lazarus-4.4-fpc-3.2.2-win64.exe
67+
path: ${{ runner.temp }}/fpclazup
68+
key: ${{ matrix.config.name }}
10369

10470
- name: Build Simba
10571
run: |
72+
echo "${{ matrix.config.build-mode }}"
10673
export GITHUB_SHORT_SHA=$(git rev-parse --short HEAD)
107-
lazbuild --build-mode="${{ matrix.config.name }}" "Source/Simba.lpi"
74+
lazbuild --build-mode="${{ matrix.config.build-mode }}" "Source/Simba.lpi"
75+
76+
- name: Debug
77+
if: always()
78+
uses: actions/upload-artifact@v4
79+
with:
80+
name: debug
81+
path: build/Mac Arm
10882

10983
- name: Create Mac Image
110-
if: startsWith(matrix.config.name, 'Mac') == true
11184
run: |
11285
brew install create-dmg
113-
11486
for i in {1..10};
11587
do
11688
create-dmg --window-size 500 330 --icon-size 48 --icon "Simba.app" 130 135 --app-drop-link 380 135 --background "Source/macosbundle/installer.tff" "${{ matrix.config.binary }}" "Simba.app" && break || sleep 15;
11789
done
11890
119-
- name: Test Simba
120-
if: matrix.config.test != ''
121-
run: |
122-
if [[ "${{ matrix.config.runs-on }}" == ubuntu* ]]; then
123-
export DISPLAY=:1
124-
Xvfb :1 & sleep 2
125-
fi
126-
127-
chmod +x ${{ matrix.config.test }}
128-
./${{ matrix.config.test }} --run "Tests/RunTests/tester.simba"
129-
13091
- name: Upload Simba Binary
13192
uses: actions/[email protected]
13293
with:
13394
name: ${{ matrix.config.name }}
134-
path: ${{ matrix.config.binary }}
95+
path: ${{ matrix.config.binary }}

Source/Simba.lpi

Lines changed: 3 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -27,11 +27,11 @@
2727
<Resource_6 FileName="..\Examples\image_drawtext.simba" Type="RCDATA" ResourceName="EXAMPLE_IMAGE_DRAW_TEXT"/>
2828
<Resource_7 FileName="..\Examples\cluster_points.simba" Type="RCDATA" ResourceName="EXAMPLE_CLUSTER_POINTS"/>
2929
<Resource_8 FileName="..\Examples\form.simba" Type="RCDATA" ResourceName="EXAMPLE_FORM"/>
30-
<Resource_9 FileName="..\Examples\form_dragablepanel.simba" Type="RCDATA" ResourceName="EXAMPLE_FORM_DRAGABLE_PANEL"/>
31-
<Resource_10 FileName="..\Examples\form_imagebox.simba" Type="RCDATA" ResourceName="EXAMPLE_FORM_IMAGEBOX"/>
30+
<Resource_9 FileName="..\Examples\form_dragablepanel.simba" Type="RCDATA" ResourceName="EXAMPLE_FORM_DRAGABLE_PANEL"/>
31+
<Resource_10 FileName="..\Examples\form_imagebox.simba" Type="RCDATA" ResourceName="EXAMPLE_FORM_IMAGEBOX"/>
3232
<Resource_11 FileName="..\Examples\irc.simba" Type="RCDATA" ResourceName="EXAMPLE_IRC"/>
3333
<Resource_12 FileName="..\Examples\asyncmouse.simba" Type="RCDATA" ResourceName="EXAMPLE_ASYNCMOUSE"/>
34-
<Resource_13 FileName="..\Examples\mouse_path.simba" Type="RCDATA" ResourceName="MOUSE_PATH"/>
34+
<Resource_13 FileName="..\Examples\mouse_path.simba" Type="RCDATA" ResourceName="MOUSE_PATH"/>
3535
<Resource_14 FileName="..\Examples\randomleft.simba" Type="RCDATA" ResourceName="EXAMPLE_RANDOM_LEFT"/>
3636
<Resource_15 FileName="..\Examples\method-property.simba" Type="RCDATA" ResourceName="EXAMPLE_METHOD_PROPERTY"/>
3737
<Resource_16 FileName="..\Examples\method-property-index.simba" Type="RCDATA" ResourceName="EXAMPLE_METHOD_PROPERTY_INDEX"/>
@@ -352,20 +352,15 @@
352352
</SyntaxOptions>
353353
</Parsing>
354354
<CodeGeneration>
355-
<SmartLinkUnit Value="True"/>
356355
<TargetCPU Value="x86_64"/>
357356
<TargetOS Value="darwin"/>
358-
<Optimizations>
359-
<OptimizationLevel Value="3"/>
360-
</Optimizations>
361357
</CodeGeneration>
362358
<Linking>
363359
<Debugging>
364360
<GenerateDebugInfo Value="False"/>
365361
<DebugInfoType Value="dsDwarf2Set"/>
366362
<StripSymbols Value="True"/>
367363
</Debugging>
368-
<LinkSmart Value="True"/>
369364
<Options>
370365
<Win32>
371366
<GraphicApplication Value="True"/>
@@ -405,20 +400,14 @@
405400
</SyntaxOptions>
406401
</Parsing>
407402
<CodeGeneration>
408-
<SmartLinkUnit Value="True"/>
409403
<TargetCPU Value="aarch64"/>
410404
<TargetOS Value="darwin"/>
411-
<Optimizations>
412-
<OptimizationLevel Value="3"/>
413-
</Optimizations>
414405
</CodeGeneration>
415406
<Linking>
416407
<Debugging>
417408
<GenerateDebugInfo Value="False"/>
418409
<DebugInfoType Value="dsDwarf2Set"/>
419-
<StripSymbols Value="True"/>
420410
</Debugging>
421-
<LinkSmart Value="True"/>
422411
<Options>
423412
<Win32>
424413
<GraphicApplication Value="True"/>

Source/ide/codetools/simba.ide_codetools_base.pas

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,15 +10,15 @@
1010
interface
1111

1212
uses
13-
Classes, SysUtils,
14-
simba.base;
13+
Classes, SysUtils;
1514

1615
type
1716
// "Perfect Hashing"
1817
// A hashtable with no collisions.
1918
generic TKeywordDictionary<_T> = class(TObject)
20-
type
21-
TBucketArray = array of record Key: String; Value: _T; end;
19+
public type
20+
TBucket = record Key: String; Value: _T; end;
21+
TBucketArray = array of TBucket;
2222
protected
2323
FBuckets: TBucketArray;
2424
FSeed: UInt32;

Source/simba.fftpack4.pas

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,6 @@
1616
[==============================================================================}
1717
{$i simba.inc}
1818

19-
{$IFOPT D-}
20-
{$OPTIMIZATION LEVEL4}
21-
{$ENDIF}
22-
2319
{$MODESWITCH ARRAYOPERATORS OFF}
2420

2521
interface

Source/simba.fftpack4_core.pas

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,6 @@
1010
[==============================================================================}
1111
{$i simba.inc}
1212

13-
{$IFOPT D-}
14-
{$OPTIMIZATION LEVEL4}
15-
{$ENDIF}
16-
1713
{$MODESWITCH ARRAYOPERATORS OFF}
1814

1915
interface

0 commit comments

Comments
 (0)