Commit 5b6a60bb authored by Andreas Traczyk's avatar Andreas Traczyk

packaging: add script to copy files required for packaging

Change-Id: I4e6443ca705686e2a6113e671468d3d2134d821e
parent 43c0823d
......@@ -11,4 +11,4 @@ release/
qrencode-win32/
*.dll
.gitignore
*.ps1
*.qm
\ No newline at end of file
write-host "copying runtime files..."
$QtDir = "C:\Qt\5.9.4\msvc2017_64"
$ClientDir = split-path -parent $MyInvocation.MyCommand.Definition
$OutDir = $ClientDir + "\x64\Release"
New-Item -ItemType directory -Path $OutDir -Force
if (-not (Test-Path env:daemonDir)) {
$env:daemonDir = '$ClientDir\..\daemon'
}
if (-not (Test-Path env:lrcDir)) {
$env:lrcDir = '$ClientDir\..\lrc'
}
# dependency bin files
$FilesToCopy = @(
"$env:daemonDir\contrib\build\ffmpeg\Build\win32\x64\bin\avcodec-58.dll",
"$env:daemonDir\contrib\build\ffmpeg\Build\win32\x64\bin\avutil-56.dll",
"$env:daemonDir\contrib\build\ffmpeg\Build\win32\x64\bin\avformat-58.dll",
"$env:daemonDir\contrib\build\ffmpeg\Build\win32\x64\bin\avdevice-58.dll",
"$env:daemonDir\contrib\build\ffmpeg\Build\win32\x64\bin\swresample-3.dll",
"$env:daemonDir\contrib\build\ffmpeg\Build\win32\x64\bin\swscale-5.dll",
"$env:daemonDir\contrib\build\ffmpeg\Build\win32\x64\bin\avfilter-7.dll",
"$env:daemonDir\contrib\build\restbed\dependency\openssl\out32dll\libeay32.dll",
"$env:daemonDir\contrib\build\restbed\dependency\openssl\out32dll\ssleay32.dll",
"$ClientDir\winsparkle\x64\Release\WinSparkle.dll",
"$ClientDir\ring.nsi",
"$ClientDir\images\ring.ico"
)
foreach ($i in $FilesToCopy) {
write-host "copying: " $i " => " $OutDir
Copy-Item -Path $i -Destination $OutDir -Force
}
############
# qt
############
# qt bin files
$FilesToCopy = @(
"$QtDir\bin\Qt5Core.dll",
"$QtDir\bin\Qt5Gui.dll",
"$QtDir\bin\Qt5Network.dll",
"$QtDir\bin\Qt5Positioning.dll",
"$QtDir\bin\Qt5PrintSupport.dll",
"$QtDir\bin\Qt5Qml.dll",
"$QtDir\bin\Qt5Quick.dll",
"$QtDir\bin\Qt5QuickWidgets.dll",
"$QtDir\bin\Qt5Sql.dll",
"$QtDir\bin\Qt5Svg.dll",
"$QtDir\bin\Qt5WebChannel.dll",
"$QtDir\bin\Qt5WebEngine.dll",
"$QtDir\bin\Qt5WebEngineCore.dll",
"$QtDir\bin\Qt5WebEngineWidgets.dll",
"$QtDir\bin\Qt5Widgets.dll",
"$QtDir\bin\Qt5WinExtras.dll",
"$QtDir\bin\Qt5Xml.dll",
"$QtDir\bin\QtWebEngineProcess.exe",
"$QtDir\resources\qtwebengine_resources.pak",
"$QtDir\resources\icudtl.dat"
)
foreach ($i in $FilesToCopy) {
write-host "copying: " $i " => " $OutDir
Copy-Item -Path $i -Destination $OutDir -Force
}
# qt imageformats
$FilesToCopy = @(
"$QtDir\plugins\imageformats\qgif.dll",
"$QtDir\plugins\imageformats\qico.dll",
"$QtDir\plugins\imageformats\qjpeg.dll",
"$QtDir\plugins\imageformats\qsvg.dll"
)
$CopyDir = $OutDir + "\imageformats"
New-Item -ItemType directory -Path $CopyDir -Force
foreach ($i in $FilesToCopy) {
write-host "copying: " $i " => " $CopyDir
Copy-Item -Path $i -Destination $CopyDir -Force
}
# qt platform dll for windows
$CopyDir = $OutDir + "\platforms"
New-Item -ItemType directory -Path $CopyDir -Force
$file = "$QtDir\plugins\platforms\qwindows.dll"
write-host "copying: " $file " => " $CopyDir
Copy-Item -Path $file -Destination $CopyDir -Force
# qt sql driver
$CopyDir = $OutDir + "\sqldrivers"
New-Item -ItemType directory -Path $CopyDir -Force
$file = "$QtDir\plugins\sqldrivers\qsqlite.dll"
write-host "copying: " $file " => " $CopyDir
Copy-Item -Path $file -Destination $CopyDir -Force
# ringtones
$CopyDir = $OutDir + "\ringtones"
New-Item -ItemType directory -Path $CopyDir -Force
$RingtonePath = "$ClientDir\..\daemon\ringtones"
write-host "copying ringtones..."
Get-ChildItem -Path $RingtonePath -Include *.ul, *.wav, *.ogg -Recurse | ForEach-Object {
write-host "copying ringtone: " $_.FullName " => " $CopyDir
Copy-Item -Path $_.FullName -Destination $CopyDir -Force Recurse
}
# qt translations
$lrelease = "$QtDir\bin\lrelease.exe"
# lrc translations
$lrcTSPath = "$env:lrcDir\translations"
Get-ChildItem -Path $lrcTSPath -Include *.ts -Recurse | ForEach-Object {
& $lrelease $_.FullName
}
$CopyDir = $OutDir + "\share\libringclient\translations"
New-Item -ItemType directory -Path $CopyDir -Force
write-host "copying ringtones..."
Get-ChildItem -Path $lrcTSPath -Include *.qm -Recurse | ForEach-Object {
write-host "copying translation file: " $_.FullName " => " $CopyDir
Copy-Item -Path $_.FullName -Destination $CopyDir -Force Recurse
}
# client translations
$clientTSPath = "$ClientDir\translations"
Get-ChildItem -Path $clientTSPath -Include *.ts -Recurse | ForEach-Object {
& $lrelease $_.FullName
}
$CopyDir = $OutDir + "\share\ring\translations"
New-Item -ItemType directory -Path $CopyDir -Force
write-host "copying ringtones..."
Get-ChildItem -Path $lrcTSPath -Include *.qm -Recurse | ForEach-Object {
write-host "copying translation file: " $_.FullName " => " $CopyDir
Copy-Item -Path $_.FullName -Destination $CopyDir -Force Recurse
}
write-host "copy completed" -NoNewline
\ No newline at end of file
......@@ -92,7 +92,7 @@
<FunctionLevelLinking>true</FunctionLevelLinking>
</ClCompile>
<Link>
<AdditionalDependencies>dring.lib;qtwrapper.lib;ringclient_static.lib;WinSparkle.lib;qrcodelib.lib;shell32.lib;Ole32.lib;Advapi32.lib;Shlwapi.lib;User32.lib;Gdi32.lib;Crypt32.lib;Strmiids.lib;qtmain.lib;Qt5Svg.lib;Qt5Widgets.lib;Qt5WinExtras.lib;Qt5Gui.lib;Qt5Xml.lib;Qt5Network.lib;Qt5Core.lib;$(QTDIR)\lib\Qt5Sql.lib;$(QTDIR)\lib\Qt5WebEngineWidgets.lib;$(QTDIR)\lib\Qt5WebChannel.lib;%(AdditionalDependencies)</AdditionalDependencies>
<AdditionalDependencies>dring.lib;qtwrapper.lib;ringclient_static.lib;WinSparkle.lib;qrcodelib.lib;shell32.lib;Ole32.lib;Advapi32.lib;Shlwapi.lib;User32.lib;Gdi32.lib;Crypt32.lib;Strmiids.lib;qtmain.lib;Qt5Svg.lib;Qt5Widgets.lib;Qt5WinExtras.lib;Qt5Gui.lib;Qt5Xml.lib;Qt5Network.lib;Qt5Core.lib;Qt5Sql.lib;Qt5WebEngineWidgets.lib;Qt5WebChannel.lib;%(AdditionalDependencies)</AdditionalDependencies>
<AdditionalLibraryDirectories>$(QTDIR)\lib;..\ring-daemon\contrib\msvc\lib\x64;..\daemon\contrib\msvc\lib\x64;..\ring-daemon\MSVC\x64\ReleaseLib_win32\bin;..\daemon\MSVC\x64\ReleaseLib_win32\bin;..\ring-lrc\msvc\release;..\lrc\msvc\release;..\ring-lrc\msvc\src\qtwrapper\Release;..\lrc\msvc\src\qtwrapper\Release;.\winsparkle\x64\release;.\qrencode-win32\qrencode-win32\vc8\qrcodelib\x64\Release-Lib;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
<AdditionalOptions>"/MANIFESTDEPENDENCY:type='win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' publicKeyToken='6595b64144ccf1df' language='*' processorArchitecture='*'" /ignore:4006,4049,4078,4098 /LTCG /NODEFAULTLIB:LIBCMT %(AdditionalOptions)</AdditionalOptions>
<DataExecutionPrevention>true</DataExecutionPrevention>
......
......@@ -141,6 +141,9 @@ section "install"
# Files added here should be removed by the uninstaller (see section "uninstall")
file "Ring.exe"
file "ring.ico"
file "qtwebengine_resources.pak"
file "QtWebEngineProcess.exe"
file "icudtl.dat"
file *.dll
setOutPath $INSTDIR\platforms
file platforms/*
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment