[SOLVED] Need help creating a Slack package

Share your tips or issues concerning the WAPT Console or WAPT Agent here
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
Thomas
Messages: 2
Registration: May 17, 2018 - 12:02

May 17, 2018 - 12:15

Good morning,

I am encountering a problem while installing a basic package:
Here are the steps involved in making my package:
1. Creating the template:

Code: Select all

PS C:\WINDOWS\system32> wapt-get make-template C:\SlackSetup.exe coldis-slack
Template created. You can build the WAPT package by launching
  C:\Program Files (x86)\wapt\wapt-get.exe build-package \\wapt\waptdev$\coldis-slack-wapt
You can build and upload the WAPT package by launching
  C:\Program Files (x86)\wapt\wapt-get.exe build-upload \\wapt\waptdev$\coldis-slack-wapt
PS C:\WINDOWS\system32>
So far, no problem, the package is created and Pyscripter starts.
2. Setup.py:

Code: Select all

# -*- coding: utf-8 -*-
from setuphelpers import *

uninstallkey = []

def install():
    print('installing coldis-slack')
    install_exe_if_needed("SlackSetup.exe",'/VERYSILENT',key='',min_version='3.1.1')
3. control:

Code: Select all

package           : coldis-slack
version           : 3.1.1-0
architecture      : all
section           : base
priority          : optional
maintainer        : Thomas
description       : Package for Slack Desktop (Slack Technologies) 
depends           : 
conflicts         : 
maturity          : 
locale            : 
target_os         : 
min_os_version    : 
max_os_version    : 
min_wapt_version  : 
sources           : 
installed_size    : 
impacted_process  : 
description_fr    : 
description_pl    : 
description_de    : 
description_es    : 
signer            : 
signer_fingerprint: 
signature_date    : 
signed_attributes : 
when I run the install command:

Code: Select all

Ligne de Commande : install "\\wapt\waptdev$\coldis-slack-wapt\WAPT\.."
Installing WAPT files \\wapt\waptdev$\coldis-slack-wapt
installing coldis-slack
2018-05-17 11:59:21,726 CRITICAL Fatal error in install script: CalledProcessErrorOutput: Command '"SlackSetup.exe" /VERYSILENT' returned non-zero exit status 1.
Output:'\\wapt\waptdev$\coldis-slack-wapt'
CMD.EXE a ǸtǸ dǸmarrǸ avec le chemin d'accÇùs comme rǸpertoire en
cours. Les chemins d'accÇùs UNC ne sont pas prise en charge. Utilisation
du rǸpertoire Windows par dǸfaut.
'"SlackSetup.exe"' n'est pas reconnu en tant que commande interne
ou externe, un programme exǸcutable ou un fichier de commandes.
:
Traceback (most recent call last):
  File "C:\Program Files (x86)\wapt\common.py", line 3328, in install_wapt
    exitstatus = setup.install()
  File "\\wapt\waptdev$\coldis-slack-wapt\setup.py", line 8, in install
    install_exe_if_needed("SlackSetup.exe",'/VERYSILENT',key='',min_version='3.1.1')
  File "C:\Program Files (x86)\wapt\common.py", line 3289, in new_func
    return func(*args,**kwargs)
  File "C:\Program Files (x86)\wapt\setuphelpers.py", line 3852, in install_exe_if_needed
    run(r'"%s" %s' % (exe,silentflags),accept_returncodes=accept_returncodes,timeout=timeout,pidlist=pidlist)
  File "C:\Program Files (x86)\wapt\setuphelpers.py", line 983, in run
    raise CalledProcessErrorOutput(proc.returncode,cmd,''.join(output))
CalledProcessErrorOutput: Command '"SlackSetup.exe" /VERYSILENT' returned non-zero exit status 1.
Output:'\\wapt\waptdev$\coldis-slack-wapt'
CMD.EXE a ‚t‚ d‚marr‚ avec le chemin d'accŠs comme r‚pertoire en
cours. Les chemins d'accŠs UNC ne sont pas prise en charge. Utilisation
du r‚pertoire Windows par d‚faut.
'"SlackSetup.exe"' n'est pas reconnu en tant que commande interne
ou externe, un programme ex‚cutable ou un fichier de commandes.


FATAL ERROR : CalledProcessErrorOutput: Command '"SlackSetup.exe" /VERYSILENT' returned non-zero exit status 1.
Output:'\\wapt\waptdev$\coldis-slack-wapt'
CMD.EXE a ǸtǸ dǸmarrǸ avec le chemin d'accÇùs comme rǸpertoire en
cours. Les chemins d'accÇùs UNC ne sont pas prise en charge. Utilisation
du rǸpertoire Windows par dǸfaut.
'"SlackSetup.exe"' n'est pas reconnu en tant que commande interne
ou externe, un programme exǸcutable ou un fichier de commandes.

Exit code:  3
>>> 
However, if I create my template with:

Code: Select all

PS C:\WINDOWS\system32> wapt-get make-template C:\SlackSetup.exe c:\coldis-slack
So with a local path, the contents of setup.py and control are similar (the only difference is the package name: c:\coldis-slack instead of coldis-slack)

But when I run the install command, the program installs correctly. However, it doesn't work via the server after using -i build-upload.

Thank you for your help.
User avatar
dcardon
WAPT Expert
Messages: 1929
Registration: June 18, 2014 - 09:58
Location: Saint Sébastien sur Loire
Contact :

May 18, 2018 - 3:08 PM

Hello Thomas,
Thomas wrote: May 17, 2018 - 12:15 PM
CMD.EXE started with the path as the
current directory. UNC paths are not supported. Using
the default Windows directory.
'"SlackSetup.exe"' is not recognized as an internal
or external command, operable program, or batch file.
The problem lies in the error message. It seems that `make-template` isn't correctly interpreting the UNC path and therefore isn't correctly transferring the information to the package. I'll open a bug report regarding this. For now, you can copy the .exe file to your local machine before running the command.

And by the way, since it's probably an Electron application, we'll also need to check if it installs correctly in program files, and not in the user profile.

Sincerely,

Denis
Denis Cardon - Tranquil IT
Share your experiences on WAPT! Send us your blog and article URLs in the "Your Opinion of the forum, and we'll feature them on the WAPT
Thomas
Messages: 2
Registration: May 17, 2018 - 12:02

May 22, 2018 - 12:15

Hello,

thank you for your feedback.
Locked