Page 1 of 1

[SOLVED] Need help creating a Slack package

Published: May 17, 2018 - 12:15
by Thomas
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.

Re: Need help creating a Slack package

Published: May 18, 2018 - 3:08 PM
by dcardon
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

Re: [SOLVED] Need help creating a Slack package

Published: May 22, 2018 - 12:15 PM
by Thomas
Hello,

thank you for your feedback.