Skip to content

Commit

Permalink
Squashed commit of the following:
Browse files Browse the repository at this point in the history
commit 75572f4
Author: Dimitris Panokostas <[email protected]>
Date:   Sat Nov 23 10:59:04 2024 +0100

    bugfix: ensure CPack also has correct capitalization (fixes #1514)

commit 2e70acc
Author: Dimitris Panokostas <[email protected]>
Date:   Sat Nov 23 10:45:29 2024 +0100

    bugfix: Linux builds should have PROJECT_NAME in lower case

    Looks like the CMAKE_SYSTEM_NAME variable is only valid AFTER the project is set.
    We need a capitalized name for macOS builds, but lowercase for linux ones.

commit a1591ee
Author: Dimitris Panokostas <[email protected]>
Date:   Fri Nov 22 20:55:07 2024 +0100

    chore: only write config options if they are enabled

    - Manual Crop
    - Drawbridge

    These options would be written to the config always, even if not enabled

commit 249a132
Author: Dimitris Panokostas <[email protected]>
Date:   Fri Nov 22 20:48:03 2024 +0100

    chore: bump options version to 7.0.0

commit 85044a8
Author: Dimitris Panokostas <[email protected]>
Date:   Fri Nov 22 18:57:06 2024 +0100

    enhancement: add ".vbi" in global ROM extensions also #1507

commit 63fee15
Author: Dimitris Panokostas <[email protected]>
Date:   Fri Nov 22 18:54:22 2024 +0100

    fix typo

    It's not vdi, but vbi

commit 2c1e921
Author: Dimitris Panokostas <[email protected]>
Date:   Fri Nov 22 18:52:07 2024 +0100

    bugfix: allow .vdi selection in Expansions ROMs #1507

    These types of files are VGA rom files, but they were filtered out based on the filename extensions

commit 1718e2c
Author: Dimitris Panokostas <[email protected]>
Date:   Fri Nov 22 18:38:44 2024 +0100

    bugfix: #1507 Expansions GUI CPU board fixes

    When selecting a CPU board from the dropdown, the sub-options did not get enables as expected

commit f7f09bf
Author: Dimitris Panokostas <[email protected]>
Date:   Fri Nov 22 08:39:49 2024 +0100

    Update README.md

    Remove obsolete info about bypassing security on MacOS installation

commit 9d0c218
Author: Dimitris Panokostas <[email protected]>
Date:   Fri Nov 22 00:46:20 2024 +0100

    ci: added missing team ID

commit a197c86
Author: Dimitris Panokostas <[email protected]>
Date:   Fri Nov 22 00:36:07 2024 +0100

    ci: added notary service steps

commit 10fe364
Author: Dimitris Panokostas <[email protected]>
Date:   Fri Nov 22 00:04:40 2024 +0100

    ci: fix macOS signing

commit 97a7021
Author: Dimitris Panokostas <[email protected]>
Date:   Thu Nov 21 23:53:19 2024 +0100

    ci: fix capitalization for MacOS App bundle

commit 0fe6e54
Author: Dimitris Panokostas <[email protected]>
Date:   Thu Nov 21 23:53:00 2024 +0100

    ci: Add Apple certificate signing to dylibs and app bundle

commit 0344272
Author: Dimitris Panokostas <[email protected]>
Date:   Thu Nov 21 20:29:38 2024 +0100

    ci: Added missing create keychain step

commit 935fcda
Author: Dimitris Panokostas <[email protected]>
Date:   Thu Nov 21 20:09:34 2024 +0100

    ci: add apple signing certificate setup in workflow

commit d9804b3
Author: Dimitris Panokostas <[email protected]>
Date:   Sat Nov 16 10:48:46 2024 +0100

    Update README.md (#1511)
  • Loading branch information
midwan committed Nov 23, 2024
1 parent 24e4725 commit fe82bb1
Show file tree
Hide file tree
Showing 8 changed files with 138 additions and 31 deletions.
108 changes: 104 additions & 4 deletions .github/workflows/c-cpp.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,16 +24,66 @@ jobs:
brew update
brew install sdl2 mpg123 sdl2_ttf sdl2_image flac libmpeg2 libserialport portmidi enet dylibbundler
- name: make for macOS X64
- name: Install the Apple certificate
env:
APPLE_DEVID_CERT_BASE64: ${{ secrets.APPLE_DEVID_CERT_BASE64 }}
APPLE_DEVID_CERT_P12_PASSWORD: ${{ secrets.APPLE_DEVID_CERT_P12_PASSWORD }}
APPLE_KEYCHAIN_PASSWORD: ${{ secrets.APPLE_KEYCHAIN_PASSWORD }}
run: |
# create variables
CERTIFICATE_PATH=$RUNNER_TEMP/apple_devid_cert.p12
KEYCHAIN_PATH=$RUNNER_TEMP/app-signing.keychain-db
# import certificate from secret
echo -n "$APPLE_DEVID_CERT_BASE64" | base64 --decode -o $CERTIFICATE_PATH
# create keychain
security create-keychain -p $APPLE_KEYCHAIN_PASSWORD $KEYCHAIN_PATH
security set-keychain-settings -lut 21600 $KEYCHAIN_PATH
security unlock-keychain -p $APPLE_KEYCHAIN_PASSWORD $KEYCHAIN_PATH
# import certificate to keychain
security import $CERTIFICATE_PATH -P $APPLE_DEVID_CERT_P12_PASSWORD -A -t cert -f pkcs12 -k $KEYCHAIN_PATH
security set-key-partition-list -S apple-tool:,apple: -s -k $APPLE_KEYCHAIN_PASSWORD $KEYCHAIN_PATH
security list-keychains -d user -s $KEYCHAIN_PATH
- name: Build for macOS X64
run: |
cmake -B build && cmake --build build -j4
- name: Codesign the dylibs
run: |
for file in build/Amiberry.app/Contents/Frameworks/*.dylib; do
if [ -f "$file" ]; then
codesign -s "Developer ID Application: Dimitris Panokostas (5GQP72592A)" -f -o runtime,hard $file
fi
done
- name: Codesign the app
run: |
codesign -s "Developer ID Application: Dimitris Panokostas (5GQP72592A)" -f -o runtime,hard build/Amiberry.app
- name: Create a zip to send to the notary service
run: |
zip -r Amiberry-${{ github.sha }}-macOS-x86_64.zip build/Amiberry.app
- name: Send the file to be notarized by Apple
run: |
xcrun notarytool submit Amiberry-${{ github.sha }}-macOS-x86_64.zip --wait --apple-id "[email protected]" --password ${{ secrets.APPLE_NOTARY_APP_PASSWORD }} --team-id ${{ secrets.APPLE_TEAM_ID }}
- name: Staple the notary receipt to the application bundle
run: |
xcrun stapler staple build/Amiberry.app
- name: Create DMG package
run: |
cpack -G DragNDrop --config build/CPackConfig.cmake
- name: Upload artifact
uses: actions/upload-artifact@v4
with:
name: amiberry-macOS-64bit-intel
path: amiberry-*.dmg
path: Amiberry-*.dmg

build-macOS-Apple-Silicon:
runs-on: macos-latest
Expand All @@ -47,16 +97,66 @@ jobs:
brew upgrade
brew install sdl2 mpg123 sdl2_ttf sdl2_image flac libmpeg2 libserialport portmidi enet dylibbundler
- name: make for macOS Apple Silicon
- name: Install the Apple certificate
env:
APPLE_DEVID_CERT_BASE64: ${{ secrets.APPLE_DEVID_CERT_BASE64 }}
APPLE_DEVID_CERT_P12_PASSWORD: ${{ secrets.APPLE_DEVID_CERT_P12_PASSWORD }}
APPLE_KEYCHAIN_PASSWORD: ${{ secrets.APPLE_KEYCHAIN_PASSWORD }}
run: |
# create variables
CERTIFICATE_PATH=$RUNNER_TEMP/apple_devid_cert.p12
KEYCHAIN_PATH=$RUNNER_TEMP/app-signing.keychain-db
# import certificate from secret
echo -n "$APPLE_DEVID_CERT_BASE64" | base64 --decode -o $CERTIFICATE_PATH
# create keychain
security create-keychain -p $APPLE_KEYCHAIN_PASSWORD $KEYCHAIN_PATH
security set-keychain-settings -lut 21600 $KEYCHAIN_PATH
security unlock-keychain -p $APPLE_KEYCHAIN_PASSWORD $KEYCHAIN_PATH
# import certificate to keychain
security import $CERTIFICATE_PATH -P $APPLE_DEVID_CERT_P12_PASSWORD -A -t cert -f pkcs12 -k $KEYCHAIN_PATH
security set-key-partition-list -S apple-tool:,apple: -s -k $APPLE_KEYCHAIN_PASSWORD $KEYCHAIN_PATH
security list-keychains -d user -s $KEYCHAIN_PATH
- name: Build for macOS Apple Silicon
run: |
cmake -B build && cmake --build build -j4
- name: Codesign the dylibs
run: |
for file in build/Amiberry.app/Contents/Frameworks/*.dylib; do
if [ -f "$file" ]; then
codesign -s "Developer ID Application: Dimitris Panokostas (5GQP72592A)" -f -o runtime,hard $file
fi
done
- name: Codesign the app
run: |
codesign -s "Developer ID Application: Dimitris Panokostas (5GQP72592A)" -f -o runtime,hard build/Amiberry.app
- name: Create a zip to send to the notary service
run: |
zip -r Amiberry-${{ github.sha }}-macOS-Apple-Silicon.zip build/Amiberry.app
- name: Send the file to be notarized by Apple
run: |
xcrun notarytool submit Amiberry-${{ github.sha }}-macOS-Apple-Silicon.zip --wait --apple-id "[email protected]" --password ${{ secrets.APPLE_NOTARY_APP_PASSWORD }} --team-id ${{ secrets.APPLE_TEAM_ID }}
- name: Staple the notary receipt to the application bundle
run: |
xcrun stapler staple build/Amiberry.app
- name: Create DMG package
run: |
cpack -G DragNDrop --config build/CPackConfig.cmake
- name: Upload artifact
uses: actions/upload-artifact@v4
with:
name: amiberry-macOS-64bit-apple-silicon
path: amiberry-*.dmg
path: Amiberry-*.dmg

build-ubuntu-24-amd64:
runs-on: ubuntu-24.04
Expand Down
12 changes: 5 additions & 7 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -21,18 +21,16 @@ set(VERSION_PATCH "0")

set(VERSION "${VERSION_MAJOR}.${VERSION_MINOR}.${VERSION_PATCH}")

if (${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
set(PROJECT_NAME "Amiberry")
else ()
set(PROJECT_NAME "amiberry")
endif ()

project(${PROJECT_NAME}
project(amiberry
VERSION ${VERSION}
LANGUAGES C CXX
DESCRIPTION "Optimized Amiga emulator for various platforms"
HOMEPAGE_URL "https://amiberry.com"
)
if (CMAKE_SYSTEM_NAME STREQUAL "Darwin")
set(PROJECT_NAME "Amiberry")
set(CMAKE_PROJECT_NAME "Amiberry")
endif ()
set(PROJECT_COMPANY_NAME "BlitterStudio")
set(PROJECT_COMPANY_NAMESPACE "com.blitterstudio") # Reverse domain name notation

Expand Down
4 changes: 2 additions & 2 deletions cmake/SourceFiles.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -392,8 +392,8 @@ set_target_properties(${PROJECT_NAME} PROPERTIES
MACOSX_BUNDLE_EXECUTABLE_NAME "Amiberry"
MACOSX_BUNDLE_INFO_STRING "${PROJECT_NAME} ${PROJECT_VERSION}"
MACOSX_BUNDLE_ICON_FILE "data/icon"
MACOSX_BUNDLE_GUI_IDENTIFIER "com.blitterstudio.amiberry"
XCODE_ATTRIBUTE_PRODUCT_BUNDLE_IDENTIFIER "com.blitterstudio.amiberry"
MACOSX_BUNDLE_GUI_IDENTIFIER "com.blitterstudio.Amiberry"
XCODE_ATTRIBUTE_PRODUCT_BUNDLE_IDENTIFIER "com.blitterstudio.Amiberry"
MACOSX_BUNDLE_LONG_VERSION_STRING ${PROJECT_VERSION}
MACOSX_BUNDLE_BUNDLE_NAME "Amiberry"
MACOSX_BUNDLE_SHORT_VERSION_STRING ${PROJECT_VERSION}
Expand Down
2 changes: 0 additions & 2 deletions docs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,6 @@ If you're on Arch Linux you'll find Amiberry on the [AUR](https://aur.archlinux.

Amiberry is available as a DMG package for macOS. You can download the latest version from the [Releases](https://github.com/BlitterStudio/amiberry/releases) area.

After installing it in your Applications folder, you'll need to open a console and run `xattr -rd com.apple.quarantine Amiberry.app`, to whitelist it and allow it to run. Alternatively, macOS might ask you about allowing it to run, and you'll have to manually do that (the exact steps differ from one macOS version to another).

### Distro package management

Some distros (like RetroPie, DietPi, Pimiga and others) already include Amiberry either pre-installed, or through their package management systems. Please follow the methods provided in those distros for a smoother experience, and refer to their owners for support during this process.
Expand Down
6 changes: 3 additions & 3 deletions src/include/options.h
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,9 @@
#include "traps.h"
#include "guisan/color.hpp"

#define UAEMAJOR 6
#define UAEMINOR 3
#define UAESUBREV 5
#define UAEMAJOR 7
#define UAEMINOR 0
#define UAESUBREV 0

#define MAX_AMIGADISPLAYS 1

Expand Down
29 changes: 19 additions & 10 deletions src/osdep/amiberry.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2505,10 +2505,16 @@ void target_save_options(struct zfile* f, struct uae_prefs* p)

cfgfile_target_dwrite(f, _T("gfx_horizontal_offset"), _T("%d"), p->gfx_horizontal_offset);
cfgfile_target_dwrite(f, _T("gfx_vertical_offset"), _T("%d"), p->gfx_vertical_offset);
cfgfile_target_dwrite_bool(f, _T("gfx_auto_crop"), p->gfx_auto_crop);
cfgfile_target_dwrite_bool(f, _T("gfx_manual_crop"), p->gfx_manual_crop);
cfgfile_target_dwrite(f, _T("gfx_manual_crop_width"), _T("%d"), p->gfx_manual_crop_width);
cfgfile_target_dwrite(f, _T("gfx_manual_crop_height"), _T("%d"), p->gfx_manual_crop_height);
if (p->gfx_auto_crop)
{
cfgfile_target_dwrite_bool(f, _T("gfx_auto_crop"), p->gfx_auto_crop);
}
else if (p->gfx_manual_crop)
{
cfgfile_target_dwrite_bool(f, _T("gfx_manual_crop"), p->gfx_manual_crop);
cfgfile_target_dwrite(f, _T("gfx_manual_crop_width"), _T("%d"), p->gfx_manual_crop_width);
cfgfile_target_dwrite(f, _T("gfx_manual_crop_height"), _T("%d"), p->gfx_manual_crop_height);
}
cfgfile_target_dwrite(f, _T("gfx_correct_aspect"), _T("%d"), p->gfx_correct_aspect);
cfgfile_target_dwrite(f, _T("kbd_led_num"), _T("%d"), p->kbd_led_num);
cfgfile_target_dwrite(f, _T("kbd_led_scr"), _T("%d"), p->kbd_led_scr);
Expand All @@ -2521,12 +2527,15 @@ void target_save_options(struct zfile* f, struct uae_prefs* p)
cfgfile_target_dwrite_str(f, _T("fullscreen_toggle"), p->fullscreen_toggle);
cfgfile_target_dwrite_str(f, _T("minimize"), p->minimize);

cfgfile_target_dwrite(f, _T("drawbridge_driver"), _T("%d"), p->drawbridge_driver);
cfgfile_target_dwrite_bool(f, _T("drawbridge_serial_autodetect"), p->drawbridge_serial_auto);
cfgfile_target_write_str(f, _T("drawbridge_serial_port"), p->drawbridge_serial_port);
cfgfile_target_dwrite_bool(f, _T("drawbridge_smartspeed"), p->drawbridge_smartspeed);
cfgfile_target_dwrite_bool(f, _T("drawbridge_autocache"), p->drawbridge_autocache);
cfgfile_target_dwrite_bool(f, _T("drawbridge_connected_drive_b"), p->drawbridge_connected_drive_b);
if (p->drawbridge_driver > 0)
{
cfgfile_target_dwrite(f, _T("drawbridge_driver"), _T("%d"), p->drawbridge_driver);
cfgfile_target_dwrite_bool(f, _T("drawbridge_serial_autodetect"), p->drawbridge_serial_auto);
cfgfile_target_write_str(f, _T("drawbridge_serial_port"), p->drawbridge_serial_port);
cfgfile_target_dwrite_bool(f, _T("drawbridge_smartspeed"), p->drawbridge_smartspeed);
cfgfile_target_dwrite_bool(f, _T("drawbridge_autocache"), p->drawbridge_autocache);
cfgfile_target_dwrite_bool(f, _T("drawbridge_connected_drive_b"), p->drawbridge_connected_drive_b);
}

cfgfile_target_dwrite_bool(f, _T("alt_tab_release"), p->alt_tab_release);
cfgfile_target_dwrite(f, _T("sound_pullmode"), _T("%d"), p->sound_pullmode);
Expand Down
2 changes: 1 addition & 1 deletion src/osdep/amiberry_gui.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -380,7 +380,7 @@ static int isromext(const std::string& path, bool deepscan)
return 0;
const std::string ext = path.substr(ext_pos + 1);

static const std::vector<std::string> extensions = { "rom", "bin", "adf", "key", "a500", "a1200", "a4000", "cdtv", "cd32" };
static const std::vector<std::string> extensions = { "rom", "bin", "vbi", "adf", "key", "a500", "a1200", "a4000", "cdtv", "cd32" };
if (std::find(extensions.begin(), extensions.end(), ext) != extensions.end())
return 1;

Expand Down
6 changes: 4 additions & 2 deletions src/osdep/gui/PanelExpansions.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -891,7 +891,7 @@ class ExpansionsActionListener : public gcn::ActionListener

if (source == btnScsiRomChooser)
{
const char* filter[] = { ".rom", ".bin", "\0" };
const char* filter[] = { ".rom", ".bin", ".vbi", "\0" };
std::string full_path = SelectFile("Select ROM", get_rom_path(), filter);
if (!full_path.empty())
{
Expand All @@ -908,7 +908,7 @@ class ExpansionsActionListener : public gcn::ActionListener
}
else if (source == btnCpuBoardRomChooser)
{
const char* filter[] = { ".rom", ".bin", "\0" };
const char* filter[] = { ".rom", ".bin", ".vbi", "\0" };
std::string full_path = SelectFile("Select ROM", get_rom_path(), filter);
if (!full_path.empty())
{
Expand Down Expand Up @@ -1022,6 +1022,7 @@ class ExpansionsActionListener : public gcn::ActionListener
}
cpuboard_set_cpu(&changed_prefs);
setcpuboardmemsize();
enable_for_expansion2dlg();
values_to_expansion2dlg();
}
}
Expand All @@ -1041,6 +1042,7 @@ class ExpansionsActionListener : public gcn::ActionListener
}
cpuboard_set_cpu(&changed_prefs);
setcpuboardmemsize();
enable_for_expansion2dlg();
values_to_expansion2dlg();
}
}
Expand Down

0 comments on commit fe82bb1

Please sign in to comment.