QuasarApp / CQtDeployer

This project is used to deploy applications written using QML, qt or other С / С++ frameworks.
https://quasarapp.ddns.net:3031/docs/QuasarApp/CQtDeployer/latest/
GNU Lesser General Public License v3.0
570 stars 89 forks source link

QIF banner/logo on cross-compiled app (Linux->Windows) #799

Closed higaski closed 3 months ago

higaski commented 6 months ago

I'm having troubles adding a banner (and or a logo) to an installer created by the binary creator. Creating the installer itself works fine. I have this custom CMake command which invokes the CQtDeyployer executable and passes things on to the binarycreator through Wine.

add_custom_command(
  TARGET MSim
  POST_BUILD
  COMMAND
    ${CQTDEPLOYER_EXECUTABLE} 
    force-clear 
    noTranslations 
    qif 
    -bin $<TARGET_FILE:MSim> 
    -qmake ${QMAKE_EXECUTABLE} 
    -libDir ${LIB_DIRS} 
    -recursiveDepth 2 
    -targetDir ${CMAKE_BINARY_DIR}/deploy 
    -verbose 3 
    -platform win_x86_64 
    -icon ${CMAKE_CURRENT_SOURCE_DIR}/src/MSim.ico 
    -qifBanner ${CMAKE_CURRENT_SOURCE_DIR}/data/images/ZIMO_small.png # Adding banner
    -qifLogo ${CMAKE_CURRENT_SOURCE_DIR}/data/images/logo.png # Adding logo
    -qifOut MSim-${PROJECT_VERSION}-x86_64 
    -qifConfig ${CMAKE_BINARY_DIR}/config.xml 
    -binarycreator "${WINE_EXECUTABLE} ${BINARYCREATOR_WINDOWS_EXECUTABLE}")

The output of this command also suggests that the specified files have been found

Info: Use a default installer style
Info: copy :/home/vinci/Develop/VSCode/MSim/data/images/ZIMO_small.png
Info: copy :/home/vinci/Develop/VSCode/MSim/data/images/logo.png

log.txt

When running the installer on Windows however neither banner nor logo show up win

EndrII commented 6 months ago

Hi, give me more time to answer please, I will check this issue to evening.

higaski commented 6 months ago

This is an absolute luxury problem, please take as much time as you want.

EndrII commented 6 months ago

hmm probably its windows only issue. Because on the linux version all works is fine. I need more time to solve it. image

EndrII commented 6 months ago

i finish checked your issue on the both platforms (windows/linux), all works fine. probably trouble in the binarycreator executable. What version of qifw do you use ? Just run your installer with version option

InstallerApplication.exe -verison
higaski commented 6 months ago

I get the feeling that I'm doing something wrong? Are there any size or path restrictions to the banner and logo files?

I've now tried to add just a banner (even the one from the CQtDeployer repo... just to be sure) on my host linux machine with the following two releases

Using CQtDeployer 1.5.4.17 (Linux only):

IFW Version: 4.4.0, built with Qt 5.15.2.
Build date: Jun  7 2022
Installer Framework SHA1: e8025cdfe0d85c8ac9199784e95d88bf001a8a99
Libarchive version: libarchive 3.6.1 zlib/1.2.7 liblzma/5.2.2 bz2lib/1.0.8

Using CQtDeployer 1.6.2323 (Linux only):

IFW Version: 4.6.1, built with Qt 5.15.2.
Build date: Aug 23 2023
Installer Framework SHA1: e99494a7abfd8509decd2ab46f84bc9e5bd5794f
Libarchive version: libarchive 3.6.2 zlib/1.2.11 (Qt) liblzma/5.2.2 bz2lib/1.0.8

One once compiling on my host for windows and then using CQtDeployer 1.6.2345 (so Linux and Windows binaries)

IFW Version: 4.7.0, built with Qt 6.6.0.
Build date: Feb 15 2024
Installer Framework SHA1: fad83b7a8ba6a9e3179236d11bba0ceb9b3de5b4
Libarchive version: libarchive 3.7.1 zlib/1.2.12 liblzma/5.2.5 bz2lib/1.0.8

/edit Here's a link to the CMakeLists.txt file containing the custom commands I use to deploy for this test: https://github.com/higaski/QtPlayground/blob/13fb743b8b00775f944dd6bae5df5da202a39790/CMakeLists.txt#L190-L209

EndrII commented 6 months ago

Yes, I found a mistake in your config. you use custom configuration of qt installer framework instead of default that contains rules for logo and banner.

Just remove the -qifConfig ${CMAKE_BINARY_DIR}/config.xml line

Or take cqtdeployer default config and modify it. Available here.

higaski commented 6 months ago

Thank you very much, I didn't realize that those options need to be added to the .xml

EndrII commented 6 months ago

Thank you very much, I didn't realize that those options need to be added to the .xml

Yes, it's qifw feature see qifw documentation about config file.

higaski commented 3 months ago

I'm sorry but I've to reopen this issue. I can't get a custom config.xml file to show me a banner.

<?xml version="1.0" encoding="UTF-8"?>
<Installer>
  <Name>${APPLICATION_NAME}</Name>
  <Version>${PROJECT_VERSION}</Version>
  <Title>${APPLICATION_NAME} Installer</Title>
  <Publisher>${ORGANISATION_NAME}-Elektronik</Publisher>
  <Banner>../data/images/banner.png</Banner>
  <StartMenuDir>${ORGANISATION_NAME}/${APPLICATION_NAME}</StartMenuDir>
  <TargetDir>${INSTALLER_APP_DIR}/${ORGANISATION_NAME}/${APPLICATION_NAME}</TargetDir>
</Installer>

The verbose output claims the banner has been found

Info: [23015] Read dom element: <Banner>../data/images/banner.png</Banner>.

Info: [23015] Copying associated "Banner" file "Z:/home/vinci/Develop/VSCode/ZIMO-Elektronik/MSim/data/images/banner.png"

Info: [23016] done.

But the installer does not show it. image

Any chance this has something to do with invoking the binarycreator through wine?

/edit Oh... the WizardStyle must be set (see this question on SO). How about the would fucking mention that in their documentation... god damn it! Sorry for bothering you.