Warning, /office/calligra/windows/calligra_installer/package.bat is written in an unsupported language. File is not indexed.

0001 :: Copyright (c) 2011-2012 KO GmbH.  All rights reserved.
0002 :: Copyright (c) 2011-2012 Stuart Dickson <stuartmd@kogmbh.com>
0003 ::
0004 :: The use and distribution terms for this software are covered by the
0005 :: Common Public License 1.0 (http://opensource.org/licenses/cpl1.0.php)
0006 :: which can be found in the file CPL.TXT at the root of this distribution.
0007 :: By using this software in any fashion, you are agreeing to be bound by
0008 :: the terms of this license.
0009 ::  
0010 :: You must not remove this notice, or any other, from this software.
0011 :: ------------------------------------------------------------------------
0012 ::
0013 ::  package_calligra.bat
0014 ::
0015 ::  Copies relevant files from the calligra inst and kderoot folders 
0016 ::
0017 @echo off
0018 
0019 ::  Safety check:
0020 ::  Make sure key variables are defined
0021 
0022 IF "%C2WINSTALL_INPUT%"=="" (
0023         echo !!! C2WINSTALL VARIABLES NOT PROPERLY DEFINED !!!
0024         echo Operation cancelled.
0025         goto :eof
0026         pause
0027 )
0028 IF "%C2WINSTALL_TEMP%"=="" (
0029         echo !!! C2WINSTALL VARIABLES NOT PROPERLY DEFINED !!!
0030         echo Operation cancelled.
0031         goto :eof
0032         pause
0033 )
0034 IF "%C2WINSTALL_OUTPUT%"=="" (
0035         echo !!! C2WINSTALL VARIABLES NOT PROPERLY DEFINED !!!
0036         echo Operation cancelled.
0037 
0038         goto :eof
0039         pause
0040 )
0041 
0042 ::  Test for argument
0043 IF "%1"==""  (
0044         @echo off
0045 ) ELSE (
0046         mkdir %C2WINSTALL_INPUT%\output
0047         del %C2WINSTALL_INPUT%\output\*.* /S /Q
0048         SET CALLIGRA_INST=%C2WINSTALL_INPUT%\%1\inst
0049         SET KDEROOT=%C2WINSTALL_INPUT%\%1\kderoot
0050         SET C2WINSTALL_INPUT=%C2WINSTALL_INPUT%\output
0051 )
0052 
0053 ::  Create redistribution directories
0054 mkdir %c%
0055 mkdir %C2WINSTALL_INPUT%
0056 mkdir %C2WINSTALL_OUTPUT%
0057 del %C2WINSTALL_TEMP%\*.* /Q /S
0058 del %C2WINSTALL_INPUT%\*.* /Q /S
0059 
0060 mkdir %C2WINSTALL_INPUT%\bin
0061 mkdir %C2WINSTALL_INPUT%\etc
0062 mkdir %C2WINSTALL_INPUT%\lib
0063 mkdir %C2WINSTALL_INPUT%\plugins
0064 mkdir %C2WINSTALL_INPUT%\share
0065 
0066 echo Copying Calligra binaries...
0067 xcopy "%CALLIGRA_INST%\bin\*.*" "%C2WINSTALL_TEMP%" /Q /Y /EXCLUDE:%~dp0res\package\todelete.txt
0068 echo .
0069 move "%C2WINSTALL_TEMP%\*.exe" "%C2WINSTALL_INPUT%\bin"
0070 move "%C2WINSTALL_TEMP%\*.dll" "%C2WINSTALL_INPUT%\bin"
0071 echo ..
0072 move "%C2WINSTALL_TEMP%\*.*" "%C2WINSTALL_INPUT%\lib"
0073 echo ...
0074 xcopy "%CALLIGRA_INST%\lib\kde4" "%C2WINSTALL_INPUT%\lib\kde4\" /Q /Y /EXCLUDE:%~dp0res\package\todelete.txt
0075 echo ....
0076 xcopy "%CALLIGRA_INST%\share" "%C2WINSTALL_INPUT%\share" /I /E /Q /Y /EXCLUDE:%~dp0res\package\todelete.txt
0077 echo .....
0078 
0079 echo Copying KDE-Windows binaries
0080 xcopy "%KDEROOT%\bin" "%C2WINSTALL_TEMP%\bin" /I /E /Q /Y /EXCLUDE:%~dp0res\package\todelete.txt
0081 xcopy "%KDEROOT%\etc" "%C2WINSTALL_TEMP%\etc" /I /E /Q /Y /EXCLUDE:%~dp0res\package\todelete.txt
0082 xcopy "%KDEROOT%\lib" "%C2WINSTALL_TEMP%\lib" /I /E /Q /Y /EXCLUDE:%~dp0res\package\todelete.txt
0083 xcopy "%KDEROOT%\plugins" "%C2WINSTALL_TEMP%\plugins" /I /E /Q /Y /EXCLUDE:%~dp0res\package\todelete.txt
0084 xcopy "%KDEROOT%\share" "%C2WINSTALL_TEMP%\share" /I /E /Q /Y /EXCLUDE:%~dp0res\package\todelete.txt
0085 
0086 del "%C2WINSTALL_TEMP%\lib\*.prl" /S /Q
0087 del "%C2WINSTALL_TEMP%\lib\*.cmd" /S /Q
0088 del "%C2WINSTALL_TEMP%\lib\*.bat" /S /Q
0089 del "%C2WINSTALL_TEMP%\lib\*.def" /S /Q
0090 del "%C2WINSTALL_TEMP%\lib\libpng" /S /Q
0091 del "%C2WINSTALL_TEMP%\lib\libstreamanalyzer" /S /Q
0092 del "%C2WINSTALL_TEMP%\lib\libstreams" /S /Q
0093 
0094 
0095 move "%C2WINSTALL_TEMP%\lib\dbus*.*" "%C2WINSTALL_TEMP%\bin\"
0096 move "%C2WINSTALL_TEMP%\lib\*.dll" "%C2WINSTALL_TEMP%\bin\"
0097 
0098 xcopy "%C2WINSTALL_TEMP%" "%C2WINSTALL_INPUT%" /Y /S /EXCLUDE:%~dp0res\package\todelete.txt
0099 
0100 move "%C2WINSTALL_INPUT%\lib\libwmf.dll""%C2WINSTALL_INPUT%\bin\libwmf.dll
0101 move "%C2WINSTALL_INPUT%\lib\msooxml.dll" %C2WINSTALL_INPUT%\bin\msooxml.dll
0102 move "%C2WINSTALL_INPUT%\lib\RtfReader.dll" %C2WINSTALL_INPUT%\bin\RtfReader.dll
0103 
0104 ::  Temporary Measure - rename kspread.png to sheets.png in hicolor
0105 ::  TODO Find out why KDE looks for sheets instead of kspread
0106 ren "%C2WINSTALL_INPUT%\share\icons\hicolor\16x16\apps\kspread.png sheets.png"
0107 ren "%C2WINSTALL_INPUT%\share\icons\hicolor\22x22\apps\kspread.png sheets.png"
0108 ren "%C2WINSTALL_INPUT%\share\icons\hicolor\32x32\apps\kspread.png sheets.png"
0109 ren "%C2WINSTALL_INPUT%\share\icons\hicolor\48x48\apps\kspread.png sheets.png"
0110 
0111 :: ICONV.DLL improve
0112 :: TODO: consider restructuring the install directory
0113 :: move %C2WINSTALL_INPUT%\lib\iconv.dll %C2WINSTALL_INPUT%\bin\iconv.dll
0114 
0115 ::  Delete unused resources
0116 ::  TODO in future we will package .pdb 
0117 del "%C2WINSTALL_TEMP%\*.*" /S /Q
0118 
0119 echo Complete.