From fe6b69750ca745d9836871e4fe338242e5bb03be Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jean-Fran=C3=A7ois=20DEL=20NERO?= Date: Sun, 15 Jun 2025 00:02:30 +0200 Subject: [PATCH] DosDiskBrowser : macOs build. --- .github/workflows/ci-macos.yml | 17 ++++- HxCFloppyEmulator_software/build/Makefile | 14 ++++ build/maccreatebundle | 79 ++++++++++++++--------- 3 files changed, 79 insertions(+), 31 deletions(-) diff --git a/.github/workflows/ci-macos.yml b/.github/workflows/ci-macos.yml index 5e29a1c0..1cdca914 100755 --- a/.github/workflows/ci-macos.yml +++ b/.github/workflows/ci-macos.yml @@ -19,8 +19,21 @@ jobs: - name: Build run: cd build && make -j2 - name: Package - run: cd build && ./maccreatebundle + run: cd build && ./maccreatebundle HXCSOFT - uses: actions/upload-artifact@master with: name: hxcfloppyemulator-macos-${{ github.sha }} - path: build/HxCFloppyEmulator.dmg \ No newline at end of file + path: build/HxCFloppyEmulator.dmg + + build-hxcdiskbrowser-macos: + runs-on: macOS-latest + steps: + - uses: actions/checkout@master + - name: Build + run: cd build && make STANDALONEFSBROWSER_BUILD=1 -j2 + - name: Package + run: cd build && ./maccreatebundle DOSDISKBROWSER + - uses: actions/upload-artifact@master + with: + name: hxcfloppyemulator-dosdiskbrowser-macos-${{ github.sha }} + path: build/DosDiskBrowser.dmg \ No newline at end of file diff --git a/HxCFloppyEmulator_software/build/Makefile b/HxCFloppyEmulator_software/build/Makefile index 1b319e2d..87a12822 100644 --- a/HxCFloppyEmulator_software/build/Makefile +++ b/HxCFloppyEmulator_software/build/Makefile @@ -119,9 +119,19 @@ endif ifdef STANDALONEFSBROWSER_BUILD CFLAGS += -DSTANDALONEFSBROWSER + + EXEC = dosdiskbrowser + +ifeq ($(TARGET), mingw64) EXEC = DosDiskBrowser.exe endif +ifeq ($(TARGET), mingw32) + EXEC = DosDiskBrowser.exe +endif + +endif + FTDIFLOPPYEMU=usb_hxcfloppyemulator.o variablebitrate.o GUI = main_gui.o msg_txt.o gui_strings.o about_gui.o batch_converter_window.o floppy_dump_window.o floppy_infos_window.o license_gui.o \ @@ -225,6 +235,10 @@ HxCFloppyEmulator.exe: win32_hxcfloppy_res.o main.o utils.o $(GUI) $(MICROINTRO) $(CPP) -o $@ $^ $(LDFLAGS) cp $@ ../../build +dosdiskbrowser: main.o utils.o $(GUI) $(MICROINTRO) loader.o soft_cfg_file.o fileselector.o $(FLTKLIB) $(LIBHXCFE) ../../build/libhxcadaptor.a + $(CPP) -o $@ $^ $(LDFLAGS) + cp $@ ../../build + DosDiskBrowser.exe: win32_hxcfloppy_res.o main.o utils.o $(GUI) $(MICROINTRO) loader.o soft_cfg_file.o fileselector.o $(FLTKLIB) $(LIBHXCFE) $(LIBUSBHXCFE) ../../build/libhxcadaptor.a $(CPP) -o $@ $^ $(LDFLAGS) cp $@ ../../build diff --git a/build/maccreatebundle b/build/maccreatebundle index 3e6c8736..9f7e6bd9 100755 --- a/build/maccreatebundle +++ b/build/maccreatebundle @@ -1,46 +1,67 @@ #!/usr/bin/env bash export VERSION=`grep "define STR_FILE_VERSION2" version.h | cut -f2 -d\"` -export NAME="HxCFloppyEmulator" -export DMGNAME="HxCFloppyEmulator" -export CLI_PATH="hxcfe_cmdline" -export CLI_EXEC="hxcfe" +if [ "$1" = "HXCSOFT" ]; then + export NAME="HxCFloppyEmulator" + export DMGNAME="HxCFloppyEmulator" -export GUI_PATH="HxCFloppyEmulator.app" -export GUI_EXEC="hxcfloppyemulator" + export CLI_PATH="hxcfe_cmdline" + export CLI_EXEC="hxcfe" -echo Creating App bundle : ${NAME} + export GUI_PATH="HxCFloppyEmulator.app" + export GUI_EXEC="hxcfloppyemulator" -mkdir -p ${CLI_PATH}/{Frameworks,App} -install hxcfe ${CLI_PATH}/App/${CLI_EXEC} -install libhxcfe.dylib libusbhxcfe.dylib ${CLI_PATH}/Frameworks + echo Creating App bundle : ${NAME} -mkdir -p ${GUI_PATH}/Contents/{Resources,MacOS,Frameworks} + mkdir -p ${CLI_PATH}/{Frameworks,App} + install hxcfe ${CLI_PATH}/App/${CLI_EXEC} + install libhxcfe.dylib libusbhxcfe.dylib ${CLI_PATH}/Frameworks -echo APPLnone > ${GUI_PATH}/Contents/PkgInfo -iconutil --convert icns --output ${GUI_PATH}/Contents/Resources/icons.icns ../HxCFloppyEmulator_software/sources/mac/icons/hxcfloppyemulator.iconset/ -install hxcfloppyemulator ${GUI_PATH}/Contents/MacOS/${GUI_EXEC} -install libhxcfe.dylib libusbhxcfe.dylib ${GUI_PATH}/Contents/Frameworks + mkdir -p ${GUI_PATH}/Contents/{Resources,MacOS,Frameworks} + + echo APPLnone > ${GUI_PATH}/Contents/PkgInfo + iconutil --convert icns --output ${GUI_PATH}/Contents/Resources/icons.icns ../HxCFloppyEmulator_software/sources/mac/icons/hxcfloppyemulator.iconset/ + install hxcfloppyemulator ${GUI_PATH}/Contents/MacOS/${GUI_EXEC} + install libhxcfe.dylib libusbhxcfe.dylib ${GUI_PATH}/Contents/Frameworks + +fi + +if [ "$1" = "DOSDISKBROWSER" ]; then + export NAME="DosDiskBrowser" + export DMGNAME="DosDiskBrowser" + + export GUI_PATH="DosDiskBrowser.app" + export GUI_EXEC="dosdiskbrowser" + + echo Creating App bundle : ${NAME} + + mkdir -p ${GUI_PATH}/Contents/{Resources,MacOS,Frameworks} + + echo APPLnone > ${GUI_PATH}/Contents/PkgInfo + iconutil --convert icns --output ${GUI_PATH}/Contents/Resources/icons.icns ../HxCFloppyEmulator_software/sources/mac/icons/hxcfloppyemulator.iconset/ + install hxcfloppyemulator ${GUI_PATH}/Contents/MacOS/${GUI_EXEC} + install libhxcfe.dylib ${GUI_PATH}/Contents/Frameworks +fi cat << EOF > ${GUI_PATH}/Contents/info.plist - CFBundleIdentifier - com.hxc2001.${GUI_EXEC} - CFBundleName - ${NAME} - CFBundlePackageType - APPL - CFBundleVersion - 1 - CFBundleShortVersionString - ${VERSION} - CFBundleIconFile - icons.icns - CFBundleSignature - none + CFBundleIdentifier + com.hxc2001.${GUI_EXEC} + CFBundleName + ${NAME} + CFBundlePackageType + APPL + CFBundleVersion + 1 + CFBundleShortVersionString + ${VERSION} + CFBundleIconFile + icons.icns + CFBundleSignature + none EOF