Skip to content

Instantly share code, notes, and snippets.

Created April 15, 2014 09:36
Show Gist options
  • Save lalinsky/10717865 to your computer and use it in GitHub Desktop.
Save lalinsky/10717865 to your computer and use it in GitHub Desktop.
picard build scripts
cd deps
tar xf chromaprint-fpcalc-*.tar.gz
rm chromaprint-fpcalc-*.tar.gz
export PATH=`pwd`/`ls | grep chromaprint-fpcalc`:$PATH
cd ..
cat <<EOS >
import re, sys, datetime
source = open('picard/').read()
patched_source = re.sub(r'PICARD_VERSION = \((\d+), (\d+), (\d+), (\S+), (\d+)\)', r'PICARD_VERSION = (\1, \2, \3, "dev", ' +'%Y%m%d') + ')', source)
open('picard/', 'w').write(patched_source)
version=`python -c 'import picard; print picard.__version__'`
. e/bin/activate
rm -rf dist build locale
python2.7 clean
python2.7 build_ext -i
python2.7 build_locales -i
python2.7 py2app
cd dist
ditto -rsrc --arch x86_64 'MusicBrainz' 'MusicBrainz Picard.tmp'
rm -r 'MusicBrainz'
mv 'MusicBrainz Picard.tmp' 'MusicBrainz'
hdiutil create -volname "MusicBrainz Picard $version" -srcfolder 'MusicBrainz' -ov -format UDBZ MusicBrainz-Picard-$version.dmg
set PATH=%PATH%;%WORKSPACE%;C:\MinGW\bin;C:\Python27;C:\Python27\Scripts;"C:\Program Files\7-Zip"
call "C:\Program Files\Microsoft Visual Studio 9.0\Common7\Tools\vsvars32.bat"
del installer\*.exe
copy /Y "C:\Program Files\Microsoft Visual Studio 9.0\VC\redist\x86\Microsoft.VC90.CRT\msvcr90.dll" .
copy /Y "C:\Program Files\Microsoft Visual Studio 9.0\VC\redist\x86\Microsoft.VC90.CRT\msvcp90.dll" .
7z e -odeps deps\chromaprint-fpcalc-*.zip
copy /Y deps\fpcalc.exe .
REM virtualenv --system-site-packages e
set PATH=%WORKSPACE%\e\scripts;%PATH%
pip install -U discid
pip install -U mutagen
echo import re, sys, datetime >
echo source = open('picard/').read() >>
echo patched_source = re.sub(r'PICARD_VERSION = \((\d+), (\d+), (\d+), (\S+), (\d+)\)', r'PICARD_VERSION = (\1, \2, \3, "dev", ' +'%%Y%%m%%d') + ')', source) >>
echo open('picard/', 'w').write(patched_source) >>
rmdir /S /Q dist
python clean
python build_ext -i
python build_locales -i
python bdist_nsis
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment