mirror of
https://github.com/jfdelnero/HxCFloppyEmulator.git
synced 2026-10-26 22:10:31 +00:00
Improve Mac bundle, add README for CLI installation.
This commit is contained in:
1 parent
9ea6fc0342
commit
82e636afbc
1 file changed
+42
-62
+42
-62
@@ -1,30 +1,39 @@
|
||||
#!/usr/bin/env bash
|
||||
export VERSION=`grep "define STR_FILE_VERSION2" version.h | cut -f2 -d\"`
|
||||
VERSION=`grep "define STR_FILE_VERSION2" version.h | cut -f2 -d\"`
|
||||
|
||||
if [ "$1" = "HXCSOFT" ]; then
|
||||
export NAME="HxCFloppyEmulator"
|
||||
export DMGNAME="HxCFloppyEmulator"
|
||||
|
||||
export CLI_PATH="hxcfe_cmdline"
|
||||
export CLI_EXEC="hxcfe"
|
||||
|
||||
export GUI_PATH="HxCFloppyEmulator.app"
|
||||
export GUI_EXEC="hxcfloppyemulator"
|
||||
case "$1" in
|
||||
HXCSOFT)
|
||||
NAME="HxCFloppyEmulator"
|
||||
DMGNAME="HxCFloppyEmulator"
|
||||
INSTALL_PATH="HxCFloppyEmulator.app"
|
||||
LIBS="libhxcfe.dylib libusbhxcfe.dylib"
|
||||
GUI_EXEC="hxcfloppyemulator"
|
||||
CLI_EXEC="hxcfe"
|
||||
;;
|
||||
DOSDISKBROWSER)
|
||||
NAME="DosDiskBrowser"
|
||||
DMGNAME="DosDiskBrowser"
|
||||
INSTALL_PATH="DosDiskBrowser.app"
|
||||
LIBS="libhxcfe.dylib"
|
||||
GUI_EXEC="dosdiskbrowser"
|
||||
CLI_EXEC=""
|
||||
;;
|
||||
*)
|
||||
echo "Usage: $0 {HXCSOFT|DOSDISKBROWSER}"
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
|
||||
echo Creating App bundle : ${NAME}
|
||||
|
||||
mkdir -p ${CLI_PATH}/{Frameworks,App}
|
||||
install hxcfe ${CLI_PATH}/App/${CLI_EXEC}
|
||||
install libhxcfe.dylib libusbhxcfe.dylib ${CLI_PATH}/Frameworks
|
||||
mkdir -p ${INSTALL_PATH}/Contents/{Resources,MacOS,Frameworks}
|
||||
|
||||
mkdir -p ${GUI_PATH}/Contents/{Resources,MacOS,Frameworks}
|
||||
echo APPLnone > ${INSTALL_PATH}/Contents/PkgInfo
|
||||
iconutil --convert icns --output ${INSTALL_PATH}/Contents/Resources/icons.icns ../HxCFloppyEmulator_software/sources/mac/icons/hxcfloppyemulator.iconset/
|
||||
install ${GUI_EXEC} ${CLI_EXEC} ${INSTALL_PATH}/Contents/MacOS
|
||||
install ${LIBS} ${INSTALL_PATH}/Contents/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
|
||||
|
||||
cat << EOF > ${GUI_PATH}/Contents/info.plist
|
||||
cat << EOF > ${INSTALL_PATH}/Contents/info.plist
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist SYSTEM "file://localhost/System/Library/DTDs/PropertyList.dtd">
|
||||
<plist version="0.9">
|
||||
@@ -47,51 +56,22 @@ cat << EOF > ${GUI_PATH}/Contents/info.plist
|
||||
</plist>
|
||||
EOF
|
||||
|
||||
hdiutil create ${DMGNAME}.dmg -srcfolder ${CLI_PATH} -srcfolder ${GUI_PATH} -ov -volname ${DMGNAME}
|
||||
if [ -n "${CLI_EXEC}" ]; then
|
||||
|
||||
fi
|
||||
cat << EOF > ${INSTALL_PATH}/Contents/MacOS/README
|
||||
${CLI_EXEC} is the command line version of ${NAME}.
|
||||
It can run from here, or be installed to /usr/local/bin or any other convenient directory \
|
||||
in your PATH.
|
||||
It will look for its libraries (${LIBS}) in ../lib or ../Frameworks relative to the executable.
|
||||
|
||||
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 dosdiskbrowser ${GUI_PATH}/Contents/MacOS/${GUI_EXEC}
|
||||
install libhxcfe.dylib ${GUI_PATH}/Contents/Frameworks
|
||||
|
||||
cat << EOF > ${GUI_PATH}/Contents/info.plist
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist SYSTEM "file://localhost/System/Library/DTDs/PropertyList.dtd">
|
||||
<plist version="0.9">
|
||||
<dict>
|
||||
<key>CFBundleIdentifier</key>
|
||||
<string>com.hxc2001.${GUI_EXEC}</string>
|
||||
<key>CFBundleName</key>
|
||||
<string>${NAME}</string>
|
||||
<key>CFBundlePackageType</key>
|
||||
<string>APPL</string>
|
||||
<key>CFBundleVersion</key>
|
||||
<string>1</string>
|
||||
<key>CFBundleShortVersionString</key>
|
||||
<string>${VERSION}</string>
|
||||
<key>CFBundleIconFile</key>
|
||||
<string>icons.icns</string>
|
||||
<key>CFBundleSignature</key>
|
||||
<string>none</string>
|
||||
</dict>
|
||||
</plist>
|
||||
To use SPS CapsLib / CAPSImage for IPF support, install it in one of \
|
||||
the following locations :
|
||||
- the same directory as libhxcfe.dylib
|
||||
- /Library/Frameworks
|
||||
- /usr/local/lib
|
||||
and make sure the SPSCAPS_LIB_NAME internal parameter is set to the correct name.
|
||||
EOF
|
||||
|
||||
hdiutil create ${DMGNAME}.dmg -srcfolder ${GUI_PATH} -ov -volname ${DMGNAME}
|
||||
|
||||
fi
|
||||
|
||||
hdiutil create ${DMGNAME}.dmg -srcfolder ${INSTALL_PATH} -ov -volname ${DMGNAME}
|
||||
Reference in new issue
Block a user