Cleanup root directory
Cleans up the root directory of the GitHub source tree and starts to separate platform-specific installing and packaging logic from the master CMakeLists.txt. Closes #2201
This commit is contained in:
27
cmake/CMakeLists.txt
Normal file
27
cmake/CMakeLists.txt
Normal file
@@ -0,0 +1,27 @@
|
||||
SET(CPACK_PACKAGE_DESCRIPTION_SUMMARY "${PROJECT_DESCRIPTION}")
|
||||
SET(CPACK_PACKAGE_VENDOR "${PROJECT_AUTHOR}")
|
||||
SET(CPACK_PACKAGE_DESCRIPTION_FILE "${CMAKE_SOURCE_DIR}/README.md")
|
||||
SET(CPACK_RESOURCE_FILE_LICENSE "${CMAKE_SOURCE_DIR}/LICENSE.txt")
|
||||
SET(CPACK_PACKAGE_VERSION_MAJOR "${VERSION_MAJOR}")
|
||||
SET(CPACK_PACKAGE_VERSION_MINOR "${VERSION_MINOR}")
|
||||
SET(CPACK_PACKAGE_VERSION_PATCH "${VERSION_PATCH}")
|
||||
SET(CPACK_PACKAGE_INSTALL_DIRECTORY "${PROJECT_NAME_UCASE}")
|
||||
SET(CPACK_SOURCE_GENERATOR "TBZ2")
|
||||
SET(CPACK_SOURCE_PACKAGE_FILE_NAME "${CMAKE_PROJECT_NAME}-${VERSION}")
|
||||
IF(VERSION_SUFFIX)
|
||||
SET(CPACK_PACKAGE_VERSION_PATCH "${VERSION_PATCH}-${VERSION_SUFFIX}")
|
||||
ENDIF()
|
||||
IF(NOT DEFINED WIN32)
|
||||
SET(CPACK_STRIP_FILES "bin/${CMAKE_PROJECT_NAME};${PLUGIN_DIR}/*.so")
|
||||
SET(CPACK_PACKAGE_EXECUTABLES "${CMAKE_PROJECT_NAME}" "${PROJECT_NAME_UCASE} binary")
|
||||
ENDIF()
|
||||
|
||||
IF(LMMS_BUILD_WIN32)
|
||||
ADD_SUBDIRECTORY(nsis)
|
||||
ELSEIF(LMMS_BUILD_APPLE)
|
||||
ADD_SUBDIRECTORY(apple)
|
||||
ELSE()
|
||||
ADD_SUBDIRECTORY(linux)
|
||||
ENDIF()
|
||||
|
||||
INCLUDE(CPack)
|
||||
24
cmake/apple/CMakeLists.txt
Normal file
24
cmake/apple/CMakeLists.txt
Normal file
@@ -0,0 +1,24 @@
|
||||
SET(MACOSX_BUNDLE_ICON_FILE "lmms.icns")
|
||||
SET(MACOSX_BUNDLE_GUI_IDENTIFIER "${PROJECT_NAME_UCASE}")
|
||||
SET(MACOSX_BUNDLE_LONG_VERSION_STRING "${VERSION}")
|
||||
SET(MACOSX_BUNDLE_BUNDLE_NAME "${PROJECT_NAME_UCASE}")
|
||||
SET(MACOSX_BUNDLE_SHORT_VERSION_STRING "${VERSION}")
|
||||
SET(MACOSX_BUNDLE_BUNDLE_VERSION "${VERSION}")
|
||||
SET(MACOSX_BUNDLE_COPYRIGHT "${PROJECT_COPYRIGHT}")
|
||||
SET(MACOSX_BUNDLE_MIMETYPE "application/x-lmms-project")
|
||||
SET(MACOSX_BUNDLE_MIMETYPE_ICON "project.icns")
|
||||
SET(MACOSX_BUNDLE_MIMETYPE_ID "io.lmms")
|
||||
SET(MACOSX_BUNDLE_PROJECT_URL "${PROJECT_URL}")
|
||||
|
||||
CONFIGURE_FILE("lmms.plist.in" "${CMAKE_INSTALL_PREFIX}/Info.plist")
|
||||
CONFIGURE_FILE("install_apple.sh.in" "${CMAKE_BINARY_DIR}/install_apple.sh" @ONLY)
|
||||
CONFIGURE_FILE("package_apple.sh.in" "${CMAKE_BINARY_DIR}/package_apple.sh" @ONLY)
|
||||
|
||||
# Add execute permissions to install script
|
||||
EXECUTE_PROCESS(COMMAND chmod u+x ${CMAKE_BINARY_DIR}/install_apple.sh)
|
||||
INSTALL(CODE "EXECUTE_PROCESS(COMMAND ${CMAKE_BINARY_DIR}/install_apple.sh)")
|
||||
|
||||
# TODO: Add PACKAGE target using package_apple_dmg.sh
|
||||
|
||||
|
||||
|
||||
BIN
cmake/apple/dmg_branding.png
Normal file
BIN
cmake/apple/dmg_branding.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 18 KiB |
121
cmake/apple/install_apple.sh.in
Normal file
121
cmake/apple/install_apple.sh.in
Normal file
@@ -0,0 +1,121 @@
|
||||
#!/bin/bash
|
||||
#title :install_apple.sh
|
||||
#description :Creates Apple ".app" bundle for LMMS
|
||||
#author :Tres Finocchiaro
|
||||
#date :20140504
|
||||
#version :1.1
|
||||
#usage :bash create_applet_installer.sh
|
||||
#notes :See also https://github.com/LMMS
|
||||
#notes :Troubleshooting try: export DYLD_PRINT_LIBRARIES=1; export VERBOSE=1;
|
||||
#requires :deploymacqt
|
||||
#=========================================================================================
|
||||
|
||||
# MacPorts Location
|
||||
MACPORTS=/opt/local
|
||||
|
||||
# LMMS project root directory (extracted source)
|
||||
CMAKE_SRC=@CMAKE_SOURCE_DIR@
|
||||
|
||||
# LMMS compiled (install) resources
|
||||
CMAKE_INSTALL=@CMAKE_INSTALL_PREFIX@
|
||||
|
||||
# LMMS working build directory
|
||||
CMAKE_BUILD=$(cd @CMAKE_CURRENT_BINARY_DIR@/../..; pwd)
|
||||
|
||||
# STK rawwaves directory
|
||||
STK_RAWWAVE=${HOME}/stk-*/rawwaves
|
||||
|
||||
# Place to create ".app" bundle
|
||||
APP=${HOME}/Desktop/LMMS.app
|
||||
|
||||
# MacPorts installs libreadline with wrong permissions
|
||||
LIBREADLINE=${MACPORTS}/lib/libreadline.6.2.dylib
|
||||
|
||||
# The DMG packager script location
|
||||
DMG_SCRIPT_SRC=${CMAKE_BUILD}/package_apple.sh
|
||||
DMG_SCRIPT_DST=${HOME}/Desktop/package_apple.sh
|
||||
|
||||
#=========================================================================================
|
||||
|
||||
MSG_COLOR='\x1B[1;36m'
|
||||
COLOR_RESET='\x1B[0m'
|
||||
echo -e "${MSG_COLOR}\n\nCreating App Bundle \"${APP}\"...${COLOR_RESET}"
|
||||
|
||||
# Check for u+w permissions on libreadline
|
||||
CHECKREADLINE=$(stat -f "%p" $LIBREADLINE)
|
||||
CHECKREADLINE=${CHECKREADLINE:3:1}
|
||||
if [ "${CHECKREADLINE}" != "7" ]
|
||||
then
|
||||
echo -e "\n\n\t\t\t\t***********\n\t\t\t\t* WARNING *\n\t\t\t\t***********"
|
||||
echo -e "File ${LIBREADLINE} is not marked as user writable."
|
||||
echo -e "This will break macdeployqt's linking process after it is copied."
|
||||
echo -e "A sudo password is required to elevate and fix using chmod u+w."
|
||||
echo -e "\nPLEASE ENTER SUDO PASSWORD:"
|
||||
sudo chmod u+w "${MACPORTS}/lib/libreadline.6.2.dylib"
|
||||
fi
|
||||
|
||||
# Remove any old .app bundles
|
||||
rm -Rf ${APP}
|
||||
|
||||
# Create new bundle, copy our built code to it
|
||||
mkdir -p ${APP}
|
||||
cd ${CMAKE_INSTALL}
|
||||
mkdir ${APP}/Contents
|
||||
cp -R * ${APP}/Contents
|
||||
|
||||
# Manually copy STK rawwaves
|
||||
mkdir -p ${APP}/Contents/share/stk/rawwaves
|
||||
cp ${STK_RAWWAVE}/*.raw ${APP}/Contents/share/stk/rawwaves
|
||||
|
||||
# Make all libraries writable for macdeployqt
|
||||
cd ${APP}
|
||||
find . -type f -print0 | xargs -0 chmod u+w
|
||||
|
||||
# Move lmms binary to the proper location
|
||||
mkdir -p ${APP}/Contents/MacOS
|
||||
mv ${APP}/Contents/bin/lmms ${APP}/Contents/MacOS
|
||||
rm -rf ${APP}/Contents/bin
|
||||
|
||||
# Move libraries to proper locations
|
||||
mkdir -p ${APP}/Contents/Frameworks
|
||||
mv ${APP}/Contents/lib/lmms/libZynAddSubFxCore.dylib \
|
||||
${APP}/Contents/Frameworks/libZynAddSubFxCore.dylib
|
||||
|
||||
mv ${APP}/Contents/lib/lmms/RemoteZynAddSubFx \
|
||||
${APP}/Contents/MacOS/RemoteZynAddSubFx
|
||||
|
||||
# Fix more Zyn Linking issues
|
||||
install_name_tool -change libZynAddSubFxCore.dylib \
|
||||
@loader_path/../../Frameworks/libZynAddSubFxCore.dylib \
|
||||
${APP}/Contents/lib/lmms/libzynaddsubfx.so
|
||||
|
||||
install_name_tool -change ${CMAKE_BUILD}/plugins/zynaddsubfx/libZynAddSubFxCore.dylib \
|
||||
@loader_path/../../Frameworks/libZynAddSubFxCore.dylib \
|
||||
${APP}/Contents/MacOS/RemoteZynAddSubFx
|
||||
|
||||
# Build a list of shared objects in target/lib/lmms
|
||||
for file in ${APP}/Contents/lib/lmms/*.so; do
|
||||
_executables="${_executables} -executable=${APP}/Contents/lib/lmms/${file##*/}"
|
||||
done
|
||||
|
||||
# Build a list of shared objects in target/lib/lmms/ladspa
|
||||
for file in ${APP}/Contents/lib/lmms/ladspa/*.so; do
|
||||
_executables="${_executables} -executable=${APP}/Contents/lib/lmms/ladspa/${file##*/}"
|
||||
done
|
||||
|
||||
# Additional binaries that require linking
|
||||
_executables="${_executables} -executable=${APP}/Contents/MacOS/RemoteZynAddSubFx"
|
||||
_executables="${_executables} -executable=${APP}/Contents/Frameworks/libZynAddSubFxCore.dylib"
|
||||
|
||||
# Build our App Package using "macdeployqt"
|
||||
macdeployqt ${APP} $_executables
|
||||
|
||||
# OS X Specific Artwork
|
||||
cp ${CMAKE_SRC}/cmake/apple/*.icns ${APP}/Contents/Resources/
|
||||
|
||||
# Done. Ready to build DMG
|
||||
echo -e "\nFinished.\n\nYou may run LMMS from the Desktop."
|
||||
echo -e "\nTo create an Apple DMG Package run ${MSG_COLOR}\"${DMG_SCRIPT_DST}\"${COLOR_RESET}.\n"
|
||||
echo -e "(Note: You can drag/drop the script directly into this terminal window.)\n"
|
||||
cp ${DMG_SCRIPT_SRC} ${DMG_SCRIPT_DST}
|
||||
chmod +x ${DMG_SCRIPT_DST}
|
||||
BIN
cmake/apple/lmms.icns
Normal file
BIN
cmake/apple/lmms.icns
Normal file
Binary file not shown.
147
cmake/apple/lmms.plist.in
Normal file
147
cmake/apple/lmms.plist.in
Normal file
@@ -0,0 +1,147 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
|
||||
<key>CFBundleDevelopmentRegion</key>
|
||||
<string>English</string>
|
||||
|
||||
<key>CFBundleIconFile</key>
|
||||
<string>@MACOSX_BUNDLE_ICON_FILE@</string>
|
||||
|
||||
<key>CFBundlePackageType</key>
|
||||
<string>APPL</string>
|
||||
|
||||
<key>CFBundleGetInfoString</key>
|
||||
<string>@MACOSX_BUNDLE_GUI_IDENTIFIER@ @MACOSX_BUNDLE_LONG_VERSION_STRING@</string>
|
||||
|
||||
<!--
|
||||
#############################################################
|
||||
# Apple Creator Code Registered Application Signatures #
|
||||
#############################################################
|
||||
# Company: LMMS Foundation #
|
||||
# Registrant: tres.finocchiaro@gmail.com #
|
||||
# ASCII Code: LMMS #
|
||||
# HEX: 4C4D4D53 #
|
||||
#############################################################
|
||||
# Contact Apple Developer Support at cfreg@apple.com #
|
||||
# with any requested changes #
|
||||
#############################################################
|
||||
-->
|
||||
<key>CFBundleSignature</key>
|
||||
<string>@MACOSX_BUNDLE_GUI_IDENTIFIER@</string>
|
||||
|
||||
<key>CFBundleExecutable</key>
|
||||
<string>@MACOSX_BUNDLE_GUI_IDENTIFIER@</string>
|
||||
|
||||
<key>CFBundleVersion</key>
|
||||
<string>@MACOSX_BUNDLE_LONG_VERSION_STRING@</string>
|
||||
|
||||
<key>CFBundleShortVersionString</key>
|
||||
<string>@MACOSX_BUNDLE_LONG_VERSION_STRING@</string>
|
||||
|
||||
<key>CFBundleName</key>
|
||||
<string>@MACOSX_BUNDLE_BUNDLE_NAME@</string>
|
||||
|
||||
<key>CFBundleInfoDictionaryVersion</key>
|
||||
<string>6.0</string>
|
||||
|
||||
<key>CFBundleIdentifier</key>
|
||||
<string>@MACOSX_BUNDLE_MIMETYPE_ID@</string>
|
||||
|
||||
<key>CFBundleDocumentTypes</key>
|
||||
<array>
|
||||
|
||||
<dict>
|
||||
<key>CFBundleTypeExtensions</key>
|
||||
<array>
|
||||
<string>mmpz</string>
|
||||
</array>
|
||||
<key>CFBundleTypeIconFile</key>
|
||||
<string>@MACOSX_BUNDLE_MIMETYPE_ICON@</string>
|
||||
<key>CFBundleTypeName</key>
|
||||
<string>@MACOSX_BUNDLE_GUI_IDENTIFIER@ Project</string>
|
||||
<key>CFBundleTypeOSTypes</key>
|
||||
<array>
|
||||
<string>mmpz</string>
|
||||
</array>
|
||||
<key>CFBundleTypeRole</key>
|
||||
<string>Editor</string>
|
||||
<key>CFBundleTypeMIMETypes</key>
|
||||
<array>
|
||||
<string>@MACOSX_BUNDLE_MIMETYPE@</string>
|
||||
</array>
|
||||
</dict>
|
||||
|
||||
<dict>
|
||||
<key>CFBundleTypeExtensions</key>
|
||||
<array>
|
||||
<string>mmp</string>
|
||||
</array>
|
||||
<key>CFBundleTypeIconFile</key>
|
||||
<string>@MACOSX_BUNDLE_MIMETYPE_ICON@</string>
|
||||
<key>CFBundleTypeName</key>
|
||||
<string>@MACOSX_BUNDLE_GUI_IDENTIFIER@ Project (uncompressed)</string>
|
||||
<key>CFBundleTypeOSTypes</key>
|
||||
<array>
|
||||
<string>mmp</string>
|
||||
</array>
|
||||
<key>CFBundleTypeRole</key>
|
||||
<string>Editor</string>
|
||||
<key>CFBundleTypeMIMETypes</key>
|
||||
<array>
|
||||
<string>@MACOSX_BUNDLE_MIMETYPE@</string>
|
||||
</array>
|
||||
</dict>
|
||||
|
||||
</array>
|
||||
|
||||
<key>UTExportedTypeDeclarations</key>
|
||||
<array>
|
||||
<dict>
|
||||
<key>UTTypeIdentifier</key>
|
||||
<string>@MACOSX_BUNDLE_MIMETYPE_ID@.mmpz</string>
|
||||
<key>UTTypeReferenceURL</key>
|
||||
<string>@MACOSX_BUNDLE_PROJECT_URL@</string>
|
||||
<key>UTTypeDescription</key>
|
||||
<string>@MACOSX_BUNDLE_GUI_IDENTIFIER@ Project</string>
|
||||
<key>UTTypeIconFile</key>
|
||||
<string>@MACOSX_BUNDLE_MIMETYPE_ICON@</string>
|
||||
<key>UTTypeConformsTo</key>
|
||||
<array>
|
||||
<string>public.data</string>
|
||||
</array>
|
||||
<key>UTTypeTagSpecification</key>
|
||||
<dict>
|
||||
<key>public.filename-extension</key>
|
||||
<array>
|
||||
<string>mmpz</string>
|
||||
</array>
|
||||
</dict>
|
||||
</dict>
|
||||
|
||||
<dict>
|
||||
<key>UTTypeIdentifier</key>
|
||||
<string>@MACOSX_BUNDLE_MIMETYPE_ID@.mmp</string>
|
||||
<key>UTTypeReferenceURL</key>
|
||||
<string>@MACOSX_BUNDLE_PROJECT_URL@</string>
|
||||
<key>UTTypeDescription</key>
|
||||
<string>@MACOSX_BUNDLE_GUI_IDENTIFIER@ Project (uncompressed)</string>
|
||||
<key>UTTypeIconFile</key>
|
||||
<string>@MACOSX_BUNDLE_MIMETYPE_ICON@</string>
|
||||
<key>UTTypeConformsTo</key>
|
||||
<array>
|
||||
<string>public.xml</string>
|
||||
<string>public.data</string>
|
||||
</array>
|
||||
<key>UTTypeTagSpecification</key>
|
||||
<dict>
|
||||
<key>public.filename-extension</key>
|
||||
<array>
|
||||
<string>mmp</string>
|
||||
</array>
|
||||
</dict>
|
||||
</dict>
|
||||
</array>
|
||||
</dict>
|
||||
</plist>
|
||||
140
cmake/apple/package_apple.sh.in
Normal file
140
cmake/apple/package_apple.sh.in
Normal file
@@ -0,0 +1,140 @@
|
||||
#!/bin/bash
|
||||
|
||||
# by Andy Maloney
|
||||
# http://asmaloney.com/2013/07/howto/packaging-a-mac-os-x-application-using-a-dmg/
|
||||
|
||||
# make sure we are in the correct dir when we double-click a .command file
|
||||
dir=${0%/*}
|
||||
if [ -d "$dir" ]; then
|
||||
cd "$dir"
|
||||
fi
|
||||
|
||||
# set up your app name, version number, and background image file name
|
||||
APP_NAME="@MACOSX_BUNDLE_BUNDLE_NAME@"
|
||||
VERSION="@MACOSX_BUNDLE_LONG_VERSION_STRING@"
|
||||
DMG_BACKGROUND_IMG="dmg_branding.png"
|
||||
cp "@CMAKE_SOURCE_DIR@/cmake/apple/${DMG_BACKGROUND_IMG}" .
|
||||
|
||||
# you should not need to change these
|
||||
OS_VER=`sw_vers -productVersion|cut -d"." -f1-2`
|
||||
APP_LOWERCASE=$(echo $APP_NAME|tr '[:upper:]' '[:lower:]')
|
||||
APP_EXE="${APP_NAME}.app/Contents/MacOS/${APP_LOWERCASE}"
|
||||
|
||||
VOL_NAME="${APP_LOWERCASE}-${VERSION}-mac${OS_VER}" # volume name will be "SuperCoolApp 1.0.0"
|
||||
DMG_TMP="${VOL_NAME}-temp.dmg"
|
||||
DMG_FINAL="${VOL_NAME}.dmg" # final DMG name will be "SuperCoolApp 1.0.0.dmg"
|
||||
STAGING_DIR="./Install" # we copy all our stuff into this dir
|
||||
|
||||
# Check the background image DPI and convert it if it isn't 72x72
|
||||
_BACKGROUND_IMAGE_DPI_H=`sips -g dpiHeight ${DMG_BACKGROUND_IMG} | grep -Eo '[0-9]+\.[0-9]+'`
|
||||
_BACKGROUND_IMAGE_DPI_W=`sips -g dpiWidth ${DMG_BACKGROUND_IMG} | grep -Eo '[0-9]+\.[0-9]+'`
|
||||
|
||||
if [ $(echo " $_BACKGROUND_IMAGE_DPI_H != 72.0 " | bc) -eq 1 -o $(echo " $_BACKGROUND_IMAGE_DPI_W != 72.0 " | bc) -eq 1 ]; then
|
||||
echo "WARNING: The background image's DPI is not 72. This will result in distorted backgrounds on Mac OS X 10.7+."
|
||||
echo " I will convert it to 72 DPI for you."
|
||||
|
||||
_DMG_BACKGROUND_TMP="${DMG_BACKGROUND_IMG%.*}"_dpifix."${DMG_BACKGROUND_IMG##*.}"
|
||||
|
||||
sips -s dpiWidth 72 -s dpiHeight 72 ${DMG_BACKGROUND_IMG} --out ${_DMG_BACKGROUND_TMP}
|
||||
|
||||
DMG_BACKGROUND_IMG="${_DMG_BACKGROUND_TMP}"
|
||||
fi
|
||||
|
||||
# clear out any old data
|
||||
rm -rf "${STAGING_DIR}" "${DMG_TMP}" "${DMG_FINAL}"
|
||||
|
||||
# copy over the stuff we want in the final disk image to our staging dir
|
||||
mkdir -p "${STAGING_DIR}"
|
||||
cp -rpf "${APP_NAME}.app" "${STAGING_DIR}"
|
||||
# ... cp anything else you want in the DMG - documentation, etc.
|
||||
|
||||
pushd "${STAGING_DIR}"
|
||||
|
||||
# strip the executable
|
||||
echo "Stripping ${APP_EXE}..."
|
||||
strip -u -r "${APP_EXE}"
|
||||
|
||||
# compress the executable if we have upx in PATH
|
||||
# UPX: http://upx.sourceforge.net/
|
||||
if hash upx 2>/dev/null; then
|
||||
echo "Compressing (UPX) ${APP_EXE}..."
|
||||
upx -9 "${APP_EXE}"
|
||||
fi
|
||||
|
||||
# ... perform any other stripping/compressing of libs and executables
|
||||
|
||||
popd
|
||||
|
||||
# figure out how big our DMG needs to be
|
||||
# assumes our contents are at least 1M!
|
||||
SIZE=`du -sh "${STAGING_DIR}" | sed 's/\([0-9\.]*\)M\(.*\)/\1/'`
|
||||
SIZE=`echo "${SIZE} + 5.0" | bc | awk '{print int($1+0.5)}'`
|
||||
|
||||
if [ $? -ne 0 ]; then
|
||||
echo "Error: Cannot compute size of staging dir"
|
||||
exit
|
||||
fi
|
||||
|
||||
# create the temp DMG file
|
||||
hdiutil create -srcfolder "${STAGING_DIR}" -volname "${VOL_NAME}" -fs HFS+ \
|
||||
-fsargs "-c c=64,a=16,e=16" -format UDRW -size ${SIZE}M "${DMG_TMP}"
|
||||
|
||||
echo "Created DMG: ${DMG_TMP}"
|
||||
|
||||
# mount it and save the device
|
||||
DEVICE=$(hdiutil attach -readwrite -noverify "${DMG_TMP}" | \
|
||||
egrep '^/dev/' | sed 1q | awk '{print $1}')
|
||||
|
||||
sleep 2
|
||||
|
||||
# add a link to the Applications dir
|
||||
echo "Add link to /Applications"
|
||||
pushd /Volumes/"${VOL_NAME}"
|
||||
ln -s /Applications
|
||||
popd
|
||||
|
||||
# add a background image
|
||||
mkdir /Volumes/"${VOL_NAME}"/.background
|
||||
cp "${DMG_BACKGROUND_IMG}" /Volumes/"${VOL_NAME}"/.background/
|
||||
|
||||
# tell the Finder to resize the window, set the background,
|
||||
# change the icon size, place the icons in the right position, etc.
|
||||
echo '
|
||||
tell application "Finder"
|
||||
tell disk "'${VOL_NAME}'"
|
||||
open
|
||||
set current view of container window to icon view
|
||||
set toolbar visible of container window to false
|
||||
set statusbar visible of container window to false
|
||||
set the bounds of container window to {400, 100, 920, 440}
|
||||
set viewOptions to the icon view options of container window
|
||||
set arrangement of viewOptions to not arranged
|
||||
set icon size of viewOptions to 72
|
||||
set background picture of viewOptions to file ".background:'${DMG_BACKGROUND_IMG}'"
|
||||
set position of item "'${APP_NAME}'.app" of container window to {160, 205}
|
||||
set position of item "Applications" of container window to {360, 205}
|
||||
close
|
||||
open
|
||||
update without registering applications
|
||||
delay 2
|
||||
end tell
|
||||
end tell
|
||||
' | osascript
|
||||
|
||||
sync
|
||||
|
||||
# unmount it
|
||||
hdiutil detach "${DEVICE}"
|
||||
|
||||
# now make the final image a compressed disk image
|
||||
echo "Creating compressed image"
|
||||
hdiutil convert "${DMG_TMP}" -format UDZO -imagekey zlib-level=9 -o "${DMG_FINAL}"
|
||||
|
||||
# clean up
|
||||
rm -rf "${DMG_TMP}"
|
||||
rm -rf "${STAGING_DIR}"
|
||||
rm -rf "${DMG_BACKGROUND_IMG}"
|
||||
|
||||
echo 'Done.'
|
||||
|
||||
exit
|
||||
BIN
cmake/apple/project.icns
Normal file
BIN
cmake/apple/project.icns
Normal file
Binary file not shown.
14
cmake/build_mingw32.sh
Executable file
14
cmake/build_mingw32.sh
Executable file
@@ -0,0 +1,14 @@
|
||||
#!/bin/sh
|
||||
|
||||
MINGW=/opt/mingw32
|
||||
export PATH=$PATH:$MINGW/bin
|
||||
#export CFLAGS="-march=pentium3 -mtune=generic -mpreferred-stack-boundary=5 -fno-tree-vectorize"
|
||||
export CFLAGS="-march=pentium3 -mtune=generic -mpreferred-stack-boundary=5"
|
||||
export CXXFLAGS="$CFLAGS"
|
||||
|
||||
if [ "$1" = "-qt5" ] ; then
|
||||
CMAKE_OPTS="-DWANT_QT5=ON -DCMAKE_PREFIX_PATH=$MINGW"
|
||||
fi
|
||||
|
||||
cmake .. -DCMAKE_TOOLCHAIN_FILE=../cmake/modules/Win32Toolchain.cmake -DCMAKE_MODULE_PATH=`pwd`/../cmake/modules/ $CMAKE_OPTS
|
||||
|
||||
13
cmake/build_mingw64.sh
Executable file
13
cmake/build_mingw64.sh
Executable file
@@ -0,0 +1,13 @@
|
||||
#!/bin/sh
|
||||
|
||||
MINGW=/opt/mingw64
|
||||
export PATH=$PATH:$MINGW/bin
|
||||
#export CFLAGS="-fno-tree-vectorize"
|
||||
export CXXFLAGS="$CFLAGS"
|
||||
|
||||
if [ "$1" = "-qt5" ] ; then
|
||||
CMAKE_OPTS="-DWANT_QT5=ON -DCMAKE_PREFIX_PATH=$MINGW"
|
||||
fi
|
||||
|
||||
cmake .. -DCMAKE_TOOLCHAIN_FILE=../cmake/modules/Win64Toolchain.cmake -DCMAKE_MODULE_PATH=`pwd`/../cmake/modules/ $CMAKE_OPTS
|
||||
|
||||
4
cmake/linux/CMakeLists.txt
Normal file
4
cmake/linux/CMakeLists.txt
Normal file
@@ -0,0 +1,4 @@
|
||||
INSTALL(FILES lmms.png DESTINATION "${DATA_DIR}/pixmaps")
|
||||
INSTALL(FILES lmms DESTINATION "${DATA_DIR}/menu")
|
||||
INSTALL(FILES lmms.desktop DESTINATION "${DATA_DIR}/applications")
|
||||
INSTALL(FILES lmms.xml DESTINATION "${DATA_DIR}/mime/packages")
|
||||
4
cmake/linux/lmms
Normal file
4
cmake/linux/lmms
Normal file
@@ -0,0 +1,4 @@
|
||||
?package(lmms):needs="X11" section="Apps/Sound" \
|
||||
title="LMMS" hints="Audio" command="/usr/bin/lmms" \
|
||||
longtitle="LMMS" \
|
||||
icon="/usr/share/pixmaps/lmms.png"
|
||||
13
cmake/linux/lmms.desktop
Normal file
13
cmake/linux/lmms.desktop
Normal file
@@ -0,0 +1,13 @@
|
||||
[Desktop Entry]
|
||||
Name=LMMS
|
||||
GenericName=music production suite
|
||||
GenericName[ca]=Programari de producció musical
|
||||
GenericName[de]=Software zur Musik-Produktion
|
||||
Comment=easy music production for everyone!
|
||||
Comment[ca]=Producció fàcil de música per a tothom!
|
||||
Icon=lmms
|
||||
Exec=env QT_X11_NO_NATIVE_MENUBAR=1 lmms
|
||||
Terminal=false
|
||||
Type=Application
|
||||
Categories=Qt;AudioVideo;Audio;Midi;
|
||||
MimeType=application/x-lmms-project;
|
||||
BIN
cmake/linux/lmms.png
Normal file
BIN
cmake/linux/lmms.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 93 KiB |
200
cmake/linux/lmms.spec.in
Normal file
200
cmake/linux/lmms.spec.in
Normal file
@@ -0,0 +1,200 @@
|
||||
# Configuration variables
|
||||
%define name lmms
|
||||
%define version ${LMMS_VERSION}
|
||||
%define rel 1
|
||||
%define release %{rel}%{?disttag}%{?repotag}
|
||||
|
||||
# Define what you can/want to build:
|
||||
%define with_sdl 0%{nil}
|
||||
%define with_jack 1%{nil}
|
||||
%define with_vorbis 1%{nil}
|
||||
%define with_flac 1%{nil}
|
||||
%define with_sr 1%{nil}
|
||||
%define with_sf 1%{nil}
|
||||
|
||||
# Build by setting these defines on the command line, for example:
|
||||
# rpmbuild --define 'disttag .EL' --define 'repotag .fc6'
|
||||
%{!?desktop_vendor: %{expand: %%define desktop_vendor rpmfarm}}
|
||||
# This can be changed at build time:
|
||||
# rpmbuild --define 'desktop_vendor RPMfarm'
|
||||
|
||||
#--------------------------------------------------------------------
|
||||
|
||||
Name: %{name}
|
||||
Version: %{version}
|
||||
Release: %{release}
|
||||
Summary: powerful sequencer-, synthesizer- and sample-studio for Linux
|
||||
Summary(de): Leistungsfaehiges Sequenzer-, Synthesizer- und Sample-Studio fuer Linux
|
||||
License: GPL
|
||||
URL: http://lmms.io/
|
||||
Group: Applications/Multimedia
|
||||
Provides: lmms = %{version}-%{release}
|
||||
BuildRequires: gcc gcc-c++ libstdc++-devel autoconf automake libtool make
|
||||
BuildRequires: alsa-lib-devel
|
||||
BuildRequires: qt-devel > 3.0
|
||||
# ------------- BuildRequires:
|
||||
%if %{with_vorbis}
|
||||
BuildRequires: libvorbis libvorbis-devel
|
||||
%endif
|
||||
%if %{with_sdl}
|
||||
BuildRequires: SDL SDL-devel SDL_sound
|
||||
%endif
|
||||
%if %{with_sr}
|
||||
BuildRequires: libsamplerate libsamplerate-devel
|
||||
%endif
|
||||
%if %{with_sf}
|
||||
BuildRequires: libsndfile libsndfile-devel
|
||||
%endif
|
||||
%if %{with_jack}
|
||||
BuildRequires: jack-audio-connection-kit-devel
|
||||
%endif
|
||||
%if %{with_flac}
|
||||
BuildRequires: flac-devel
|
||||
%endif
|
||||
# ------------- Requires:
|
||||
Requires: qt >= 3.0 alsa-lib
|
||||
%if %{with_sr}
|
||||
Requires: libsamplerate
|
||||
%endif
|
||||
%if %{with_sf}
|
||||
Requires: libsndfile
|
||||
%endif
|
||||
%if %{with_jack}
|
||||
Requires: jack-audio-connection-kit
|
||||
%endif
|
||||
%if %{with_vorbis}
|
||||
Requires: libvorbis
|
||||
%endif
|
||||
%if %{with_flac}
|
||||
Requires: flac
|
||||
%endif
|
||||
%if %{with_sdl}
|
||||
Requires: SDL_sound
|
||||
%endif
|
||||
|
||||
Requires: lmms-data
|
||||
Source: %{name}-%{version}.tar.bz2
|
||||
Patch1: %{name}-%{version}-patch
|
||||
BuildRoot: %{_tmppath}/%{name}-%{version}-buildroot
|
||||
Prefix: %{_prefix}
|
||||
|
||||
|
||||
%description
|
||||
LMMS aims to be a free alternative to popular (but commercial and closed-
|
||||
source) programs like FruityLoops, Cubase and Logic giving you the ability of
|
||||
producing music with your computer by creating/synthesizing sounds, arranging
|
||||
samples, playing live with keyboard and much more...
|
||||
|
||||
LMMS combines the features of a tracker-/sequencer-program (pattern-/channel-/
|
||||
sample-/song-/effect-management) and those of powerful synthesizers and
|
||||
samplers in a modern, user-friendly and easy to use graphical user-interface.
|
||||
|
||||
LMMS is still in heavy development, so with this version please don't expect a
|
||||
complete, ready and bugfree program!!
|
||||
|
||||
|
||||
%description -l de
|
||||
LMMS ist eine freie Alternative zu bekannten (aber kommerziellen und
|
||||
Closed-Source-) Programmen wie FruityLoops, Cubase und Logic, die Ihnen die
|
||||
Moeglichkeit geben, mit Ihrem Computer Musik zu produzieren, indem Sie
|
||||
Klaenge kreieren/synthetisieren, Samples anordnen, mit dem Keyboard live
|
||||
spielen usw....
|
||||
|
||||
LMMS kombiniert die Funktionen eines Tracker-/Sequenzer-Programms (Pattern-/
|
||||
Kanal-/Sample-/Song-/Effekt-Management) und die von leistungsfaehigen
|
||||
Synthesizern und Samplern in einer modernen, benutzerfreundlichen und einfach zu
|
||||
benutzenden grafischen Oberflaeche.
|
||||
|
||||
Derzeit befindet sich LMMS komplett in Entwicklung. Also erwarten Sie bitte mit
|
||||
dieser Version nicht ein vollstaendiges, fertiges und fehlerfreies Programm!!
|
||||
|
||||
|
||||
%package data
|
||||
Summary: samples, presets, demo-projects and localization-files for LMMS
|
||||
Summary(de): Samples, Presets, Demo-Projekte und Lokalisierungsdateien fuer LMMS
|
||||
Group: Applications/Multimedia
|
||||
Provides: lmms-data = %{version}-%{release}
|
||||
|
||||
%description data
|
||||
This package contains platform-independent data and resources for LMMS, e.g.
|
||||
samples, presets and demo-projects.
|
||||
|
||||
|
||||
%description data -l de
|
||||
Dieses Paket beinhaltet plattform-unabhaengige Daten und Resourcen fuer LMMS,
|
||||
wie z.B. Samples, Presets und Demo-Projekte.
|
||||
|
||||
|
||||
%prep
|
||||
%setup -n %{name}-%{version}
|
||||
%patch1 -p1 -b .EL
|
||||
|
||||
%build
|
||||
%configure \
|
||||
%if !%{with_jack}
|
||||
--without-jack \
|
||||
%endif
|
||||
%if !%{with_sdl}
|
||||
--without-sdl \
|
||||
--without-sdlsound \
|
||||
%endif
|
||||
%if !%{with_vorbis}
|
||||
--without-vorbis \
|
||||
%endif
|
||||
%if !%{with_flac}
|
||||
--without-flac \
|
||||
%endif
|
||||
%if !%{with_sr}
|
||||
--without-libsrc \
|
||||
%endif
|
||||
%if !%{with_sf}
|
||||
--without-libsf \
|
||||
%endif
|
||||
|
||||
%{__make} %{?_smp_mflags}
|
||||
|
||||
# Create a desktop menu entry
|
||||
%{__cat} > %{name}.desktop << EOF
|
||||
[Desktop Entry]
|
||||
Name=LMMS
|
||||
Comment=Powerful sequencer-, synthesizer- and sample-studio for Linux
|
||||
Exec=lmms
|
||||
Icon=%{_datadir}/%{name}/themes/default/icon.png
|
||||
Terminal=false
|
||||
Type=Application
|
||||
Categories=Application;AudioVideo;X-Fedora;X-RPMfarm;
|
||||
Encoding=UTF-8
|
||||
EOF
|
||||
|
||||
%install
|
||||
%{__rm} -rf %{buildroot}
|
||||
make DESTDIR=$RPM_BUILD_ROOT install
|
||||
|
||||
# Install menu entry
|
||||
%{__mkdir_p} %{buildroot}%{_datadir}/applications
|
||||
desktop-file-install \
|
||||
--vendor %{desktop_vendor} \
|
||||
--dir %{buildroot}%{_datadir}/applications \
|
||||
%{name}.desktop || :
|
||||
|
||||
%clean
|
||||
%{__rm} -rf %{buildroot}
|
||||
|
||||
%files
|
||||
%defattr(-, root, root, 0755)
|
||||
%doc AUTHORS ChangeLog COPYING README TODO
|
||||
%{_bindir}/lmms
|
||||
%dir %{_libdir}/lmms
|
||||
%{_libdir}/lmms/*
|
||||
%{_mandir}/man*/lmms.*
|
||||
%{_datadir}/applications/%{desktop_vendor}-%{name}.desktop
|
||||
|
||||
%files data
|
||||
%defattr(-,root,root)
|
||||
%dir %{_datadir}/lmms
|
||||
%{_datadir}/lmms/*
|
||||
|
||||
-%changelog
|
||||
-* Please see release notes (viewable online):
|
||||
-- https://github.com/LMMS/lmms/releases/tag/v${LMMS_VERSION}
|
||||
-
|
||||
14
cmake/linux/lmms.xml
Normal file
14
cmake/linux/lmms.xml
Normal file
@@ -0,0 +1,14 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<mime-info xmlns="http://www.freedesktop.org/standards/shared-mime-info">
|
||||
<mime-type type="application/x-lmms-project">
|
||||
<sub-class-of type="application/xml"/>
|
||||
<comment>LMMS project</comment>
|
||||
<comment xml:lang="ca">Projecte LMMS</comment>
|
||||
<glob pattern="*.mmp"/>
|
||||
<glob pattern="*.mmpz"/>
|
||||
<magic priority="80">
|
||||
<match type="string" value="<!DOCTYPE multimedia-project" offset="0:256"/>
|
||||
<match type="string" value="<multimedia-project" offset="0:64"/>
|
||||
</magic>
|
||||
</mime-type>
|
||||
</mime-info>
|
||||
36
cmake/nsis/CMakeLists.txt
Normal file
36
cmake/nsis/CMakeLists.txt
Normal file
@@ -0,0 +1,36 @@
|
||||
SET(CPACK_PACKAGE_ICON "${CMAKE_SOURCE_DIR}/cmake/nsis/nsis_branding.bmp" PARENT_SCOPE)
|
||||
SET(CPACK_NSIS_MUI_ICON "${CMAKE_SOURCE_DIR}/cmake/nsis/lmms.ico" PARENT_SCOPE)
|
||||
SET(CPACK_NSIS_INSTALLED_ICON_NAME "${CMAKE_PROJECT_NAME}.exe" PARENT_SCOPE)
|
||||
SET(CPACK_NSIS_DISPLAY_NAME "${PROJECT_NAME_UCASE} ${VERSION}" PARENT_SCOPE)
|
||||
SET(CPACK_NSIS_HELP_LINK "${PROJECT_URL}" PARENT_SCOPE)
|
||||
SET(CPACK_NSIS_URL_INFO_ABOUT "${PROJECT_URL}" PARENT_SCOPE)
|
||||
SET(CPACK_NSIS_CONTACT "${PROJECT_EMAIL}" PARENT_SCOPE)
|
||||
SET(CPACK_PACKAGE_EXECUTABLES "${CMAKE_PROJECT_NAME}.exe;${PROJECT_NAME_UCASE}" PARENT_SCOPE)
|
||||
SET(CPACK_NSIS_MENU_LINKS "${CMAKE_PROJECT_NAME}.exe;${PROJECT_NAME_UCASE}" PARENT_SCOPE)
|
||||
SET(CPACK_NSIS_DEFINES "!include ${CMAKE_SOURCE_DIR}/cmake/nsis/FileAssociation.nsh")
|
||||
SET(CPACK_NSIS_DEFINES "${CPACK_NSIS_DEFINES}" PARENT_SCOPE)
|
||||
SET(CPACK_PACKAGE_FILE_NAME "${CMAKE_PROJECT_NAME}-${VERSION}-win32" PARENT_SCOPE)
|
||||
SET(CPACK_NSIS_EXTRA_INSTALL_COMMANDS "
|
||||
\\\${registerExtension} \\\"$INSTDIR\\\\${CMAKE_PROJECT_NAME}.exe\\\" \\\".mmp\\\" \\\"${PROJECT_NAME_UCASE} Project\\\"
|
||||
\\\${registerExtension} \\\"$INSTDIR\\\\${CMAKE_PROJECT_NAME}.exe\\\" \\\".mmpz\\\" \\\"${PROJECT_NAME_UCASE} Project (compressed)\\\"
|
||||
" PARENT_SCOPE)
|
||||
SET(CPACK_NSIS_EXTRA_UNINSTALL_COMMANDS "
|
||||
\\\${unregisterExtension} \\\".mmp\\\" \\\"${PROJECT_NAME_UCASE} Project\\\"
|
||||
\\\${unregisterExtension} \\\".mmpz\\\" \\\"${PROJECT_NAME_UCASE} Project (compressed)\\\"
|
||||
DeleteRegKey HKCR \\\"${PROJECT_NAME_UCASE} Project\\\"
|
||||
DeleteRegKey HKCR \\\"${PROJECT_NAME_UCASE} Project (compressed)\\\"
|
||||
" PARENT_SCOPE)
|
||||
|
||||
IF(WIN64)
|
||||
SET(CPACK_PACKAGE_FILE_NAME "${CMAKE_PROJECT_NAME}-${VERSION}-win64" PARENT_SCOPE)
|
||||
SET(CPACK_NSIS_DEFINES "${CPACK_NSIS_DEFINES}
|
||||
InstallDir \\\"\\\$PROGRAMFILES64\\\\${CPACK_PACKAGE_INSTALL_DIRECTORY}\\\"" PARENT_SCOPE)
|
||||
ENDIF()
|
||||
|
||||
# Windows resource compilers
|
||||
CONFIGURE_FILE("lmms.rc.in" "${CMAKE_BINARY_DIR}/lmms.rc")
|
||||
CONFIGURE_FILE("zynaddsubfx.rc.in" "${CMAKE_BINARY_DIR}/plugins/zynaddsubfx/zynaddsubfx.rc")
|
||||
|
||||
FILE(GLOB RAWWAVES "${CMAKE_INSTALL_PREFIX}/share/stk/rawwaves/*.raw")
|
||||
INSTALL(FILES ${RAWWAVES} DESTINATION "${DATA_DIR}/stk/rawwaves")
|
||||
|
||||
BIN
cmake/nsis/lmms.ico
Normal file
BIN
cmake/nsis/lmms.ico
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 134 KiB |
26
cmake/nsis/lmms.rc.in
Normal file
26
cmake/nsis/lmms.rc.in
Normal file
@@ -0,0 +1,26 @@
|
||||
lmmsicon ICON cmake/nsis/lmms.ico
|
||||
#include <windows.h>
|
||||
|
||||
VS_VERSION_INFO VERSIONINFO
|
||||
FILEVERSION @VERSION_MAJOR@,@VERSION_MINOR@,@VERSION_PATCH@,0
|
||||
FILEFLAGSMASK VS_FFI_FILEFLAGSMASK
|
||||
FILEOS VOS_NT_WINDOWS32
|
||||
FILETYPE VFT_APP
|
||||
FILESUBTYPE VFT2_UNKNOWN
|
||||
BEGIN
|
||||
BLOCK "StringFileInfo"
|
||||
BEGIN
|
||||
BLOCK "040904E4"
|
||||
//language ID = U.S. English, charset = Windows, Multilingual
|
||||
BEGIN
|
||||
VALUE "Comments", "${PROJECT_URL}\0"
|
||||
VALUE "CompanyName", "${PROJECT_AUTHOR}\0"
|
||||
VALUE "FileDescription", "${PROJECT_NAME_UCASE}\0"
|
||||
VALUE "FileVersion", "@VERSION@\0"
|
||||
VALUE "LegalCopyright", "Copyright (c) ${PROJECT_COPYRIGHT}\0"
|
||||
VALUE "OriginalFilename", "${CMAKE_PROJECT_NAME}.exe\0"
|
||||
VALUE "ProductName", "${PROJECT_NAME_UCASE}\0"
|
||||
VALUE "ProductVersion", "@VERSION@\0"
|
||||
END
|
||||
END
|
||||
END
|
||||
BIN
cmake/nsis/nsis_branding.bmp
Normal file
BIN
cmake/nsis/nsis_branding.bmp
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 9.5 KiB |
26
cmake/nsis/zynaddsubfx.rc.in
Normal file
26
cmake/nsis/zynaddsubfx.rc.in
Normal file
@@ -0,0 +1,26 @@
|
||||
zynaddsubfx_icon ICON zynaddsubfx/zynaddsubfx.ico
|
||||
#include <windows.h>
|
||||
|
||||
VS_VERSION_INFO VERSIONINFO
|
||||
FILEVERSION 0,2,3,0
|
||||
FILEFLAGSMASK VS_FFI_FILEFLAGSMASK
|
||||
FILEOS VOS_NT_WINDOWS32
|
||||
FILETYPE VFT_APP
|
||||
FILESUBTYPE VFT2_UNKNOWN
|
||||
BEGIN
|
||||
BLOCK "StringFileInfo"
|
||||
BEGIN
|
||||
BLOCK "040904E4"
|
||||
//language ID = U.S. English, charset = Windows, Multilingual
|
||||
BEGIN
|
||||
VALUE "Comments", "ZynAddSubFX Plugin - ${PROJECT_NAME_UCASE} (${PROJECT_URL})\0"
|
||||
VALUE "CompanyName", "${PROJECT_AUTHOR}\0"
|
||||
VALUE "FileDescription", "ZynAddSubFX ${PROJECT_NAME_UCASE} Plugin\0"
|
||||
VALUE "FileVersion", "2.3.0/@VERSION@\0"
|
||||
VALUE "LegalCopyright", "Copyright (c) Nasca Octavian Paul, Mark McCurry, Harald Hvaal, Tobias Doerffel\0"
|
||||
VALUE "OriginalFilename", "RemoteZynAddSubFx.exe\0"
|
||||
VALUE "ProductName", "ZynAddSubFX/${PROJECT_NAME_UCASE}\0"
|
||||
VALUE "ProductVersion", "2.3.0/@VERSION@\0"
|
||||
END
|
||||
END
|
||||
END
|
||||
Reference in New Issue
Block a user