Skip to content
Snippets Groups Projects
Unverified Commit 1ae11e5c authored by Kali Kaneko's avatar Kali Kaneko Committed by meskio
Browse files

[pkg] boilerplate for qtinstaller framework

parent a1216b2e
No related branches found
No related tags found
No related merge requests found
......@@ -58,6 +58,9 @@ dependsCygwin:
@choco install -y golang python nssm nsis wget 7zip
build:
gui/build.sh
build_old:
ifeq (${XBUILD}, yes)
$(MAKE) build_cross_win
$(MAKE) build_cross_osx
......
......@@ -9,6 +9,7 @@ QMAKE_MACOSX_DEPLOYMENT_TARGET = 10.14
macx {
LIBS += -framework Security
ICON = ./branding/assets/riseup/icon.icns
}
QT += qml quick widgets
......
......@@ -20,8 +20,8 @@ fi
if [ "$XBUILD" == "$WIN64" ]
then
# TODO allow to override vars
QMAKE="`pwd`/../mxe/usr/x86_64-w64-mingw32.static/qt5/bin/qmake"
PATH="`pwd`/../mxe/usr/bin"/:$PATH
QMAKE="`pwd`/../../mxe/usr/x86_64-w64-mingw32.static/qt5/bin/qmake"
PATH="`pwd`/../../mxe/usr/bin"/:$PATH
CC=x86_64-w64-mingw32.static-gcc
else
if [ "$QMAKE" == "" ]
......
......@@ -12,8 +12,6 @@ class QJsonWatch : public QObject {
Q_OBJECT
QJsonModel *model;
public:
signals:
......
.qmake.stash
Makefile
packages/riseupvpn/data/riseup-vpn
RiseupVPN-Installer
TEMPLATE = aux
CONFIG -= debug_and_release
INSTALLER = RiseupVPN-Installer
INPUT = $$PWD/config/config.xml $$PWD/packages
inst.input = INPUT
inst.output = $$INSTALLER
inst.commands = binarycreator -c $$PWD/config/config.xml -p $$PWD/packages ${QMAKE_FILE_OUT}
inst.CONFIG += target_predeps no_link combine
QMAKE_EXTRA_COMPILERS += inst
OTHER_FILES += \
# watch out... it chokes with dashes in the path
packages/riseupvpn/meta/package.xml \
packages/riseupvpn/meta/install.js \
packages/riseupvpn/data/README.txt \
packages/riseupvpn/data/riseup-vpn
<?xml version="1.0" encoding="UTF-8"?>
<Installer>
<Name>RiseupVPN Installer 1.0</Name>
<Title>RiseupVPN Installer</Title>
<Version>1.0.0</Version>
<TargetDir>@ApplicationsDir@/RiseupVPN</TargetDir>
<RemoteRepositories>
<Repository>
<Url>http://localhost/repository/</Url>
</Repository>
</RemoteRepositories>
</Installer>
RiseupVPN README
/****************************************************************************
**
** Copyright (C) 2020 LEAP
**
****************************************************************************/
function Component() {
}
Component.prototype.createOperations = function ()
{
// This will actually install the files
component.createOperations();
// And now our custom actions.
// See https://doc.qt.io/qtinstallerframework/operations.html for reference
//
// We can also use this to register different components (different architecture for instance)
// See https://doc.qt.io/qtinstallerframework/qt-installer-framework-systeminfo-packages-root-meta-installscript-qs.html
console.log("Post installation. Checking platform...")
if (systemInfo.productType === "windows") {
console.log("Platform: windows");
postInstallWindows();
} else if (systemInfo.productType === "osx") {
console.log("Platform: osx");
postInstallOSX();
} else {
console.log("Platform: linux");
postInstallLinux();
}
}
function postInstallWindows() {
component.addOperation("CreateShortcut",
"@TargetDir@/README.txt",
"@StartMenuDir@/README.lnk",
"workingDirectory=@TargetDir@",
"iconPath=%SystemRoot%/system32/SHELL32.dll",
"iconId=2");
}
function postInstallOSX() {
console.log("TODO: should do osx post-installation");
}
function postInstallLinux() {
console.log("TODO: should do linux post-installation");
console.log("Maybe you want to use your package manager instead?");
component.addOperation("AppendFile", "/tmp/riseupvpn.log", "this is a test - written from the installer");
}
<?xml version="1.0" encoding="UTF-8"?>
<Package>
<DisplayName>RiseupVPN</DisplayName>
<Description>RiseupVPN</Description>
<Version>0.20.6-1</Version>
<ReleaseDate>2020-07-01</ReleaseDate>
<Default>false</Default>
<RequiresAdminRights>true</RequiresAdminRights>
<Script>install.js</Script>
<ForcedInstallation>true</ForcedInstallation>
</Package>
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment