Initial upload: fin65-mobile

This commit is contained in:
Abderrahim-Mouhcine
2026-08-16 19:59:55 +01:00
commit 46558a5ec8
242 changed files with 16334 additions and 0 deletions
@@ -0,0 +1,33 @@
# FIN65 - Patch icône Android direct V2
Cette version corrige l'erreur PowerShell :
```text
The regular expression pattern android:label="[^]* is not valid
```
## Utilisation
Décompresse le ZIP puis lance :
```powershell
.\apply_fin65_android_icon_direct_v2.bat
```
Ensuite relance :
```powershell
cd D:\07-Logiciels\20-FIN65\fin65_mobile
flutter run
```
## Si l’icône ne change pas
Android garde parfois l’ancienne icône en cache.
Dans ce cas :
1. synchronise toutes les opérations en attente ;
2. désinstalle l'app du téléphone ;
3. relance `flutter run`.
Attention : désinstaller l’app supprime la base SQLite locale mobile.
@@ -0,0 +1,86 @@
@echo off
setlocal enabledelayedexpansion
REM ============================================================
REM FIN65 - Patch icone Android direct V2
REM Corrige le probleme de regex PowerShell dans le .bat precedent.
REM ============================================================
set "ROOT_DIR=D:\07-Logiciels\20-FIN65"
set "MOBILE_DIR=%ROOT_DIR%\fin65_mobile"
set "PUB_CACHE=%ROOT_DIR%\.pub-cache"
set "RES_DIR=%MOBILE_DIR%\android\app\src\main\res"
set "MANIFEST=%MOBILE_DIR%\android\app\src\main\AndroidManifest.xml"
echo.
echo ==========================================
echo FIN65 - Patch icone Android direct V2
echo ==========================================
echo.
if not exist "%MOBILE_DIR%" (
echo [ERREUR] Dossier mobile introuvable :
echo %MOBILE_DIR%
pause
exit /b 1
)
if not exist "%RES_DIR%" (
echo [ERREUR] Dossier res Android introuvable :
echo %RES_DIR%
pause
exit /b 1
)
if not exist "%MANIFEST%" (
echo [ERREUR] AndroidManifest.xml introuvable :
echo %MANIFEST%
pause
exit /b 1
)
cd /d "%MOBILE_DIR%"
echo Copie des icones natives Android...
for %%D in (mipmap-mdpi mipmap-hdpi mipmap-xhdpi mipmap-xxhdpi mipmap-xxxhdpi mipmap-anydpi-v26 values) do (
if not exist "%RES_DIR%\%%D" mkdir "%RES_DIR%\%%D"
copy /Y "%~dp0generated_res\%%D\*" "%RES_DIR%\%%D\" >nul
)
echo.
echo Mise a jour du label et de l'icone dans AndroidManifest.xml...
powershell -NoProfile -ExecutionPolicy Bypass -File "%~dp0patch_manifest_icon.ps1" -ManifestPath "%MANIFEST%"
if errorlevel 1 (
echo.
echo [ERREUR] Patch du Manifest echoue.
pause
exit /b 1
)
echo.
echo Verification rapide :
findstr /C:"android:label" "%MANIFEST%"
findstr /C:"android:icon" "%MANIFEST%"
findstr /C:"android:roundIcon" "%MANIFEST%"
echo.
echo Nettoyage Flutter...
flutter clean
flutter pub get
echo.
echo ==========================================
echo Icone native FIN65 appliquee.
echo ==========================================
echo.
echo Relance :
echo flutter run
echo.
echo Si l'ancienne icone reste visible, Android garde le cache :
echo 1. Synchronise les operations en attente.
echo 2. Desinstalle l'app du telephone.
echo 3. Relance flutter run.
echo.
pause
Binary file not shown.

After

Width:  |  Height:  |  Size: 23 KiB

@@ -0,0 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
<background android:drawable="@color/ic_launcher_background"/>
<foreground android:drawable="@mipmap/ic_launcher_foreground"/>
</adaptive-icon>
@@ -0,0 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
<background android:drawable="@color/ic_launcher_background"/>
<foreground android:drawable="@mipmap/ic_launcher_foreground"/>
</adaptive-icon>
Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.8 KiB

@@ -0,0 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<color name="ic_launcher_background">#0F172A</color>
</resources>
@@ -0,0 +1,30 @@
param(
[Parameter(Mandatory=$true)]
[string]$ManifestPath
)
if (!(Test-Path $ManifestPath)) {
Write-Host "[ERREUR] AndroidManifest.xml introuvable : $ManifestPath" -ForegroundColor Red
exit 1
}
$text = Get-Content $ManifestPath -Raw
# Remplace les attributs existants.
$text = [regex]::Replace($text, 'android:label="[^"]*"', 'android:label="FIN65"')
$text = [regex]::Replace($text, 'android:icon="[^"]*"', 'android:icon="@mipmap/ic_launcher"')
$text = [regex]::Replace($text, 'android:roundIcon="[^"]*"', 'android:roundIcon="@mipmap/ic_launcher_round"')
# Ajoute les attributs s'ils n'existaient pas.
if ($text -notmatch 'android:label=') {
$text = $text -replace '<application', '<application android:label="FIN65"'
}
if ($text -notmatch 'android:icon=') {
$text = $text -replace '<application', '<application android:icon="@mipmap/ic_launcher"'
}
if ($text -notmatch 'android:roundIcon=') {
$text = $text -replace '<application', '<application android:roundIcon="@mipmap/ic_launcher_round"'
}
Set-Content -Path $ManifestPath -Value $text -Encoding UTF8
Write-Host "AndroidManifest.xml mis a jour."