Skip to content

Commit 3ce5d2c

Browse files
authored
[Fix] Connect to Data Source window does not scale properly (Ubuntu) (#2492)
1 parent 2084f3c commit 3ce5d2c

File tree

25 files changed

+1475
-1375
lines changed

25 files changed

+1475
-1375
lines changed

.github/workflows/osx_build.yml

Lines changed: 34 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -21,12 +21,24 @@ on:
2121
jobs:
2222
# This workflow contains a single job called "build"
2323
osx_build:
24-
# The type of runner that the job will run on
25-
runs-on: macos-latest
24+
# The type of runner that the job will run on, macos-13 is x86_64
25+
runs-on: ${{ matrix.distro }}
2626
if: ${{ !contains(github.event.head_commit.message, '[ci skip]') && !contains(github.event.head_commit.message, '[skip ci]') }}
2727

28+
strategy:
29+
fail-fast: true
30+
matrix:
31+
distro:
32+
- 'macos-13'
33+
- 'macos-14'
34+
include:
35+
- distro: 'macos-13'
36+
pre: 'x86_64'
37+
- distro: 'macos-14'
38+
pre: 'arm64'
2839
env:
2940
GEODA_VER: '1.22.0'
41+
GEODA_ARCH: ${{ matrix.pre }}
3042

3143
# Steps represent a sequence of tasks that will be executed as part of the job
3244

@@ -42,40 +54,52 @@ jobs:
4254
p12-file-base64: ${{ secrets.MACOS_CERTIFICATE }}
4355
p12-password: ${{ secrets.MACOS_CERTIFICATE_PWD }}
4456

45-
- name: Setup Brew
57+
- name: Install GDAL using Brew x86_64
58+
if: ${{ matrix.pre == 'x86_64' }}
4659
run: |
47-
brew install [email protected]
48-
ln -s /usr/local/opt/[email protected] /usr/local/opt/boost
60+
rm /usr/local/bin/2to3 || true
61+
rm /usr/local/bin/idle3 || true
62+
rm /usr/local/bin/pydoc3 || true
63+
rm /usr/local/bin/python3 || true
64+
rm /usr/local/bin/python3-config || true
65+
brew install --force --overwrite --quiet gdal || true
66+
67+
- name: Install GDAL using Brew Arm64
68+
if: ${{ matrix.pre == 'arm64' }}
69+
run: |
70+
arch
4971
brew install gdal
72+
sudo ln -s /opt/homebrew/opt/gdal /usr/local/opt/gdal
5073
5174
- uses: actions/cache@v3
5275
id: cache
5376
with:
5477
path: |
5578
BuildTools/macosx/libraries
5679
BuildTools/macosx/temp
57-
key: ${{ runner.os }}-deps-cache-${{ hashFiles('BuildTools/macosx/install.sh') }}
80+
key: ${{ runner.os }}-${{ matrix.pre }}-deps-cache-${{ hashFiles('BuildTools/macosx/install.sh') }}
5881

5982
- if: steps.cache.outputs.cache-hit != 'true'
6083
name: Build Dependencies
6184
run: |
6285
cd BuildTools/macosx
6386
export GEODA_HOME=$PWD
64-
export GEODA_ARCH=x86_64
87+
export GEODA_ARCH=${{ env.GEODA_ARCH }}
6588
./install.sh
6689
6790
- name: Build GeoDa
6891
run: |
6992
mkdir -p o
7093
cd BuildTools/macosx
7194
export GEODA_HOME=$PWD
95+
export GEODA_ARCH=${{ env.GEODA_ARCH }}
7296
cp ../../GeoDamake.macosx.opt ../../GeoDamake.opt
7397
echo "find identity"
7498
security find-identity -v
7599
VER_MAJOR=$(grep version_major $GEODA_HOME/../../version.h | sed -e 's/^[[:space:]][[:alpha:]|[:space:]|_|=]*//g' | sed -e 's/;//g')
76100
VER_MINOR=$(grep version_minor $GEODA_HOME/../../version.h | sed -e 's/^[[:space:]][[:alpha:]|[:space:]|_|=]*//g' | sed -e 's/;//g')
77101
VER_BUILD=$(grep version_build $GEODA_HOME/../../version.h | sed -e 's/^[[:space:]][[:alpha:]|[:space:]|_|=]*//g' | sed -e 's/;//g')
78-
GEODA_VERSION=$VER_MAJOR.$VER_MINOR.$VER_BUILD
102+
GEODA_VERSION=$VER_MAJOR.$VER_MINOR.$VER_BUILD-$GEODA_ARCH
79103
echo $GEODA_VERSION
80104
make -j$(sysctl -n hw.ncpu)
81105
make app
@@ -86,5 +110,5 @@ jobs:
86110
# Upload artifact
87111
- uses: actions/upload-artifact@v3
88112
with:
89-
name: GeoDa-${{ env.GEODA_VER }}-MacOS
90-
path: ${{ github.workspace }}/BuildTools/macosx/create-dmg/GeoDa${{ env.GEODA_VER }}-Installer.dmg
113+
name: GeoDa-${{ env.GEODA_VER }}-${{ env.GEODA_ARCH }}-MacOS
114+
path: ${{ github.workspace }}/BuildTools/macosx/create-dmg/GeoDa${{ env.GEODA_VER }}-${{ env.GEODA_ARCH }}-Installer.dmg

.github/workflows/ubuntu_build.yml

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,25 +29,31 @@ jobs:
2929
fail-fast: true
3030
matrix:
3131
distro:
32+
- 'ubuntu-24.04'
3233
- 'ubuntu-22.04'
3334
- 'ubuntu-20.04'
3435
include:
36+
- distro: 'ubuntu-24.04'
37+
pre: 'noble'
38+
ldflags: '-lgdal -lcurl -L/usr/lib/x86_64-linux-gnu -lz -lwebkit2gtk-4.1 -lEGL -ljavascriptcoregtk-4.1'
3539
- distro: 'ubuntu-22.04'
3640
pre: 'jammy'
41+
ldflags: '-lgdal -lcurl -L/usr/lib/x86_64-linux-gnu -lz -lwebkit2gtk-4.0 -lEGL -ljavascriptcoregtk-4.0'
3742
- distro: 'ubuntu-20.04'
3843
pre: 'focal'
44+
ldflags: '-lgdal -lcurl -L/usr/lib/x86_64-linux-gnu -lz -lwebkit2gtk-4.0 -lEGL -ljavascriptcoregtk-4.0'
3945

4046
env:
4147
platform: ${{ matrix.distro }}
4248
GEODA_VER: '1.22.0'
4349
TARGET_OS: ${{ matrix.pre }}
50+
EXTRA_GEODA_LD_FLAGS: ${{ matrix.ldflags }}
4451

4552
# Steps represent a sequence of tasks that will be executed as part of the job
4653
steps:
4754
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
4855
- uses: actions/checkout@v3
4956

50-
# Prepare
5157
- name: Prepare on ${{ matrix.distro }}
5258
run: |
5359
chmod +x BuildTools/ubuntu/create_deps.sh
@@ -81,6 +87,7 @@ jobs:
8187
export WORK_DIR=$PWD
8288
export OS=${{ env.TARGET_OS }}
8389
export VER=${{ env.GEODA_VER }}
90+
export EXTRA_GEODA_LD_FLAGS='${{ env.EXTRA_GEODA_LD_FLAGS }}'
8491
export APT="sudo apt-get"
8592
cd BuildTools/ubuntu
8693
./install.sh

.github/workflows/windows_build.yml

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -89,9 +89,15 @@ jobs:
8989
BuildTools/windows/temp
9090
key: ${{ runner.os }}-${{ matrix.platform }}-deps-cache-${{ hashFiles('BuildTools/windows/deps.md') }}
9191

92+
# Install innosetup
93+
- name: Install innosetup
94+
uses: crazy-max/ghaction-chocolatey@v3
95+
with:
96+
args: install innosetup --no-progress
97+
9298
# Create Deps
9399
- if: steps.cache.outputs.cache-hit != 'true'
94-
name: Create Dependencies
100+
name: Create Dependencies
95101
shell: pwsh
96102
run: |
97103
$ErrorActionPreference = 'continue'
@@ -250,13 +256,6 @@ jobs:
250256
{
251257
msbuild.exe GeoDa.vs2019.sln /t:GeoDa /property:Configuration="Release" /m /p:Platform="x64"
252258
}
253-
#
254-
# InnoSetup
255-
#
256-
Choco-Install -PackageName innosetup
257-
#
258-
# Binary
259-
#
260259
if($env:platform -eq "x86")
261260
{
262261
ISCC.exe /q installer\32bit\GeoDa.iss

.vscode/settings.json

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,5 +29,17 @@
2929
"typeinfo": "cpp",
3030
"algorithm": "cpp"
3131
},
32-
"C_Cpp.default.compilerPath": "/usr/bin/clang++"
32+
"C_Cpp.default.compilerPath": "/usr/bin/clang++",
33+
"files.exclude": {
34+
"**/.git": true,
35+
"**/.svn": true,
36+
"**/.hg": true,
37+
"**/CVS": true,
38+
"**/.DS_Store": true,
39+
"**/Thumbs.db": true,
40+
"**/temp": true,
41+
"**/build": true,
42+
"**/debug": true,
43+
"**/libraries": true
44+
}
3345
}

BuildTools/macosx/GNUmakefile

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -95,12 +95,12 @@ build-geoda-mac:
9595
cp /usr/local/opt/gdal/share/gdal/* build/GeoDa.app/Contents/Resources/gdaldata
9696
cp libraries/lib/libwx_osx_cocoau-3.2.0.2.2.dylib build/GeoDa.app/Contents/Frameworks/libwx_osx_cocoau-3.2.dylib
9797
cp libraries/lib/libwx_osx_cocoau_gl-3.2.0.2.2.dylib build/GeoDa.app/Contents/Frameworks/libwx_osx_cocoau_gl-3.2.dylib
98-
cp /usr/local/opt/gdal/lib/libgdal.34.dylib build/GeoDa.app/Contents/Frameworks
98+
cp /usr/local/opt/gdal/lib/libgdal.35.dylib build/GeoDa.app/Contents/Frameworks
9999
install_name_tool -id "GeoDa" build/GeoDa.app/Contents/MacOS/GeoDa
100100
install_name_tool -change "$(GEODA_HOME)/libraries/lib/libwx_osx_cocoau_gl-3.2.dylib" "@executable_path/../Frameworks/libwx_osx_cocoau_gl-3.2.dylib" build/GeoDa.app/Contents/MacOS/GeoDa
101101
install_name_tool -change "$(GEODA_HOME)/libraries/lib/libwx_osx_cocoau-3.2.dylib" "@executable_path/../Frameworks/libwx_osx_cocoau-3.2.dylib" build/GeoDa.app/Contents/MacOS/GeoDa
102-
install_name_tool -change "/usr/local/opt/gdal/lib/libgdal.34.dylib" "@executable_path/../Frameworks/libgdal.34.dylib" build/GeoDa.app/Contents/MacOS/GeoDa
103-
install_name_tool -change "/opt/homebrew/opt/gdal/lib/libgdal.34.dylib" "@executable_path/../Frameworks/libgdal.34.dylib" build/GeoDa.app/Contents/MacOS/GeoDa
102+
install_name_tool -change "/usr/local/opt/gdal/lib/libgdal.35.dylib" "@executable_path/../Frameworks/libgdal.35.dylib" build/GeoDa.app/Contents/MacOS/GeoDa
103+
install_name_tool -change "/opt/homebrew/opt/gdal/lib/libgdal.35.dylib" "@executable_path/../Frameworks/libgdal.35.dylib" build/GeoDa.app/Contents/MacOS/GeoDa
104104
python3 install_name.py $(GEODA_HOME)/build/GeoDa.app/Contents/Frameworks "Developer ID Application: Geodapress LLC (26M5NG43GP)"
105105
install_name_tool -change "@executable_path/../Frameworks/libwx_osx_cocoau-3.2.0.2.2.dylib" "@executable_path/../Frameworks/libwx_osx_cocoau-3.2.dylib" build/GeoDa.app/Contents/Frameworks/libwx_osx_cocoau_gl-3.2.dylib
106106
codesign -f --timestamp -o runtime -s "Developer ID Application: Geodapress LLC (26M5NG43GP)" build/GeoDa.app/Contents/Frameworks/libwx_osx_cocoau_gl-3.2.dylib

BuildTools/macosx/build.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/bin/bash
1+
#!/bin/zsh
22
#############################################################################
33
# ./build.sh
44
# ./build.sh [CPU]

BuildTools/macosx/dep/CLAPACK-3.2.1/F2CLIBS/libf2c/Makefile

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,7 @@ include $(TOPDIR)/make.inc
1919

2020
# compile, then strip unnecessary symbols
2121
.c.o:
22-
$(CC) -m64 -c -DSkip_f2c_Undefs $(CFLAGS) $*.c
23-
#ld -arch x86_64 -macosx_version_min 10.6 -syslibroot $GDA_WITH_SYSROOT -r -x -o $*.xxx $*.o
22+
$(CC) -m64 -arch $(GEODA_ARCH) -c -DSkip_f2c_Undefs $(CFLAGS) $*.c
2423
ld -arch $(GEODA_ARCH) -r -x -o $*.xxx $*.o
2524
mv $*.xxx $*.o
2625
## Under Solaris (and other systems that do not understand ld -x),
@@ -185,7 +184,7 @@ xwsne.o: fmt.h
185184
arith.h: arithchk.c
186185
$(CC) $(CFLAGS) -DNO_FPINIT arithchk.c -lm ||\
187186
$(CC) -DNO_LONG_LONG $(CFLAGS) -DNO_FPINIT arithchk.c -lm
188-
./a.out >arith.h
187+
# ./a.out >arith.h
189188
rm -f a.out arithchk.o
190189

191190
check:
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
#define IEEE_8087
2+
#define Arith_Kind_ASL 1
3+
#define Long int
4+
#define Intcast (int)(long)
5+
#define Double_Align
6+
#define X64_bit_pointers
7+
#define NANCHECK
8+
#define QNaN0 0x0
9+
#define QNaN1 0x7ff80000

BuildTools/macosx/dep/CLAPACK-3.2.1/make.inc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,8 @@ PLAT =
2424
CC = gcc
2525
# if no wrapping of the blas library is needed, uncomment next line
2626
#CC = gcc -DNO_BLAS_WRAP
27-
CFLAGS = -O3 -m64 -isysroot $GDA_WITH_SYSROOT -mmacosx-version-min=10.10 -I$(GEODA_HOME)/temp/CLAPACK-3.2.1/INCLUDE -I$(GEODA_HOME)/temp/CLAPACK-3.2.1/
28-
CFLAGS = -O3 -m64 -I$(GEODA_HOME)/temp/CLAPACK-3.2.1/INCLUDE -I$(GEODA_HOME)/temp/CLAPACK-3.2.1/
27+
CFLAGS = -O3 -m64 -arch $(GEODA_ARCH) -isysroot $GDA_WITH_SYSROOT -mmacosx-version-min=10.10 -I$(GEODA_HOME)/temp/CLAPACK-3.2.1/INCLUDE -I$(GEODA_HOME)/temp/CLAPACK-3.2.1/
28+
CFLAGS = -O3 -m64 -arch $(GEODA_ARCH) -I$(GEODA_HOME)/temp/CLAPACK-3.2.1/INCLUDE -I$(GEODA_HOME)/temp/CLAPACK-3.2.1/
2929
LOADER = gcc
3030
LOADOPTS = -m64 -arch $(GEODA_ARCH) -isysroot $GDA_WITH_SYSROOT -mmacosx-version-min=10.10
3131
LOADOPTS = -m64 -arch $(GEODA_ARCH)

BuildTools/macosx/dep/json_spirit/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
CMAKE_MINIMUM_REQUIRED(VERSION 2.6)
22

33
add_definitions(-DJSON_SPIRIT_VALUE_ENABLED)
4-
SET(CMAKE_INCLUDE_PATH /usr/local/opt/boost/include ${CMAKE_INCLUDE_PATH})
4+
SET(CMAKE_INCLUDE_PATH /Users/runner/work/geoda/geoda/BuildTools/macosx/libraries/include/boost ${CMAKE_INCLUDE_PATH})
55

66
PROJECT(json_spirit)
77
SUBDIRS(json_spirit json_demo json_headers_only_demo json_map_demo json_test)

0 commit comments

Comments
 (0)