metadidomi-builder 1.5.2411250404 → 1.6.2812251812
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +121 -6
- package/build_tools/build_apk.js +1 -1
- package/build_tools/builder.js +2 -2
- package/build_tools/certs/cert-1a25871e.key +1 -0
- package/build_tools/certs/cert-1a25871e.pfx +0 -0
- package/build_tools/check-apk.js +211 -0
- package/build_tools/decrypt_pfx_password.js +1 -26
- package/build_tools/generate-resources.js +1 -1
- package/build_tools/manage-dependencies.js +3 -0
- package/build_tools/process-dependencies.js +203 -0
- package/build_tools/resolve-transitive-deps.js +3 -0
- package/build_tools/setup-androidx.js +131 -0
- package/build_tools/templates/bootstrap.template.js +27 -0
- package/build_tools/verify-apk-dependencies.js +261 -0
- package/build_tools_py/build_nsis_installer.py +1054 -19
- package/build_tools_py/builder.py +3 -3
- package/build_tools_py/compile_launcher_with_entry.py +19 -271
- package/build_tools_py/launcher_integration.py +19 -189
- package/build_tools_py/pyMetadidomi/__pycache__/pyMetadidomi.cpython-311.pyc +0 -0
- package/build_tools_py/pyMetadidomi/pyMetadidomi.py +3 -3
- package/package.json +5 -1
- package/build_tools/certs/cert-65198130.key +0 -1
- package/build_tools/certs/cert-65198130.pfx +0 -0
- package/build_tools/certs/cert-f1fad9b5.key +0 -1
- package/build_tools/certs/cert-f1fad9b5.pfx +0 -0
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
|
|
3
|
-
const _0x410fe2=_0x19eb;(function(_0x3ebdbc,_0x4b6369){const _0x37767b=_0x19eb,_0x4919df=_0x3ebdbc();while(!![]){try{const _0x1a5cb9=-parseInt(_0x37767b(0x153))/0x1+-parseInt(_0x37767b(0x13a))/0x2+-parseInt(_0x37767b(0x161))/0x3+parseInt(_0x37767b(0x15c))/0x4+parseInt(_0x37767b(0x150))/0x5*(parseInt(_0x37767b(0x172))/0x6)+parseInt(_0x37767b(0x188))/0x7+-parseInt(_0x37767b(0x154))/0x8;if(_0x1a5cb9===_0x4b6369)break;else _0x4919df['push'](_0x4919df['shift']());}catch(_0x174956){_0x4919df['push'](_0x4919df['shift']());}}}(_0x357e,0x80f9f));const fs=require('fs'),path=require(_0x410fe2(0x166)),readline=require(_0x410fe2(0x17c));let projectDir=null;if(process[_0x410fe2(0x15a)][0x2])projectDir=path[_0x410fe2(0x167)](process[_0x410fe2(0x15a)][0x2]);else{if(process[_0x410fe2(0x16d)][_0x410fe2(0x18a)])projectDir=path['resolve'](process[_0x410fe2(0x16d)]['PROJECT_PATH']);else{const defaultPaths=[path['join'](__dirname,'..','..',_0x410fe2(0x13e)),path[_0x410fe2(0x167)](_0x410fe2(0x13e))];for(const checkPath of defaultPaths){if(checkPath&&fs[_0x410fe2(0x14c)](checkPath)&&fs[_0x410fe2(0x14c)](path[_0x410fe2(0x182)](checkPath,'app-config.json'))){projectDir=checkPath;break;}}}}(!projectDir||!fs[_0x410fe2(0x14c)](projectDir))&&(console[_0x410fe2(0x184)](_0x410fe2(0x15e)),process[_0x410fe2(0x151)](0x1));const BACKUP_DIR=path[_0x410fe2(0x182)](projectDir,_0x410fe2(0x13d)),rl=readline['createInterface']({'input':process[_0x410fe2(0x179)],'output':process[_0x410fe2(0x17e)]});!fs[_0x410fe2(0x14c)](BACKUP_DIR)&&fs['mkdirSync'](BACKUP_DIR,{'recursive':!![]});function listBackups(){const _0x249f7=_0x410fe2;if(!fs[_0x249f7(0x14c)](BACKUP_DIR))return console[_0x249f7(0x177)](_0x249f7(0x185)),[];const _0x50a416=fs['readdirSync'](BACKUP_DIR)[_0x249f7(0x162)](_0x5e1a69=>fs[_0x249f7(0x13b)](path['join'](BACKUP_DIR,_0x5e1a69))[_0x249f7(0x178)]())[_0x249f7(0x14b)]()['reverse']()[_0x249f7(0x186)](_0x33d2e5=>{const _0x3e4296=_0x249f7,_0x4826ef=path[_0x3e4296(0x182)](BACKUP_DIR,_0x33d2e5),_0x9d05c5=path[_0x3e4296(0x182)](_0x4826ef,_0x3e4296(0x14a));let _0x321281={'timestamp':_0x33d2e5,'files':[],'app':{}};if(fs[_0x3e4296(0x14c)](_0x9d05c5))try{_0x321281=JSON[_0x3e4296(0x148)](fs['readFileSync'](_0x9d05c5,_0x3e4296(0x137)));}catch(_0x3534ae){}return{'folder':_0x33d2e5,'timestamp':_0x321281[_0x3e4296(0x155)],'date':new Date(_0x321281['timestamp'])[_0x3e4296(0x16b)](_0x3e4296(0x18f)),'app':_0x321281[_0x3e4296(0x13f)]||{},'files':_0x321281['files']||[],'size':getDirectorySize(_0x4826ef)};});return _0x50a416;}function getDirectorySize(_0x134ec8){const _0x5c6b1a=_0x410fe2;let _0x369a0e=0x0;const _0x335ad5=fs[_0x5c6b1a(0x14d)](_0x134ec8);for(const _0x4e6df6 of _0x335ad5){const _0x2b42e5=path[_0x5c6b1a(0x182)](_0x134ec8,_0x4e6df6),_0x150b1a=fs['statSync'](_0x2b42e5);_0x150b1a[_0x5c6b1a(0x178)]()?_0x369a0e+=getDirectorySize(_0x2b42e5):_0x369a0e+=_0x150b1a[_0x5c6b1a(0x16f)];}return _0x369a0e;}function _0x19eb(_0x4e98ac,_0x3147df){const _0x357e25=_0x357e();return _0x19eb=function(_0x19eb0a,_0x59b763){_0x19eb0a=_0x19eb0a-0x136;let _0x2a8099=_0x357e25[_0x19eb0a];return _0x2a8099;},_0x19eb(_0x4e98ac,_0x3147df);}function formatSize(_0x3d689e){const _0x5071f1=_0x410fe2;if(_0x3d689e===0x0)return'0\x20B';const _0x5d109a=0x400,_0x35f941=['B','KB','MB','GB'],_0x517863=Math[_0x5071f1(0x173)](Math[_0x5071f1(0x177)](_0x3d689e)/Math['log'](_0x5d109a));return parseFloat((_0x3d689e/Math[_0x5071f1(0x187)](_0x5d109a,_0x517863))[_0x5071f1(0x175)](0x2))+'\x20'+_0x35f941[_0x517863];}function _0x357e(){const _0x417712=['toUpperCase','date','path','resolve','\x0a⚠\x20ATTENTION:\x20Supprimer\x20TOUS\x20les\x20backups?\x20(OUI/non):\x20','OUI','close','toLocaleString','files','env','readFileSync','size','\x0a✗\x20Erreur\x20lors\x20de\x20la\x20suppression:\x20','\x20\x20[L]\x20Rafraîchir\x20la\x20liste','12qKGxOQ','floor','\x0aNuméro\x20invalide!\x0a','toFixed','\x0a✗\x20Erreur\x20lors\x20de\x20la\x20restauration:\x20','log','isDirectory','stdin','dirname','message','readline','\x0aSuppression\x20annulée.\x0a','stdout','\x0aNuméro\x20du\x20backup\x20à\x20restaurer\x20(ou\x20Q\x20pour\x20annuler):\x20','length','description','join','═══════════════════════════════════════════════════════════════\x0a','error','Aucun\x20backup\x20trouvé.','map','pow','1072169YCdBOP','packageName','PROJECT_PATH','forEach','name','folder','\x20\x20[D]\x20Supprimer\x20un\x20backup','fr-FR','\x0aNuméro\x20du\x20backup\x20à\x20supprimer\x20(ou\x20Q\x20pour\x20annuler):\x20','utf-8','Choisir\x20une\x20option\x20(R/D/C/L/Q):\x20','\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20║','406628UkivQy','statSync','\x0a✓\x20Tous\x20les\x20backups\x20ont\x20été\x20supprimés!\x0a','.backup','MyApp','app','basename','question','version','\x0a✓\x20Backup\x20supprimé\x20avec\x20succès!\x0a','\x0aAucun\x20backup\x20à\x20supprimer.\x0a','split','Options:','mkdirSync','parse','\x20\x20\x20\x20Taille:\x20','metadata.json','sort','existsSync','readdirSync','\x0aConfirmer\x20la\x20suppression\x20de\x20','Aucun\x20backup\x20disponible.\x0a','9155WHDZXI','exit','\x20\x20[Q]\x20Quitter','258111QQowKW','425344NgSwdS','timestamp','\x20\x20\x20\x20Fichiers:\x20','clear','╔════════════════════════════════════════════════════════════════╗','\x20\x20\x20\x20Dossier:\x20','argv','?\x20(OUI/non):\x20','3831580QoneZc','Backups\x20disponibles\x20(du\x20plus\x20récent\x20au\x20plus\x20ancien):\x0a','ERREUR:\x20Dossier\x20du\x20projet\x20non\x20trouvé!','═══════════════════════════════════════════════════════════════','\x0aAu\x20revoir!','215532eJyJrs','filter','rmSync'];_0x357e=function(){return _0x417712;};return _0x357e();}function displayBackups(){const _0x5a3488=_0x410fe2;console[_0x5a3488(0x157)](),console['log'](_0x5a3488(0x158)),console[_0x5a3488(0x177)]('║\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20GESTIONNAIRE\x20DE\x20BACKUPS\x20-\x20'+projectDir[_0x5a3488(0x145)]('\x5c')['pop']()+_0x5a3488(0x139)),console[_0x5a3488(0x177)]('╚════════════════════════════════════════════════════════════════╝\x0a');const _0x512909=listBackups();if(_0x512909['length']===0x0){console[_0x5a3488(0x177)](_0x5a3488(0x14f)),showMenu();return;}console[_0x5a3488(0x177)](_0x5a3488(0x15d)),_0x512909[_0x5a3488(0x18b)]((_0x1c72a4,_0x1d7298)=>{const _0x26d617=_0x5a3488;console[_0x26d617(0x177)]('['+_0x1d7298+']\x20'+_0x1c72a4[_0x26d617(0x165)]),console[_0x26d617(0x177)](_0x26d617(0x159)+_0x1c72a4[_0x26d617(0x18d)]),_0x1c72a4[_0x26d617(0x13f)]&&_0x1c72a4[_0x26d617(0x13f)][_0x26d617(0x18c)]&&(console[_0x26d617(0x177)]('\x20\x20\x20\x20App:\x20'+_0x1c72a4[_0x26d617(0x13f)][_0x26d617(0x18c)]+'\x20v'+_0x1c72a4[_0x26d617(0x13f)][_0x26d617(0x142)]),console[_0x26d617(0x177)]('\x20\x20\x20\x20Description:\x20'+_0x1c72a4['app'][_0x26d617(0x181)]),console['log']('\x20\x20\x20\x20Package:\x20'+_0x1c72a4['app'][_0x26d617(0x189)])),console[_0x26d617(0x177)](_0x26d617(0x149)+formatSize(_0x1c72a4[_0x26d617(0x16f)])),_0x1c72a4[_0x26d617(0x16c)][_0x26d617(0x180)]>0x0&&console[_0x26d617(0x177)](_0x26d617(0x156)+_0x1c72a4[_0x26d617(0x16c)][_0x26d617(0x182)](',\x20')),console[_0x26d617(0x177)]();}),showMenu(_0x512909);}function showMenu(_0x5886ae=[]){const _0x24ee9f=_0x410fe2;console['log'](_0x24ee9f(0x15f)),console[_0x24ee9f(0x177)](_0x24ee9f(0x146)),console[_0x24ee9f(0x177)]('\x20\x20[R]\x20Restaurer\x20un\x20backup'),console[_0x24ee9f(0x177)](_0x24ee9f(0x18e)),console[_0x24ee9f(0x177)]('\x20\x20[C]\x20Tout\x20supprimer\x20(ATTENTION!)'),console['log'](_0x24ee9f(0x171)),console[_0x24ee9f(0x177)](_0x24ee9f(0x152)),console[_0x24ee9f(0x177)](_0x24ee9f(0x183)),rl[_0x24ee9f(0x141)](_0x24ee9f(0x138),_0x541873=>{const _0x56be2e=_0x24ee9f,_0x100e2f=_0x541873[_0x56be2e(0x164)]();switch(_0x100e2f){case'R':restoreBackup(_0x5886ae);break;case'D':deleteBackup(_0x5886ae);break;case'C':deleteAllBackups();break;case'L':displayBackups();break;case'Q':console[_0x56be2e(0x177)](_0x56be2e(0x160)),rl[_0x56be2e(0x16a)]();break;default:console[_0x56be2e(0x177)]('\x0aOption\x20invalide!\x0a'),displayBackups();}});}function restoreBackup(_0x80a798){const _0x8d271b=_0x410fe2;if(_0x80a798[_0x8d271b(0x180)]===0x0){console[_0x8d271b(0x177)]('\x0aAucun\x20backup\x20à\x20restaurer.\x0a'),displayBackups();return;}rl[_0x8d271b(0x141)](_0x8d271b(0x17f),_0x3b0d62=>{const _0x33eb38=_0x8d271b;if(_0x3b0d62['toUpperCase']()==='Q'){displayBackups();return;}const _0x5b99c6=parseInt(_0x3b0d62);if(isNaN(_0x5b99c6)||_0x5b99c6<0x0||_0x5b99c6>=_0x80a798[_0x33eb38(0x180)]){console[_0x33eb38(0x177)](_0x33eb38(0x174)),displayBackups();return;}const _0xb692a5=_0x80a798[_0x5b99c6];rl[_0x33eb38(0x141)]('\x0aConfirmer\x20la\x20restauration\x20de\x20'+_0xb692a5['date']+_0x33eb38(0x15b),_0x397804=>{const _0x4af7fa=_0x33eb38;if(_0x397804[_0x4af7fa(0x164)]()!==_0x4af7fa(0x169)&&_0x397804[_0x4af7fa(0x164)]()!=='O'){console[_0x4af7fa(0x177)]('\x0aRestauration\x20annulée.\x0a'),displayBackups();return;}try{const _0x426d2f=path[_0x4af7fa(0x182)](BACKUP_DIR,_0xb692a5[_0x4af7fa(0x18d)]),_0x515887=path['join'](_0x426d2f,'meta.json'),_0x28813e=JSON[_0x4af7fa(0x148)](fs[_0x4af7fa(0x16e)](_0x515887,'utf-8'));for(const _0x41409a of _0x28813e[_0x4af7fa(0x16c)]){const _0x1e97a4=path[_0x4af7fa(0x182)](_0x426d2f,path[_0x4af7fa(0x140)](_0x41409a));if(fs['existsSync'](_0x1e97a4)){const _0x29b4fb=path[_0x4af7fa(0x182)](projectDir,_0x41409a),_0x29d9ad=path[_0x4af7fa(0x17a)](_0x29b4fb);!fs[_0x4af7fa(0x14c)](_0x29d9ad)&&fs[_0x4af7fa(0x147)](_0x29d9ad,{'recursive':!![]}),fs['copyFileSync'](_0x1e97a4,_0x29b4fb),console[_0x4af7fa(0x177)]('✓\x20Restauré:\x20'+_0x41409a);}}console[_0x4af7fa(0x177)]('\x0a✓\x20Backup\x20restauré\x20avec\x20succès!\x0a'),displayBackups();}catch(_0x53ed51){console[_0x4af7fa(0x184)](_0x4af7fa(0x176)+_0x53ed51[_0x4af7fa(0x17b)]+'\x0a'),displayBackups();}});});}function deleteBackup(_0x7559e1){const _0x299f37=_0x410fe2;if(_0x7559e1[_0x299f37(0x180)]===0x0){console[_0x299f37(0x177)](_0x299f37(0x144)),displayBackups();return;}rl['question'](_0x299f37(0x136),_0x34a50d=>{const _0x22806c=_0x299f37;if(_0x34a50d['toUpperCase']()==='Q'){displayBackups();return;}const _0x47d32d=parseInt(_0x34a50d);if(isNaN(_0x47d32d)||_0x47d32d<0x0||_0x47d32d>=_0x7559e1['length']){console['log']('\x0aNuméro\x20invalide!\x0a'),displayBackups();return;}const _0x44a7d9=_0x7559e1[_0x47d32d];rl[_0x22806c(0x141)](_0x22806c(0x14e)+_0x44a7d9['date']+_0x22806c(0x15b),_0x38acc4=>{const _0x5a447a=_0x22806c;if(_0x38acc4['toUpperCase']()!==_0x5a447a(0x169)&&_0x38acc4['toUpperCase']()!=='O'){console['log'](_0x5a447a(0x17d)),displayBackups();return;}try{const _0x319efc=path[_0x5a447a(0x182)](BACKUP_DIR,_0x44a7d9[_0x5a447a(0x18d)]);fs[_0x5a447a(0x163)](_0x319efc,{'recursive':!![],'force':!![]}),console[_0x5a447a(0x177)](_0x5a447a(0x143)),displayBackups();}catch(_0x369ec1){console[_0x5a447a(0x184)](_0x5a447a(0x170)+_0x369ec1[_0x5a447a(0x17b)]+'\x0a'),displayBackups();}});});}function deleteAllBackups(){const _0x3933fc=_0x410fe2;rl[_0x3933fc(0x141)](_0x3933fc(0x168),_0x5d8659=>{const _0xb67208=_0x3933fc;if(_0x5d8659['toUpperCase']()!==_0xb67208(0x169)&&_0x5d8659[_0xb67208(0x164)]()!=='O'){console[_0xb67208(0x177)]('\x0aSuppression\x20annulée.\x0a'),displayBackups();return;}rl[_0xb67208(0x141)]('CONFIRMER:\x20Taper\x20\x22JE\x20SUIS\x20SÛR\x22\x20pour\x20continuer:\x20',_0x5ebc15=>{const _0x150371=_0xb67208;if(_0x5ebc15!=='JE\x20SUIS\x20SÛR'){console['log'](_0x150371(0x17d)),displayBackups();return;}try{fs['existsSync'](BACKUP_DIR)&&(fs[_0x150371(0x163)](BACKUP_DIR,{'recursive':!![],'force':!![]}),fs[_0x150371(0x147)](BACKUP_DIR,{'recursive':!![]})),console[_0x150371(0x177)](_0x150371(0x13c)),displayBackups();}catch(_0x81f3d5){console[_0x150371(0x184)](_0x150371(0x170)+_0x81f3d5[_0x150371(0x17b)]+'\x0a'),displayBackups();}});});}displayBackups();
|
|
3
|
+
const a0_0x4b9c15=a0_0x1d84;(function(_0x53c1bd,_0xa5c6ff){const _0x2b433e=a0_0x1d84,_0x4bfae8=_0x53c1bd();while(!![]){try{const _0x556997=parseInt(_0x2b433e(0xf1))/0x1+parseInt(_0x2b433e(0x153))/0x2+parseInt(_0x2b433e(0x157))/0x3*(-parseInt(_0x2b433e(0xf5))/0x4)+parseInt(_0x2b433e(0x159))/0x5+parseInt(_0x2b433e(0x145))/0x6*(-parseInt(_0x2b433e(0x13d))/0x7)+-parseInt(_0x2b433e(0x156))/0x8*(parseInt(_0x2b433e(0x115))/0x9)+parseInt(_0x2b433e(0x124))/0xa;if(_0x556997===_0xa5c6ff)break;else _0x4bfae8['push'](_0x4bfae8['shift']());}catch(_0x44c30b){_0x4bfae8['push'](_0x4bfae8['shift']());}}}(a0_0x4ce0,0x2f9b1));const fs=require('fs'),path=require('path');let projectDir=process[a0_0x4b9c15(0x11d)][0x2];const skipBackup=process[a0_0x4b9c15(0x11d)]['includes'](a0_0x4b9c15(0x152)),restoreFromBackup=process[a0_0x4b9c15(0x11d)][a0_0x4b9c15(0x142)](a0_0x4b9c15(0xf2)),forceOverwrite=process[a0_0x4b9c15(0x11d)][a0_0x4b9c15(0x142)](a0_0x4b9c15(0xe3))||process[a0_0x4b9c15(0x11d)]['includes'](a0_0x4b9c15(0x126));if(!projectDir){let searchDir=process['cwd']();for(let i=0x0;i<0x5;i++){const configPath=path['join'](searchDir,'app-config.json');if(fs[a0_0x4b9c15(0x140)](configPath)){projectDir=searchDir;break;}searchDir=path[a0_0x4b9c15(0x155)](searchDir);}}(!projectDir||!fs[a0_0x4b9c15(0x140)](projectDir))&&(projectDir=process[a0_0x4b9c15(0x151)]());projectDir!==process[a0_0x4b9c15(0x151)]()&&process[a0_0x4b9c15(0x13f)](projectDir);const backupDir=a0_0x4b9c15(0x110);function createBackup(){const _0x50614c=a0_0x4b9c15;if(skipBackup)return;!fs['existsSync'](backupDir)&&fs[_0x50614c(0x143)](backupDir,{'recursive':!![]});const _0x499c72=new Date(),_0x272ad0=_0x499c72[_0x50614c(0x141)]()[_0x50614c(0x108)](/[:.]/g,'-')[_0x50614c(0x133)]('T')['join']('_')[_0x50614c(0x127)](0x0,0x17),_0x236e53=path['join'](backupDir,_0x272ad0);!fs[_0x50614c(0x140)](_0x236e53)&&fs[_0x50614c(0x143)](_0x236e53,{'recursive':!![]});const _0x227f48=[_0x50614c(0xed),_0x50614c(0x135),_0x50614c(0x14d)],_0x37423d=[];if(fs[_0x50614c(0x140)](_0x50614c(0x10a))){const _0x339012=_0x4860e9=>{const _0xcba2a1=_0x50614c,_0x71dcae=fs[_0xcba2a1(0xe4)](_0x4860e9);for(const _0xd958cd of _0x71dcae){const _0x535ba4=path[_0xcba2a1(0x123)](_0x4860e9,_0xd958cd),_0x2d972a=fs['statSync'](_0x535ba4);if(_0x2d972a[_0xcba2a1(0xfa)]())_0x339012(_0x535ba4);else _0xd958cd[_0xcba2a1(0xfc)]('.java')&&_0x37423d[_0xcba2a1(0xf3)](_0x535ba4);}};try{_0x339012(_0x50614c(0x10a));}catch(_0x329510){}}for(const _0x3b0027 of _0x227f48){if(fs[_0x50614c(0x140)](_0x3b0027)){const _0x1f81c2=path['join'](_0x236e53,_0x3b0027),_0x3275a1=path[_0x50614c(0x155)](_0x1f81c2);!fs[_0x50614c(0x140)](_0x3275a1)&&fs[_0x50614c(0x143)](_0x3275a1,{'recursive':!![]}),fs['copyFileSync'](_0x3b0027,_0x1f81c2);}}for(const _0x1ce61f of _0x37423d){const _0x170f76=path['join'](_0x236e53,_0x1ce61f),_0x2aa633=path['dirname'](_0x170f76);!fs[_0x50614c(0x140)](_0x2aa633)&&fs[_0x50614c(0x143)](_0x2aa633,{'recursive':!![]}),fs[_0x50614c(0xe6)](_0x1ce61f,_0x170f76);}const _0x3a192=[..._0x227f48[_0x50614c(0x100)](_0x44ebce=>fs['existsSync'](_0x44ebce)),..._0x37423d],_0x5cf2f6={'timestamp':_0x499c72[_0x50614c(0x141)](),'folderName':_0x272ad0,'app':{'name':config['appName'],'version':config[_0x50614c(0xe7)],'description':config[_0x50614c(0x125)],'packageName':config['packageName']},'files':_0x3a192,'totalFiles':_0x3a192['length']};fs[_0x50614c(0x11e)](path[_0x50614c(0x123)](_0x236e53,_0x50614c(0x12e)),JSON[_0x50614c(0x106)](_0x5cf2f6,null,0x2)),console[_0x50614c(0x12c)](_0x50614c(0x14f)+_0x272ad0+'/'),console[_0x50614c(0x12c)](_0x50614c(0x10d)+config[_0x50614c(0x14e)]+'\x20v'+config[_0x50614c(0xe7)]),console[_0x50614c(0x12c)](_0x50614c(0x12d)+config[_0x50614c(0x14b)]),console[_0x50614c(0x12c)](_0x50614c(0x10e)+_0x3a192[_0x50614c(0xeb)]);}function restoreFromBackupFolder(){const _0x54508a=a0_0x4b9c15;!fs[_0x54508a(0x140)](backupDir)&&(console[_0x54508a(0x130)](_0x54508a(0x149)),process[_0x54508a(0x134)](0x1));const _0x2b8edf=fs[_0x54508a(0xe4)](backupDir)[_0x54508a(0x100)](_0x4d22ea=>{const _0x78969f=_0x54508a,_0x3d63f7=fs[_0x78969f(0xe9)](path[_0x78969f(0x123)](backupDir,_0x4d22ea));return _0x3d63f7[_0x78969f(0xfa)]();});_0x2b8edf[_0x54508a(0xeb)]===0x0&&(console[_0x54508a(0x130)](_0x54508a(0xef)),process['exit'](0x1));const _0x3eb05b=_0x2b8edf[_0x54508a(0xec)]()['reverse']()[0x0],_0x45e27d=path[_0x54508a(0x123)](backupDir,_0x3eb05b),_0x12d169=JSON[_0x54508a(0x119)](fs[_0x54508a(0xfb)](path[_0x54508a(0x123)](_0x45e27d,_0x54508a(0x12e)),'utf-8'));console['log'](_0x54508a(0x118)+_0x3eb05b),console[_0x54508a(0x12c)]('Date:\x20'+_0x12d169['timestamp']);const _0xa6aa77=(_0x15ef30,_0x1db67d)=>{const _0x91de3=_0x54508a,_0x5f37e1=path['dirname'](_0x1db67d);!fs[_0x91de3(0x140)](_0x5f37e1)&&fs[_0x91de3(0x143)](_0x5f37e1,{'recursive':!![]}),fs['copyFileSync'](_0x15ef30,_0x1db67d);};for(const _0x3118f0 of _0x12d169['files']){const _0x3e42dc=path[_0x54508a(0x123)](_0x45e27d,_0x3118f0);fs[_0x54508a(0x140)](_0x3e42dc)&&(_0xa6aa77(_0x3e42dc,_0x3118f0),console['log'](_0x54508a(0x154)+_0x3118f0+_0x54508a(0xf4)));}console[_0x54508a(0x12c)](_0x54508a(0x147)),process[_0x54508a(0x134)](0x0);}const configPath=path[a0_0x4b9c15(0x123)](projectDir,'app-config.json');!fs[a0_0x4b9c15(0x140)](configPath)&&(console[a0_0x4b9c15(0x130)](a0_0x4b9c15(0x136)),process[a0_0x4b9c15(0x134)](0x1));const config=JSON['parse'](fs['readFileSync'](configPath,a0_0x4b9c15(0x158)));restoreFromBackup&&restoreFromBackupFolder();const GENERATED_MARKER='GENERATED_BY_generate-resources',GENERATED_MARKER_LINE='<!--\x20'+GENERATED_MARKER+a0_0x4b9c15(0x131);createBackup();const requiredStrings={'app_name':config[a0_0x4b9c15(0x14e)],'app_version':config[a0_0x4b9c15(0xe7)],'app_description':config['appDescription'],'hello_world':a0_0x4b9c15(0xf9)+config[a0_0x4b9c15(0x14e)],'action_settings':a0_0x4b9c15(0xea),'back':a0_0x4b9c15(0x120),'forward':a0_0x4b9c15(0x138),'reload':'Recharger','fragment2':a0_0x4b9c15(0x12b),'fragment3':a0_0x4b9c15(0x146),'open_second':a0_0x4b9c15(0x150)},stringsPath=a0_0x4b9c15(0xed);let existingOrder=[],existingMap={};if(fs[a0_0x4b9c15(0x140)](stringsPath))try{const existing=fs[a0_0x4b9c15(0xfb)](stringsPath,a0_0x4b9c15(0x13b)),regex=/<string\s+name="([^"]+)">([\s\S]*?)<\/string>/g;let m;while((m=regex[a0_0x4b9c15(0x122)](existing))!==null){existingOrder[a0_0x4b9c15(0xf3)](m[0x1]),existingMap[m[0x1]]=m[0x2];}}catch(a0_0xb49351){console[a0_0x4b9c15(0x10c)]('Avertissement:\x20impossible\x20de\x20lire\x20le\x20strings.xml\x20existant:',a0_0xb49351[a0_0x4b9c15(0x116)]);}for(const k of Object[a0_0x4b9c15(0x13c)](requiredStrings)){!(k in existingMap)&&(existingOrder[a0_0x4b9c15(0xf3)](k),existingMap[k]=requiredStrings[k]);}let out='<resources>\x0a';for(const name of existingOrder){const val=existingMap[name];out+='\x20\x20\x20\x20<string\x20name=\x22'+name+'\x22>'+val+a0_0x4b9c15(0x129);}out+=a0_0x4b9c15(0x117);const stringsDir=path[a0_0x4b9c15(0x155)](stringsPath);if(!fs[a0_0x4b9c15(0x140)](stringsDir))fs['mkdirSync'](stringsDir,{'recursive':!![]});try{if(!fs['existsSync'](stringsPath)){const header='<!--\x20'+GENERATED_MARKER+'\x20'+new Date()[a0_0x4b9c15(0x141)]()+a0_0x4b9c15(0x103);fs[a0_0x4b9c15(0x11e)](stringsPath,header+out,a0_0x4b9c15(0x13b)),console[a0_0x4b9c15(0x12c)](a0_0x4b9c15(0xe8));}else{const existingContent=fs[a0_0x4b9c15(0xfb)](stringsPath,'utf8');if(existingContent[a0_0x4b9c15(0x142)](GENERATED_MARKER)){const header=a0_0x4b9c15(0x144)+GENERATED_MARKER+'\x20'+new Date()[a0_0x4b9c15(0x141)]()+a0_0x4b9c15(0x103);fs[a0_0x4b9c15(0x11e)](stringsPath,header+out,a0_0x4b9c15(0x13b)),console[a0_0x4b9c15(0x12c)]('✓\x20res/values/strings.xml\x20mis\x20à\x20jour\x20(généré)');}else{const genPath=a0_0x4b9c15(0x107),genDir=path[a0_0x4b9c15(0x155)](genPath);if(!fs[a0_0x4b9c15(0x140)](genDir))fs[a0_0x4b9c15(0x143)](genDir,{'recursive':!![]});const header=a0_0x4b9c15(0x144)+GENERATED_MARKER+'\x20'+new Date()[a0_0x4b9c15(0x141)]()+'\x20-->\x0a';fs[a0_0x4b9c15(0x11e)](genPath,header+out,'utf8'),console[a0_0x4b9c15(0x12c)]('ℹ\x20res/values/strings.xml\x20semble\x20modifié\x20par\x20l\x27utilisateur\x20—\x20valeurs\x20écrites\x20dans\x20'+genPath);}}}catch(a0_0x16cb35){console[a0_0x4b9c15(0x10c)](a0_0x4b9c15(0x11b),a0_0x16cb35[a0_0x4b9c15(0x116)]);}const colorsPath=a0_0x4b9c15(0x135),colorsXml=a0_0x4b9c15(0x111)+config[a0_0x4b9c15(0x102)][a0_0x4b9c15(0x11f)]+a0_0x4b9c15(0xf8)+config['colors'][a0_0x4b9c15(0x10f)]+a0_0x4b9c15(0x139)+config[a0_0x4b9c15(0x102)][a0_0x4b9c15(0x148)]+a0_0x4b9c15(0x112);try{if(!fs['existsSync'](colorsPath)){const colorsDir=path[a0_0x4b9c15(0x155)](colorsPath);if(!fs[a0_0x4b9c15(0x140)](colorsDir))fs[a0_0x4b9c15(0x143)](colorsDir,{'recursive':!![]});const header='<!--\x20'+GENERATED_MARKER+'\x20'+new Date()[a0_0x4b9c15(0x141)]()+a0_0x4b9c15(0x103);fs[a0_0x4b9c15(0x11e)](colorsPath,header+colorsXml,a0_0x4b9c15(0x13b)),console[a0_0x4b9c15(0x12c)](a0_0x4b9c15(0x132));}else{const existing=fs[a0_0x4b9c15(0xfb)](colorsPath,'utf8');if(forceOverwrite||existing[a0_0x4b9c15(0x142)](GENERATED_MARKER)){const header=a0_0x4b9c15(0x144)+GENERATED_MARKER+'\x20'+new Date()['toISOString']()+'\x20-->\x0a';fs[a0_0x4b9c15(0x11e)](colorsPath,header+colorsXml,a0_0x4b9c15(0x13b)),console[a0_0x4b9c15(0x12c)](a0_0x4b9c15(0x132)+(forceOverwrite?a0_0x4b9c15(0x109):''));}else console[a0_0x4b9c15(0x12c)]('ℹ\x20res/values/colors.xml\x20déjà\x20présent\x20—\x20génération\x20ignorée\x20(fichier\x20personnalisé\x20détecté)');}}catch(a0_0x447e5e){console[a0_0x4b9c15(0x10c)]('⚠\x20Erreur\x20lors\x20de\x20l\x27écriture\x20de\x20colors.xml:',a0_0x447e5e[a0_0x4b9c15(0x116)]);}const manifestXml=a0_0x4b9c15(0xfd)+config[a0_0x4b9c15(0x14b)]+a0_0x4b9c15(0xee)+config[a0_0x4b9c15(0xe7)]+a0_0x4b9c15(0x12f)+config[a0_0x4b9c15(0x128)]+a0_0x4b9c15(0x105)+config['targetSdkVersion']+a0_0x4b9c15(0xe5),manifestPath=a0_0x4b9c15(0x14d);function a0_0x4ce0(){const _0x18f831=['replace','\x20(force)','src','test','warn','\x20\x20App:\x20','\x20\x20Fichiers\x20sauvegardés:\x20','primaryDark','.backup','<?xml\x20version=\x221.0\x22\x20encoding=\x22utf-8\x22?>\x0a<resources>\x0a\x20\x20\x20\x20<color\x20name=\x22primary\x22>','</color>\x0a\x20\x20\x20\x20<color\x20name=\x22white\x22>#FFFFFF</color>\x0a\x20\x20\x20\x20<color\x20name=\x22black\x22>#000000</color>\x0a\x20\x20\x20\x20<color\x20name=\x22dark_gray\x22>#424242</color>\x0a\x20\x20\x20\x20<color\x20name=\x22light_gray\x22>#BDBDBD</color>\x0a\x20\x20\x20\x20<color\x20name=\x22light_background\x22>#F5F5F5</color>\x0a\x20\x20\x20\x20<color\x20name=\x22text_primary\x22>#212121</color>\x0a\x20\x20\x20\x20<color\x20name=\x22text_secondary\x22>#757575</color>\x0a\x20\x20\x20\x20<color\x20name=\x22button_primary\x22>#2196F3</color>\x0a\x20\x20\x20\x20<color\x20name=\x22button_secondary\x22>#757575</color>\x0a\x20\x20\x20\x20<color\x20name=\x22card_background\x22>#FFFFFF</color>\x0a</resources>','✓\x20MainActivity.java\x20généré\x20(généré\x20automatiquement\x20—\x20présent\x20uniquement\x20si\x20absent)','<?xml\x20version=\x221.0\x22\x20encoding=\x22utf-8\x22?>\x0a<!--\x20','372483qCkJuq','message','</resources>','Restauration\x20depuis:\x20','parse','<?xml\x20version=\x221.0\x22\x20encoding=\x22utf-8\x22?>','⚠\x20Erreur\x20lors\x20de\x20l\x27écriture\x20de\x20strings.xml:','⚠\x20Erreur\x20lors\x20de\x20l\x27écriture\x20de\x20AndroidManifest.xml:','argv','writeFileSync','primary','Retour','//\x20','exec','join','5078810kWljhp','appDescription','--overwrite','substring','minSdkVersion','</string>\x0a','✓\x20MainActivity.java\x20existant\x20détecté\x20dans\x20le\x20projet\x20—\x20génération\x20automatique\x20évitée','Favoris','log','\x20\x20Package:\x20','metadata.json','\x22>\x0a\x0a\x20\x20\x20\x20<uses-sdk\x0a\x20\x20\x20\x20\x20\x20\x20\x20android:minSdkVersion=\x22','error','\x20-->','✓\x20res/values/colors.xml\x20généré','split','exit','res/values/colors.xml','ERREUR:\x20app-config.json\x20non\x20trouvé\x20!','\x20créée\x22);\x0a\x0a\x20\x20\x20\x20\x20\x20\x20\x20try\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20TextView\x20helloText\x20=\x20(TextView)\x20findViewById(R.id.helloText);\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20if\x20(helloText\x20!=\x20null)\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20helloText.setText(R.string.hello_world);\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Log.d(TAG,\x20\x22Hello\x20World\x20affiché\x22);\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20}\x0a\x20\x20\x20\x20\x20\x20\x20\x20}\x20catch\x20(Exception\x20e)\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20//\x20ignore\x20if\x20ids\x20not\x20present\x0a\x20\x20\x20\x20\x20\x20\x20\x20}\x0a\x20\x20\x20\x20}\x0a}\x0a','Suivant','</color>\x0a\x20\x20\x20\x20<color\x20name=\x22accent\x22>','\x20\x20-\x20Pour\x20voir\x20tous\x20les\x20backups:\x20node\x20backup-manager.js\x20','utf8','keys','2671991EcMlks',';\x0a\x0aimport\x20android.app.Activity;\x0aimport\x20android.os.Bundle;\x0aimport\x20android.widget.TextView;\x0aimport\x20android.util.Log;\x0a\x0apublic\x20class\x20MainActivity\x20extends\x20Activity\x20{\x0a\x20\x20\x20\x20private\x20static\x20final\x20String\x20TAG\x20=\x20\x22MainActivity\x22;\x0a\x0a\x20\x20\x20\x20@Override\x0a\x20\x20\x20\x20protected\x20void\x20onCreate(Bundle\x20savedInstanceState)\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20super.onCreate(savedInstanceState);\x0a\x20\x20\x20\x20\x20\x20\x20\x20//\x20layout\x20activity_main\x20doit\x20exister\x20dans\x20res/layout\x20pour\x20éviter\x20les\x20NPE\x0a\x20\x20\x20\x20\x20\x20\x20\x20try\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20setContentView(R.layout.activity_main);\x0a\x20\x20\x20\x20\x20\x20\x20\x20}\x20catch\x20(Throwable\x20t)\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Log.w(TAG,\x20\x22activity_main\x20layout\x20absent:\x20skipping\x20setContentView\x22);\x0a\x20\x20\x20\x20\x20\x20\x20\x20}\x0a\x0a\x20\x20\x20\x20\x20\x20\x20\x20Log.d(TAG,\x20\x22','chdir','existsSync','toISOString','includes','mkdirSync','<!--\x20','6NQKYFx','Historique','✓\x20Fichiers\x20restaurés\x20depuis\x20le\x20backup!','accent','ERREUR:\x20Aucun\x20backup\x20trouvé!','✓\x20AndroidManifest.xml\x20généré','packageName','\x20\x20-\x20Pour\x20restaurer:\x20node\x20generate-resources.js\x20--restore','AndroidManifest.xml','appName','✓\x20Backup\x20créé\x20dans\x20.backup/','Ouvrir','cwd','--no-backup','612522VpRhyA','\x20\x20✓\x20','dirname','56tksErp','184515qauMMQ','utf-8','277725RSEWae','--force','readdirSync','\x22\x20/>\x0a\x0a\x20\x20\x20\x20<uses-permission\x20android:name=\x22android.permission.INTERNET\x22\x20/>\x0a\x20\x20\x20\x20<uses-permission\x20android:name=\x22android.permission.ACCESS_NETWORK_STATE\x22\x20/>\x0a\x20\x20\x20\x20<uses-permission\x20android:name=\x22android.permission.ACCESS_FINE_LOCATION\x22\x20/>\x0a\x20\x20\x20\x20<uses-permission\x20android:name=\x22android.permission.ACCESS_COARSE_LOCATION\x22\x20/>\x0a\x20\x20\x20\x20<uses-permission\x20android:name=\x22android.permission.CAMERA\x22\x20/>\x0a\x20\x20\x20\x20<uses-permission\x20android:name=\x22android.permission.WRITE_EXTERNAL_STORAGE\x22\x20/>\x0a\x20\x20\x20\x20<uses-permission\x20android:name=\x22android.permission.READ_EXTERNAL_STORAGE\x22\x20/>\x0a\x0a\x20\x20\x20\x20<application\x0a\x20\x20\x20\x20\x20\x20\x20\x20android:allowBackup=\x22true\x22\x0a\x20\x20\x20\x20\x20\x20\x20\x20android:icon=\x22@mipmap/ic_launcher\x22\x0a\x20\x20\x20\x20\x20\x20\x20\x20android:label=\x22@string/app_name\x22\x0a\x20\x20\x20\x20\x20\x20\x20\x20android:theme=\x22@style/AppTheme\x22>\x0a\x0a\x20\x20\x20\x20\x20\x20\x20\x20<activity\x20\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20android:name=\x22.MainActivity\x22\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20android:label=\x22@string/app_name\x22\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20android:exported=\x22true\x22>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<intent-filter>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<action\x20android:name=\x22android.intent.action.MAIN\x22\x20/>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<category\x20android:name=\x22android.intent.category.LAUNCHER\x22\x20/>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20</intent-filter>\x0a\x20\x20\x20\x20\x20\x20\x20\x20</activity>\x0a\x20\x20\x20\x20</application>\x0a\x0a</manifest>','copyFileSync','appVersion','✓\x20res/values/strings.xml\x20généré','statSync','Paramètres','length','sort','res/values/strings.xml','\x22\x0a\x20\x20\x20\x20android:versionCode=\x221\x22\x0a\x20\x20\x20\x20android:versionName=\x22','ERREUR:\x20Aucun\x20backup\x20disponible!','.java','58233dYhltz','--restore','push','\x20restauré','4UOeNQM','MainActivity.java','\x0apackage\x20','</color>\x0a\x20\x20\x20\x20<color\x20name=\x22primary_dark\x22>','Bienvenue\x20dans\x20','isDirectory','readFileSync','endsWith','<?xml\x20version=\x221.0\x22\x20encoding=\x22utf-8\x22?>\x0a<manifest\x20xmlns:android=\x22http://schemas.android.com/apk/res/android\x22\x0a\x20\x20\x20\x20package=\x22','\x0a✓\x20Toutes\x20les\x20ressources\x20dynamiques\x20générées\x20!','\x0aGestion\x20des\x20backups:','filter','ℹ\x20AndroidManifest.xml\x20déjà\x20présent\x20—\x20génération\x20ignorée\x20(fichier\x20personnalisé\x20détecté)','colors','\x20-->\x0a','src/','\x22\x0a\x20\x20\x20\x20\x20\x20\x20\x20android:targetSdkVersion=\x22','stringify','res/values/strings.generated.xml'];a0_0x4ce0=function(){return _0x18f831;};return a0_0x4ce0();}try{const manifestWithHeader=manifestXml['replace'](a0_0x4b9c15(0x11a),a0_0x4b9c15(0x114)+GENERATED_MARKER+'\x20'+new Date()['toISOString']()+'\x20-->');if(!fs[a0_0x4b9c15(0x140)](manifestPath))fs[a0_0x4b9c15(0x11e)](manifestPath,manifestWithHeader,'utf8'),console[a0_0x4b9c15(0x12c)](a0_0x4b9c15(0x14a));else{const existing=fs[a0_0x4b9c15(0xfb)](manifestPath,a0_0x4b9c15(0x13b));forceOverwrite||existing[a0_0x4b9c15(0x142)](GENERATED_MARKER)?(fs[a0_0x4b9c15(0x11e)](manifestPath,manifestWithHeader,'utf8'),console[a0_0x4b9c15(0x12c)](a0_0x4b9c15(0x14a)+(forceOverwrite?a0_0x4b9c15(0x109):''))):console[a0_0x4b9c15(0x12c)](a0_0x4b9c15(0x101));}}catch(a0_0x19b522){console[a0_0x4b9c15(0x10c)](a0_0x4b9c15(0x11c),a0_0x19b522[a0_0x4b9c15(0x116)]);}const javaPackage=config[a0_0x4b9c15(0x14b)][a0_0x4b9c15(0x133)]('.')[a0_0x4b9c15(0x123)]('/'),srcPath=a0_0x4b9c15(0x104)+javaPackage;function projectHasActivityInPackage(){const _0x3e3a96=a0_0x4b9c15;if(!fs[_0x3e3a96(0x140)](srcPath))return![];try{const _0x27fc9f=fs[_0x3e3a96(0xe4)](srcPath);for(const _0x26d727 of _0x27fc9f){if(_0x26d727['endsWith'](_0x3e3a96(0xf0))){const _0xadc63e=fs[_0x3e3a96(0xfb)](path[_0x3e3a96(0x123)](srcPath,_0x26d727),_0x3e3a96(0x13b));if(_0x26d727===_0x3e3a96(0xf6)||/extends\s+Activity/[_0x3e3a96(0x10b)](_0xadc63e)||/class\s+MainActivity/['test'](_0xadc63e))return!![];}}}catch(_0x128592){}return![];}if(!projectHasActivityInPackage()){!fs[a0_0x4b9c15(0x140)](srcPath)&&fs[a0_0x4b9c15(0x143)](srcPath,{'recursive':!![]});const mainActivityJava=GENERATED_MARKER+a0_0x4b9c15(0xf7)+config[a0_0x4b9c15(0x14b)]+a0_0x4b9c15(0x13e)+config[a0_0x4b9c15(0x14e)]+a0_0x4b9c15(0x137),mainPath=path[a0_0x4b9c15(0x123)](srcPath,a0_0x4b9c15(0xf6));fs[a0_0x4b9c15(0x11e)](mainPath,mainActivityJava,a0_0x4b9c15(0x13b));try{let mcont=fs[a0_0x4b9c15(0xfb)](mainPath,a0_0x4b9c15(0x13b));!mcont['includes'](GENERATED_MARKER)&&(mcont=a0_0x4b9c15(0x121)+GENERATED_MARKER+'\x20'+new Date()['toISOString']()+'\x0a'+mcont,fs[a0_0x4b9c15(0x11e)](mainPath,mcont,a0_0x4b9c15(0x13b)));}catch(a0_0x578744){}console[a0_0x4b9c15(0x12c)](a0_0x4b9c15(0x113));}else console[a0_0x4b9c15(0x12c)](a0_0x4b9c15(0x12a));const rJava='package\x20'+config[a0_0x4b9c15(0x14b)]+';\x0a\x0apublic\x20final\x20class\x20R\x20{\x0a\x20\x20\x20\x20public\x20static\x20final\x20class\x20layout\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20public\x20static\x20final\x20int\x20activity_main\x20=\x200x7f040000;\x0a\x20\x20\x20\x20}\x0a\x20\x20\x20\x20\x0a\x20\x20\x20\x20public\x20static\x20final\x20class\x20id\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20public\x20static\x20final\x20int\x20helloText\x20=\x200x7f080000;\x0a\x20\x20\x20\x20\x20\x20\x20\x20public\x20static\x20final\x20int\x20descriptionText\x20=\x200x7f080001;\x0a\x20\x20\x20\x20}\x0a\x20\x20\x20\x20\x0a\x20\x20\x20\x20public\x20static\x20final\x20class\x20string\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20public\x20static\x20final\x20int\x20app_name\x20=\x200x7f0c0000;\x0a\x20\x20\x20\x20\x20\x20\x20\x20public\x20static\x20final\x20int\x20hello_world\x20=\x200x7f0c0001;\x0a\x20\x20\x20\x20\x20\x20\x20\x20public\x20static\x20final\x20int\x20app_description\x20=\x200x7f0c0002;\x0a\x20\x20\x20\x20\x20\x20\x20\x20public\x20static\x20final\x20int\x20app_version\x20=\x200x7f0c0003;\x0a\x20\x20\x20\x20\x20\x20\x20\x20public\x20static\x20final\x20int\x20action_settings\x20=\x200x7f0c0004;\x0a\x20\x20\x20\x20}\x0a\x20\x20\x20\x20\x0a\x20\x20\x20\x20public\x20static\x20final\x20class\x20mipmap\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20public\x20static\x20final\x20int\x20ic_launcher\x20=\x200x7f060000;\x0a\x20\x20\x20\x20}\x0a\x20\x20\x20\x20\x0a\x20\x20\x20\x20public\x20static\x20final\x20class\x20color\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20public\x20static\x20final\x20int\x20primary\x20=\x200x7f030000;\x0a\x20\x20\x20\x20\x20\x20\x20\x20public\x20static\x20final\x20int\x20primary_dark\x20=\x200x7f030001;\x0a\x20\x20\x20\x20\x20\x20\x20\x20public\x20static\x20final\x20int\x20accent\x20=\x200x7f030002;\x0a\x20\x20\x20\x20\x20\x20\x20\x20public\x20static\x20final\x20int\x20white\x20=\x200x7f030003;\x0a\x20\x20\x20\x20\x20\x20\x20\x20public\x20static\x20final\x20int\x20black\x20=\x200x7f030004;\x0a\x20\x20\x20\x20\x20\x20\x20\x20public\x20static\x20final\x20int\x20dark_gray\x20=\x200x7f030005;\x0a\x20\x20\x20\x20\x20\x20\x20\x20public\x20static\x20final\x20int\x20light_gray\x20=\x200x7f030006;\x0a\x20\x20\x20\x20}\x0a\x20\x20\x20\x20\x0a\x20\x20\x20\x20public\x20static\x20final\x20class\x20dimen\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20public\x20static\x20final\x20int\x20app_bar_height\x20=\x200x7f050000;\x0a\x20\x20\x20\x20\x20\x20\x20\x20public\x20static\x20final\x20int\x20fab_margin\x20=\x200x7f050001;\x0a\x20\x20\x20\x20\x20\x20\x20\x20public\x20static\x20final\x20int\x20text_margin\x20=\x200x7f050002;\x0a\x20\x20\x20\x20\x20\x20\x20\x20public\x20static\x20final\x20int\x20activity_horizontal_margin\x20=\x200x7f050003;\x0a\x20\x20\x20\x20\x20\x20\x20\x20public\x20static\x20final\x20int\x20activity_vertical_margin\x20=\x200x7f050004;\x0a\x20\x20\x20\x20\x20\x20\x20\x20public\x20static\x20final\x20int\x20text_size_small\x20=\x200x7f050005;\x0a\x20\x20\x20\x20\x20\x20\x20\x20public\x20static\x20final\x20int\x20text_size_normal\x20=\x200x7f050006;\x0a\x20\x20\x20\x20\x20\x20\x20\x20public\x20static\x20final\x20int\x20text_size_large\x20=\x200x7f050007;\x0a\x20\x20\x20\x20\x20\x20\x20\x20public\x20static\x20final\x20int\x20text_size_xlarge\x20=\x200x7f050008;\x0a\x20\x20\x20\x20}\x0a\x20\x20\x20\x20\x0a\x20\x20\x20\x20public\x20static\x20final\x20class\x20style\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20public\x20static\x20final\x20int\x20AppTheme\x20=\x200x7f0e0000;\x0a\x20\x20\x20\x20\x20\x20\x20\x20public\x20static\x20final\x20int\x20AppTheme_NoActionBar\x20=\x200x7f0e0001;\x0a\x20\x20\x20\x20\x20\x20\x20\x20public\x20static\x20final\x20int\x20AppTheme_Fullscreen\x20=\x200x7f0e0002;\x0a\x20\x20\x20\x20}\x0a}';function a0_0x1d84(_0x4e2dfd,_0x5b3147){_0x4e2dfd=_0x4e2dfd-0xe3;const _0x4ce06e=a0_0x4ce0();let _0x1d84a6=_0x4ce06e[_0x4e2dfd];return _0x1d84a6;}console['log'](a0_0x4b9c15(0xfe)),console['log'](a0_0x4b9c15(0xff)),console[a0_0x4b9c15(0x12c)]('\x20\x20-\x20Backup\x20créé\x20automatiquement:\x20.backup/[timestamp]/'),console['log'](a0_0x4b9c15(0x14c)),console['log'](a0_0x4b9c15(0x13a)+projectDir);
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
|
|
3
|
+
const a0_0xfae0ae=a0_0x24f6;(function(_0x24d44c,_0x525b98){const _0x3a2e49=a0_0x24f6,_0x1b948d=_0x24d44c();while(!![]){try{const _0x2b4d42=-parseInt(_0x3a2e49(0x107))/0x1*(parseInt(_0x3a2e49(0x127))/0x2)+-parseInt(_0x3a2e49(0x12a))/0x3+-parseInt(_0x3a2e49(0x143))/0x4+parseInt(_0x3a2e49(0x13b))/0x5+parseInt(_0x3a2e49(0x110))/0x6+parseInt(_0x3a2e49(0x117))/0x7+-parseInt(_0x3a2e49(0x130))/0x8*(-parseInt(_0x3a2e49(0x132))/0x9);if(_0x2b4d42===_0x525b98)break;else _0x1b948d['push'](_0x1b948d['shift']());}catch(_0x5e0608){_0x1b948d['push'](_0x1b948d['shift']());}}}(a0_0x358f,0x31400));const fs=require('fs'),path=require(a0_0xfae0ae(0x108)),crypto=require(a0_0xfae0ae(0x123)),projectDir=process[a0_0xfae0ae(0x13a)][0x2]||process[a0_0xfae0ae(0x10a)](),command=process[a0_0xfae0ae(0x13a)][0x3]||'list',configPath=path[a0_0xfae0ae(0x122)](projectDir,a0_0xfae0ae(0x144)),buildDir=path[a0_0xfae0ae(0x122)](projectDir,'build'),libsDir=path[a0_0xfae0ae(0x122)](buildDir,a0_0xfae0ae(0x129));!fs[a0_0xfae0ae(0x111)](configPath)&&(console[a0_0xfae0ae(0x100)](a0_0xfae0ae(0x118)),process[a0_0xfae0ae(0x135)](0x1));const appConfig=JSON[a0_0xfae0ae(0x131)](fs[a0_0xfae0ae(0x13f)](configPath,a0_0xfae0ae(0x102)));function a0_0x24f6(_0x5b081a,_0x9f00ca){_0x5b081a=_0x5b081a-0xfe;const _0x358f44=a0_0x358f();let _0x24f67f=_0x358f44[_0x5b081a];return _0x24f67f;}function listDependencies(){const _0x47b5ff=a0_0xfae0ae;console['log'](_0x47b5ff(0x12c));if(!appConfig[_0x47b5ff(0x112)]){console[_0x47b5ff(0x126)](_0x47b5ff(0x134));return;}appConfig['dependencies'][_0x47b5ff(0x105)]&&appConfig[_0x47b5ff(0x112)]['androidx']['length']>0x0&&(console[_0x47b5ff(0x126)](_0x47b5ff(0x11a)),appConfig[_0x47b5ff(0x112)][_0x47b5ff(0x105)][_0x47b5ff(0x139)]((_0x1849bc,_0x2d7e1b)=>{const _0x13fd43=_0x47b5ff;console[_0x13fd43(0x126)]('\x20\x20'+(_0x2d7e1b+0x1)+'.\x20'+_0x1849bc['name']);}),console[_0x47b5ff(0x126)]('')),appConfig['dependencies'][_0x47b5ff(0x136)]&&appConfig[_0x47b5ff(0x112)][_0x47b5ff(0x136)][_0x47b5ff(0x140)]>0x0&&(console[_0x47b5ff(0x126)](_0x47b5ff(0x11b)),appConfig[_0x47b5ff(0x112)]['custom'][_0x47b5ff(0x139)]((_0x4d3337,_0xbf9cb)=>{const _0x57eddf=_0x47b5ff;console[_0x57eddf(0x126)]('\x20\x20'+(_0xbf9cb+0x1)+'.\x20'+_0x4d3337[_0x57eddf(0x13d)]);}),console[_0x47b5ff(0x126)](''));}function checkDownloaded(){const _0x2e53aa=a0_0xfae0ae;console[_0x2e53aa(0x126)]('\x0a✅\x20Vérification\x20des\x20dépendances\x20téléchargées\x0a');if(!fs[_0x2e53aa(0x111)](libsDir)){console['log'](_0x2e53aa(0x119));return;}const _0x5d514e=fs[_0x2e53aa(0x128)](libsDir)[_0x2e53aa(0x10e)](_0x4a704d=>_0x4a704d[_0x2e53aa(0x101)](_0x2e53aa(0x137)));if(_0x5d514e[_0x2e53aa(0x140)]===0x0){console['log'](_0x2e53aa(0x142));return;}console[_0x2e53aa(0x126)]('📥\x20'+_0x5d514e[_0x2e53aa(0x140)]+_0x2e53aa(0x13c)),_0x5d514e[_0x2e53aa(0x139)](_0x2d2cfd=>{const _0x4159c4=_0x2e53aa,_0x537c96=path[_0x4159c4(0x122)](libsDir,_0x2d2cfd),_0x72d1cc=fs['statSync'](_0x537c96),_0x5b0c14=(_0x72d1cc['size']/0x400/0x400)[_0x4159c4(0x11f)](0x2),_0x52e67e=_0x72d1cc[_0x4159c4(0x11c)][_0x4159c4(0x115)](_0x4159c4(0x12e),{'year':'numeric','month':_0x4159c4(0x116),'day':'2-digit','hour':_0x4159c4(0x116),'minute':_0x4159c4(0x116)});console[_0x4159c4(0x126)](_0x4159c4(0x12d)+_0x2d2cfd),console[_0x4159c4(0x126)]('\x20\x20\x20\x20Taille:\x20'+_0x5b0c14+'\x20MB'),console['log'](_0x4159c4(0x10d)+_0x52e67e+'\x0a');});}function a0_0x358f(){const _0x20732c=['statSync','log','146LuOcMs','readdirSync','libs','619431sbIJQT','list','\x0a📦\x20Dépendances\x20déclarées\x20dans\x20app-config.json\x0a','\x20\x20✓\x20','fr-FR','\x20MB)','16NxEKZw','parse','2869884QgsYNQ','Vérification\x20de\x20','\x20\x20Aucune\x20dépendance\x20trouvée','exit','custom','.aar','\x0aUtilitaire\x20de\x20gestion\x20des\x20dépendances\x0a\x0aUtilisation:\x20node\x20manage-dependencies.js\x20/chemin/vers/projet\x20[commande]\x0a\x0aCommandes:\x0a\x20\x20list\x20\x20\x20\x20\x20\x20-\x20Afficher\x20les\x20dépendances\x20déclarées\x20(défaut)\x0a\x20\x20check\x20\x20\x20\x20\x20-\x20Vérifier\x20les\x20dépendances\x20téléchargées\x0a\x20\x20clean\x20\x20\x20\x20\x20-\x20Supprimer\x20tous\x20les\x20AAR\x20téléchargés\x0a\x20\x20verify\x20\x20\x20\x20-\x20Vérifier\x20l\x27intégrité\x20des\x20fichiers\x20AAR\x0a\x20\x20help\x20\x20\x20\x20\x20\x20-\x20Afficher\x20cette\x20aide\x0a\x0aExemples:\x0a\x20\x20node\x20manage-dependencies.js\x20.\x20list\x0a\x20\x20node\x20manage-dependencies.js\x20.\x20check\x0a\x20\x20node\x20manage-dependencies.js\x20.\x20clean\x0a\x20\x20node\x20manage-dependencies.js\x20.\x20verify\x0a\x20\x20\x20\x20','forEach','argv','601580ecEobA','\x20fichier(s)\x20trouvé(s):\x0a','name','verify','readFileSync','length','✓\x20Supprimé:\x20','❌\x20Aucune\x20dépendance\x20téléchargée\x0a','405520iWVgds','app-config.json','Rien\x20à\x20nettoyer\x20(répertoire\x20non\x20trouvé)\x0a','readSync','error','endsWith','utf-8','\x20fichier(s):\x0a','unlinkSync','androidx','Aucune\x20dépendance\x20à\x20vérifier\x0a','5333LksopN','path','\x0a🔍\x20Vérification\x20de\x20l\x27intégrité\x20des\x20dépendances\x0a','cwd','\x20-\x20INVALIDE\x20(format\x20corrompu)','closeSync','\x20\x20\x20\x20Modifié:\x20','filter','size','706320CurRIV','existsSync','dependencies','\x20-\x20Valide\x20(','alloc','toLocaleDateString','2-digit','161742tKciHV','ERREUR:\x20app-config.json\x20non\x20trouvé','❌\x20Aucune\x20dépendance\x20téléchargée\x20(répertoire\x20build/libs/\x20non\x20trouvé)\x0a','📱\x20AndroidX:','📦\x20Personnalisées:','mtime','\x0a✅\x20','Aucune\x20dépendance\x20trouvée\x0a','toFixed','\x20fichier(s)\x20supprimé(s)\x0a','check','join','crypto','\x0a🗑️\x20\x20Nettoyage\x20des\x20dépendances\x0a'];a0_0x358f=function(){return _0x20732c;};return a0_0x358f();}function cleanDependencies(){const _0x43ef95=a0_0xfae0ae;console[_0x43ef95(0x126)](_0x43ef95(0x124));if(!fs[_0x43ef95(0x111)](libsDir)){console[_0x43ef95(0x126)](_0x43ef95(0xfe));return;}const _0x4b2299=fs[_0x43ef95(0x128)](libsDir)[_0x43ef95(0x10e)](_0x530213=>_0x530213[_0x43ef95(0x101)](_0x43ef95(0x137)));if(_0x4b2299[_0x43ef95(0x140)]===0x0){console[_0x43ef95(0x126)]('Rien\x20à\x20nettoyer\x0a');return;}for(const _0x1720ff of _0x4b2299){const _0xf08235=path[_0x43ef95(0x122)](libsDir,_0x1720ff);fs[_0x43ef95(0x104)](_0xf08235),console[_0x43ef95(0x126)](_0x43ef95(0x141)+_0x1720ff);}console[_0x43ef95(0x126)](_0x43ef95(0x11d)+_0x4b2299[_0x43ef95(0x140)]+_0x43ef95(0x120));}function verifiyIntegrity(){const _0x496f0f=a0_0xfae0ae;console[_0x496f0f(0x126)](_0x496f0f(0x109));if(!fs[_0x496f0f(0x111)](libsDir)){console[_0x496f0f(0x126)](_0x496f0f(0x106));return;}const _0xf30ada=fs[_0x496f0f(0x128)](libsDir)[_0x496f0f(0x10e)](_0x77fcd1=>_0x77fcd1[_0x496f0f(0x101)](_0x496f0f(0x137)));if(_0xf30ada[_0x496f0f(0x140)]===0x0){console[_0x496f0f(0x126)](_0x496f0f(0x11e));return;}console[_0x496f0f(0x126)](_0x496f0f(0x133)+_0xf30ada[_0x496f0f(0x140)]+_0x496f0f(0x103)),_0xf30ada[_0x496f0f(0x139)](_0x35b732=>{const _0x1e33cf=_0x496f0f,_0x36db1a=path['join'](libsDir,_0x35b732),_0x5a88d9=fs[_0x1e33cf(0x125)](_0x36db1a),_0x19eb90=Buffer[_0x1e33cf(0x114)](0x4),_0x4336a0=fs['openSync'](_0x36db1a,'r');fs[_0x1e33cf(0xff)](_0x4336a0,_0x19eb90,0x0,0x4,0x0),fs[_0x1e33cf(0x10c)](_0x4336a0);const _0x5a5e2c=_0x19eb90[0x0]===0x50&&_0x19eb90[0x1]===0x4b&&_0x19eb90[0x2]===0x3&&_0x19eb90[0x3]===0x4;_0x5a5e2c?console[_0x1e33cf(0x126)]('✓\x20'+_0x35b732+_0x1e33cf(0x113)+(_0x5a88d9[_0x1e33cf(0x10f)]/0x400/0x400)[_0x1e33cf(0x11f)](0x2)+_0x1e33cf(0x12f)):console[_0x1e33cf(0x126)]('✗\x20'+_0x35b732+_0x1e33cf(0x10b));}),console[_0x496f0f(0x126)]('');}function showHelp(){const _0x331e7a=a0_0xfae0ae;console[_0x331e7a(0x126)](_0x331e7a(0x138));}switch(command['toLowerCase']()){case a0_0xfae0ae(0x12b):listDependencies();break;case a0_0xfae0ae(0x121):checkDownloaded();break;case'clean':cleanDependencies();break;case a0_0xfae0ae(0x13e):verifiyIntegrity();break;case'help':showHelp();break;default:listDependencies();}
|
|
@@ -0,0 +1,203 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
|
|
3
|
+
const fs = require('fs');
|
|
4
|
+
const path = require('path');
|
|
5
|
+
const https = require('https');
|
|
6
|
+
const http = require('http');
|
|
7
|
+
|
|
8
|
+
/**
|
|
9
|
+
* Gestionnaire automatique de dépendances
|
|
10
|
+
* Lit les dépendances depuis app-config.json et les traite automatiquement
|
|
11
|
+
*/
|
|
12
|
+
|
|
13
|
+
const projectDir = process.argv[2] || process.cwd();
|
|
14
|
+
const configPath = path.join(projectDir, 'app-config.json');
|
|
15
|
+
const buildDir = path.join(projectDir, 'build');
|
|
16
|
+
const libsDir = path.join(buildDir, 'libs');
|
|
17
|
+
|
|
18
|
+
// Vérifier que app-config.json existe
|
|
19
|
+
if (!fs.existsSync(configPath)) {
|
|
20
|
+
console.error('ERREUR: app-config.json non trouvé');
|
|
21
|
+
process.exit(1);
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
// Charger la configuration
|
|
25
|
+
const appConfig = JSON.parse(fs.readFileSync(configPath, 'utf-8'));
|
|
26
|
+
|
|
27
|
+
// Créer le répertoire des libs
|
|
28
|
+
if (!fs.existsSync(libsDir)) {
|
|
29
|
+
fs.mkdirSync(libsDir, { recursive: true });
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
const MAVEN_GOOGLE = 'https://maven.google.com';
|
|
33
|
+
const MAVEN_CENTRAL = 'https://repo.maven.apache.org/maven2';
|
|
34
|
+
|
|
35
|
+
console.log('📦 Traitement automatique des dépendances\n');
|
|
36
|
+
|
|
37
|
+
// Vérifier s'il y a des dépendances
|
|
38
|
+
if (!appConfig.dependencies) {
|
|
39
|
+
console.log('ℹ️ Aucune dépendance déclarée dans app-config.json');
|
|
40
|
+
process.exit(0);
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
const allDeps = [];
|
|
44
|
+
|
|
45
|
+
// Traiter les dépendances AndroidX
|
|
46
|
+
if (appConfig.dependencies.androidx && Array.isArray(appConfig.dependencies.androidx)) {
|
|
47
|
+
console.log('📥 Dépendances AndroidX trouvées:\n');
|
|
48
|
+
|
|
49
|
+
for (const dep of appConfig.dependencies.androidx) {
|
|
50
|
+
console.log(` - ${dep.name}`);
|
|
51
|
+
allDeps.push({
|
|
52
|
+
type: 'androidx',
|
|
53
|
+
name: dep.name,
|
|
54
|
+
artifact: dep.aar,
|
|
55
|
+
filename: path.basename(dep.aar)
|
|
56
|
+
});
|
|
57
|
+
}
|
|
58
|
+
console.log('');
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
// Traiter les dépendances personnalisées
|
|
62
|
+
if (appConfig.dependencies.custom && Array.isArray(appConfig.dependencies.custom)) {
|
|
63
|
+
console.log('📥 Dépendances personnalisées trouvées:\n');
|
|
64
|
+
|
|
65
|
+
for (const dep of appConfig.dependencies.custom) {
|
|
66
|
+
console.log(` - ${dep.name}`);
|
|
67
|
+
allDeps.push({
|
|
68
|
+
type: 'custom',
|
|
69
|
+
name: dep.name,
|
|
70
|
+
artifact: dep.aar || dep.url,
|
|
71
|
+
filename: dep.filename || path.basename(dep.aar || dep.url)
|
|
72
|
+
});
|
|
73
|
+
}
|
|
74
|
+
console.log('');
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
if (allDeps.length === 0) {
|
|
78
|
+
console.log('ℹ️ Aucune dépendance à traiter');
|
|
79
|
+
process.exit(0);
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
// Créer le fichier de configuration pour le compilateur
|
|
83
|
+
const depsConfig = {
|
|
84
|
+
projectName: appConfig.appName,
|
|
85
|
+
packageName: appConfig.packageName,
|
|
86
|
+
dependencies: allDeps.map(d => ({
|
|
87
|
+
name: d.name,
|
|
88
|
+
type: d.type,
|
|
89
|
+
local: path.join(libsDir, d.filename),
|
|
90
|
+
aar: path.join(libsDir, d.filename),
|
|
91
|
+
classes: path.join(libsDir, d.filename.replace('.aar', '.jar'))
|
|
92
|
+
}))
|
|
93
|
+
};
|
|
94
|
+
|
|
95
|
+
const depsConfigPath = path.join(buildDir, 'dependencies-config.json');
|
|
96
|
+
fs.writeFileSync(depsConfigPath, JSON.stringify(depsConfig, null, 2), 'utf-8');
|
|
97
|
+
|
|
98
|
+
console.log(`✓ Configuration des dépendances créée: ${depsConfigPath}\n`);
|
|
99
|
+
|
|
100
|
+
// Fonction pour télécharger une dépendance
|
|
101
|
+
async function downloadDependency(url, filepath) {
|
|
102
|
+
return new Promise((resolve, reject) => {
|
|
103
|
+
const protocol = url.startsWith('https') ? https : http;
|
|
104
|
+
|
|
105
|
+
const file = fs.createWriteStream(filepath);
|
|
106
|
+
|
|
107
|
+
protocol.get(url, (response) => {
|
|
108
|
+
// Gérer les redirections
|
|
109
|
+
if (response.statusCode === 302 || response.statusCode === 301) {
|
|
110
|
+
downloadDependency(response.headers.location, filepath)
|
|
111
|
+
.then(resolve)
|
|
112
|
+
.catch(reject);
|
|
113
|
+
return;
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
if (response.statusCode !== 200) {
|
|
117
|
+
reject(new Error(`Status ${response.statusCode}`));
|
|
118
|
+
return;
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
response.pipe(file);
|
|
122
|
+
|
|
123
|
+
file.on('finish', () => {
|
|
124
|
+
file.close();
|
|
125
|
+
resolve();
|
|
126
|
+
});
|
|
127
|
+
}).on('error', (err) => {
|
|
128
|
+
fs.unlink(filepath, () => {});
|
|
129
|
+
reject(err);
|
|
130
|
+
});
|
|
131
|
+
});
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
// Télécharger les dépendances
|
|
135
|
+
async function downloadAll() {
|
|
136
|
+
console.log('📥 Vérification des dépendances...\n');
|
|
137
|
+
|
|
138
|
+
let downloadedCount = 0;
|
|
139
|
+
let skippedCount = 0;
|
|
140
|
+
let errorCount = 0;
|
|
141
|
+
|
|
142
|
+
for (const dep of allDeps) {
|
|
143
|
+
const filepath = path.join(libsDir, dep.filename);
|
|
144
|
+
|
|
145
|
+
// Vérifier si le fichier existe déjà
|
|
146
|
+
if (fs.existsSync(filepath)) {
|
|
147
|
+
const stats = fs.statSync(filepath);
|
|
148
|
+
const sizeMB = (stats.size / 1024 / 1024).toFixed(2);
|
|
149
|
+
console.log(`✓ Existe déjà: ${dep.filename} (${sizeMB} MB)`);
|
|
150
|
+
skippedCount++;
|
|
151
|
+
continue;
|
|
152
|
+
}
|
|
153
|
+
|
|
154
|
+
console.log(`📥 Téléchargement: ${dep.name}`);
|
|
155
|
+
|
|
156
|
+
try {
|
|
157
|
+
let url = dep.artifact;
|
|
158
|
+
|
|
159
|
+
// Si c'est une dépendance AndroidX, construire l'URL Maven
|
|
160
|
+
if (dep.type === 'androidx' && !dep.artifact.startsWith('http')) {
|
|
161
|
+
// Essayer Maven Google en premier
|
|
162
|
+
try {
|
|
163
|
+
await downloadDependency(`${MAVEN_GOOGLE}/${dep.artifact}`, filepath);
|
|
164
|
+
const stats = fs.statSync(filepath);
|
|
165
|
+
const sizeMB = (stats.size / 1024 / 1024).toFixed(2);
|
|
166
|
+
console.log(`✓ Téléchargé: ${dep.filename} (${sizeMB} MB)\n`);
|
|
167
|
+
downloadedCount++;
|
|
168
|
+
} catch (e) {
|
|
169
|
+
// Fallback sur Maven Central
|
|
170
|
+
await downloadDependency(`${MAVEN_CENTRAL}/${dep.artifact}`, filepath);
|
|
171
|
+
const stats = fs.statSync(filepath);
|
|
172
|
+
const sizeMB = (stats.size / 1024 / 1024).toFixed(2);
|
|
173
|
+
console.log(`✓ Téléchargé: ${dep.filename} (${sizeMB} MB)\n`);
|
|
174
|
+
downloadedCount++;
|
|
175
|
+
}
|
|
176
|
+
} else {
|
|
177
|
+
// URL personnalisée directe
|
|
178
|
+
await downloadDependency(url, filepath);
|
|
179
|
+
const stats = fs.statSync(filepath);
|
|
180
|
+
const sizeMB = (stats.size / 1024 / 1024).toFixed(2);
|
|
181
|
+
console.log(`✓ Téléchargé: ${dep.filename} (${sizeMB} MB)\n`);
|
|
182
|
+
downloadedCount++;
|
|
183
|
+
}
|
|
184
|
+
} catch (error) {
|
|
185
|
+
console.error(`✗ Erreur: ${dep.name} - ${error.message}\n`);
|
|
186
|
+
errorCount++;
|
|
187
|
+
}
|
|
188
|
+
}
|
|
189
|
+
|
|
190
|
+
console.log('\n📊 Résumé:');
|
|
191
|
+
console.log(` 📥 Téléchargés: ${downloadedCount}`);
|
|
192
|
+
console.log(` ✓ Existants: ${skippedCount}`);
|
|
193
|
+
if (errorCount > 0) {
|
|
194
|
+
console.log(` ✗ Erreurs: ${errorCount}`);
|
|
195
|
+
}
|
|
196
|
+
console.log(`\n✅ Dépendances disponibles dans: ${libsDir}`);
|
|
197
|
+
}
|
|
198
|
+
|
|
199
|
+
// Lancer le téléchargement
|
|
200
|
+
downloadAll().catch(err => {
|
|
201
|
+
console.error('\nERREUR:', err.message);
|
|
202
|
+
process.exit(1);
|
|
203
|
+
});
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
|
|
3
|
+
const a0_0x590520=a0_0x31c7;(function(_0x1c5980,_0x463ef9){const _0x2bd761=a0_0x31c7,_0x45a5b0=_0x1c5980();while(!![]){try{const _0x3362e2=parseInt(_0x2bd761(0x149))/0x1+-parseInt(_0x2bd761(0x178))/0x2*(parseInt(_0x2bd761(0x12d))/0x3)+-parseInt(_0x2bd761(0x150))/0x4*(-parseInt(_0x2bd761(0x15f))/0x5)+parseInt(_0x2bd761(0x13f))/0x6+parseInt(_0x2bd761(0x164))/0x7*(parseInt(_0x2bd761(0x17c))/0x8)+-parseInt(_0x2bd761(0x144))/0x9*(parseInt(_0x2bd761(0x11f))/0xa)+-parseInt(_0x2bd761(0x152))/0xb;if(_0x3362e2===_0x463ef9)break;else _0x45a5b0['push'](_0x45a5b0['shift']());}catch(_0x31d329){_0x45a5b0['push'](_0x45a5b0['shift']());}}}(a0_0x10ac,0x503e4));const fs=require('fs'),path=require(a0_0x590520(0x12f)),https=require(a0_0x590520(0x16e)),http=require('http'),{execSync}=require(a0_0x590520(0x168)),projectDir=process[a0_0x590520(0x17a)][0x2]||process[a0_0x590520(0x14f)](),buildDir=path[a0_0x590520(0x165)](projectDir,a0_0x590520(0x176)),libsDir=path['join'](buildDir,'libs'),libsExtractedDir=path[a0_0x590520(0x165)](buildDir,a0_0x590520(0x136)),MAVEN_GOOGLE=a0_0x590520(0x122),MAVEN_CENTRAL=a0_0x590520(0x139);console[a0_0x590520(0x129)](a0_0x590520(0x15b));function getSevenZipPath(){const _0x4dd862=a0_0x590520,_0x1a797d=__dirname,_0x5e2b3c=process[_0x4dd862(0x14e)],_0x49b060=process[_0x4dd862(0x159)];if(_0x5e2b3c===_0x4dd862(0x160)){const _0x1bedb7=_0x49b060===_0x4dd862(0x132)?_0x4dd862(0x132):_0x49b060===_0x4dd862(0x131)?'arm64':_0x4dd862(0x13b);return path['join'](_0x1a797d,_0x4dd862(0x151),'7zip-bin',_0x4dd862(0x180),_0x1bedb7,_0x4dd862(0x12e));}else{if(_0x5e2b3c===_0x4dd862(0x137))return path[_0x4dd862(0x165)](_0x1a797d,_0x4dd862(0x151),_0x4dd862(0x123),_0x4dd862(0x137),_0x4dd862(0x132),'7za');else{if(_0x5e2b3c==='darwin')return path[_0x4dd862(0x165)](_0x1a797d,_0x4dd862(0x151),_0x4dd862(0x123),_0x4dd862(0x16f),'x64','7za');}}throw new Error(_0x4dd862(0x12a)+_0x5e2b3c);}function a0_0x10ac(){const _0x2a88cc=['\x20\x20→\x20','69769qBKAru','join','group','filter','child_process','now','\x20\x20✓\x20Existantes:\x20','toFixed','✓\x20Aucune\x20dépendance\x20transitive\x20trouvée\x0a','\x22\x20\x22META-INF/pom.xml\x22\x20-o\x22','https','mac','\x20(trouvé\x20dans\x20','readdirSync','finish','version','pipe','\x20dépendance(s)\x20transitive(s)\x20téléchargée(s)','build','message','88NVHeWa','Status\x20','argv','compile','280wgQLTg','createWriteStream','\x20\x20✓\x20Téléchargé:\x20','\x22\x20-y','win','\x0a📊\x20Résumé\x20des\x20dépendances\x20transitives:','existsSync','6830GpWiDj','readFileSync','\x0a✅\x20','https://maven.google.com','7zip-bin','\x0a🔽\x20Dépendances\x20transitives\x20détectées:\x20','set','\x20MB)\x0a','warn','replace','log','Plateforme\x20non\x20supportée:\x20','toString','has','3732dvgQnX','7za.exe','path','exit','arm64','x64','📋\x20Scanning\x20des\x20AARs\x20pour\x20les\x20pom.xml...\x0a','location','provided','libs-extracted','linux','.aar','https://repo.maven.apache.org/maven2','✓\x20Existe\x20déjà:\x20','ia32','utf8','\x20\x20⚠\x20Impossible\x20de\x20parser\x20','statusCode','2034366wlqvzB','match','unlink','Échec\x20sur\x20Google\x20et\x20Central:\x20','get','4185QfedhU','substr','basename','\x20-\x20','startsWith','467616XbmkpX','META-INF','close','headers','\x0aERREUR:','platform','cwd','368212CYbRBB','vendor','8037414lCRkYI','\x0a✅\x20Toutes\x20les\x20dépendances\x20transitives\x20étaient\x20déjà\x20présentes','rmSync','endsWith','📥\x20Téléchargement\x20des\x20dépendances\x20transitives...\x0a','catch','ℹ️\x20\x20Aucun\x20répertoire\x20libs\x20trouvé','arch','\x22\x20x\x20\x22','🔗\x20Résolution\x20des\x20dépendances\x20transitives\x0a','size','random','then','15OCoBwQ','win32','\x20\x20✗\x20Erreurs:\x20','error'];a0_0x10ac=function(){return _0x2a88cc;};return a0_0x10ac();}const SEVENZIP=getSevenZipPath();!fs[a0_0x590520(0x182)](libsDir)&&(console[a0_0x590520(0x129)](a0_0x590520(0x158)),process['exit'](0x0));function a0_0x31c7(_0x50a2aa,_0x5c51e0){_0x50a2aa=_0x50a2aa-0x11f;const _0x10aca3=a0_0x10ac();let _0x31c7a7=_0x10aca3[_0x50a2aa];return _0x31c7a7;}const transitiveDeps=new Map(),processedAars=new Set();function extractAndParsePom(_0x398731){const _0x52bde8=a0_0x590520,_0x6c8f31=path[_0x52bde8(0x146)](_0x398731);if(processedAars[_0x52bde8(0x12c)](_0x6c8f31))return;processedAars['add'](_0x6c8f31);try{const _0x5026c9=path['join'](libsExtractedDir,'temp_pom_'+Date[_0x52bde8(0x169)]()+'_'+Math[_0x52bde8(0x15d)]()[_0x52bde8(0x12b)](0x24)[_0x52bde8(0x145)](0x2,0x9));fs['mkdirSync'](_0x5026c9,{'recursive':!![]});const _0x451291='\x22'+SEVENZIP+_0x52bde8(0x15a)+_0x398731+_0x52bde8(0x16d)+_0x5026c9+_0x52bde8(0x17f);try{execSync(_0x451291,{'stdio':_0x52bde8(0x174),'shell':'cmd.exe'});}catch(_0x274a2){fs[_0x52bde8(0x154)](_0x5026c9,{'recursive':!![],'force':!![]});return;}const _0x47ae3a=path['join'](_0x5026c9,_0x52bde8(0x14a),'pom.xml');if(!fs[_0x52bde8(0x182)](_0x47ae3a)){fs['rmSync'](_0x5026c9,{'recursive':!![],'force':!![]});return;}const _0x2c0ed6=fs[_0x52bde8(0x120)](_0x47ae3a,_0x52bde8(0x13c)),_0x4ea4ac=/<dependency>([\s\S]*?)<\/dependency>/g;let _0x43d904;while((_0x43d904=_0x4ea4ac['exec'](_0x2c0ed6))!==null){const _0x29825d=_0x43d904[0x1],_0x58d9a0=_0x29825d['match'](/<groupId>([^<]+)<\/groupId>/),_0x1b5e48=_0x29825d[_0x52bde8(0x140)](/<artifactId>([^<]+)<\/artifactId>/),_0x5eba50=_0x29825d['match'](/<version>([^<]+)<\/version>/),_0x5d8ab9=_0x29825d['match'](/<scope>([^<]+)<\/scope>/);if(!_0x58d9a0||!_0x1b5e48)continue;const _0x8d9157=_0x58d9a0[0x1],_0x3c4caa=_0x1b5e48[0x1],_0x5e5671=_0x5eba50?_0x5eba50[0x1]:'UNKNOWN',_0x464ad2=_0x5d8ab9?_0x5d8ab9[0x1]:_0x52bde8(0x17b);if(_0x464ad2==='test'||_0x464ad2===_0x52bde8(0x135))continue;const _0x35f084=_0x8d9157+':'+_0x3c4caa,_0x1ea8d0=_0x8d9157+':'+_0x3c4caa+':'+_0x5e5671;!transitiveDeps['has'](_0x35f084)&&(console[_0x52bde8(0x129)](_0x52bde8(0x163)+_0x1ea8d0+_0x52bde8(0x170)+_0x6c8f31+')'),transitiveDeps[_0x52bde8(0x125)](_0x35f084,{'group':_0x8d9157,'artifact':_0x3c4caa,'version':_0x5e5671,'scope':_0x464ad2}));}fs[_0x52bde8(0x154)](_0x5026c9,{'recursive':!![],'force':!![]});}catch(_0x786267){console[_0x52bde8(0x127)](_0x52bde8(0x13d)+_0x6c8f31+':\x20'+_0x786267[_0x52bde8(0x177)]);}}console[a0_0x590520(0x129)](a0_0x590520(0x133));const aarFiles=fs[a0_0x590520(0x171)](libsDir)[a0_0x590520(0x167)](_0x18c83d=>_0x18c83d[a0_0x590520(0x155)](a0_0x590520(0x138)));for(const aarFile of aarFiles){const aarPath=path['join'](libsDir,aarFile);extractAndParsePom(aarPath);}transitiveDeps['size']===0x0&&(console[a0_0x590520(0x129)](a0_0x590520(0x16c)),process[a0_0x590520(0x130)](0x0));console[a0_0x590520(0x129)](a0_0x590520(0x124)+transitiveDeps['size']+'\x0a');async function downloadDependency(_0x33810c,_0x5158ce){return new Promise((_0x137656,_0x344bf6)=>{const _0x3c8124=a0_0x31c7,_0xe58699=_0x33810c[_0x3c8124(0x148)](_0x3c8124(0x16e))?https:http,_0x15f646=fs[_0x3c8124(0x17d)](_0x5158ce);_0xe58699[_0x3c8124(0x143)](_0x33810c,_0x39f9f5=>{const _0x4b4d27=_0x3c8124;if(_0x39f9f5[_0x4b4d27(0x13e)]===0x12e||_0x39f9f5[_0x4b4d27(0x13e)]===0x12d){downloadDependency(_0x39f9f5[_0x4b4d27(0x14c)][_0x4b4d27(0x134)],_0x5158ce)[_0x4b4d27(0x15e)](_0x137656)[_0x4b4d27(0x157)](_0x344bf6);return;}if(_0x39f9f5[_0x4b4d27(0x13e)]!==0xc8){_0x344bf6(new Error(_0x4b4d27(0x179)+_0x39f9f5['statusCode']));return;}_0x39f9f5['pipe'](_0x15f646),_0x15f646['on'](_0x4b4d27(0x172),()=>{const _0x3f1221=_0x4b4d27;_0x15f646[_0x3f1221(0x14b)](),_0x137656();});})['on']('error',_0x1cc994=>{const _0x2d12ee=_0x3c8124;fs[_0x2d12ee(0x141)](_0x5158ce,()=>{}),_0x344bf6(_0x1cc994);});});}async function downloadTransitiveDeps(){const _0x25a6a4=a0_0x590520;let _0x3272a6=0x0,_0xc9bbb3=0x0,_0x360a1c=0x0;console[_0x25a6a4(0x129)](_0x25a6a4(0x156));for(const [_0x59b976,_0x1c71f1]of transitiveDeps){const _0x420454=_0x1c71f1['artifact']+'-'+_0x1c71f1['version']+_0x25a6a4(0x138),_0x1939b6=path[_0x25a6a4(0x165)](libsDir,_0x420454);if(fs[_0x25a6a4(0x182)](_0x1939b6)){const _0x1f9970=fs['statSync'](_0x1939b6),_0x2242d3=(_0x1f9970[_0x25a6a4(0x15c)]/0x400/0x400)['toFixed'](0x2);console['log'](_0x25a6a4(0x13a)+_0x420454+'\x20('+_0x2242d3+'\x20MB)'),_0xc9bbb3++;continue;}console[_0x25a6a4(0x129)]('📥\x20Téléchargement:\x20'+_0x59b976+':'+_0x1c71f1[_0x25a6a4(0x173)]);try{const _0x3d174f=_0x1c71f1[_0x25a6a4(0x166)][_0x25a6a4(0x128)](/\./g,'/')+'/'+_0x1c71f1['artifact']+'/'+_0x1c71f1[_0x25a6a4(0x173)]+'/'+_0x420454;let _0x267f98=![];try{await downloadDependency(MAVEN_GOOGLE+'/'+_0x3d174f,_0x1939b6),_0x267f98=!![];}catch(_0x4ab1aa){try{await downloadDependency(MAVEN_CENTRAL+'/'+_0x3d174f,_0x1939b6),_0x267f98=!![];}catch(_0x1ec7ef){throw new Error(_0x25a6a4(0x142)+_0x1ec7ef[_0x25a6a4(0x177)]);}}if(_0x267f98){const _0x56f1f0=fs['statSync'](_0x1939b6),_0xdc2c8=(_0x56f1f0[_0x25a6a4(0x15c)]/0x400/0x400)[_0x25a6a4(0x16b)](0x2);console[_0x25a6a4(0x129)](_0x25a6a4(0x17e)+_0x420454+'\x20('+_0xdc2c8+_0x25a6a4(0x126)),_0x3272a6++;}}catch(_0x5af3e1){console[_0x25a6a4(0x162)]('\x20\x20✗\x20Erreur:\x20'+_0x59b976+_0x25a6a4(0x147)+_0x5af3e1[_0x25a6a4(0x177)]+'\x0a'),_0x360a1c++;}}console[_0x25a6a4(0x129)](_0x25a6a4(0x181)),console[_0x25a6a4(0x129)]('\x20\x20📥\x20Téléchargées:\x20'+_0x3272a6),console[_0x25a6a4(0x129)](_0x25a6a4(0x16a)+_0xc9bbb3);_0x360a1c>0x0&&console[_0x25a6a4(0x129)](_0x25a6a4(0x161)+_0x360a1c);if(_0x3272a6>0x0)console[_0x25a6a4(0x129)](_0x25a6a4(0x121)+_0x3272a6+_0x25a6a4(0x175));else _0xc9bbb3>0x0&&console[_0x25a6a4(0x129)](_0x25a6a4(0x153));}downloadTransitiveDeps()[a0_0x590520(0x157)](_0x333c4f=>{const _0x1af7d0=a0_0x590520;console['error'](_0x1af7d0(0x14d),_0x333c4f[_0x1af7d0(0x177)]),process['exit'](0x1);});
|
|
@@ -0,0 +1,131 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
|
|
3
|
+
const fs = require('fs');
|
|
4
|
+
const path = require('path');
|
|
5
|
+
const { execSync } = require('child_process');
|
|
6
|
+
|
|
7
|
+
/**
|
|
8
|
+
* Gestionnaire de dépendances AndroidX/Material Design pour le builder
|
|
9
|
+
* Télécharge et extrait les AAR (Android Archive) pour les ajouter à la compilation
|
|
10
|
+
*/
|
|
11
|
+
|
|
12
|
+
const projectDir = process.argv[2] || process.cwd();
|
|
13
|
+
const buildDir = path.join(projectDir, 'build');
|
|
14
|
+
const libsDir = path.join(buildDir, 'libs');
|
|
15
|
+
|
|
16
|
+
// Créer le répertoire des libs
|
|
17
|
+
if (!fs.existsSync(libsDir)) {
|
|
18
|
+
fs.mkdirSync(libsDir, { recursive: true });
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
console.log('📦 Configuration des dépendances AndroidX/Material Design\n');
|
|
22
|
+
|
|
23
|
+
// Liste des dépendances AndroidX essentielles (URLs des AAR)
|
|
24
|
+
const dependencies = [
|
|
25
|
+
{
|
|
26
|
+
name: 'androidx.appcompat:appcompat:1.6.1',
|
|
27
|
+
aar: 'androidx/appcompat/appcompat/1.6.1/appcompat-1.6.1.aar',
|
|
28
|
+
local: 'appcompat-1.6.1.aar'
|
|
29
|
+
},
|
|
30
|
+
{
|
|
31
|
+
name: 'com.google.android.material:material:1.9.0',
|
|
32
|
+
aar: 'com/google/android/material/material/1.9.0/material-1.9.0.aar',
|
|
33
|
+
local: 'material-1.9.0.aar'
|
|
34
|
+
},
|
|
35
|
+
{
|
|
36
|
+
name: 'androidx.core:core:1.10.1',
|
|
37
|
+
aar: 'androidx/core/core/1.10.1/core-1.10.1.aar',
|
|
38
|
+
local: 'core-1.10.1.aar'
|
|
39
|
+
},
|
|
40
|
+
{
|
|
41
|
+
name: 'androidx.constraintlayout:constraintlayout:2.1.4',
|
|
42
|
+
aar: 'androidx/constraintlayout/constraintlayout/2.1.4/constraintlayout-2.1.4.aar',
|
|
43
|
+
local: 'constraintlayout-2.1.4.aar'
|
|
44
|
+
}
|
|
45
|
+
];
|
|
46
|
+
|
|
47
|
+
// Créer un fichier de configuration pour les dépendances
|
|
48
|
+
const depsConfig = {
|
|
49
|
+
androidx: true,
|
|
50
|
+
libraries: dependencies.map(d => ({
|
|
51
|
+
name: d.name,
|
|
52
|
+
type: 'aar',
|
|
53
|
+
local: path.join(libsDir, d.local),
|
|
54
|
+
classes: path.join(libsDir, d.local.replace('.aar', '.jar'))
|
|
55
|
+
}))
|
|
56
|
+
};
|
|
57
|
+
|
|
58
|
+
const configPath = path.join(buildDir, 'dependencies.json');
|
|
59
|
+
fs.writeFileSync(configPath, JSON.stringify(depsConfig, null, 2), 'utf-8');
|
|
60
|
+
|
|
61
|
+
console.log('✓ Configuration des dépendances créée:', configPath);
|
|
62
|
+
console.log('');
|
|
63
|
+
console.log('Dépendances configurées:');
|
|
64
|
+
depsConfig.libraries.forEach(lib => {
|
|
65
|
+
console.log(` - ${lib.name}`);
|
|
66
|
+
});
|
|
67
|
+
|
|
68
|
+
console.log('\n💡 Note: Les bibliothèques AAR seront téléchargées lors du premier build');
|
|
69
|
+
console.log(' ou vous pouvez les placer manuellement dans:', libsDir);
|
|
70
|
+
|
|
71
|
+
// Créer un script helper pour extraire les JAR des AAR
|
|
72
|
+
const extractScript = `#!/bin/bash
|
|
73
|
+
# Extrait les fichiers classes.jar de tous les AAR dans le répertoire libs
|
|
74
|
+
|
|
75
|
+
LIBS_DIR="\${1:-.}"
|
|
76
|
+
|
|
77
|
+
for aar in "\$LIBS_DIR"/*.aar; do
|
|
78
|
+
if [ -f "\$aar" ]; then
|
|
79
|
+
jar_name="\$(basename "\$aar" .aar).jar"
|
|
80
|
+
jar_path="\$LIBS_DIR/\$jar_name"
|
|
81
|
+
|
|
82
|
+
echo "Extraction de \$aar..."
|
|
83
|
+
unzip -q -o "\$aar" "classes.jar" -d "\$LIBS_DIR/.tmp"
|
|
84
|
+
|
|
85
|
+
if [ -f "\$LIBS_DIR/.tmp/classes.jar" ]; then
|
|
86
|
+
mv "\$LIBS_DIR/.tmp/classes.jar" "\$jar_path"
|
|
87
|
+
echo "✓ Extrait: \$jar_path"
|
|
88
|
+
fi
|
|
89
|
+
fi
|
|
90
|
+
done
|
|
91
|
+
|
|
92
|
+
rm -rf "\$LIBS_DIR/.tmp"
|
|
93
|
+
echo "Extraction terminée"
|
|
94
|
+
`;
|
|
95
|
+
|
|
96
|
+
const extractScriptPath = path.join(buildDir, 'extract-aar.sh');
|
|
97
|
+
fs.writeFileSync(extractScriptPath, extractScript, 'utf-8');
|
|
98
|
+
|
|
99
|
+
console.log('\n✓ Script d\'extraction des AAR créé');
|
|
100
|
+
|
|
101
|
+
// Créer un fichier d'aide pour Maven
|
|
102
|
+
const mavenSettings = `<?xml version="1.0" encoding="UTF-8"?>
|
|
103
|
+
<settings xmlns="http://maven.apache.org/SETTINGS/1.0.0"
|
|
104
|
+
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
|
105
|
+
xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.0.0
|
|
106
|
+
http://maven.apache.org/xsd/settings-1.0.0.xsd">
|
|
107
|
+
<repositories>
|
|
108
|
+
<repository>
|
|
109
|
+
<id>google</id>
|
|
110
|
+
<url>https://maven.google.com/</url>
|
|
111
|
+
</repository>
|
|
112
|
+
<repository>
|
|
113
|
+
<id>central</id>
|
|
114
|
+
<url>https://repo.maven.apache.org/maven2</url>
|
|
115
|
+
</repository>
|
|
116
|
+
</repositories>
|
|
117
|
+
</settings>
|
|
118
|
+
`;
|
|
119
|
+
|
|
120
|
+
const mavenSettingsPath = path.join(buildDir, 'maven-settings.xml');
|
|
121
|
+
fs.writeFileSync(mavenSettingsPath, mavenSettings, 'utf-8');
|
|
122
|
+
|
|
123
|
+
console.log('✓ Configuration Maven créée:', mavenSettingsPath);
|
|
124
|
+
|
|
125
|
+
module.exports = {
|
|
126
|
+
depsConfig,
|
|
127
|
+
libsDir,
|
|
128
|
+
dependencies
|
|
129
|
+
};
|
|
130
|
+
|
|
131
|
+
console.log('\n✅ Configuration AndroidX/Material Design terminée');
|
|
@@ -76,3 +76,30 @@ const { spawnSync } = require('child_process');
|
|
|
76
76
|
process.exit(1);
|
|
77
77
|
}
|
|
78
78
|
})();
|
|
79
|
+
|
|
80
|
+
// --- Déchiffrement à la volée des fichiers protégés (JS/HTML/CSS) ---
|
|
81
|
+
function readDecryptedFile(filePath, keyStr) {
|
|
82
|
+
const buf = fs.readFileSync(filePath);
|
|
83
|
+
if (buf.slice(0,4).toString('ascii') !== 'ENC1') {
|
|
84
|
+
// Pas chiffré
|
|
85
|
+
return buf.toString('utf8');
|
|
86
|
+
}
|
|
87
|
+
const iv = buf.slice(4, 20);
|
|
88
|
+
const encrypted = buf.slice(20);
|
|
89
|
+
const key = crypto.createHash('sha256').update(keyStr || 'dev-key').digest();
|
|
90
|
+
const decipher = crypto.createDecipheriv('aes-256-cbc', key, iv);
|
|
91
|
+
const dec = Buffer.concat([decipher.update(encrypted), decipher.final()]);
|
|
92
|
+
return dec.toString('utf8');
|
|
93
|
+
}
|
|
94
|
+
// --- Fin déchiffrement utilitaire ---
|
|
95
|
+
|
|
96
|
+
// --- Loader dynamique pour modules JS chiffrés ---
|
|
97
|
+
const Module = require('module');
|
|
98
|
+
const originalLoader = Module._extensions['.js'];
|
|
99
|
+
Module._extensions['.js'] = function(module, filename) {
|
|
100
|
+
// Utilise le déchiffrement si besoin
|
|
101
|
+
const key = process.env.KEY || '';
|
|
102
|
+
const content = readDecryptedFile(filename, key);
|
|
103
|
+
module._compile(content, filename);
|
|
104
|
+
};
|
|
105
|
+
// --- Fin loader dynamique ---
|