Skip to content

Commit 7a11d9c

Browse files
authored
Merge pull request #414 from Universite-Gustave-Eiffel/fixlinux
fix flatpak build
2 parents 81dbf78 + 7fa4d83 commit 7a11d9c

File tree

3 files changed

+32
-17
lines changed

3 files changed

+32
-17
lines changed
Lines changed: 8 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
# -*- coding: UTF-8 -*-
22
import uictrl as ui
33
import uilocale
4-
import urllib.request
54
import os
65
import re
6+
import requests
77

88
_ = uilocale.InstallUiModule(ui.application.getapplicationpath()["systemscript"]+"check_version"+os.sep,ui.application.getlocale())
99

@@ -15,19 +15,11 @@ def versionToCode(major, minor, revision):
1515
def check_version():
1616
visimpa = list(map(int, ui.application.getversion().split(".")))[:3]
1717
visimpa = versionToCode(visimpa[0], visimpa[1], visimpa[2])
18-
19-
with urllib.request.urlopen("https://raw.githubusercontent.com/Ifsttar/I-Simpa/master/CMakeLists.txt") as response:
20-
html = response.read().decode("utf-8")
21-
p = re.compile("^project \(isimpa VERSION (\d+\.)?(\d+\.)?(\*|\d+)")
22-
23-
for line in html.split("\n"):
24-
r = p.match(line)
25-
if r is not None:
26-
major = int(r.group(1)[:1])
27-
minor = int(r.group(2)[:1])
28-
revision = int(r.group(3))
29-
if visimpa < versionToCode(major, minor, revision):
30-
ui.application.loginfo(_("A new version of I-Simpa is available, please look at https://github.com/Ifsttar/I-Simpa/releases/latest"))
31-
return major, minor, revision
32-
return 0, 0, 0
18+
response = requests.get("https://api.github.com/repos/Universite-Gustave-Eiffel/I-Simpa/releases/latest")
19+
data = response.json()
20+
latest_tag = data['tag_name']
21+
major, minor, revision = map(int, latest_tag[1:].split("."))
22+
if visimpa < versionToCode(major, minor, revision):
23+
ui.application.loginfo(_("A new version of I-Simpa is available, please look at https://github.com/Universite-Gustave-Eiffel/I-Simpa/releases/latest"))
24+
return major, minor, revision
3325

org.noise_planet.i-simpa.yml

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ finish-args:
1010
- --socket=wayland
1111
- --device=dri
1212
- --filesystem=home
13+
- --share=network # check if there is a new version of I-SIMPA
1314
- --env=LD_LIBRARY_PATH=/app/lib:/app/lib64
1415
cleanup:
1516
- '/include'
@@ -66,6 +67,28 @@ modules:
6667
- type: archive
6768
url: https://github.com/wxWidgets/wxWidgets/releases/download/v3.3.1/wxWidgets-3.3.1.tar.bz2
6869
sha256: f936c8d694f9c49a367a376f99c751467150a4ed7cbf8f4723ef19b2d2d9998d
70+
# Generated with flatpak-pip-generator requests --yaml
71+
- name: python3-requests
72+
buildsystem: simple
73+
build-commands:
74+
- pip3 install --verbose --exists-action=i --no-index --find-links="file://${PWD}"
75+
--prefix=${FLATPAK_DEST} "requests" --no-build-isolation
76+
sources:
77+
- type: file
78+
url: https://files.pythonhosted.org/packages/e4/37/af0d2ef3967ac0d6113837b44a4f0bfe1328c2b9763bd5b1744520e5cfed/certifi-2025.10.5-py3-none-any.whl
79+
sha256: 0f212c2744a9bb6de0c56639a6f68afe01ecd92d91f14ae897c4fe7bbeeef0de
80+
- type: file
81+
url: https://files.pythonhosted.org/packages/13/69/33ddede1939fdd074bce5434295f38fae7136463422fe4fd3e0e89b98062/charset_normalizer-3.4.4.tar.gz
82+
sha256: 94537985111c35f28720e43603b8e7b43a6ecfb2ce1d3058bbe955b73404e21a
83+
- type: file
84+
url: https://files.pythonhosted.org/packages/0e/61/66938bbb5fc52dbdf84594873d5b51fb1f7c7794e9c0f5bd885f30bc507b/idna-3.11-py3-none-any.whl
85+
sha256: 771a87f49d9defaf64091e6e6fe9c18d4833f140bd19464795bc32d966ca37ea
86+
- type: file
87+
url: https://files.pythonhosted.org/packages/1e/db/4254e3eabe8020b458f1a747140d32277ec7a271daf1d235b70dc0b4e6e3/requests-2.32.5-py3-none-any.whl
88+
sha256: 2462f94637a34fd532264295e186976db0f5d453d1cdd31473c85a6a161affb6
89+
- type: file
90+
url: https://files.pythonhosted.org/packages/a7/c2/fe1e52489ae3122415c51f387e221dd0773709bad6c6cdaa599e8a2c5185/urllib3-2.5.0-py3-none-any.whl
91+
sha256: e6b01673c0fa6a13e374b50871808eb3bf7046c4b125b216f6bf1cc604cff0dc
6992
- name: isimpa
7093
buildsystem: cmake-ninja
7194
sources:

src/isimpa/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -586,7 +586,7 @@ else()
586586
target_link_libraries(isimpa ${wxWidgets_LIBRARIES})
587587
endif()
588588

589-
target_link_libraries(isimpa OpenGL::GL)
589+
target_link_libraries(isimpa OpenGL::GL OpenGL::GLU)
590590

591591
add_definitions(-DUSE_PYTHON=${PYTHONLIBS_FOUND})
592592

0 commit comments

Comments
 (0)