9 Commits

Author SHA1 Message Date
Dimitris Panokostas
2c39559952
Reduce compiler warnings (#1566)
* refactor: fix compiler and clang-tidy warnings
* minor code improvements and modernization
* refactor: fix sprintf is deperecated warnings
* refactor: convert gfxboard encoding to UTF-8
2025-01-03 16:54:58 +01:00
Dimitris Panokostas
f967df0ace
Revert "refactor: bump CMake requirement to 3.27 so we can debug it"
This reverts commit 0e28e2bb1aa51c33fc4b172994e2ca4d06709276.
2024-12-19 15:52:53 +01:00
Dimitris Panokostas
0e28e2bb1a
refactor: bump CMake requirement to 3.27 so we can debug it 2024-12-19 15:28:34 +01:00
Dimitris Panokostas
6e84d721c9
Macos bundle (#1446)
* refactor: macOS bundle changes

- Move macos build files in separate directory
- Harmonize logic of creating folders on startup between MacOS and Linux versions
- Removed macos_init_amiberry.zsh script, no longer needed

* ci: enable builds on all pushes and pull requests

* ci: build on every push, not just tags

* build: fix some paths

* Added cmake macosx bundle options

* Fixes for macOS directory detections

* build: fix path to template file

* Escape paths in macOS Library directory

* build: when compiling on macOS, capitalize project name

* ci: use CMake to prepare macOS bundles

* ci: fix path for macOS bundle

* ci: remove CPack options for macOS (not needed)

The build already produces an app bundle now, so there's no need for Cpack as well for this platform

* ci: don't include the build dir in the macOS zip

* ci: fix path to macOS artifact

* ci: fix macOS x86 zip path

* build: add a few more properties in the plist file

* build: combine macOS and Linux options where possible

* build: added man file (fixes #1445)

* ci: build macOS packages the same way as Linux Deb ones

* ci: also change apple silicon build

* build: fix macos bundle packaging from cmake

* refactor: reorganize CPack entries

- reorganized cpack entries in more logical order
- added DMG background image

* refactor: improved icon

* bugfix: fixed applescript .app reference

* build: maybe we don't need the RPATH change anymore

* build: skip install step in bundled libs, do it from the root one only

* refactor: use .dylib for macOS libs, look for them in Frameworks directory

* build: fix destination folder of DEB assets

* build: remove Makefiles and obsolete files

* refactor: data_dir in macOS should be in Resources

* refactor: some dirs should not be in the config file

- data dir is determined on startup, having it in the config file will only make things worse
- path dir doesn't seem to be necessary to save/load
- config path as well
2024-09-30 18:38:55 +02:00
Dimitris Panokostas
40e73ea8ae
1440 create home directories on startup (#1443)
* build: move gamecontrollerdb.txt to controllers directory

* enhancement: create home directories if they don't exist

- After the directories have been decided (data, home, config), create those in the specified HOME directory, if they don't exist
- If they didn't exist, and we had the original contents installed in /usr/share/amiberry/<dir>, copy those over and change permissions. This ensures that the distributed files like the AROS ROMs, the WHDLoad booter and the controllerdb files, are always there in the home dir.

* chore: we no longer need to copy all the directories in the package

Now that we create the home directories on startup, we don't need the empty ones in the package anymore.
Only those that contain something can stay

* build: add stripping of binaries

* chore: ignore .idea folder

* bugfix: WHDLoad booter A1200 config was incorrect

After the additional entries in A1200 configs and models, the booter was set to incorrectly use a config with a Blizzard accelerator. Since that requires a board ROM, which might not be available, it has to change.

Using the default A1200 config instead, and setting Fast RAM to 8MB after that.

* build: install icon in shared location

When preparing the .deb package, the application icon should go in the /usr/share/icons/hicolor/... location, to adhere with established standards

* build: use ~/Amiberry instead of ~/.amiberry

Perhaps it's best to use a non-hidden folder for amiberry directories, make it easier on the users to find it

* refactor: use ~/Amiberry/conf instead of ~/.config/amiberry for config files

* refactor: change desktop file icon reference

Should be possible to use just "amiberry" now, that the icon file is copied in the right location

* chore: fix references to github.com/midwan -> github.com/BlitterStudio

* refactor: move plugins dir to /usr/lib/amiberry in the .deb package

If we are using a system-wide installation, with the .deb package, use /usr/lib/amiberry for plugins.
Check the HOME/Amiberry/plugins next, create it if necessary.
Fallback to the startup directory if that's not available (probably never).

* refactor: only move the abr folder in the destination plugins

When using the .deb package, only the abr folder should be copied in the destination.
Otherwise, we get a plugins directory created there as well

* refactor: Change Kickstarts to Roms

The Kickstarts directory can contain different kind of ROMs, not only kickstarts.
It's best if we rename it accordingly

* build: CPack updates

- Removed unneeded line
- added CPACK_DEBIAN_PACKAGE_ARCHITECTURE
- Added Extended Description
- Fixed description starts with package name

* ci: rename architectures properly

Let's keep the names identical to what dpkg reports

* build: fix some lintian errors

- location of plugins
- section

* build: added copyright and changelog in DEB

* build: fix location of debian files

* build: add copyright notice, fix changelog

* build: changelog should be compressed

* build: extend the description

* build: make the description lines shorter...

* build: description should not be longer than 80 chars

* build: remove timestamp from changelog

Fix another lintian complaint

* build: description again

* bugfix: the plugins dir was not correctly set

* refactor: Updated desktop entry to handle MimeTypes

* build: remove duplicate key in desktop file

* build: add more mimetypes to desktop file
2024-09-28 09:54:50 +02:00
Dimitris Panokostas
045acf2f9b
ci: change APPLE to Darwin checks in CMake
Apple will match all Apple operating systems, but we're really only interested in macOS
2024-09-25 07:57:01 +02:00
Dimitris Panokostas
22bf8e8804
Cmake packaging (#1431)
* modify CMakeLists.txt to be able to build packages for MacOS and Linux

* Moved pull request template to .github dir

* Moved code of conduct file under .github directory

* Removed gitmodules file

* Moved install extra dirs to only if we're not building an Apple bundle

* Added first version of a Deb package option to CPack

* Fixed double directory creation during installation/packaging

* Remove debian directory

We won't be using this, going for CPack instead

* Fixed package version

* Clean up contents of packages

* Fix dependencies and filename of .deb package

* Bump version to 6.3.5

* Add desktop file for Deb package

* Remove archive generator, the DEB one is good enough

* Change pipeline to use CMake for Linux targets

Let's generate some .deb files!
This is most likely missing stuff, like the distro name...

* Fix incorrect architecture names in cross-compiler

* Fix 32-bit arm package architecture

* ci: Allow 32-bit arm builds

* ci: disable the bullseye builds for now

Until we figure out a solution with Bullseye + CMake + SDL2_image/SDL2_ttf

* ci: fix expected targets

* ci: bring back bullseye builds

* Remove path from desktop shortcut

* Fixed typo in comment

* Set the version in the Project, use that for CPack

* Updated compiled and linker flags with no-pie properly

- There were some differences between the Makefile flags and CMake. Now they are identical
- Updated the Findmpg123.cmake file with the latest one from upstream

* Include bullseye build targets again
2024-09-23 18:20:16 +02:00
Dimitris Panokostas
dbd85a3714
ci: upgrade the minimum CMake version for capsimage
Get rid of a warning about older CMake versions being deprecated soon
2024-09-17 22:25:52 +02:00
Dimitris Panokostas
41d1274796
Fix capsimg (#1374)
* Remove capsimg submodule

* Add capsimg sources

* Add dependencies in Makefile and CMakeLists.txt to build libcapsimage.so

* Fix path in makefile

* Add libs to make clean also

* Automatically build capsimg as well

* Remove extra step to build capsimg from pipeline
2024-06-28 00:13:43 +02:00