1
0
mirror of https://github.com/tomahawk-player/tomahawk.git synced 2025-08-27 07:44:34 +02:00

Initial Tomahawk import.

This commit is contained in:
Christian Muehlhaeuser
2010-10-17 05:32:01 +02:00
commit 1f592fbbd9
413 changed files with 48521 additions and 0 deletions

28
admin/mac/Info.plist Normal file
View File

@@ -0,0 +1,28 @@
<?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>CFBundleExecutable</key>
<string>tomahawk</string>
<key>CFBundleIdentifier</key>
<string>org.tomahawk.Tomahawk</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleVersion</key>
<string>0.0.1.0</string>
<key>CFBundleShortVersionString</key>
<string>0.0.1</string>
<key>CFBundleSignature</key>
<string>tomahawk</string>
<key>CFBundleIconFile</key>
<string>tomahawk.icns</string>
<key>CFBundleName</key>
<string>Tomahawk</string>
<key>LSMinimumSystemVersion</key>
<string>10.5.0</string>
</dict>
</plist>

64
admin/mac/add-Qt-to-bundle.sh Executable file
View File

@@ -0,0 +1,64 @@
#!/bin/sh
# author: max@last.fm
# usage: Run from inside the bundle root directory, eg. Last.fm.app
# The first parameter should be the QtFrameworks to copy.
# Remaining parameters are plugins to copy, directories and files are
# valid.
# eg: add-Qt-to-bundle.sh 'QtCore QtGui QtXml' \
# imageformats \
# sqldrivers/libsqlite.dylib
################################################################################
if [[ ! -d "$QTDIR/lib/QtCore.framework" ]]
then
# this dir is the location of install for the official Trolltech dmg
if [[ -d /Library/Frameworks/QtCore.framework ]]
then
QT_FRAMEWORKS_DIR=/Library/Frameworks
QT_PLUGINS_DIR=/Developer/Applications/Qt/plugins
fi
elif [[ $QTDIR ]]
then
QT_FRAMEWORKS_DIR="$QTDIR/lib"
QT_PLUGINS_DIR="$QTDIR/plugins"
fi
if [ -z $QTDIR ]
then
echo QTDIR must be set, or install the official Qt dmg
exit 1
fi
################################################################################
#first frameworks
mkdir -p Contents/Frameworks
for x in $1
do
echo "C $x"
cp -R $QT_FRAMEWORKS_DIR/$x.framework Contents/Frameworks/
done
#plugins
shift
mkdir -p Contents/MacOS
while (( "$#" ))
do
echo "C $1"
if [[ -d $QT_PLUGINS_DIR/$1 ]]
then
cp -R $QT_PLUGINS_DIR/$1 Contents/MacOS
else
dir=$(basename $(dirname $1))
mkdir Contents/MacOS/$dir
cp $QT_PLUGINS_DIR/$1 Contents/MacOS/$dir
fi
shift
done
#cleanup
find Contents/Frameworks -name Headers -o -name \*.prl -o -name \*_debug | xargs rm -rf
find Contents -name \*_debug -o -name \*_debug.dylib | xargs rm

48
admin/mac/build-release-osx.sh Executable file
View File

@@ -0,0 +1,48 @@
#!/bin/bash
#
# Usage: dist/build-relese-osx.sh [-j] [--no-clean]
#
# Adding the -j parameter results in building a japanese version.
################################################################################
function header {
echo -e "\033[0;34m==>\033[0;0;1m $1 \033[0;0m"
}
function die {
exit_code=$?
echo $1
exit $exit_code
}
################################################################################
ROOT=`pwd`
QTDIR=`which qmake`
QTDIR=`dirname $QTDIR`
QTDIR=`dirname $QTDIR`
test -L "$QTDIR" && QTDIR=`readlink $QTDIR`
export QMAKESPEC='macx-g++'
export QTDIR
export VERSION
################################################################################
CLEAN='1'
BUILD='1'
NOTQUICK='1'
CREATEDMG='1'
header addQt
cd tomahawk.app
# $ROOT/admin/mac/add-Qt-to-bundle.sh \
# 'QtCore QtGui QtXml QtNetwork QtSql'
header deposx
$ROOT/admin/mac/deposx.sh
header Done!

73
admin/mac/deposx.sh Executable file
View File

@@ -0,0 +1,73 @@
#!/bin/sh
# author: max@last.fm, chris@last.fm
################################################################################
if [ -z $QTDIR ]
then
echo QTDIR must be set
exit 1
fi
cd Contents
QTLIBS=`ls Frameworks | cut -d. -f1`
LIBS=`cd MacOS && ls -fR1 | grep dylib`
################################################################################
function deposx_change
{
echo "D \`$1'"
echo $QTDIR
for y in $QTLIBS
do
install_name_tool -change $QTDIR/lib/$y.framework/Versions/4/$y \
@executable_path/../Frameworks/$y.framework/Versions/4/$y \
"$1"
install_name_tool -change $QTDIR/Cellar/qt/4.6.2/lib/$y.framework/Versions/4/$y \
@executable_path/../Frameworks/$y.framework/Versions/4/$y \
"$1"
done
for y in $LIBS
do
install_name_tool -change $y \
@executable_path/$y \
"$1"
done
}
################################################################################
# first all libraries and executables
find MacOS -type f -a -perm -100 | while read x
do
echo $x
y=$(file "$x" | grep 'Mach-O')
test -n "$y" && deposx_change "$x"
install_name_tool -change liblastfm.0.dylib @executable_path/liblastfm.0.dylib $x
install_name_tool -change /usr/local/Cellar/gloox/1.0/lib/libgloox.8.dylib @executable_path/libgloox.8.dylib $x
install_name_tool -change /usr/local/lib/libgloox.8.dylib @executable_path/libgloox.8.dylib $x
install_name_tool -change /usr/local/Cellar/taglib/1.6/lib/libtag.1.dylib @executable_path/libtag.1.dylib $x
install_name_tool -change /usr/local/Cellar/libogg/1.2.0/lib/libogg.0.dylib @executable_path/libogg.0.dylib $x
install_name_tool -change /usr/local/Cellar/libvorbis/1.3.1/lib/libvorbisfile.3.dylib @executable_path/libvorbisfile.3.dylib $x
install_name_tool -change /usr/local/Cellar/mad/0.15.1b/lib/libmad.0.dylib @executable_path/libmad.0.dylib $x
done
deposx_change MacOS/libqjson.0.7.1.dylib
deposx_change MacOS/liblastfm.0.dylib
# now Qt
for x in $QTLIBS
do
echo `pwd`
# ls -l Frameworks/$x.framework/Versions/4/$x
deposx_change Frameworks/$x.framework/Versions/4/$x
install_name_tool -id @executable_path/../Frameworks/$x.framework/Versions/4/$x \
Frameworks/$x.framework/Versions/4/$x
done

3
admin/win/README.txt Executable file
View File

@@ -0,0 +1,3 @@
# windres.exe tomahawk.rx -O coff -o tomahawk.res
# SEE: http://stackoverflow.com/questions/708238/how-do-i-add-an-icon-to-a-mingw-gcc-compiled-executable

124
admin/win/tomahawk.nsi Executable file
View File

@@ -0,0 +1,124 @@
; assuming the script is in ROOT/admin/win/
!define ROOTDIR "../.."
!include "MUI2.nsh"
Name "Tomahawk"
!define MUI_NAME "Tomahawk"
!define MUI_PRODUCT "Tomahawk"
!define MUI_FILE "Tomahawk"
!define MUI_VERSION "Alpha"
!define MUI_BRANDINGTEXT "Tomahawk-Player Alpha Test"
CRCCheck On
OutFile "tomahawk-setup-alpha.exe"
;ShowInstDetails "nevershow"
ShowUninstDetails "nevershow"
;SetCompressor "bzip2"
!define MUI_ICON "..\..\data\icons\tomahawk.ico"
!define MUI_UNICON "..\..\data\icons\tomahawk.ico"
;!define MUI_SPECIALBITMAP "Bitmap.bmp"
InstallDir "$PROGRAMFILES\${MUI_PRODUCT}"
;--------------------------------
;Modern UI Configuration
!define MUI_WELCOMEPAGE_TEXT "This is an Alpha release, and is still buggy.$\n$\nPlease join #tomahawk-player on irc.freenode.net"
!insertmacro MUI_PAGE_WELCOME
!insertmacro MUI_PAGE_LICENSE "${ROOTDIR}\LICENSE.txt"
;;!insertmacro MUI_PAGE_COMPONENTS
!insertmacro MUI_PAGE_DIRECTORY
!insertmacro MUI_PAGE_INSTFILES
!define MUI_FINISHPAGE_RUN "$INSTDIR\tomahawk.exe"
!insertmacro MUI_PAGE_FINISH
!insertmacro MUI_LANGUAGE "English"
;Modern UI System
;!insertmacro MUI_SYSTEM
LicenseData "${ROOTDIR}\LICENSE.txt"
Section "install"
;Add files
SetOutPath "$INSTDIR"
;Path to our DLL cache
!define DLLS "${ROOTDIR}\admin\win\dlls"
File "${ROOTDIR}\build\tomahawk.exe"
File "${ROOTDIR}\LICENSE.txt"
; QT stuff:
File "${DLLS}\QtCore4.dll"
File "${DLLS}\QtGui4.dll"
File "${DLLS}\QtNetwork4.dll"
File "${DLLS}\QtSql4.dll"
File "${DLLS}\QtXml4.dll"
SetOutPath "$INSTDIR\sqldrivers"
File "${DLLS}\sqldrivers\qsqlite4.dll"
SetOutPath "$INSTDIR"
; Cygwin/c++ stuff
File "${DLLS}\cygmad-0.dll"
File "${DLLS}\libgcc_s_dw2-1.dll"
File "${DLLS}\mingwm10.dll"
; Audio stuff
File "${DLLS}\libmad.dll"
File "${DLLS}\librtaudio.dll"
; Other
File "${DLLS}\libqjson.dll"
File "${DLLS}\libqxtweb-standalone.dll"
File "${DLLS}\libtag.dll"
;create desktop shortcut
CreateShortCut "$DESKTOP\${MUI_PRODUCT}.lnk" "$INSTDIR\${MUI_FILE}.exe" ""
;create start-menu items
CreateDirectory "$SMPROGRAMS\${MUI_PRODUCT}"
CreateShortCut "$SMPROGRAMS\${MUI_PRODUCT}\Uninstall.lnk" "$INSTDIR\Uninstall.exe" "" "$INSTDIR\Uninstall.exe" 0
CreateShortCut "$SMPROGRAMS\${MUI_PRODUCT}\${MUI_PRODUCT}.lnk" "$INSTDIR\${MUI_FILE}.exe" "" "$INSTDIR\${MUI_FILE}.exe" 0
;write uninstall information to the registry
WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\${MUI_PRODUCT}" "DisplayName" "${MUI_PRODUCT} (remove only)"
WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\${MUI_PRODUCT}" "UninstallString" "$INSTDIR\Uninstall.exe"
WriteUninstaller "$INSTDIR\Uninstall.exe"
SectionEnd
;--------------------------------
;Uninstaller Section
Section "Uninstall"
;Delete Files
RMDir /r "$INSTDIR\*.*"
;Remove the installation directory
RMDir "$INSTDIR"
;Delete Start Menu Shortcuts
Delete "$DESKTOP\${MUI_PRODUCT}.lnk"
Delete "$SMPROGRAMS\${MUI_PRODUCT}\*.*"
RmDir "$SMPROGRAMS\${MUI_PRODUCT}"
;Delete Uninstaller And Unistall Registry Entries
DeleteRegKey HKEY_LOCAL_MACHINE "SOFTWARE\${MUI_PRODUCT}"
DeleteRegKey HKEY_LOCAL_MACHINE "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\${MUI_PRODUCT}"
SectionEnd
Function un.onUninstSuccess
MessageBox MB_OK "You have successfully uninstalled ${MUI_PRODUCT}."
FunctionEnd

1
admin/win/tomahawk.rc Normal file
View File

@@ -0,0 +1 @@
ID ICON "data/tomahawk_logo_32x32.ico"