Bonjour,
Je fait un nouveau poste, je veux pas de problème avec Wikipedia 😉
La procédure est opérationnel en script que déploie par gpo, mais je wapétise tous en ce moment
Objectif :
Installation du setup, mais celui-ci a besoin d'inscrire un certificat dans la banque windows avant l install du setup Ajout de Ardublock dans le dossier install c:\Program Files (x86)\Arduino\Tools\Ardublock\tool*.jar
Les dossiers Ardublock\tool*.jar n'existe pas
Pour l'ajout du certificat voila ce que j'ai coller dans mon cmd :
certutil -addstore "TrustedPublisher" driversx86.cer
le setup.py :
if isdir(makepath(programfiles32,'Arduino')): print 'Arduino' source_filename = 'cert.cmd' dest_filename = makepath(programfiles32,'Arduino',source_filename) filecopyto(source_filename,dest_filename) source_filename = 'driversx86.cer' dest_filename = makepath(programfiles32,'Arduino',source_filename) filecopyto(source_filename,dest_filename) import subprocess as sp sp.Popen(("cert.cmd", "c:\Program Files (X86)\Arduino\cert.cmd"))
def install(): print('installing chaumes-arduino-1.0.6-windows') run(r'"arduino-1.0.6-windows.exe" /S') copytree2(r'ArduBlockTool',r'c:\Program Files (X86)\Arduino\tools')
Si j'execute pour test cela fonctionnent
wapt-get install pathtomytemplate
Si j exécute
Wapt-get build-upload
il m'execute le script cert.cmd
Si vous avez des idées pour résoudre le problème, ce que je veux surtout c'est comprendre malgré mes lacunes en Python
Bonjour
Votre premier bloc de code n'est pas dans une fonction, du coup il est exécuté à chaque fois qu'on lance le script (ce que dois faire le build-upload je suppose).
Il faudrait mettre tout le bloc dans la fonction install(), de manière à ne l'exécuter que lors d'un "wapt-get install monpaquet".
De la même manière, vous pouvez ajouter une fonction uninstall() et définir dedans la suppression des fichiers et du certificat.
Cordialement, Bastien
Le 20/05/2016 à 17:58, Olivier CATY a écrit :
Bonjour, Je fait un nouveau poste, je veux pas de problème avec Wikipedia 😉 La procédure est opérationnel en script que déploie par gpo, mais je wapétise tous en ce moment Objectif : Installation du setup, mais celui-ci a besoin d'inscrire un certificat dans la banque windows avant l install du setup Ajout de Ardublock dans le dossier install c:\Program Files (x86)\Arduino\Tools\Ardublock\tool*.jar Les dossiers Ardublock\tool*.jar n'existe pas Pour l'ajout du certificat voila ce que j'ai coller dans mon cmd : certutil -addstore "TrustedPublisher" driversx86.cer le setup.py : if isdir(makepath(programfiles32,'Arduino')): print 'Arduino' source_filename = 'cert.cmd' dest_filename = makepath(programfiles32,'Arduino',source_filename) filecopyto(source_filename,dest_filename) source_filename = 'driversx86.cer' dest_filename = makepath(programfiles32,'Arduino',source_filename) filecopyto(source_filename,dest_filename) import subprocess as sp sp.Popen(("cert.cmd", "c:\Program Files (X86)\Arduino\cert.cmd")) def install(): print('installing chaumes-arduino-1.0.6-windows') run(r'"arduino-1.0.6-windows.exe" /S') copytree2(r'ArduBlockTool',r'c:\Program Files (X86)\Arduino\tools') Si j'execute pour test cela fonctionnent wapt-get install pathtomytemplate Si j exécute Wapt-get build-upload il m'execute le script cert.cmd Si vous avez des idées pour résoudre le problème, ce que je veux surtout c'est comprendre malgré mes lacunes en Python
WAPT mailing list WAPT@lists.tranquil.it http://lists.tranquil.it/listinfo/wapt
bonsoir
merci pour votre aide sa avance voici mon code qui fonctionne :
n'hésiter pas a me reprendre si le code n'est pas propre, j'apprend le langage
Pour la désinstallation cela ne fonctionnent pas, il y a une message box qui s'ouvre lors de l'uninstall.exe /S
# -*- coding: utf-8 -*- from setuphelpers import *
uninstallkey = []
uninstallstring = [u'"c:\Program Files (x86)\Arduino\uninstall.exe" /S']
def install(): print('installing chaumes-arduino-1.0.6-windows') copytree2(r'ArduBlockTool',r'c:\Program Files (X86)\Arduino\tools') if isdir(makepath(programfiles32,'Arduino')): print 'Arduino' source_filename = 'cert.cmd' dest_filename = makepath(programfiles32,'Arduino',source_filename) filecopyto(source_filename,dest_filename) source_filename = 'driversx86.cer' dest_filename = makepath(programfiles32,'Arduino',source_filename) filecopyto(source_filename,dest_filename) import subprocess as sp sp.Popen(("cert.cmd", "c:\Program Files (X86)\Arduino\cert.cmd")) run(r'"arduino-1.0.6-windows.exe" /S')
Olivier
Le 20 mai 2016 à 18:04, Bastien HERMITTE bhermitte@b2pweb.com a écrit :
Bonjour
Votre premier bloc de code n'est pas dans une fonction, du coup il est exécuté à chaque fois qu'on lance le script (ce que dois faire le build-upload je suppose).
Il faudrait mettre tout le bloc dans la fonction install(), de manière à ne l'exécuter que lors d'un "wapt-get install monpaquet".
De la même manière, vous pouvez ajouter une fonction uninstall() et définir dedans la suppression des fichiers et du certificat.
Cordialement, Bastien
Le 20/05/2016 à 17:58, Olivier CATY a écrit :
Bonjour, Je fait un nouveau poste, je veux pas de problème avec Wikipedia 😉 La procédure est opérationnel en script que déploie par gpo, mais je wapétise tous en ce moment Objectif : Installation du setup, mais celui-ci a besoin d'inscrire un certificat dans la banque windows avant l install du setup Ajout de Ardublock dans le dossier install c:\Program Files (x86)\Arduino\Tools\Ardublock\tool*.jar Les dossiers Ardublock\tool*.jar n'existe pas Pour l'ajout du certificat voila ce que j'ai coller dans mon cmd : certutil -addstore "TrustedPublisher" driversx86.cer le setup.py : if isdir(makepath(programfiles32,'Arduino')): print 'Arduino' source_filename = 'cert.cmd' dest_filename = makepath(programfiles32,'Arduino',source_filename) filecopyto(source_filename,dest_filename) source_filename = 'driversx86.cer' dest_filename = makepath(programfiles32,'Arduino',source_filename) filecopyto(source_filename,dest_filename) import subprocess as sp sp.Popen(("cert.cmd", "c:\Program Files (X86)\Arduino\cert.cmd")) def install(): print('installing chaumes-arduino-1.0.6-windows') run(r'"arduino-1.0.6-windows.exe" /S') copytree2(r'ArduBlockTool',r'c:\Program Files (X86)\Arduino\tools') Si j'execute pour test cela fonctionnent wapt-get install pathtomytemplate Si j exécute Wapt-get build-upload il m'execute le script cert.cmd Si vous avez des idées pour résoudre le problème, ce que je veux surtout c'est comprendre malgré mes lacunes en Python
WAPT mailing listWAPT@lists.tranquil.ithttp://lists.tranquil.it/listinfo/wapt
WAPT mailing list WAPT@lists.tranquil.it http://lists.tranquil.it/listinfo/wapt
Bonjour
voici suite : qui me pose problème
Le Setup.py
# -*- coding: utf-8 -*- from setuphelpers import *
uninstallkey = []
uninstallstring = [u'"c:\Program Files (x86)\Arduino\uninstall.exe" /S']
def install(): print('installing chaumes-arduino-1.0.6-windows') copytree2(r'ArduBlockTool',r'c:\Program Files (X86)\Arduino\tools') if isdir(makepath(programfiles32,'Arduino')): print 'Arduino' source_filename = 'cert.cmd' dest_filename = makepath(programfiles32,'Arduino',source_filename) filecopyto(source_filename,dest_filename) source_filename = 'driversx86.cer' dest_filename = makepath(programfiles32,'Arduino',source_filename) filecopyto(source_filename,dest_filename) import subprocess as sp sp.Popen(("cert.cmd", "c:\Program Files (X86)\Arduino\cert.cmd")) copytree2(r'Logiciels',r'C:\ProgramData\Microsoft\Windows\Start Menu\Programs') create_shortcut(r'C:\ProgramData\Microsoft\Windows\Start Menu\Programs\Logiciels\Arduino.lnk',target='C:\Program Files (x86)\Arduino\arduino.exe',wDir='"C:\Program Files (x86)\Arduino"') run(r'"arduino-1.0.6-windows.exe" /S')
Le souhaite creer un racourci dans le start menu, dans un dossier Logiciels,
Alors 1 je ne sait pas creer de dossier en python, 2 je fait donc un copytree2 du dossier Logiciels dans le start menu\Programs, cela fonctionne très bien, lors d'un wapt-get install
Mais ne fonctionnent plus une fois le paquet builder, lors de la descente du paquet erreur :
[Error 3] Le chemin d\x92acc\xe8s sp\xe9cifi\xe9 est introuvable: 'Logiciels/*.*'\n''
C'est quoi la blague
D'avance merci
Le 20 mai 2016 à 22:23, Olivier CATY emmir.zone15@squale21.fr a écrit :
bonsoir
merci pour votre aide sa avance voici mon code qui fonctionne :
n'hésiter pas a me reprendre si le code n'est pas propre, j'apprend le langage
Pour la désinstallation cela ne fonctionnent pas, il y a une message box qui s'ouvre lors de l'uninstall.exe /S
# -*- coding: utf-8 -*- from setuphelpers import *
uninstallkey = []
uninstallstring = [u'"c:\Program Files (x86)\Arduino\uninstall.exe" /S']
def install(): print('installing chaumes-arduino-1.0.6-windows') copytree2(r'ArduBlockTool',r'c:\Program Files (X86)\Arduino\tools') if isdir(makepath(programfiles32,'Arduino')): print 'Arduino' source_filename = 'cert.cmd' dest_filename = makepath(programfiles32,'Arduino',source_filename) filecopyto(source_filename,dest_filename) source_filename = 'driversx86.cer' dest_filename = makepath(programfiles32,'Arduino',source_filename) filecopyto(source_filename,dest_filename) import subprocess as sp sp.Popen(("cert.cmd", "c:\Program Files (X86)\Arduino\cert.cmd")) run(r'"arduino-1.0.6-windows.exe" /S')
Olivier
Le 20 mai 2016 à 18:04, Bastien HERMITTE bhermitte@b2pweb.com a écrit :
Bonjour
Votre premier bloc de code n'est pas dans une fonction, du coup il est exécuté à chaque fois qu'on lance le script (ce que dois faire le build-upload je suppose).
Il faudrait mettre tout le bloc dans la fonction install(), de manière à ne l'exécuter que lors d'un "wapt-get install monpaquet".
De la même manière, vous pouvez ajouter une fonction uninstall() et définir dedans la suppression des fichiers et du certificat.
Cordialement, Bastien
Le 20/05/2016 à 17:58, Olivier CATY a écrit :
Bonjour, Je fait un nouveau poste, je veux pas de problème avec Wikipedia 😉 La procédure est opérationnel en script que déploie par gpo, mais je wapétise tous en ce moment Objectif : Installation du setup, mais celui-ci a besoin d'inscrire un certificat dans la banque windows avant l install du setup Ajout de Ardublock dans le dossier install c:\Program Files (x86)\Arduino\Tools\Ardublock\tool*.jar Les dossiers Ardublock\tool*.jar n'existe pas Pour l'ajout du certificat voila ce que j'ai coller dans mon cmd : certutil -addstore "TrustedPublisher" driversx86.cer le setup.py : if isdir(makepath(programfiles32,'Arduino')): print 'Arduino' source_filename = 'cert.cmd' dest_filename = makepath(programfiles32,'Arduino',source_filename) filecopyto(source_filename,dest_filename) source_filename = 'driversx86.cer' dest_filename = makepath(programfiles32,'Arduino',source_filename) filecopyto(source_filename,dest_filename) import subprocess as sp sp.Popen(("cert.cmd", "c:\Program Files (X86)\Arduino\cert.cmd")) def install(): print('installing chaumes-arduino-1.0.6-windows') run(r'"arduino-1.0.6-windows.exe" /S') copytree2(r'ArduBlockTool',r'c:\Program Files (X86)\Arduino\tools') Si j'execute pour test cela fonctionnent wapt-get install pathtomytemplate Si j exécute Wapt-get build-upload il m'execute le script cert.cmd Si vous avez des idées pour résoudre le problème, ce que je veux surtout c'est comprendre malgré mes lacunes en Python
WAPT mailing listWAPT@lists.tranquil.ithttp://lists.tranquil.it/listinfo/wapt
WAPT mailing list WAPT@lists.tranquil.it http://lists.tranquil.it/listinfo/wapt
--
17, boulevard de la Trémouille
CS 23502 - 21035 DIJON CEDEX
*Olivier CATY* Direction des lycées et de la formation initiale
Service maintenance informatique des lycées
Agent de l’équipe mobile de maintenance informatique régionale
Le 23/05/2016 14:34, Olivier CATY a écrit :
Bonjour
voici suite : qui me pose problème
Le Setup.py
# -*- coding: utf-8 -*- from setuphelpers import *
uninstallkey = []
uninstallstring = [u'"c:\Program Files (x86)\Arduino\uninstall.exe" /S']
def install(): print('installing chaumes-arduino-1.0.6-windows') copytree2(r'ArduBlockTool',r'c:\Program Files (X86)\Arduino\tools') if isdir(makepath(programfiles32,'Arduino')): print 'Arduino' source_filename = 'cert.cmd' dest_filename = makepath(programfiles32,'Arduino',source_filename) filecopyto(source_filename,dest_filename) source_filename = 'driversx86.cer' dest_filename = makepath(programfiles32,'Arduino',source_filename) filecopyto(source_filename,dest_filename) import subprocess as sp sp.Popen(("cert.cmd", "c:\Program Files (X86)\Arduino\cert.cmd")) copytree2(r'Logiciels',r'C:\ProgramData\Microsoft\Windows\Start Menu\Programs') create_shortcut(r'C:\ProgramData\Microsoft\Windows\Start Menu\Programs\Logiciels\Arduino.lnk',target='C:\Program Files (x86)\Arduino\arduino.exe',wDir='"C:\Program Files (x86)\Arduino"') run(r'"arduino-1.0.6-windows.exe" /S')
Le souhaite creer un racourci dans le start menu, dans un dossier Logiciels,
A tu essayer avec cette fonction ? : https://github.com/tranquilit/WAPT/blob/master/setuphelpers.py#L457
Tu a un exemple dans la fonction justement
Alors 1 je ne sait pas creer de dossier en python, 2 je fait donc un copytree2 du dossier Logiciels dans le start menu\Programs, cela fonctionne très bien, lors d'un wapt-get install
Mais ne fonctionnent plus une fois le paquet builder, lors de la descente du paquet erreur :
[Error 3] Le chemin d\x92acc\xe8s sp\xe9cifi\xe9 est introuvable: 'Logiciels/*.*'\n''
C'est quoi la blague
D'avance merci
Le 20 mai 2016 à 22:23, Olivier CATY <emmir.zone15@squale21.fr mailto:emmir.zone15@squale21.fr> a écrit :
bonsoir merci pour votre aide sa avance voici mon code qui fonctionne : n'hésiter pas a me reprendre si le code n'est pas propre, j'apprend le langage Pour la désinstallation cela ne fonctionnent pas, il y a une message box qui s'ouvre lors de l'uninstall.exe /S # -*- coding: utf-8 -*- from setuphelpers import * uninstallkey = [] uninstallstring = [u'"c:\\Program Files (x86)\\Arduino\\uninstall.exe" /S'] def install(): print('installing chaumes-arduino-1.0.6-windows') copytree2(r'ArduBlockTool',r'c:\Program Files (X86)\Arduino\tools') if isdir(makepath(programfiles32,'Arduino')): print 'Arduino' source_filename = 'cert.cmd' dest_filename = makepath(programfiles32,'Arduino',source_filename) filecopyto(source_filename,dest_filename) source_filename = 'driversx86.cer' dest_filename = makepath(programfiles32,'Arduino',source_filename) filecopyto(source_filename,dest_filename) import subprocess as sp sp.Popen(("cert.cmd", "c:\Program Files (X86)\Arduino\cert.cmd")) run(r'"arduino-1.0.6-windows.exe" /S') Olivier Le 20 mai 2016 à 18:04, Bastien HERMITTE <bhermitte@b2pweb.com <mailto:bhermitte@b2pweb.com>> a écrit : Bonjour Votre premier bloc de code n'est pas dans une fonction, du coup il est exécuté à chaque fois qu'on lance le script (ce que dois faire le build-upload je suppose). Il faudrait mettre tout le bloc dans la fonction install(), de manière à ne l'exécuter que lors d'un "wapt-get install monpaquet". De la même manière, vous pouvez ajouter une fonction uninstall() et définir dedans la suppression des fichiers et du certificat. Cordialement, Bastien Le 20/05/2016 à 17:58, Olivier CATY a écrit :
Bonjour, Je fait un nouveau poste, je veux pas de problème avec Wikipedia 😉 La procédure est opérationnel en script que déploie par gpo, mais je wapétise tous en ce moment Objectif : Installation du setup, mais celui-ci a besoin d'inscrire un certificat dans la banque windows avant l install du setup Ajout de Ardublock dans le dossier install c:\Program Files (x86)\Arduino\Tools\Ardublock\tool\*.jar Les dossiers Ardublock\tool\*.jar n'existe pas Pour l'ajout du certificat voila ce que j'ai coller dans mon cmd : certutil -addstore "TrustedPublisher" driversx86.cer le setup.py : if isdir(makepath(programfiles32,'Arduino')): print 'Arduino' source_filename = 'cert.cmd' dest_filename = makepath(programfiles32,'Arduino',source_filename) filecopyto(source_filename,dest_filename) source_filename = 'driversx86.cer' dest_filename = makepath(programfiles32,'Arduino',source_filename) filecopyto(source_filename,dest_filename) import subprocess as sp sp.Popen(("cert.cmd", "c:\Program Files (X86)\Arduino\cert.cmd")) def install(): print('installing chaumes-arduino-1.0.6-windows') run(r'"arduino-1.0.6-windows.exe" /S') copytree2(r'ArduBlockTool',r'c:\Program Files (X86)\Arduino\tools') Si j'execute pour test cela fonctionnent wapt-get install pathtomytemplate Si j exécute Wapt-get build-upload il m'execute le script cert.cmd Si vous avez des idées pour résoudre le problème, ce que je veux surtout c'est comprendre malgré mes lacunes en Python _______________________________________________ WAPT mailing list WAPT@lists.tranquil.it <mailto:WAPT@lists.tranquil.it> http://lists.tranquil.it/listinfo/wapt
_______________________________________________ WAPT mailing list WAPT@lists.tranquil.it <mailto:WAPT@lists.tranquil.it> http://lists.tranquil.it/listinfo/wapt -- 17, boulevard de la Trémouille CS 23502 - 21035 DIJON CEDEX *Olivier CATY* Direction des lycées et de la formation initiale Service maintenance informatique des lycées Agent de l’équipe mobile de maintenance informatique régionale
--
17, boulevard de la Trémouille
CS 23502 - 21035 DIJON CEDEX
*Olivier CATY* Direction des lycées et de la formation initiale
Service maintenance informatique des lycées
Agent de l’équipe mobile de maintenance informatique régionale
WAPT mailing list WAPT@lists.tranquil.it http://lists.tranquil.it/listinfo/wapt
Bonsoir,
oui j'ai tester cette fonction, mais cela ne fonctionne pas
pourriez vous m'écrire la syntaxe pour mon soft, j'aimerais que mon raccourci arrive dans un dossier Logiciels du Start menu
merci par avance
olivier
Le 23 mai 2016 à 15:37, blog@lesfourmisduweb.org blog@lesfourmisduweb.org a écrit :
Le 23/05/2016 14:34, Olivier CATY a écrit :
Bonjour
voici suite : qui me pose problème
Le Setup.py
# -*- coding: utf-8 -*- from setuphelpers import *
uninstallkey = []
uninstallstring = [u'"c:\Program Files (x86)\Arduino\uninstall.exe" /S']
def install(): print('installing chaumes-arduino-1.0.6-windows') copytree2(r'ArduBlockTool',r'c:\Program Files (X86)\Arduino\tools') if isdir(makepath(programfiles32,'Arduino')): print 'Arduino' source_filename = 'cert.cmd' dest_filename = makepath(programfiles32,'Arduino',source_filename) filecopyto(source_filename,dest_filename) source_filename = 'driversx86.cer' dest_filename = makepath(programfiles32,'Arduino',source_filename) filecopyto(source_filename,dest_filename) import subprocess as sp sp.Popen(("cert.cmd", "c:\Program Files (X86)\Arduino\cert.cmd")) copytree2(r'Logiciels',r'C:\ProgramData\Microsoft\Windows\Start Menu\Programs') create_shortcut(r'C:\ProgramData\Microsoft\Windows\Start Menu\Programs\Logiciels\Arduino.lnk',target='C:\Program Files (x86)\Arduino\arduino.exe',wDir='"C:\Program Files (x86)\Arduino"') run(r'"arduino-1.0.6-windows.exe" /S')
Le souhaite creer un racourci dans le start menu, dans un dossier Logiciels,
A tu essayer avec cette fonction ? : https://github.com/tranquilit/WAPT/blob/master/setuphelpers.py#L457
Tu a un exemple dans la fonction justement
Alors 1 je ne sait pas creer de dossier en python, 2 je fait donc un copytree2 du dossier Logiciels dans le start menu\Programs, cela fonctionne très bien, lors d'un wapt-get install
Mais ne fonctionnent plus une fois le paquet builder, lors de la descente du paquet erreur :
[Error 3] Le chemin d\x92acc\xe8s sp\xe9cifi\xe9 est introuvable: 'Logiciels/*.*'\n''
C'est quoi la blague
D'avance merci
Le 20 mai 2016 à 22:23, Olivier CATY emmir.zone15@squale21.fr a écrit :
bonsoir
merci pour votre aide sa avance voici mon code qui fonctionne :
n'hésiter pas a me reprendre si le code n'est pas propre, j'apprend le langage
Pour la désinstallation cela ne fonctionnent pas, il y a une message box qui s'ouvre lors de l'uninstall.exe /S
# -*- coding: utf-8 -*- from setuphelpers import *
uninstallkey = []
uninstallstring = [u'"c:\Program Files (x86)\Arduino\uninstall.exe" /S']
def install(): print('installing chaumes-arduino-1.0.6-windows') copytree2(r'ArduBlockTool',r'c:\Program Files (X86)\Arduino\tools') if isdir(makepath(programfiles32,'Arduino')): print 'Arduino' source_filename = 'cert.cmd' dest_filename = makepath(programfiles32,'Arduino',source_filename) filecopyto(source_filename,dest_filename) source_filename = 'driversx86.cer' dest_filename = makepath(programfiles32,'Arduino',source_filename) filecopyto(source_filename,dest_filename) import subprocess as sp sp.Popen(("cert.cmd", "c:\Program Files (X86)\Arduino\cert.cmd")) run(r'"arduino-1.0.6-windows.exe" /S')
Olivier
Le 20 mai 2016 à 18:04, Bastien HERMITTE < bhermitte@b2pweb.com bhermitte@b2pweb.com> a écrit :
Bonjour
Votre premier bloc de code n'est pas dans une fonction, du coup il est exécuté à chaque fois qu'on lance le script (ce que dois faire le build-upload je suppose).
Il faudrait mettre tout le bloc dans la fonction install(), de manière à ne l'exécuter que lors d'un "wapt-get install monpaquet".
De la même manière, vous pouvez ajouter une fonction uninstall() et définir dedans la suppression des fichiers et du certificat.
Cordialement, Bastien
Le 20/05/2016 à 17:58, Olivier CATY a écrit :
Bonjour, Je fait un nouveau poste, je veux pas de problème avec Wikipedia 😉 La procédure est opérationnel en script que déploie par gpo, mais je wapétise tous en ce moment Objectif : Installation du setup, mais celui-ci a besoin d'inscrire un certificat dans la banque windows avant l install du setup Ajout de Ardublock dans le dossier install c:\Program Files (x86)\Arduino\Tools\Ardublock\tool*.jar Les dossiers Ardublock\tool*.jar n'existe pas Pour l'ajout du certificat voila ce que j'ai coller dans mon cmd : certutil -addstore "TrustedPublisher" driversx86.cer le setup.py : if isdir(makepath(programfiles32,'Arduino')): print 'Arduino' source_filename = 'cert.cmd' dest_filename = makepath(programfiles32,'Arduino',source_filename) filecopyto(source_filename,dest_filename) source_filename = 'driversx86.cer' dest_filename = makepath(programfiles32,'Arduino',source_filename) filecopyto(source_filename,dest_filename) import subprocess as sp sp.Popen(("cert.cmd", "c:\Program Files (X86)\Arduino\cert.cmd")) def install(): print('installing chaumes-arduino-1.0.6-windows') run(r'"arduino-1.0.6-windows.exe" /S') copytree2(r'ArduBlockTool',r'c:\Program Files (X86)\Arduino\tools') Si j'execute pour test cela fonctionnent wapt-get install pathtomytemplate Si j exécute Wapt-get build-upload il m'execute le script cert.cmd Si vous avez des idées pour résoudre le problème, ce que je veux surtout c'est comprendre malgré mes lacunes en Python
WAPT mailing listWAPT@lists.tranquil.ithttp://lists.tranquil.it/listinfo/wapt
WAPT mailing list WAPT@lists.tranquil.it http://lists.tranquil.it/listinfo/wapt
--
17, boulevard de la Trémouille
CS 23502 - 21035 DIJON CEDEX
*Olivier CATY* Direction des lycées et de la formation initiale
Service maintenance informatique des lycées
Agent de l’équipe mobile de maintenance informatique régionale
--
17, boulevard de la Trémouille
CS 23502 - 21035 DIJON CEDEX
*Olivier CATY* Direction des lycées et de la formation initiale
Service maintenance informatique des lycées
Agent de l’équipe mobile de maintenance informatique régionale
WAPT mailing listWAPT@lists.tranquil.ithttp://lists.tranquil.it/listinfo/wapt
WAPT mailing list WAPT@lists.tranquil.it http://lists.tranquil.it/listinfo/wapt
sa avance
ce code fonctionne :
create_programs_menu_shortcut('Arduino',target=makepath('c:',programfiles32,'Arduino','arduino.exe')) u'C:\ProgramData\Microsoft\Windows\Start Menu\Arduinono.lnk'
sauf que j'ai confondu le start menu avec le menu des programmes
je veux ceci :
creer un raccourci dans :
C:\ProgramData\Microsoft\Windows\Start Menu\Programs\Logiciels\monraccrouci.lnk
Si vous avez une idée
merci
Le 25 mai 2016 à 19:43, Olivier CATY emmir.zone15@squale21.fr a écrit :
Bonsoir,
oui j'ai tester cette fonction, mais cela ne fonctionne pas
pourriez vous m'écrire la syntaxe pour mon soft, j'aimerais que mon raccourci arrive dans un dossier Logiciels du Start menu
merci par avance
olivier
Le 23 mai 2016 à 15:37, blog@lesfourmisduweb.org <blog@lesfourmisduweb.org
a écrit :
Le 23/05/2016 14:34, Olivier CATY a écrit :
Bonjour
voici suite : qui me pose problème
Le Setup.py
# -*- coding: utf-8 -*- from setuphelpers import *
uninstallkey = []
uninstallstring = [u'"c:\Program Files (x86)\Arduino\uninstall.exe" /S']
def install(): print('installing chaumes-arduino-1.0.6-windows') copytree2(r'ArduBlockTool',r'c:\Program Files (X86)\Arduino\tools') if isdir(makepath(programfiles32,'Arduino')): print 'Arduino' source_filename = 'cert.cmd' dest_filename = makepath(programfiles32,'Arduino',source_filename) filecopyto(source_filename,dest_filename) source_filename = 'driversx86.cer' dest_filename = makepath(programfiles32,'Arduino',source_filename) filecopyto(source_filename,dest_filename) import subprocess as sp sp.Popen(("cert.cmd", "c:\Program Files (X86)\Arduino\cert.cmd")) copytree2(r'Logiciels',r'C:\ProgramData\Microsoft\Windows\Start Menu\Programs') create_shortcut(r'C:\ProgramData\Microsoft\Windows\Start Menu\Programs\Logiciels\Arduino.lnk',target='C:\Program Files (x86)\Arduino\arduino.exe',wDir='"C:\Program Files (x86)\Arduino"') run(r'"arduino-1.0.6-windows.exe" /S')
Le souhaite creer un racourci dans le start menu, dans un dossier Logiciels,
A tu essayer avec cette fonction ? : https://github.com/tranquilit/WAPT/blob/master/setuphelpers.py#L457
Tu a un exemple dans la fonction justement
Alors 1 je ne sait pas creer de dossier en python, 2 je fait donc un copytree2 du dossier Logiciels dans le start menu\Programs, cela fonctionne très bien, lors d'un wapt-get install
Mais ne fonctionnent plus une fois le paquet builder, lors de la descente du paquet erreur :
[Error 3] Le chemin d\x92acc\xe8s sp\xe9cifi\xe9 est introuvable: 'Logiciels/*.*'\n''
C'est quoi la blague
D'avance merci
Le 20 mai 2016 à 22:23, Olivier CATY emmir.zone15@squale21.fr a écrit :
bonsoir
merci pour votre aide sa avance voici mon code qui fonctionne :
n'hésiter pas a me reprendre si le code n'est pas propre, j'apprend le langage
Pour la désinstallation cela ne fonctionnent pas, il y a une message box qui s'ouvre lors de l'uninstall.exe /S
# -*- coding: utf-8 -*- from setuphelpers import *
uninstallkey = []
uninstallstring = [u'"c:\Program Files (x86)\Arduino\uninstall.exe" /S']
def install(): print('installing chaumes-arduino-1.0.6-windows') copytree2(r'ArduBlockTool',r'c:\Program Files (X86)\Arduino\tools') if isdir(makepath(programfiles32,'Arduino')): print 'Arduino' source_filename = 'cert.cmd' dest_filename = makepath(programfiles32,'Arduino',source_filename) filecopyto(source_filename,dest_filename) source_filename = 'driversx86.cer' dest_filename = makepath(programfiles32,'Arduino',source_filename) filecopyto(source_filename,dest_filename) import subprocess as sp sp.Popen(("cert.cmd", "c:\Program Files (X86)\Arduino\cert.cmd")) run(r'"arduino-1.0.6-windows.exe" /S')
Olivier
Le 20 mai 2016 à 18:04, Bastien HERMITTE < bhermitte@b2pweb.com bhermitte@b2pweb.com> a écrit :
Bonjour
Votre premier bloc de code n'est pas dans une fonction, du coup il est exécuté à chaque fois qu'on lance le script (ce que dois faire le build-upload je suppose).
Il faudrait mettre tout le bloc dans la fonction install(), de manière à ne l'exécuter que lors d'un "wapt-get install monpaquet".
De la même manière, vous pouvez ajouter une fonction uninstall() et définir dedans la suppression des fichiers et du certificat.
Cordialement, Bastien
Le 20/05/2016 à 17:58, Olivier CATY a écrit :
Bonjour, Je fait un nouveau poste, je veux pas de problème avec Wikipedia 😉 La procédure est opérationnel en script que déploie par gpo, mais je wapétise tous en ce moment Objectif : Installation du setup, mais celui-ci a besoin d'inscrire un certificat dans la banque windows avant l install du setup Ajout de Ardublock dans le dossier install c:\Program Files (x86)\Arduino\Tools\Ardublock\tool*.jar Les dossiers Ardublock\tool*.jar n'existe pas Pour l'ajout du certificat voila ce que j'ai coller dans mon cmd : certutil -addstore "TrustedPublisher" driversx86.cer le setup.py : if isdir(makepath(programfiles32,'Arduino')): print 'Arduino' source_filename = 'cert.cmd' dest_filename = makepath(programfiles32,'Arduino',source_filename) filecopyto(source_filename,dest_filename) source_filename = 'driversx86.cer' dest_filename = makepath(programfiles32,'Arduino',source_filename) filecopyto(source_filename,dest_filename) import subprocess as sp sp.Popen(("cert.cmd", "c:\Program Files (X86)\Arduino\cert.cmd")) def install(): print('installing chaumes-arduino-1.0.6-windows') run(r'"arduino-1.0.6-windows.exe" /S') copytree2(r'ArduBlockTool',r'c:\Program Files (X86)\Arduino\tools') Si j'execute pour test cela fonctionnent wapt-get install pathtomytemplate Si j exécute Wapt-get build-upload il m'execute le script cert.cmd Si vous avez des idées pour résoudre le problème, ce que je veux surtout c'est comprendre malgré mes lacunes en Python
WAPT mailing listWAPT@lists.tranquil.ithttp://lists.tranquil.it/listinfo/wapt
WAPT mailing list WAPT@lists.tranquil.it http://lists.tranquil.it/listinfo/wapt
--
17, boulevard de la Trémouille
CS 23502 - 21035 DIJON CEDEX
*Olivier CATY* Direction des lycées et de la formation initiale
Service maintenance informatique des lycées
Agent de l’équipe mobile de maintenance informatique régionale
--
17, boulevard de la Trémouille
CS 23502 - 21035 DIJON CEDEX
*Olivier CATY* Direction des lycées et de la formation initiale
Service maintenance informatique des lycées
Agent de l’équipe mobile de maintenance informatique régionale
WAPT mailing listWAPT@lists.tranquil.ithttp://lists.tranquil.it/listinfo/wapt
WAPT mailing list WAPT@lists.tranquil.it http://lists.tranquil.it/listinfo/wapt
--
17, boulevard de la Trémouille
CS 23502 - 21035 DIJON CEDEX
*Olivier CATY* Direction des lycées et de la formation initiale
Service maintenance informatique des lycées
Agent de l’équipe mobile de maintenance informatique régionale
Bonjour Olivier, Bonjour la liste,
Je suis également bloqué par l'installation d'Arduino/mBlock, j'ai réussi a installer le certificat sans passer par un script cmd externe
def install():
print('Ajout des certificats Arduino') run('certutil.exe -addstore ""TrustedPublisher"" ArduinoLLC.cer') run('certutil.exe -addstore ""TrustedPublisher"" ArduinoSRL.cer')
En revanche ça coince toujours pour l'installation des pilotes de communication Arduino qui sont signés par ces certificats
Dans le changelog on a bien depuis la version 1.5.5-r2 BETA les pilots signés ( https://www.arduino.cc/en/Main/ReleaseNotes )
ARDUINO 1.5.5-r2 BETA - 2014.01.10
- Signed drivers for Windows 8.1
Mais lorsque j'appel l'utilitaire dpinst-x86 ou dpinst-amd64 pour installer les pilotes Arduino j'obtient continuellement une erreur liée à la signature
[image: Images intégrées 1]
Est-ce que l'appel de l'installeur arduino officiel en silencieux règle ce soucis de pilotes ?
Un collègue a tenté de packager ça dans un fichier MSI je vais tenter de voir si ça résout mon problème.
Bon courage,
Alexandre
Le 20 mai 2016 à 22:23, Olivier CATY emmir.zone15@squale21.fr a écrit :
bonsoir
merci pour votre aide sa avance voici mon code qui fonctionne :
n'hésiter pas a me reprendre si le code n'est pas propre, j'apprend le langage
Pour la désinstallation cela ne fonctionnent pas, il y a une message box qui s'ouvre lors de l'uninstall.exe /S
# -*- coding: utf-8 -*- from setuphelpers import *
uninstallkey = []
uninstallstring = [u'"c:\Program Files (x86)\Arduino\uninstall.exe" /S']
def install(): print('installing chaumes-arduino-1.0.6-windows') copytree2(r'ArduBlockTool',r'c:\Program Files (X86)\Arduino\tools') if isdir(makepath(programfiles32,'Arduino')): print 'Arduino' source_filename = 'cert.cmd' dest_filename = makepath(programfiles32,'Arduino',source_filename) filecopyto(source_filename,dest_filename) source_filename = 'driversx86.cer' dest_filename = makepath(programfiles32,'Arduino',source_filename) filecopyto(source_filename,dest_filename) import subprocess as sp sp.Popen(("cert.cmd", "c:\Program Files (X86)\Arduino\cert.cmd")) run(r'"arduino-1.0.6-windows.exe" /S')
Olivier
Le 20 mai 2016 à 18:04, Bastien HERMITTE bhermitte@b2pweb.com a écrit :
Bonjour
Votre premier bloc de code n'est pas dans une fonction, du coup il est exécuté à chaque fois qu'on lance le script (ce que dois faire le build-upload je suppose).
Il faudrait mettre tout le bloc dans la fonction install(), de manière à ne l'exécuter que lors d'un "wapt-get install monpaquet".
De la même manière, vous pouvez ajouter une fonction uninstall() et définir dedans la suppression des fichiers et du certificat.
Cordialement, Bastien
Le 20/05/2016 à 17:58, Olivier CATY a écrit :
Bonjour, Je fait un nouveau poste, je veux pas de problème avec Wikipedia 😉 La procédure est opérationnel en script que déploie par gpo, mais je wapétise tous en ce moment Objectif : Installation du setup, mais celui-ci a besoin d'inscrire un certificat dans la banque windows avant l install du setup Ajout de Ardublock dans le dossier install c:\Program Files (x86)\Arduino\Tools\Ardublock\tool*.jar Les dossiers Ardublock\tool*.jar n'existe pas Pour l'ajout du certificat voila ce que j'ai coller dans mon cmd : certutil -addstore "TrustedPublisher" driversx86.cer le setup.py : if isdir(makepath(programfiles32,'Arduino')): print 'Arduino' source_filename = 'cert.cmd' dest_filename = makepath(programfiles32,'Arduino',source_filename) filecopyto(source_filename,dest_filename) source_filename = 'driversx86.cer' dest_filename = makepath(programfiles32,'Arduino',source_filename) filecopyto(source_filename,dest_filename) import subprocess as sp sp.Popen(("cert.cmd", "c:\Program Files (X86)\Arduino\cert.cmd")) def install(): print('installing chaumes-arduino-1.0.6-windows') run(r'"arduino-1.0.6-windows.exe" /S') copytree2(r'ArduBlockTool',r'c:\Program Files (X86)\Arduino\tools') Si j'execute pour test cela fonctionnent wapt-get install pathtomytemplate Si j exécute Wapt-get build-upload il m'execute le script cert.cmd Si vous avez des idées pour résoudre le problème, ce que je veux surtout c'est comprendre malgré mes lacunes en Python
WAPT mailing listWAPT@lists.tranquil.ithttp://lists.tranquil.it/listinfo/wapt
WAPT mailing list WAPT@lists.tranquil.it http://lists.tranquil.it/listinfo/wapt
--
17, boulevard de la Trémouille
CS 23502 - 21035 DIJON CEDEX
*Olivier CATY* Direction des lycées et de la formation initiale
Service maintenance informatique des lycées
Agent de l’équipe mobile de maintenance informatique régionale
WAPT mailing list WAPT@lists.tranquil.it http://lists.tranquil.it/listinfo/wapt
Bonjour
Voici la methode qui fonctionne en batch
certutil -addstore "TrustedPublisher" driversx86.cer
Je n'ai donc pas de problème a la suite pour l'install du setup.exe /S
Olivier
Le 23 mai 2016 à 14:58, Alexandre GAUVRIT gauvrit.alexandre@gmail.com a écrit :
Bonjour Olivier, Bonjour la liste,
Je suis également bloqué par l'installation d'Arduino/mBlock, j'ai réussi a installer le certificat sans passer par un script cmd externe
def install():
print('Ajout des certificats Arduino') run('certutil.exe -addstore ""TrustedPublisher"" ArduinoLLC.cer') run('certutil.exe -addstore ""TrustedPublisher"" ArduinoSRL.cer')
En revanche ça coince toujours pour l'installation des pilotes de communication Arduino qui sont signés par ces certificats
Dans le changelog on a bien depuis la version 1.5.5-r2 BETA les pilots signés ( https://www.arduino.cc/en/Main/ReleaseNotes )
ARDUINO 1.5.5-r2 BETA - 2014.01.10
- Signed drivers for Windows 8.1
Mais lorsque j'appel l'utilitaire dpinst-x86 ou dpinst-amd64 pour installer les pilotes Arduino j'obtient continuellement une erreur liée à la signature
[image: Images intégrées 1]
Est-ce que l'appel de l'installeur arduino officiel en silencieux règle ce soucis de pilotes ?
Un collègue a tenté de packager ça dans un fichier MSI je vais tenter de voir si ça résout mon problème.
Bon courage,
Alexandre
Le 20 mai 2016 à 22:23, Olivier CATY emmir.zone15@squale21.fr a écrit :
bonsoir
merci pour votre aide sa avance voici mon code qui fonctionne :
n'hésiter pas a me reprendre si le code n'est pas propre, j'apprend le langage
Pour la désinstallation cela ne fonctionnent pas, il y a une message box qui s'ouvre lors de l'uninstall.exe /S
# -*- coding: utf-8 -*- from setuphelpers import *
uninstallkey = []
uninstallstring = [u'"c:\Program Files (x86)\Arduino\uninstall.exe" /S']
def install(): print('installing chaumes-arduino-1.0.6-windows') copytree2(r'ArduBlockTool',r'c:\Program Files (X86)\Arduino\tools') if isdir(makepath(programfiles32,'Arduino')): print 'Arduino' source_filename = 'cert.cmd' dest_filename = makepath(programfiles32,'Arduino',source_filename) filecopyto(source_filename,dest_filename) source_filename = 'driversx86.cer' dest_filename = makepath(programfiles32,'Arduino',source_filename) filecopyto(source_filename,dest_filename) import subprocess as sp sp.Popen(("cert.cmd", "c:\Program Files (X86)\Arduino\cert.cmd")) run(r'"arduino-1.0.6-windows.exe" /S')
Olivier
Le 20 mai 2016 à 18:04, Bastien HERMITTE bhermitte@b2pweb.com a écrit :
Bonjour
Votre premier bloc de code n'est pas dans une fonction, du coup il est exécuté à chaque fois qu'on lance le script (ce que dois faire le build-upload je suppose).
Il faudrait mettre tout le bloc dans la fonction install(), de manière à ne l'exécuter que lors d'un "wapt-get install monpaquet".
De la même manière, vous pouvez ajouter une fonction uninstall() et définir dedans la suppression des fichiers et du certificat.
Cordialement, Bastien
Le 20/05/2016 à 17:58, Olivier CATY a écrit :
Bonjour, Je fait un nouveau poste, je veux pas de problème avec Wikipedia 😉 La procédure est opérationnel en script que déploie par gpo, mais je wapétise tous en ce moment Objectif : Installation du setup, mais celui-ci a besoin d'inscrire un certificat dans la banque windows avant l install du setup Ajout de Ardublock dans le dossier install c:\Program Files (x86)\Arduino\Tools\Ardublock\tool*.jar Les dossiers Ardublock\tool*.jar n'existe pas Pour l'ajout du certificat voila ce que j'ai coller dans mon cmd : certutil -addstore "TrustedPublisher" driversx86.cer le setup.py : if isdir(makepath(programfiles32,'Arduino')): print 'Arduino' source_filename = 'cert.cmd' dest_filename = makepath(programfiles32,'Arduino',source_filename) filecopyto(source_filename,dest_filename) source_filename = 'driversx86.cer' dest_filename = makepath(programfiles32,'Arduino',source_filename) filecopyto(source_filename,dest_filename) import subprocess as sp sp.Popen(("cert.cmd", "c:\Program Files (X86)\Arduino\cert.cmd")) def install(): print('installing chaumes-arduino-1.0.6-windows') run(r'"arduino-1.0.6-windows.exe" /S') copytree2(r'ArduBlockTool',r'c:\Program Files (X86)\Arduino\tools') Si j'execute pour test cela fonctionnent wapt-get install pathtomytemplate Si j exécute Wapt-get build-upload il m'execute le script cert.cmd Si vous avez des idées pour résoudre le problème, ce que je veux surtout c'est comprendre malgré mes lacunes en Python
WAPT mailing listWAPT@lists.tranquil.ithttp://lists.tranquil.it/listinfo/wapt
WAPT mailing list WAPT@lists.tranquil.it http://lists.tranquil.it/listinfo/wapt
--
17, boulevard de la Trémouille
CS 23502 - 21035 DIJON CEDEX
*Olivier CATY* Direction des lycées et de la formation initiale
Service maintenance informatique des lycées
Agent de l’équipe mobile de maintenance informatique régionale
WAPT mailing list WAPT@lists.tranquil.it http://lists.tranquil.it/listinfo/wapt
Bonsoir
Voici mon setup.py
c'est peu être pas conventionnel mais sa fonctionne :
Seul la désinstallation ne fonctionne pas
# -*- coding: utf-8 -*- from setuphelpers import *
uninstallkey = []
uninstallstring = [u'"c:\Program Files (x86)\Arduino\uninstall.exe" /S']
def install(): print('installing chaumes-arduino-1.0.6-windows') run('certutil.exe -addstore ""TrustedPublisher"" driversx86.cer')
run(r'"arduino-1.0.6-windows.exe" /S')
if not os.path.isdir('C:/Program Files (x86)/Arduino/tools/ArduBlockTool'): os.mkdir('C:/Program Files (x86)/Arduino/tools/ArduBlockTool')
if not os.path.isdir('C:/Program Files (x86)/Arduino/tools/ArduBlockTool/tool'): os.mkdir('C:/Program Files (x86)/Arduino/tools/ArduBlockTool/tool')
filecopyto('ardublock-all.jar','C:/Program Files (x86)/Arduino/tools/ArduBlockTool/tool')
if os.path.isdir('C:/ProgramData/Microsoft/Windows/Start Menu/Programs/Logiciels'): filecopyto('Arduino.lnk','C:/ProgramData/Microsoft/Windows/Start Menu/Programs/Logiciels')
if not os.path.isdir('C:/ProgramData/Microsoft/Windows/Start Menu/Programs/Logiciels'): os.mkdir('C:/ProgramData/Microsoft/Windows/Start Menu/Programs/Logiciels')
filecopyto('Arduino.lnk','C:/ProgramData/Microsoft/Windows/Start Menu/Programs/Logiciels')
olivier
Le 23 mai 2016 à 15:10, Olivier CATY emmir.zone15@squale21.fr a écrit :
Bonjour
Voici la methode qui fonctionne en batch
certutil -addstore "TrustedPublisher" driversx86.cer
Je n'ai donc pas de problème a la suite pour l'install du setup.exe /S
Olivier
Le 23 mai 2016 à 14:58, Alexandre GAUVRIT gauvrit.alexandre@gmail.com a écrit :
Bonjour Olivier, Bonjour la liste,
Je suis également bloqué par l'installation d'Arduino/mBlock, j'ai réussi a installer le certificat sans passer par un script cmd externe
def install():
print('Ajout des certificats Arduino') run('certutil.exe -addstore ""TrustedPublisher"" ArduinoLLC.cer') run('certutil.exe -addstore ""TrustedPublisher"" ArduinoSRL.cer')
En revanche ça coince toujours pour l'installation des pilotes de communication Arduino qui sont signés par ces certificats
Dans le changelog on a bien depuis la version 1.5.5-r2 BETA les pilots signés ( https://www.arduino.cc/en/Main/ReleaseNotes )
ARDUINO 1.5.5-r2 BETA - 2014.01.10
- Signed drivers for Windows 8.1
Mais lorsque j'appel l'utilitaire dpinst-x86 ou dpinst-amd64 pour installer les pilotes Arduino j'obtient continuellement une erreur liée à la signature
[image: Images intégrées 1]
Est-ce que l'appel de l'installeur arduino officiel en silencieux règle ce soucis de pilotes ?
Un collègue a tenté de packager ça dans un fichier MSI je vais tenter de voir si ça résout mon problème.
Bon courage,
Alexandre
Le 20 mai 2016 à 22:23, Olivier CATY emmir.zone15@squale21.fr a écrit :
bonsoir
merci pour votre aide sa avance voici mon code qui fonctionne :
n'hésiter pas a me reprendre si le code n'est pas propre, j'apprend le langage
Pour la désinstallation cela ne fonctionnent pas, il y a une message box qui s'ouvre lors de l'uninstall.exe /S
# -*- coding: utf-8 -*- from setuphelpers import *
uninstallkey = []
uninstallstring = [u'"c:\Program Files (x86)\Arduino\uninstall.exe" /S']
def install(): print('installing chaumes-arduino-1.0.6-windows') copytree2(r'ArduBlockTool',r'c:\Program Files (X86)\Arduino\tools') if isdir(makepath(programfiles32,'Arduino')): print 'Arduino' source_filename = 'cert.cmd' dest_filename = makepath(programfiles32,'Arduino',source_filename) filecopyto(source_filename,dest_filename) source_filename = 'driversx86.cer' dest_filename = makepath(programfiles32,'Arduino',source_filename) filecopyto(source_filename,dest_filename) import subprocess as sp sp.Popen(("cert.cmd", "c:\Program Files (X86)\Arduino\cert.cmd")) run(r'"arduino-1.0.6-windows.exe" /S')
Olivier
Le 20 mai 2016 à 18:04, Bastien HERMITTE bhermitte@b2pweb.com a écrit :
Bonjour
Votre premier bloc de code n'est pas dans une fonction, du coup il est exécuté à chaque fois qu'on lance le script (ce que dois faire le build-upload je suppose).
Il faudrait mettre tout le bloc dans la fonction install(), de manière à ne l'exécuter que lors d'un "wapt-get install monpaquet".
De la même manière, vous pouvez ajouter une fonction uninstall() et définir dedans la suppression des fichiers et du certificat.
Cordialement, Bastien
Le 20/05/2016 à 17:58, Olivier CATY a écrit :
Bonjour, Je fait un nouveau poste, je veux pas de problème avec Wikipedia 😉 La procédure est opérationnel en script que déploie par gpo, mais je wapétise tous en ce moment Objectif : Installation du setup, mais celui-ci a besoin d'inscrire un certificat dans la banque windows avant l install du setup Ajout de Ardublock dans le dossier install c:\Program Files (x86)\Arduino\Tools\Ardublock\tool*.jar Les dossiers Ardublock\tool*.jar n'existe pas Pour l'ajout du certificat voila ce que j'ai coller dans mon cmd : certutil -addstore "TrustedPublisher" driversx86.cer le setup.py : if isdir(makepath(programfiles32,'Arduino')): print 'Arduino' source_filename = 'cert.cmd' dest_filename = makepath(programfiles32,'Arduino',source_filename) filecopyto(source_filename,dest_filename) source_filename = 'driversx86.cer' dest_filename = makepath(programfiles32,'Arduino',source_filename) filecopyto(source_filename,dest_filename) import subprocess as sp sp.Popen(("cert.cmd", "c:\Program Files (X86)\Arduino\cert.cmd")) def install(): print('installing chaumes-arduino-1.0.6-windows') run(r'"arduino-1.0.6-windows.exe" /S') copytree2(r'ArduBlockTool',r'c:\Program Files (X86)\Arduino\tools') Si j'execute pour test cela fonctionnent wapt-get install pathtomytemplate Si j exécute Wapt-get build-upload il m'execute le script cert.cmd Si vous avez des idées pour résoudre le problème, ce que je veux surtout c'est comprendre malgré mes lacunes en Python
WAPT mailing listWAPT@lists.tranquil.ithttp://lists.tranquil.it/listinfo/wapt
WAPT mailing list WAPT@lists.tranquil.it http://lists.tranquil.it/listinfo/wapt
--
17, boulevard de la Trémouille
CS 23502 - 21035 DIJON CEDEX
*Olivier CATY* Direction des lycées et de la formation initiale
Service maintenance informatique des lycées
Agent de l’équipe mobile de maintenance informatique régionale
WAPT mailing list WAPT@lists.tranquil.it http://lists.tranquil.it/listinfo/wapt
--
17, boulevard de la Trémouille
CS 23502 - 21035 DIJON CEDEX
*Olivier CATY* Direction des lycées et de la formation initiale
Service maintenance informatique des lycées
Agent de l’équipe mobile de maintenance informatique régionale