[RESOLVED] tis-irfanview package update

Questions about WAPT Packaging / Requests and help regarding Wapt packages.
Forum Rules
Community Forum Rules
* English support on www.reddit.com/r/wapt
* French community support is available on this forum
* Please prefix the topic title with [RESOLVED] if it is resolved.
* Please do not edit a topic that is tagged [RESOLVED]. Open a new topic referencing the old one.
* Specify the installed WAPT version, full version, and build number (2.2.1.11957 / 2.2.2.12337 / etc.) as well as the Enterprise/Discovery edition.
* Versions 1.8.2 and earlier are no longer supported. The only questions accepted regarding version 1.8.2 are related to upgrading to a supported version (2.1, 2.2, etc.).
* Specify the server OS (Linux/Windows) and version (Debian Buster/Bullseye - CentOS 7 - Windows Server 2012/2016/2019).
* Specify the OS of the administration/package creation machine and the machine with the problematic agent, if applicable (Windows 7/10/11/Debian 11/etc.).
* Avoid asking multiple questions when opening a topic, otherwise it may be ignored. If there are multiple topics, open separate topics, preferably one after the other and not all at the same time (i.e., do not spam the forum).
* Include code snippets, screenshots, and other images directly in the post. Links to Pastebin, Bitly, and other third-party sites will be systematically removed.
* As with any community forum, support is provided voluntarily by members. If you require commercial support, you can contact Tranquil IT's sales department at 02.40.97.57.55
Locked
olaplanche
Messages: 178
Registration: January 26, 2017 - 11:11

March 21, 2019 - 10:00

Good morning,

I am trying to update the tis-irfanview package to the latest version of the software (4.52).
I'm encountering a problem in the update section of the ini file:

The new ini file is encoded in UTF16-LE and the [Language] section is no longer on the first line but on the 3rd line in the file.
As a result, the inifile_writestring function can no longer find the [Language] section in the file and returns the following error:
MissingSectionHeaderError: File contains no section headers.
file: C:\Program Files (x86)\IrfanView\i_view32.ini, line: 1
'\xff\xfe;\x00 \x00U\x00N\x00I\x00C\x00O\x00D\x00E\x00 \x00F\x00I\x00L\x00E\x00 \x00-\x00 \x00e\x00d\x00i\x00t\x00 \x00w\x00i\x00t\x00h\x00 \x00c\x00a\x00r\x00e\x00 \x00;\x00-\x00)\x00\r\x00\n'
Any ideas?

THANKS
Last edited by olaplanche on Apr 18, 2019 - 09:55, edited 1 time.
- Installed WAPT version: 2.6.0.16795 Enterprise
- Server OS: Linux / Debian Bookworm
- Administration/package creation machine OS: Windows 10
skoizer
Messages: 54
Registration: June 19, 2018 - 4:45 PM

March 28, 2019 - 11:20

Another solution
is to include the pre-configured .ini file in your Wapt package.
Then you simply copy and paste it at the end of the installation.
olaplanche
Messages: 178
Registration: January 26, 2017 - 11:11

April 18, 2019 - 9:54 AM

Thanks for the tip, I solved the problem that way.

For your information, it should be noted that the i_view32.ini file is copied into the user's virtualstore on the first run and therefore the following code does not change the language of users who have already used the software.

Code: Select all

from setuphelpers import *

uninstallkey = []

def install():
    print ("closing irfanview")
    killalltasks('i_view32.exe')
    print("installing exe")
    install_exe_if_needed("iview452_setup.exe",'/silent thumbs=0 /group=1 /allusers=1 /assoc=1 /assocallusers','IrfanView', '4.52')
    uninstallkey.remove('IrfanView')

    print "Install French language"
    filecopyto('French.dll',makepath(programfiles32,'IrfanView','Languages'))
    filecopyto('IP_French.lng',makepath(programfiles32,'IrfanView','Languages'))
    filecopyto('i_view32.ini',makepath(programfiles32,'IrfanView'))

    print "Install plugins"
    install_exe_if_needed("iview452_plugins_setup.exe", '/silent')

def uninstall():
    print('uninstalling wapt-irfanview')
    run(r'"%s\\IrfanView\\iv_uninstall.exe" /silent' % programfiles32)
- Installed WAPT version: 2.6.0.16795 Enterprise
- Server OS: Linux / Debian Bookworm
- Administration/package creation machine OS: Windows 10
Locked