mirror of
https://github.com/qmlnet/qmlnet.git
synced 2026-05-21 06:45:32 -06:00
Removed the build steps that handles the Qt runtimes. They will be managed differently.
This commit is contained in:
parent
9fd2875687
commit
89d0bc3bee
7 changed files with 11 additions and 223 deletions
|
|
@ -3,5 +3,7 @@ set PATH=%PATH%;C:\qmlnet-qt\qt\bin
|
|||
set PATH=%PATH%;C:\qmlnet-qt\Tools\QtCreator\bin
|
||||
|
||||
set PATH=%PATH%;%APPVEYOR_BUILD_FOLDER%\src\native\output
|
||||
set QT_PLUGIN_PATH=C:\qmlnet-qt\qt\plugins
|
||||
set QML2_IMPORT_PATH=C:\qmlnet-qt\qt\qml
|
||||
|
||||
dotnet run -p ./build/scripts/Build.csproj -- ci
|
||||
|
|
@ -59,182 +59,10 @@ namespace Build
|
|||
if (IsWindows())
|
||||
{
|
||||
RunShell($"{ExpandPath("./src/native/build.bat")}");
|
||||
|
||||
// The windows build currently brings in all the .dll's for packaging.
|
||||
// However, it also brings in the *d.dll/*.pdb files. Let's remove them.
|
||||
foreach(var file in GetFiles(ExpandPath("./src/native/output/"), recursive: true))
|
||||
{
|
||||
if (file.EndsWith("d.dll"))
|
||||
{
|
||||
if(FileExists(file.Substring(0, file.Length - 5) + ".dll"))
|
||||
{
|
||||
// This is a debug dll.
|
||||
DeleteFile(file);
|
||||
}
|
||||
}
|
||||
else if (file.EndsWith(".pdb"))
|
||||
{
|
||||
DeleteFile(file);
|
||||
}
|
||||
else if (file.EndsWith("*.qmlc"))
|
||||
{
|
||||
DeleteFile(file);
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
RunShell("src/native/build.sh");
|
||||
|
||||
if (IsOSX())
|
||||
{
|
||||
// We deploy the entire Qt framework. Let's trim it down.
|
||||
foreach(var directory in GetDirecories(ExpandPath("./src/native/output"), recursive:true))
|
||||
{
|
||||
if (!DirectoryExists(directory))
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
var directoryName = Path.GetFileName(directory);
|
||||
if (directoryName == "Headers")
|
||||
{
|
||||
DeleteDirectory(directory);
|
||||
continue;
|
||||
}
|
||||
|
||||
if (directoryName.EndsWith(".dSYM"))
|
||||
{
|
||||
DeleteDirectory(directory);
|
||||
continue;
|
||||
}
|
||||
|
||||
if (directory == "cmake")
|
||||
{
|
||||
DeleteDirectory(directory);
|
||||
continue;
|
||||
}
|
||||
|
||||
if (directory == "pkgconfig")
|
||||
{
|
||||
DeleteDirectory(directory);
|
||||
}
|
||||
}
|
||||
|
||||
foreach (var file in GetFiles(ExpandPath("./src/native/output"), recursive:true))
|
||||
{
|
||||
var extension = Path.GetExtension(file);
|
||||
var fileName = Path.GetFileNameWithoutExtension(file);
|
||||
|
||||
if (fileName.EndsWith("_debug"))
|
||||
{
|
||||
DeleteFile(file);
|
||||
continue;
|
||||
}
|
||||
|
||||
if (extension == ".prl")
|
||||
{
|
||||
DeleteFile(file);
|
||||
continue;
|
||||
}
|
||||
|
||||
if (extension == ".plist")
|
||||
{
|
||||
DeleteFile(file);
|
||||
continue;
|
||||
}
|
||||
|
||||
if (extension == ".qmlc")
|
||||
{
|
||||
DeleteFile(file);
|
||||
continue;
|
||||
}
|
||||
|
||||
if (extension == ".cmake")
|
||||
{
|
||||
DeleteFile(file);
|
||||
continue;
|
||||
}
|
||||
|
||||
if (extension == ".a")
|
||||
{
|
||||
DeleteFile(file);
|
||||
continue;
|
||||
}
|
||||
|
||||
if (extension == ".la")
|
||||
{
|
||||
DeleteFile(file);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (IsLinux())
|
||||
{
|
||||
// First get a list of all dependencies from every .so files.
|
||||
var linkedFiles = new List<string>();
|
||||
foreach(var file in GetFiles(ExpandPath("./src/native/output"), pattern:"*.so*", recursive:true))
|
||||
{
|
||||
var lddOutput = ReadShell($"ldd {file}");
|
||||
foreach (var _line in lddOutput.Split(Environment.NewLine))
|
||||
{
|
||||
var line = _line.TrimStart('\t').TrimStart('\n');
|
||||
var match = Regex.Match(line, @"(.*) =>.*");
|
||||
if (match.Success)
|
||||
{
|
||||
var linkedFile = match.Groups[1].Value;
|
||||
if(!linkedFiles.Contains(linkedFile))
|
||||
{
|
||||
linkedFiles.Add(linkedFile);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Let's remove any file from lib/ that isn't linked against anything.
|
||||
foreach(var file in GetFiles(ExpandPath("./src/native/output/lib"), recursive:true))
|
||||
{
|
||||
var fileName = Path.GetFileName(file);
|
||||
if (!linkedFiles.Contains(fileName))
|
||||
{
|
||||
DeleteFile(file);
|
||||
}
|
||||
}
|
||||
|
||||
foreach (var directory in GetDirecories(ExpandPath("./src/native/output"), recursive: true))
|
||||
{
|
||||
if (!DirectoryExists(directory))
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
var directoryName = Path.GetFileName(directory);
|
||||
if (directoryName == "cmake")
|
||||
{
|
||||
DeleteDirectory(directory);
|
||||
continue;
|
||||
}
|
||||
|
||||
if (directoryName == "pkgconfig")
|
||||
{
|
||||
DeleteDirectory(directory);
|
||||
continue;
|
||||
}
|
||||
|
||||
Info(directory);
|
||||
}
|
||||
|
||||
foreach (var file in GetFiles(ExpandPath("./src/native/output"), recursive: true))
|
||||
{
|
||||
var fileName = Path.GetFileName(file);
|
||||
var fileExtension = Path.GetExtension(fileName);
|
||||
|
||||
if (fileExtension == ".qmlc")
|
||||
{
|
||||
DeleteFile(file);
|
||||
}
|
||||
}
|
||||
}
|
||||
RunShell($"{ExpandPath("./src/native/build.sh")}");
|
||||
}
|
||||
});
|
||||
|
||||
|
|
|
|||
|
|
@ -9,6 +9,8 @@ mkdir -p $QT_DIR
|
|||
wget -O- -q https://github.com/qmlnet/qt-runtimes/releases/download/releases/qt-5.12.2-de3f7b1-linux-x64-dev.tar.gz | tar xpz -C $QT_DIR
|
||||
|
||||
export PATH=$QT_DIR/qt/bin:$PATH
|
||||
export LD_LIBRARY_PATH=$TRAVIS_BUILD_DIR/src/native/output
|
||||
export LD_LIBRARY_PATH=$TRAVIS_BUILD_DIR/src/native/output:$QT_DIR/qt/lib
|
||||
export QT_PLUGIN_PATH=$QT_DIR/qt/plugins
|
||||
export QML2_IMPORT_PATH=$QT_DIR/qt/qml
|
||||
|
||||
$TRAVIS_BUILD_DIR/build.sh ci
|
||||
|
|
@ -8,7 +8,9 @@ mkdir -p $QT_DIR
|
|||
wget -O- -q https://github.com/qmlnet/qt-runtimes/releases/download/releases/qt-5.12.2-de3f7b1-osx-x64-dev.tar.gz | tar xpz -C $QT_DIR
|
||||
|
||||
export PATH=$QT_DIR/qt/bin:$PATH
|
||||
export DYLD_LIBRARY_PATH=$TRAVIS_BUILD_DIR/src/native/output
|
||||
export DYLD_LIBRARY_PATH=$TRAVIS_BUILD_DIR/src/native/output:$QT_DIR/qt/lib
|
||||
export QT_PLUGIN_PATH=$QT_DIR/qt/plugins
|
||||
export QML2_IMPORT_PATH=$QT_DIR/qt/qml
|
||||
|
||||
# We need to source this script, so that DYLD_LIBRARY_PATH get's passed.
|
||||
. $TRAVIS_BUILD_DIR/build.sh ci
|
||||
|
|
@ -17,49 +17,3 @@ include(QmlNet.pri)
|
|||
|
||||
target.path = $$(PREFIX)/
|
||||
INSTALLS += target
|
||||
|
||||
CONFIG(install-qt-libs) {
|
||||
win32 {
|
||||
qtlibs.path = $$(PREFIX)
|
||||
qtlibs.files = $$[QT_INSTALL_BINS]/*.dll
|
||||
INSTALLS += qtlibs
|
||||
|
||||
qtplugins.path = $$(PREFIX)/plugins
|
||||
qtplugins.files = $$[QT_INSTALL_PLUGINS]/*
|
||||
INSTALLS += qtplugins
|
||||
|
||||
qtqml.path = $$(PREFIX)/qml
|
||||
qtqml.files = $$[QT_INSTALL_QML]/*
|
||||
INSTALLS += qtqml
|
||||
}
|
||||
macx {
|
||||
qtlibs.path = $$(PREFIX)/lib
|
||||
qtlibs.files = $$[QT_INSTALL_LIBS]/*
|
||||
INSTALLS += qtlibs
|
||||
|
||||
qtplugins.path = $$(PREFIX)/plugins
|
||||
qtplugins.files = $$[QT_INSTALL_PLUGINS]/*
|
||||
INSTALLS += qtplugins
|
||||
|
||||
qtqml.path = $$(PREFIX)/qml
|
||||
qtqml.files = $$[QT_INSTALL_QML]/*
|
||||
INSTALLS += qtqml
|
||||
|
||||
QMAKE_RPATHDIR += @loader_path/lib
|
||||
}
|
||||
unix:!macx {
|
||||
qtlibs.path = $$(PREFIX)/lib
|
||||
qtlibs.files = $$[QT_INSTALL_LIBS]/*
|
||||
INSTALLS += qtlibs
|
||||
|
||||
qtplugins.path = $$(PREFIX)/plugins
|
||||
qtplugins.files = $$[QT_INSTALL_PLUGINS]/*
|
||||
INSTALLS += qtplugins
|
||||
|
||||
qtqml.path = $$(PREFIX)/qml
|
||||
qtqml.files = $$[QT_INSTALL_QML]/*
|
||||
INSTALLS += qtqml
|
||||
|
||||
QMAKE_RPATHDIR = $ORIGIN/lib
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@ mkdir %BATCHDIR%output
|
|||
|
||||
cd %BATCHDIR%build
|
||||
set PREFIX=%BATCHDIR%output
|
||||
qmake ../QmlNet CONFIG+=install-qt-libs
|
||||
qmake ../QmlNet
|
||||
|
||||
jom
|
||||
jom install
|
||||
|
|
|
|||
|
|
@ -8,6 +8,6 @@ OUTPUT_DIR=$DIR/output
|
|||
|
||||
mkdir -p $BUILD_DIR
|
||||
cd $BUILD_DIR
|
||||
PREFIX=$OUTPUT_DIR qmake ../QmlNet CONFIG+=install-qt-libs
|
||||
PREFIX=$OUTPUT_DIR qmake ../QmlNet
|
||||
make
|
||||
make install
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue