Skip to content

Commit

Permalink
[mswin] update build scripts
Browse files Browse the repository at this point in the history
git-svn-id: svn://svn.berlios.de/avidemux/branches/avidemux_2.6_branch_mean@8004 30592fff-cfd4-0310-bf0e-8235a3c7be26
  • Loading branch information
gruntster committed Jun 9, 2012
1 parent 45fc866 commit 8028010
Show file tree
Hide file tree
Showing 16 changed files with 425 additions and 117 deletions.
83 changes: 36 additions & 47 deletions avidemux/winInstaller/avidemux.nsi
Original file line number Diff line number Diff line change
Expand Up @@ -276,22 +276,12 @@ Section "Avidemux Core" SecCore
SetOverwrite on
${File} "Build Info.txt"
${File} "Change Log.html"
${File} zlib1.dll

!if ${BUILD_BITS} == 32
${File} freetype6.dll
${File} pthreadGC2-w32.dll
${File} libexpat-1.dll
${File} libfreetype-6.dll
${File} libgcc_s_sjlj-1.dll
${File} libstdc++-6.dll
!endif

!if ${BUILD_BITS} == 64
${File} libfreetype-6.dll
${File} pthreadGC2-w64.dll
${File} libgcc_s_sjlj_64-1.dll
${File} libstdc++_64-6.dll
!endif

${File} libwinpthread-1.dll
${File} zlib1.dll
${File} nspr4.dll
${File} libjs.dll
${File} libADM_audioParser6.dll
Expand All @@ -316,7 +306,6 @@ Section "Avidemux Core" SecCore
${File} libADM_coreVideoCodec6.dll
${File} libADM_coreVideoEncoder6.dll
${File} libADM_coreVideoFilter6.dll
${File} libxml2-*.dll
${File} AUTHORS.
${File} COPYING.
${File} README.
Expand Down Expand Up @@ -1121,38 +1110,38 @@ End:
${Folder} etc\fonts
${MementoSectionEnd}
SectionGroupEnd
SectionGroup "OpenGL Filters" SecGrpVideoFilterOpenGl
${MementoSection} "Fragment Shader" SecVidFltOpenGlFragmentShader
SectionIn 1 2
SetOverwrite on
SetOutPath $INSTDIR\plugins\videoFilters
${File} plugins\videoFilters\libADM_vf_sampleGlFrag2.dll
${MementoSectionEnd}
${MementoSection} "Read Back Benchmark" SecVidFltOpenGlReadBack
SectionIn 1 2
SetOverwrite on
SetOutPath $INSTDIR\plugins\videoFilters
${File} plugins\videoFilters\libADM_vf_glBenchmark.dll
${MementoSectionEnd}
${MementoSection} "Resize" SecVidFltOpenGlResize
SectionIn 1 2
SetOverwrite on
SetOutPath $INSTDIR\plugins\videoFilters
${File} plugins\videoFilters\libADM_vf_glResize.dll
${MementoSectionEnd}
${MementoSection} "Rotate" SecVidFltOpenGlRotate
SectionIn 1 2
SetOverwrite on
SetOutPath $INSTDIR\plugins\videoFilters
${File} plugins\videoFilters\libADM_vf_rotateGlFrag2.dll
${MementoSectionEnd}
${MementoSection} "Wave" SecVidFltOpenGlWave
SectionIn 1 2
SetOverwrite on
SetOutPath $INSTDIR\plugins\videoFilters
${File} plugins\videoFilters\libADM_vf_sampleGlVertex.dll
${MementoSectionEnd}
SectionGroupEnd
#SectionGroup "OpenGL Filters" SecGrpVideoFilterOpenGl
#${MementoSection} "Fragment Shader" SecVidFltOpenGlFragmentShader
#SectionIn 1 2
#SetOverwrite on
#SetOutPath $INSTDIR\plugins\videoFilters
#${File} plugins\videoFilters\libADM_vf_sampleGlFrag2.dll
#${MementoSectionEnd}
#${MementoSection} "Read Back Benchmark" SecVidFltOpenGlReadBack
#SectionIn 1 2
#SetOverwrite on
#SetOutPath $INSTDIR\plugins\videoFilters
#${File} plugins\videoFilters\libADM_vf_glBenchmark.dll
#${MementoSectionEnd}
#${MementoSection} "Resize" SecVidFltOpenGlResize
#SectionIn 1 2
#SetOverwrite on
#SetOutPath $INSTDIR\plugins\videoFilters
#${File} plugins\videoFilters\libADM_vf_glResize.dll
#${MementoSectionEnd}
#${MementoSection} "Rotate" SecVidFltOpenGlRotate
#SectionIn 1 2
#SetOverwrite on
#SetOutPath $INSTDIR\plugins\videoFilters
#${File} plugins\videoFilters\libADM_vf_rotateGlFrag2.dll
#${MementoSectionEnd}
#${MementoSection} "Wave" SecVidFltOpenGlWave
#SectionIn 1 2
#SetOverwrite on
#SetOutPath $INSTDIR\plugins\videoFilters
#${File} plugins\videoFilters\libADM_vf_sampleGlVertex.dll
#${MementoSectionEnd}
#SectionGroupEnd
SectionGroup "Miscellaneous Filters" SecGrpVideoFilterMiscellaneous
${MementoSection} "Print Information" SecVidFltPrintInfo
SectionIn 1 2
Expand Down
30 changes: 11 additions & 19 deletions foreignBuilds/mswin/Set Common Environment Variables.bat
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ set ProgramFiles32=%ProgramFiles%
if "%PROCESSOR_ARCHITECTURE%" == "AMD64" for /D %%d in ("%ProgramFiles(x86)%") do set ProgramFiles32=%%~fsd
set nsisDir=%ProgramFiles32%\NSIS

set devDir=%~d0\Dev
set devDir=%~d0/Dev
set msysDir=%~d0/Dev/MSYS

if "%BuildBits%" == "32" goto :setVars
Expand All @@ -12,16 +12,16 @@ echo Error - BuildBits variable not set
goto error

:setVars
set mingwDir=%devDir%\MinGW64
set mingwDir=%devDir%/MinGW64
set usrLocalDir=%msysDir%/local%BuildBits%
set qtDir=%devDir%\Qt%BuildBits%
set CMAKE_INCLUDE_PATH=%usrLocalDir%/include
set qtDir=%devDir%/Qt%BuildBits%
set CMAKE_INCLUDE_PATH=%usrLocalDir%/include;%mingwDir%/x86_64-w64-mingw32/include
set CMAKE_LIBRARY_PATH=%usrLocalDir%/lib
set PKG_CONFIG_PATH=%usrLocalDir%\lib\pkgconfig
set SDLDIR=%usrLocalDir%
set CFLAGS=%CFLAGS% -I%CMAKE_INCLUDE_PATH% -L%CMAKE_LIBRARY_PATH%
set CXXFLAGS=%CXXFLAGS% -I%CMAKE_INCLUDE_PATH% -L%CMAKE_LIBRARY_PATH%
set LDFLAGS=%LDFLAGS% -shared-libgcc -shared-libstdc++ -L%CMAKE_LIBRARY_PATH%
set CFLAGS=%CFLAGS% -I%CMAKE_INCLUDE_PATH:;= -I% -L%CMAKE_LIBRARY_PATH:;= -L%
set CXXFLAGS=%CXXFLAGS% -I%CMAKE_INCLUDE_PATH:;= -I% -L%CMAKE_LIBRARY_PATH:;= -L%
set LDFLAGS=%LDFLAGS% -shared-libgcc -L%CMAKE_LIBRARY_PATH:;= -L%

if "%Debug%" EQU "1" (
set admBuildDir=%devDir%\avidemux_2.6_build%BuildBits%-dbg
Expand All @@ -39,7 +39,7 @@ if "%BuildBits%" == "32" (
)

if exist "%qtDir%" (
for /f %%d in ('dir /b /ad /on %qtDir%') do set qtVer=%%d
for /f %%d in ('dir /b /ad /on "%qtDir%"') do set qtVer=%%d
) else (
echo Qt 4 could not be found at "%qtDir%". Please download from http://www.trolltech.com
goto error
Expand All @@ -65,22 +65,14 @@ if not exist "%mingwDir%" (
goto error
)

if not exist "%CMAKE_INCLUDE_PATH%" (
echo Include path could not be found at "%CMAKE_INCLUDE_PATH%".
goto error
)

if not exist "%CMAKE_LIBRARY_PATH%" (
echo Library path could not be found at "%CMAKE_LIBRARY_PATH%".
goto error
)

if not exist "%nsisDir%" (
echo NSIS could not be found at "%nsisDir%". Please download from http://nsis.sourceforge.net
goto error
)

set PATH=%cmakeDir%;%mingwDir%\bin;%usrLocalDir%\bin;%msysDir%\local-shared\bin;%qtDir%\bin;c:\strawberry\perl\bin;%PATH%
set PATH=%cmakeDir%;%mingwDir%\bin;%usrLocalDir%\bin;%msysDir%\local-shared\bin;%qtDir%\bin;%devDir%\strawberry\perl\bin;%PATH%

if "%BuildBits%" == "32" set PATH=%mingwDir%\x86_64-w64-mingw32\lib32;%PATH%

goto end

Expand Down
58 changes: 58 additions & 0 deletions foreignBuilds/mswin/aften/Perform Build.bat
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
@echo off

echo MSVC build for Aften
echo ====================
echo 1. 32-bit build
echo 2. 64-bit build
echo X. Exit
echo.

choice /c 12x

if errorlevel 1 (
set BuildBits=32
set VcvarFlags=x86 )
if errorlevel 2 (
set BuildBits=64
set VcvarFlags=x86_amd64 )
if errorlevel 3 goto :eof

verify >nul
call "../Set Common Environment Variables"
if errorlevel 1 goto end

set curDir=%CD%
set PATH=%PATH%;%msysdir%\bin;%devDir%\Git\bin
set CFLAGS=
set CXXFLAGS=
set LDFLAGS=

call "%ProgramFiles(x86)%\Microsoft Visual Studio 10.0\VC\vcvarsall.bat" %VcvarFlags%
echo.

set sourceFolder=%devDir%/aften-%BuildBits%
rm -r -f %sourceFolder%
if errorlevel 1 goto end

echo Downloading from git
call git clone git://aften.git.sourceforge.net/gitroot/aften/aften %sourceFolder%
if errorlevel 1 goto end

cd "%sourceFolder%"
call git checkout 89aee3d496bb2a89f046025402626ee12a12969f
if errorlevel 1 goto end

mkdir build%BuildBits%
if errorlevel 1 goto end

cd build%BuildBits%
cmake -G"NMake Makefiles" -DCMAKE_INSTALL_PREFIX=%usrLocalDir% -DSHARED=ON -DCMAKE_C_FLAGS_RELEASE="/MT /O2 /Ob2 /D NDEBUG" ..
if errorlevel 1 goto end

nmake install
if errorlevel 1 goto end

copy "%usrLocalDir%\bin\aften.dll" "%admBuildDir%"

:end
pause
31 changes: 31 additions & 0 deletions foreignBuilds/mswin/avsproxy/Perform Build.bat
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
@echo off

echo MSVC build for avsproxy
echo =======================
echo.

set curDir=%CD%

call "%ProgramFiles(x86)%\Microsoft Visual Studio 10.0\VC\vcvarsall.bat" x86
echo.

cd ..\..\..\addons\avisynthproxy
if errorlevel 1 goto end

vcupgrade -overwrite -nologo avsproxy.vcproj
if errorlevel 1 goto end

echo.
msbuild avsproxy.vcxproj /p:Configuration=Release /t:rebuild
if errorlevel 1 goto end

set BuildBits=32
call "%curDir%\..\Set Common Environment Variables"
copy "avsproxy.exe" "%admBuildDir%"

set BuildBits=64
call "%curDir%\..\Set Common Environment Variables"
copy "avsproxy.exe" "%admBuildDir%"

:end
pause
72 changes: 72 additions & 0 deletions foreignBuilds/mswin/expat/Perform Build.bat
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
@echo off

echo MSYS build for expat
echo ====================
echo 1. 32-bit build
echo 2. 64-bit build
echo X. Exit
echo.

choice /c 12x

if errorlevel 1 set BuildBits=32
if errorlevel 2 set BuildBits=64
if errorlevel 3 goto :eof

verify >nul
call "../Set Common Environment Variables"
if errorlevel 1 goto end

set version=2.1.0
set package=expat-%version%.tar.gz
set sourceFolder=expat-%version%-%BuildBits%
set tarFolder=expat-%version%
set curDir=%CD%
set PATH=%PATH%;%msysDir%\bin

if not exist %package% (
echo.
echo Downloading
wget http://sourceforge.net/projects/expat/files/expat/%version%/%package%/download
)

if errorlevel 1 goto end

echo.
echo Preparing
rm -r -f "%devDir%\%sourceFolder%"
if errorlevel 1 goto end

mkdir "%devDir%\%sourceFolder%"
if errorlevel 1 goto end

tar xfz "%package%" -C "%devDir%\\%sourceFolder%"
if errorlevel 1 goto end
cd "%devDir%\%sourceFolder%"

for /f "delims=" %%a in ('dir /b %tarFolder%') do (
move "%CD%\%tarFolder%\%%a" "%CD%"
)

echo.
echo Configuring

sh ./configure --prefix="%usrLocalDir%" --disable-static

if errorlevel 1 goto end
echo.
pause

make CFLAGS="%CFLAGS% -O3" install
if errorlevel 1 goto end

strip "%usrLocalDir%\bin\libexpat-1.dll"
copy "%usrLocalDir%\bin\libexpat-1.dll" "%admBuildDir%"

goto end

:error
echo Error

:end
pause
10 changes: 5 additions & 5 deletions foreignBuilds/mswin/fontconfig/Perform Build.bat
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,10 @@ verify >nul
call "../Set Common Environment Variables"
if errorlevel 1 goto end

set package=fontconfig-2.8.0.tar.gz
set sourceFolder=fontconfig-2.8.0-%BuildBits%
set tarFolder=fontconfig-2.8.0
set version=2.9.0
set package=fontconfig-%version%.tar.gz
set sourceFolder=fontconfig-%version%-%BuildBits%
set tarFolder=fontconfig-%version%
set curDir=%CD%
set PATH=%PATH%;%msysDir%\bin

Expand Down Expand Up @@ -56,11 +57,10 @@ if errorlevel 1 goto end
echo.
pause

make install
make install-strip
if errorlevel 1 goto end

del "%usrLocalDir%\etc\fonts\fonts.conf.bak"
strip "%usrLocalDir%\bin\libfontconfig-1.dll"
copy "%usrLocalDir%\bin\libfontconfig-1.dll" "%admBuildDir%"
xcopy /s/y "%usrLocalDir%\etc\fonts\*.*" "%admBuildDir%\etc\fonts\"

Expand Down
Loading

0 comments on commit 8028010

Please sign in to comment.