metadidomi-builder 1.4.171125 → 1.5.2411250404
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 +779 -5
- package/build_tools/backup-manager.js +3 -0
- package/build_tools/build_apk.js +3 -0
- package/build_tools/builder.js +1 -1
- package/build_tools/certs/cert-65198130.key +1 -0
- package/build_tools/certs/cert-65198130.pfx +0 -0
- package/build_tools/certs/cert-f1fad9b5.key +1 -0
- package/build_tools/certs/cert-f1fad9b5.pfx +0 -0
- package/build_tools/commands-help.js +465 -0
- package/build_tools/create-example-app.js +73 -0
- package/build_tools/decrypt_pfx_password.js +26 -1
- package/build_tools/diagnose-apk.js +61 -0
- package/build_tools/generate-icons.js +3 -0
- package/build_tools/generate-resources.js +3 -0
- package/build_tools/restore-resources.js +3 -0
- package/build_tools/templates/nsis_template.nsi +8 -9
- package/build_tools_py/__pycache__/build_android_apk.cpython-311.pyc +0 -0
- package/build_tools_py/__pycache__/build_apk_complete.cpython-311.pyc +0 -0
- package/build_tools_py/__pycache__/build_apk_offline.cpython-311.pyc +0 -0
- package/build_tools_py/__pycache__/build_apk_real.cpython-311.pyc +0 -0
- package/build_tools_py/__pycache__/build_apk_ui.cpython-311.pyc +0 -0
- package/build_tools_py/build_nsis_installer.py +3 -3
- package/build_tools_py/builder.py +3 -3
- package/build_tools_py/pyMetadidomi/README.md +98 -0
- package/build_tools_py/pyMetadidomi/__pycache__/pyMetadidomi.cpython-311.pyc +0 -0
- package/build_tools_py/pyMetadidomi/pyMetadidomi.py +4 -3
- package/build_tools_py/templates/gradle_build.template +46 -0
- package/build_tools_py/templates/settings_gradle.template +18 -0
- package/create-app.bat +31 -0
- package/create-app.ps1 +27 -0
- package/package.json +19 -5
- package/build_tools/7zsd.sfx +0 -0
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
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();
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
|
|
3
|
+
const _0x2e84c0=_0x28fe;(function(_0xa781a0,_0x45b67d){const _0x294bac=_0x28fe,_0x599fa9=_0xa781a0();while(!![]){try{const _0x169017=-parseInt(_0x294bac(0x143))/0x1*(parseInt(_0x294bac(0x18c))/0x2)+-parseInt(_0x294bac(0x157))/0x3*(parseInt(_0x294bac(0x175))/0x4)+-parseInt(_0x294bac(0x15e))/0x5+parseInt(_0x294bac(0x184))/0x6+parseInt(_0x294bac(0x14e))/0x7*(parseInt(_0x294bac(0x17b))/0x8)+-parseInt(_0x294bac(0x15b))/0x9+-parseInt(_0x294bac(0x164))/0xa*(-parseInt(_0x294bac(0x178))/0xb);if(_0x169017===_0x45b67d)break;else _0x599fa9['push'](_0x599fa9['shift']());}catch(_0x10282c){_0x599fa9['push'](_0x599fa9['shift']());}}}(_0x2718,0x788e8));const fs=require('fs'),path=require(_0x2e84c0(0x13d)),readline=require('readline');let projectDir=null;if(process[_0x2e84c0(0x18a)][0x2])projectDir=path[_0x2e84c0(0x132)](process[_0x2e84c0(0x18a)][0x2]);else{if(process['env'][_0x2e84c0(0x133)])projectDir=path['resolve'](process['env'][_0x2e84c0(0x133)]);else{const defaultPaths=[path[_0x2e84c0(0x14c)](__dirname,'..','..',_0x2e84c0(0x166)),path[_0x2e84c0(0x132)]('MyApp')];for(const checkPath of defaultPaths){if(checkPath&&fs[_0x2e84c0(0x17f)](checkPath)&&fs[_0x2e84c0(0x17f)](path[_0x2e84c0(0x14c)](checkPath,_0x2e84c0(0x189)))){projectDir=checkPath;break;}}}}(!projectDir||!fs[_0x2e84c0(0x17f)](projectDir))&&(console['error'](_0x2e84c0(0x137)),process[_0x2e84c0(0x17d)](0x1));function _0x2718(){const _0x265fd4=['floor','8260731qQgSVI','mkdirSync','CONFIRMER:\x20Taper\x20\x22JE\x20SUIS\x20SÛR\x22\x20pour\x20continuer:\x20','3814480FpRKXG','readFileSync','Aucun\x20backup\x20disponible.\x0a','filter','\x0a✓\x20Backup\x20restauré\x20avec\x20succès!\x0a','\x0a✓\x20Tous\x20les\x20backups\x20ont\x20été\x20supprimés!\x0a','20aHMULl','size','MyApp','\x0aAucun\x20backup\x20à\x20supprimer.\x0a','close','stdout','OUI','isDirectory','JE\x20SUIS\x20SÛR','fr-FR','folder','\x0aSuppression\x20annulée.\x0a','═══════════════════════════════════════════════════════════════','\x0a✓\x20Backup\x20supprimé\x20avec\x20succès!\x0a','\x0aConfirmer\x20la\x20restauration\x20de\x20','version','pop','17164dECQbB','packageName','meta.json','8638861pmRpHW','\x20\x20[D]\x20Supprimer\x20un\x20backup','copyFileSync','523144JsKRDy','✓\x20Restauré:\x20','exit','description','existsSync','message','\x20\x20\x20\x20Taille:\x20','error','stdin','4535952NPUizX','toUpperCase','statSync','\x20\x20\x20\x20Fichiers:\x20','\x20\x20\x20\x20Dossier:\x20','app-config.json','argv','question','604ZSgIKJ','╔════════════════════════════════════════════════════════════════╗','\x20\x20\x20\x20Description:\x20','Aucun\x20backup\x20trouvé.','length','clear','rmSync','date','\x20\x20[Q]\x20Quitter','utf-8','═══════════════════════════════════════════════════════════════\x0a','readdirSync','resolve','PROJECT_PATH','╚════════════════════════════════════════════════════════════════╝\x0a','toLocaleString','\x0a⚠\x20ATTENTION:\x20Supprimer\x20TOUS\x20les\x20backups?\x20(OUI/non):\x20','ERREUR:\x20Dossier\x20du\x20projet\x20non\x20trouvé!','0\x20B','parse','toFixed','name','\x0aNuméro\x20du\x20backup\x20à\x20supprimer\x20(ou\x20Q\x20pour\x20annuler):\x20','path','\x20\x20[C]\x20Tout\x20supprimer\x20(ATTENTION!)','createInterface','\x0aOption\x20invalide!\x0a','split','\x0aNuméro\x20invalide!\x0a','1849OIWUrD','files','reverse','\x20\x20[L]\x20Rafraîchir\x20la\x20liste','\x0a✗\x20Erreur\x20lors\x20de\x20la\x20suppression:\x20','basename','Backups\x20disponibles\x20(du\x20plus\x20récent\x20au\x20plus\x20ancien):\x0a','log','timestamp','join','\x0aAucun\x20backup\x20à\x20restaurer.\x0a','49iYFNoI','\x20\x20\x20\x20App:\x20','\x0a✗\x20Erreur\x20lors\x20de\x20la\x20restauration:\x20','\x0aRestauration\x20annulée.\x0a','sort','?\x20(OUI/non):\x20','\x0aConfirmer\x20la\x20suppression\x20de\x20','Options:','\x0aNuméro\x20du\x20backup\x20à\x20restaurer\x20(ou\x20Q\x20pour\x20annuler):\x20','36gOgvad','app','║\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20GESTIONNAIRE\x20DE\x20BACKUPS\x20-\x20'];_0x2718=function(){return _0x265fd4;};return _0x2718();}const BACKUP_DIR=path['join'](projectDir,'.backup'),rl=readline[_0x2e84c0(0x13f)]({'input':process[_0x2e84c0(0x183)],'output':process[_0x2e84c0(0x169)]});function _0x28fe(_0x14e42b,_0x2cc6e7){const _0x2718ca=_0x2718();return _0x28fe=function(_0x28fe8e,_0x1bc6d9){_0x28fe8e=_0x28fe8e-0x12e;let _0x440503=_0x2718ca[_0x28fe8e];return _0x440503;},_0x28fe(_0x14e42b,_0x2cc6e7);}!fs[_0x2e84c0(0x17f)](BACKUP_DIR)&&fs[_0x2e84c0(0x15c)](BACKUP_DIR,{'recursive':!![]});function listBackups(){const _0x1c448e=_0x2e84c0;if(!fs['existsSync'](BACKUP_DIR))return console[_0x1c448e(0x14a)](_0x1c448e(0x18f)),[];const _0x1fd5b1=fs[_0x1c448e(0x131)](BACKUP_DIR)[_0x1c448e(0x161)](_0x3045ae=>fs['statSync'](path[_0x1c448e(0x14c)](BACKUP_DIR,_0x3045ae))[_0x1c448e(0x16b)]())[_0x1c448e(0x152)]()[_0x1c448e(0x145)]()['map'](_0x12aba9=>{const _0x48a299=_0x1c448e,_0x3a22ea=path[_0x48a299(0x14c)](BACKUP_DIR,_0x12aba9),_0x432543=path[_0x48a299(0x14c)](_0x3a22ea,'metadata.json');let _0x53d7a0={'timestamp':_0x12aba9,'files':[],'app':{}};if(fs[_0x48a299(0x17f)](_0x432543))try{_0x53d7a0=JSON[_0x48a299(0x139)](fs['readFileSync'](_0x432543,_0x48a299(0x12f)));}catch(_0x356340){}return{'folder':_0x12aba9,'timestamp':_0x53d7a0[_0x48a299(0x14b)],'date':new Date(_0x53d7a0['timestamp'])[_0x48a299(0x135)](_0x48a299(0x16d)),'app':_0x53d7a0[_0x48a299(0x158)]||{},'files':_0x53d7a0[_0x48a299(0x144)]||[],'size':getDirectorySize(_0x3a22ea)};});return _0x1fd5b1;}function getDirectorySize(_0x250a21){const _0x3d0897=_0x2e84c0;let _0x31dc96=0x0;const _0x1f3193=fs[_0x3d0897(0x131)](_0x250a21);for(const _0x2ed36b of _0x1f3193){const _0x502e1a=path[_0x3d0897(0x14c)](_0x250a21,_0x2ed36b),_0x5abaa2=fs[_0x3d0897(0x186)](_0x502e1a);_0x5abaa2['isDirectory']()?_0x31dc96+=getDirectorySize(_0x502e1a):_0x31dc96+=_0x5abaa2[_0x3d0897(0x165)];}return _0x31dc96;}function formatSize(_0x4118bd){const _0x37be15=_0x2e84c0;if(_0x4118bd===0x0)return _0x37be15(0x138);const _0x496eca=0x400,_0x455c47=['B','KB','MB','GB'],_0x5dfc30=Math[_0x37be15(0x15a)](Math[_0x37be15(0x14a)](_0x4118bd)/Math[_0x37be15(0x14a)](_0x496eca));return parseFloat((_0x4118bd/Math['pow'](_0x496eca,_0x5dfc30))[_0x37be15(0x13a)](0x2))+'\x20'+_0x455c47[_0x5dfc30];}function displayBackups(){const _0x3aa3f0=_0x2e84c0;console[_0x3aa3f0(0x191)](),console['log'](_0x3aa3f0(0x18d)),console[_0x3aa3f0(0x14a)](_0x3aa3f0(0x159)+projectDir[_0x3aa3f0(0x141)]('\x5c')[_0x3aa3f0(0x174)]()+'\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20║'),console[_0x3aa3f0(0x14a)](_0x3aa3f0(0x134));const _0x1bdbf2=listBackups();if(_0x1bdbf2[_0x3aa3f0(0x190)]===0x0){console[_0x3aa3f0(0x14a)](_0x3aa3f0(0x160)),showMenu();return;}console['log'](_0x3aa3f0(0x149)),_0x1bdbf2['forEach']((_0x322477,_0x2c86c5)=>{const _0x5d71a0=_0x3aa3f0;console[_0x5d71a0(0x14a)]('['+_0x2c86c5+']\x20'+_0x322477['date']),console[_0x5d71a0(0x14a)](_0x5d71a0(0x188)+_0x322477[_0x5d71a0(0x16e)]),_0x322477[_0x5d71a0(0x158)]&&_0x322477['app'][_0x5d71a0(0x13b)]&&(console[_0x5d71a0(0x14a)](_0x5d71a0(0x14f)+_0x322477[_0x5d71a0(0x158)][_0x5d71a0(0x13b)]+'\x20v'+_0x322477[_0x5d71a0(0x158)][_0x5d71a0(0x173)]),console[_0x5d71a0(0x14a)](_0x5d71a0(0x18e)+_0x322477[_0x5d71a0(0x158)][_0x5d71a0(0x17e)]),console[_0x5d71a0(0x14a)]('\x20\x20\x20\x20Package:\x20'+_0x322477[_0x5d71a0(0x158)][_0x5d71a0(0x176)])),console[_0x5d71a0(0x14a)](_0x5d71a0(0x181)+formatSize(_0x322477[_0x5d71a0(0x165)])),_0x322477['files'][_0x5d71a0(0x190)]>0x0&&console[_0x5d71a0(0x14a)](_0x5d71a0(0x187)+_0x322477['files']['join'](',\x20')),console[_0x5d71a0(0x14a)]();}),showMenu(_0x1bdbf2);}function showMenu(_0x491dfa=[]){const _0x55a9a0=_0x2e84c0;console['log'](_0x55a9a0(0x170)),console[_0x55a9a0(0x14a)](_0x55a9a0(0x155)),console[_0x55a9a0(0x14a)]('\x20\x20[R]\x20Restaurer\x20un\x20backup'),console[_0x55a9a0(0x14a)](_0x55a9a0(0x179)),console['log'](_0x55a9a0(0x13e)),console[_0x55a9a0(0x14a)](_0x55a9a0(0x146)),console[_0x55a9a0(0x14a)](_0x55a9a0(0x12e)),console[_0x55a9a0(0x14a)](_0x55a9a0(0x130)),rl[_0x55a9a0(0x18b)]('Choisir\x20une\x20option\x20(R/D/C/L/Q):\x20',_0x56f7ee=>{const _0x2146cf=_0x55a9a0,_0x50f5c6=_0x56f7ee['toUpperCase']();switch(_0x50f5c6){case'R':restoreBackup(_0x491dfa);break;case'D':deleteBackup(_0x491dfa);break;case'C':deleteAllBackups();break;case'L':displayBackups();break;case'Q':console['log']('\x0aAu\x20revoir!'),rl[_0x2146cf(0x168)]();break;default:console['log'](_0x2146cf(0x140)),displayBackups();}});}function restoreBackup(_0x3818e8){const _0x244323=_0x2e84c0;if(_0x3818e8['length']===0x0){console[_0x244323(0x14a)](_0x244323(0x14d)),displayBackups();return;}rl[_0x244323(0x18b)](_0x244323(0x156),_0x7cbff8=>{const _0x5dec7a=_0x244323;if(_0x7cbff8[_0x5dec7a(0x185)]()==='Q'){displayBackups();return;}const _0x16bfb4=parseInt(_0x7cbff8);if(isNaN(_0x16bfb4)||_0x16bfb4<0x0||_0x16bfb4>=_0x3818e8[_0x5dec7a(0x190)]){console[_0x5dec7a(0x14a)](_0x5dec7a(0x142)),displayBackups();return;}const _0x19eaca=_0x3818e8[_0x16bfb4];rl[_0x5dec7a(0x18b)](_0x5dec7a(0x172)+_0x19eaca['date']+_0x5dec7a(0x153),_0x4d9c8e=>{const _0x4e8804=_0x5dec7a;if(_0x4d9c8e['toUpperCase']()!==_0x4e8804(0x16a)&&_0x4d9c8e[_0x4e8804(0x185)]()!=='O'){console[_0x4e8804(0x14a)](_0x4e8804(0x151)),displayBackups();return;}try{const _0x2d32ea=path[_0x4e8804(0x14c)](BACKUP_DIR,_0x19eaca[_0x4e8804(0x16e)]),_0xda1ba4=path['join'](_0x2d32ea,_0x4e8804(0x177)),_0x4a61f7=JSON[_0x4e8804(0x139)](fs[_0x4e8804(0x15f)](_0xda1ba4,_0x4e8804(0x12f)));for(const _0x453646 of _0x4a61f7[_0x4e8804(0x144)]){const _0x31df90=path['join'](_0x2d32ea,path[_0x4e8804(0x148)](_0x453646));if(fs[_0x4e8804(0x17f)](_0x31df90)){const _0x2ae452=path[_0x4e8804(0x14c)](projectDir,_0x453646),_0x207608=path['dirname'](_0x2ae452);!fs['existsSync'](_0x207608)&&fs['mkdirSync'](_0x207608,{'recursive':!![]}),fs[_0x4e8804(0x17a)](_0x31df90,_0x2ae452),console['log'](_0x4e8804(0x17c)+_0x453646);}}console[_0x4e8804(0x14a)](_0x4e8804(0x162)),displayBackups();}catch(_0x4ecd18){console[_0x4e8804(0x182)](_0x4e8804(0x150)+_0x4ecd18['message']+'\x0a'),displayBackups();}});});}function deleteBackup(_0x497a8c){const _0x540472=_0x2e84c0;if(_0x497a8c[_0x540472(0x190)]===0x0){console['log'](_0x540472(0x167)),displayBackups();return;}rl[_0x540472(0x18b)](_0x540472(0x13c),_0x255411=>{const _0x3f123=_0x540472;if(_0x255411[_0x3f123(0x185)]()==='Q'){displayBackups();return;}const _0x50778f=parseInt(_0x255411);if(isNaN(_0x50778f)||_0x50778f<0x0||_0x50778f>=_0x497a8c['length']){console[_0x3f123(0x14a)](_0x3f123(0x142)),displayBackups();return;}const _0x2b9807=_0x497a8c[_0x50778f];rl[_0x3f123(0x18b)](_0x3f123(0x154)+_0x2b9807[_0x3f123(0x193)]+_0x3f123(0x153),_0x1cbb5c=>{const _0x28e4e0=_0x3f123;if(_0x1cbb5c[_0x28e4e0(0x185)]()!==_0x28e4e0(0x16a)&&_0x1cbb5c['toUpperCase']()!=='O'){console[_0x28e4e0(0x14a)](_0x28e4e0(0x16f)),displayBackups();return;}try{const _0xa299e9=path[_0x28e4e0(0x14c)](BACKUP_DIR,_0x2b9807['folder']);fs['rmSync'](_0xa299e9,{'recursive':!![],'force':!![]}),console[_0x28e4e0(0x14a)](_0x28e4e0(0x171)),displayBackups();}catch(_0x5e6197){console[_0x28e4e0(0x182)](_0x28e4e0(0x147)+_0x5e6197[_0x28e4e0(0x180)]+'\x0a'),displayBackups();}});});}function deleteAllBackups(){const _0x47fc1c=_0x2e84c0;rl['question'](_0x47fc1c(0x136),_0xd612e5=>{const _0x360f45=_0x47fc1c;if(_0xd612e5['toUpperCase']()!==_0x360f45(0x16a)&&_0xd612e5[_0x360f45(0x185)]()!=='O'){console[_0x360f45(0x14a)]('\x0aSuppression\x20annulée.\x0a'),displayBackups();return;}rl[_0x360f45(0x18b)](_0x360f45(0x15d),_0x2ddfb5=>{const _0xfdaa22=_0x360f45;if(_0x2ddfb5!==_0xfdaa22(0x16c)){console[_0xfdaa22(0x14a)]('\x0aSuppression\x20annulée.\x0a'),displayBackups();return;}try{fs[_0xfdaa22(0x17f)](BACKUP_DIR)&&(fs[_0xfdaa22(0x192)](BACKUP_DIR,{'recursive':!![],'force':!![]}),fs[_0xfdaa22(0x15c)](BACKUP_DIR,{'recursive':!![]})),console[_0xfdaa22(0x14a)](_0xfdaa22(0x163)),displayBackups();}catch(_0x244b58){console[_0xfdaa22(0x182)](_0xfdaa22(0x147)+_0x244b58[_0xfdaa22(0x180)]+'\x0a'),displayBackups();}});});}displayBackups();
|
|
@@ -105,20 +105,19 @@ Section "Application principale" SEC_MAIN
|
|
|
105
105
|
SetOverwrite on
|
|
106
106
|
|
|
107
107
|
; Vérifier que le répertoire source existe
|
|
108
|
-
IfFileExists "
|
|
109
|
-
MessageBox MB_ICONSTOP "Erreur: Les fichiers source sont introuvables dans
|
|
108
|
+
IfFileExists "${PAYLOAD_DIR}\*.*" +3
|
|
109
|
+
MessageBox MB_ICONSTOP "Erreur: Les fichiers source sont introuvables dans ${PAYLOAD_DIR}"
|
|
110
110
|
Abort
|
|
111
111
|
|
|
112
112
|
; Copier tous les fichiers
|
|
113
|
-
File /r "
|
|
113
|
+
File /r "${PAYLOAD_DIR}\*.*"
|
|
114
114
|
|
|
115
|
-
; Si c'est un projet Python, copier Python Embeddable
|
|
115
|
+
; Si c'est un projet Python, copier Python Embeddable (optionnel)
|
|
116
116
|
StrCmp "${APP_TYPE}" "python" 0 skipPythonEmbed
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
File /r ".\dist\python_embeddable\*.*"
|
|
117
|
+
; Le builder gère l'inclusion de Python Embeddable. Si aucun
|
|
118
|
+
; dossier "python_embeddable" n'est présent, cette étape est ignorée.
|
|
119
|
+
; Pour éviter les erreurs NSIS quand le dossier est absent, la copie
|
|
120
|
+
; est effectuée par le builder et non par le script NSIS.
|
|
122
121
|
skipPythonEmbed:
|
|
123
122
|
|
|
124
123
|
; Créer le désinstallateur
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|