Skip to content

Commit 75af3b4

Browse files
committed
Build update, use BASEVERSION.FS
1 parent ead95b4 commit 75af3b4

File tree

9 files changed

+68
-40
lines changed

9 files changed

+68
-40
lines changed

.github/workflows/fsbuild.yml

-1
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,6 @@ jobs:
101101
- uses: actions/upload-artifact@v2
102102
with:
103103
name: Linux_x86-64
104-
105104
path: fsbuild/_dist/*
106105

107106
- name: Upload build to Dropbox folder

BASEVERSION.FS

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
BASEVERSION_FS=4.0.40

PACKAGE.FS

+4-4
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@ PACKAGE_MACOS_BUNDLE_ID=no.fengestad.fs-uae
33
PACKAGE_NAME=fs-uae
44
PACKAGE_NAME_PRETTY=FS-UAE
55
PACKAGE_TYPE=fs-app-plugin
6-
PACKAGE_VERSION=4.0.19-master
7-
PACKAGE_VERSION_MAJOR=4
6+
PACKAGE_VERSION=0.0.0
7+
PACKAGE_VERSION_MAJOR=0
88
PACKAGE_VERSION_MINOR=0
9-
PACKAGE_VERSION_REVISION=19
10-
PACKAGE_VERSION_TAG=-master
9+
PACKAGE_VERSION_REVISION=0
10+
PACKAGE_VERSION_TAG=

configure.ac

+3-3
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,10 @@
33

44
AC_PREREQ([2.67])
55

6-
m4_define([fsbuild_version], [4.0.15-dev])
7-
m4_define([fsbuild_version_major], [4])
6+
m4_define([fsbuild_version], [0.0.0])
7+
m4_define([fsbuild_version_major], [0])
88
m4_define([fsbuild_version_minor], [0])
9-
m4_define([fsbuild_version_revision], [15])
9+
m4_define([fsbuild_version_revision], [0])
1010
m4_define([fsbuild_commit], [])
1111

1212
AC_INIT([FS-UAE], [fsbuild_version],

debian/changelog

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
fs-uae (4.0.15-dev-0) unstable; urgency=low
1+
fs-uae (0.0.0-0) unstable; urgency=low
22

33
* Dummy changelog entry.
44

5-
-- Frode Solheim <[email protected]> Tue, 16 Mar 2021 00:14:07
5+
-- Frode Solheim <[email protected]> Sun, 10 Oct 2021 09:03:58 +00:00

fs-uae.spec

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
# You should have received a copy of the GNU General Public License
1414
# along with this program. If not, see <http://www.gnu.org/licenses/>.
1515

16-
%define fsbuild_version 4.0.15-dev
16+
%define fsbuild_version 0.0.0
1717

1818
%define name fs-uae
1919
%define version %{fsbuild_version}

fsbuild/standalone.py

+20-19
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
import shutil
66
import subprocess
77
import sys
8+
from typing import Dict, List, Set
89

910
strip = False
1011
rpath = False
@@ -14,11 +15,11 @@
1415
steam_runtime = False
1516

1617

17-
excluded_libraries = {}
18-
included_libraries = {}
18+
excluded_libraries: Dict[str, Set[str]] = {}
19+
included_libraries: Dict[str, Set[str]] = {}
1920

2021

21-
def fix_linux_binary(path):
22+
def fix_linux_binary(path: str):
2223
changes = 0
2324
if os.path.exists(path + ".standalone"):
2425
return changes
@@ -41,7 +42,7 @@ def fix_linux_binary(path):
4142
return 0
4243
data = p.stdout.decode("UTF-8")
4344
print("fixing", path, "no_copy =", no_copy)
44-
library_locations = {}
45+
library_locations: Dict[str, str] = {}
4546
for line in data.split("\n"):
4647
line = line.strip()
4748
if "=>" not in line:
@@ -128,7 +129,7 @@ def fix_linux_binary(path):
128129
)
129130

130131

131-
def ignore_linux_library(name):
132+
def ignore_linux_library(name: str):
132133
if os.getenv("LIBGPG_ERROR_CHECK", "") != "0":
133134
if name.startswith("libgpg-error.so"):
134135
raise Exception(
@@ -218,8 +219,8 @@ def ignore_linux_library(name):
218219
return False
219220

220221

221-
def linux_iteration(app):
222-
binaries = []
222+
def linux_iteration(app: str):
223+
binaries: List[str] = []
223224
binaries_dir = app
224225
for name in sorted(os.listdir(binaries_dir)):
225226
binaries.append(os.path.join(binaries_dir, name))
@@ -251,7 +252,7 @@ def linux_main():
251252
os.remove(os.path.join(app, name))
252253

253254

254-
def fix_macos_binary(path, frameworks_dir):
255+
def fix_macos_binary(path: str, frameworks_dir: str):
255256
if path.endswith(".txt"):
256257
return 0
257258
print("fixing", path)
@@ -278,7 +279,7 @@ def fix_macos_binary(path, frameworks_dir):
278279
if "Contents" in old:
279280
continue
280281
print(old)
281-
old_dir, name = os.path.split(old)
282+
_, name = os.path.split(old)
282283
# new = old.replace(old, "@executable_path/../Frameworks/" + name)
283284
if rpath:
284285
new = old.replace(old, "@rpath/" + name)
@@ -311,8 +312,8 @@ def fix_macos_binary(path, frameworks_dir):
311312
return changes
312313

313314

314-
def macos_iteration(app):
315-
binaries = []
315+
def macos_iteration(app: str):
316+
binaries: List[str] = []
316317
if os.path.isdir(app):
317318
# mac_os_dir = os.path.join(app, "Contents", "MacOS")
318319
frameworks_dir = app
@@ -331,7 +332,7 @@ def macos_iteration(app):
331332
return changes
332333

333334

334-
def fix_macos_binary_2(path, frameworks_dir):
335+
def fix_macos_binary_2(path: str, frameworks_dir: str):
335336
print("fixing", path)
336337
changes = 0
337338
if not os.path.exists(path):
@@ -354,7 +355,7 @@ def fix_macos_binary_2(path, frameworks_dir):
354355
if "Contents" in old:
355356
continue
356357
print(old)
357-
old_dir, name = os.path.split(old)
358+
_, name = os.path.split(old)
358359
new = old.replace(old, "@executable_path/../Frameworks/" + name)
359360
dst = os.path.join(frameworks_dir, os.path.basename(old))
360361
if not os.path.exists(dst):
@@ -373,8 +374,8 @@ def fix_macos_binary_2(path, frameworks_dir):
373374
return changes
374375

375376

376-
def macos_iteration_2(app):
377-
binaries = []
377+
def macos_iteration_2(app: str):
378+
binaries: List[str] = []
378379
mac_os_dir = os.path.join(app, "Contents", "MacOS")
379380
frameworks_dir = os.path.join(app, "Contents", "Frameworks")
380381
if not os.path.exists(frameworks_dir):
@@ -438,8 +439,8 @@ def macos_main():
438439
]
439440

440441

441-
def fix_windows_binary(path, app_dir):
442-
name, ext = os.path.splitext(os.path.basename(path))
442+
def fix_windows_binary(path: str, app_dir: str):
443+
_, ext = os.path.splitext(os.path.basename(path))
443444
if ext.lower() not in [".dll", ".exe"]:
444445
return 0
445446
# if path.endswith(".txt"):
@@ -502,8 +503,8 @@ def fix_windows_binary(path, app_dir):
502503
return changes
503504

504505

505-
def windows_iteration(app):
506-
binaries = []
506+
def windows_iteration(app: str):
507+
binaries: List[str] = []
507508
if os.path.isdir(app):
508509
for name in sorted(os.listdir(app)):
509510
binaries.append(os.path.join(app, name))

fsbuild/version.py

+32-10
Original file line numberDiff line numberDiff line change
@@ -229,16 +229,17 @@ def calculate_version(
229229
auto_revision=False, increment_revision=False, include_commit=False
230230
):
231231
# with open("fsbuild/VERSION") as f:
232-
# # with open("VERSION.FS") as f:
233-
# version_str = f.read().strip()
234-
with open("PACKAGE.FS") as f:
235-
for line in f:
236-
if line.startswith("PACKAGE_VERSION="):
237-
version_str = line[16:].strip()
232+
with open("BASEVERSION.FS") as f:
233+
version_str = f.read().strip()
234+
if version_str.startswith("BASEVERSION_FS="):
235+
version_str = version_str[len("BASEVERSION_FS="):].strip()
236+
# with open("PACKAGE.FS") as f:
237+
# for line in f:
238+
# if line.startswith("PACKAGE_VERSION="):
239+
# version_str = line[16:].strip()
238240
version = Version(version_str)
239241
if auto_revision:
240-
# version_commit = find_last_commit_for_file("VERSION.FS")
241-
version_commit = find_last_commit_for_file("PACKAGE.FS")
242+
version_commit = find_last_commit_for_file("BASEVERSION.FS")
242243
increment = num_commits_since(version_commit)
243244
if increment_revision:
244245
increment += 1
@@ -248,6 +249,25 @@ def calculate_version(
248249
version.revision += increment
249250
if "--commit" in sys.argv:
250251
version.commit = find_last_commit()
252+
253+
if True:
254+
branch = None
255+
githubRef = os.environ.get("GITHUB_REF")
256+
if githubRef is not None:
257+
if githubRef.startswith("refs/heads/"):
258+
branch = githubRef[len("refs/heads/"):]
259+
if githubRef.startswith("refs/pull/"):
260+
branch = "pull" + githubRef[len("refs/pull/"):].replace("/", "")
261+
if not branch:
262+
branch = subprocess.check_output(["git", "branch", "--show-current"], encoding="UTF-8").strip()
263+
264+
if branch == "stable":
265+
version.tag = ""
266+
elif branch:
267+
version.tag = f"-{branch}"
268+
else:
269+
raise Exception("Cannot calculate version tag from git ref")
270+
251271
return version
252272

253273

@@ -271,9 +291,11 @@ def main():
271291
# For date/time formatting
272292
locale.setlocale(locale.LC_TIME, "C")
273293

274-
auto_revision = "--auto" in sys.argv
294+
# auto_revision = "--auto" in sys.argv
295+
auto_revision = True
275296
increment_revision = "--next" in sys.argv
276-
include_commit = "--commit" in sys.argv
297+
# include_commit = "--commit" in sys.argv
298+
include_commit = True
277299
# if "--auto-next" in sys.argv:
278300
# auto_revision = True
279301
# increment_revision = True

fsdeps/dep/SDL2

+5
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,13 @@ set -e
44
# Dependency: pulseaudio?
55
# Dependency: wayland?
66

7+
if [ "`uname`" = "Darwin" ]; then
8+
PACKAGE=SDL2-2.0.14
9+
CHECKSUM=d8215b571a581be1332d2106f8036fcb03d12a70bae01e20f424976d275432bc
10+
else
711
PACKAGE=SDL2-2.0.16
812
CHECKSUM=65be9ff6004034b5b2ce9927b5a4db1814930f169c4b2dae0a1e4697075f287b
13+
fi
914
REVISION=0
1015

1116
. fsdeps/dep.sh

0 commit comments

Comments
 (0)