Page 1 of 1

[SOLVED] Inserting a file into a package

Published: June 7, 2018 - 5:55 PM
by TechDo
Hello,

I'm new to this forum and also new to Python. I'd like to modify a package by inserting a configuration file (XML) that needs to be copied to a specific location after the package installation is complete. This XML file is a modified version of a file already present in the original packaged software. Therefore, the original file should also be deleted after installation.

I thought about modifying the package from the WAPT console and modifying the code displayed by PyScripter using `shutil()`. I imagine I would need to add `shutil()` inside the `install()` function?

Thanks in advance.

Re: Inserting a file into a package

Published: June 8, 2018 - 6:22 PM
by dcardon
Hello Techdo,
TechDo wrote: June 7, 2018 - 5:55 PM I'm new to this forum and also new to Python. I'd like to be able to modify a package by inserting a configuration file (XML) that needs to be copied to a specific location once the package installation is complete. This XML file is a modified version of a file already present in the original packaged software. Therefore, the original file should also be deleted once the installation is finished.

I thought about modifying the package from the WAPT console and modifying the code displayed by PyScripter using `shutil()`. I imagine I would need to add `shutil()` inside the `install()` function?
You can draw inspiration from existing packages offered on the store.wapt.fr repository, such as the package https://wapt.tranquil.it/package_detail ... 4_all.wapt with the filecopyto() command

Sincerely,

Denis