From 54a94184749baac011144125551ec4f8ff8ec97b Mon Sep 17 00:00:00 2001
From: Pierre-Antoine Rouby <pierre-antoine.rouby@inrae.fr>
Date: Mon, 5 Jun 2023 16:48:21 +0200
Subject: [PATCH] Package: Linux, Wine: Add tanslate files and minor change.

---
 packages/linux.sh | 12 ++++++++++--
 packages/wine.sh  |  4 +++-
 2 files changed, 13 insertions(+), 3 deletions(-)

diff --git a/packages/linux.sh b/packages/linux.sh
index 1cede45d..51ba307d 100755
--- a/packages/linux.sh
+++ b/packages/linux.sh
@@ -1,14 +1,19 @@
 #! /bin/sh
 
+echo " *** RM OLD ENV"
+
+rm dist/ -rf
+rm pamhyrBuild -rf
+
 echo " *** SETUP ENV"
 
 python3 -m venv pamhyrBuild
-source pamhyrBuild/bin/activate
+. pamhyrBuild/bin/activate
 pip3 install -r ../requirements.txt
 
 echo " *** PYINSTALL"
 
-pyinstaller --paths pamhyrBuild/lib/python3.8/site-packages ../src/pamhyr.py
+pyinstaller -y --paths pamhyrBuild/lib/python3.8/site-packages ../src/pamhyr.py
 
 echo " *** COPY DATA"
 
@@ -17,6 +22,9 @@ cp -r ../src/View/ui/ressources/ dist/pamhyr/View/ui/
 cp -r ../src/View/ui/Widgets/*.ui dist/pamhyr/View/ui/
 cp -r ../src/View/ui/*.ui dist/pamhyr/View/ui/
 
+mkdir -p dist/pamhyr/lang
+cp -r ../src/lang/*.qm dist/pamhyr/lang/
+
 echo " *** MAKE PACKAGE"
 
 OLD_PWD=$PWD
diff --git a/packages/wine.sh b/packages/wine.sh
index 42029a4f..0c1b30ff 100755
--- a/packages/wine.sh
+++ b/packages/wine.sh
@@ -25,7 +25,6 @@ then
     DISPLAY=:42.0 wine cmd /c python-3.8.10-amd64.exe /quiet PrependPath=1
     wine python $WINEPREFIX/drive_c/Program\ Files/Python38/Tools/scripts/win_add2path.py
     wine python -m pip install pyinstaller
-
     DISPLAY=:42.0 wine cmd /c nsis-3.08-setup.exe /quiet
 fi
 
@@ -40,6 +39,9 @@ cp -r ../src/View/ui/ressources/ dist/pamhyr/View/ui/
 cp -r ../src/View/ui/Widgets/*.ui dist/pamhyr/View/ui/
 cp -r ../src/View/ui/*.ui dist/pamhyr/View/ui/
 
+mkdir -p dist/pamhyr/lang
+cp -r ../src/lang/*.qm dist/pamhyr/lang/
+
 echo " *** MAKE PACKAGES"
 
 echo " TAR pamhyr-win-amd64.tar.xz"
-- 
GitLab