diff --git a/app_version_check/app_version.json b/app_version_check/app_version.json index a8bcd5b2..1fdab831 100644 --- a/app_version_check/app_version.json +++ b/app_version_check/app_version.json @@ -1,8 +1,8 @@ { "name": "PSO2NGS Mod Manager", - "version": "1.4.5", + "version": "1.4.6", "description": [ - "Fixed an issue with open item's folder in Favorites list to work properly" + "Fixed an issue where duplicate files found in _na data folders would not apply correctly" ], "windows_file": "", "linux_file": "" diff --git a/lib/file_functions.dart b/lib/file_functions.dart index 96edf650..66c249a4 100644 --- a/lib/file_functions.dart +++ b/lib/file_functions.dart @@ -25,16 +25,41 @@ Future reapplyMods(List modList) async { for (var modFile in modList) { await Future( () { + // //Backup file check and apply + // final matchedFile = iceFiles.firstWhere( + // (e) => e.path.split(s).last == modFile.iceName, + // orElse: () { + // return File(''); + // }, + // ); + + // if (matchedFile.path != '') { + // modFile.originalIcePath = matchedFile.path; + // final matchedBackup = Directory(backupDirPath).listSync(recursive: true).whereType().firstWhere( + // (e) => p.extension(e.path) == '' && e.path.split(s).last == modFile.iceName, + // orElse: () { + // return File(''); + // }, + // ); + + // if (matchedBackup.path == '') { + // modFile.backupIcePath = '$backupDirPath$s${modFile.iceName}'; + // //Backup file if not already + // File(modFile.originalIcePath).copySync(modFile.backupIcePath); + // } + + // //File actions + // File(modFile.icePath).copySync(modFile.originalIcePath); + // } else { + // originalFilesMissingList.add(modFile); + // } + // }, + //Backup file check and apply - final matchedFile = iceFiles.firstWhere( - (e) => e.path.split(s).last == modFile.iceName, - orElse: () { - return File(''); - }, - ); - - if (matchedFile.path != '') { - modFile.originalIcePath = matchedFile.path; + final matchedFiles = iceFiles.where((e) => e.path.split(s).last == modFile.iceName); + + if (matchedFiles.length == 1) { + modFile.originalIcePath = matchedFiles.first.path; final matchedBackup = Directory(backupDirPath).listSync(recursive: true).whereType().firstWhere( (e) => p.extension(e.path) == '' && e.path.split(s).last == modFile.iceName, orElse: () { @@ -46,12 +71,73 @@ Future reapplyMods(List modList) async { modFile.backupIcePath = '$backupDirPath$s${modFile.iceName}'; //Backup file if not already File(modFile.originalIcePath).copySync(modFile.backupIcePath); + } else { + //check for dub applied mod + //set backup path to file + modFile.backupIcePath = '$backupDirPath$s${modFile.iceName}'; } //File actions File(modFile.icePath).copySync(modFile.originalIcePath); - } else { - originalFilesMissingList.add(modFile); + DateTime now = DateTime.now(); + String formattedDate = DateFormat('MM-dd-yyyy HH:mm:ss').format(now); + modFile.appliedDate = formattedDate; + modFile.isApplied = true; + modFile.isNew = false; + final curCate = cateList.firstWhere((element) => element.categoryName == modFile.categoryName && element.categoryPath == modFile.categoryPath); + final curItemIndex = curCate.itemNames.indexOf(modFile.modName); + curCate.numOfApplied[curItemIndex]++; + if (modFile.isFav) { + final favIndex = cateList.firstWhere((element) => element.categoryName == 'Favorites').itemNames.indexOf(modFile.modName); + cateList.firstWhere((element) => element.categoryName == 'Favorites').numOfApplied[favIndex]++; + } + //More than 1 og file + } else if (matchedFiles.length > 1) { + List oriFilePaths = []; + List backupFilePaths = []; + + for (var file in matchedFiles) { + oriFilePaths.add(file.path); + if (file.path.split(s).indexWhere((element) => element == 'win32' || element == 'win32reboot') != -1) { + backupFilePaths.add('$backupDirPath$s${modFile.iceName}'); + } else if (file.path.split(s).indexWhere((element) => element == 'win32_na') != -1) { + backupFilePaths.add('$backupDirPath${s}win32_na$s${modFile.iceName}'); + } else if (file.path.split(s).indexWhere((element) => element == 'win32reboot_na') != -1) { + backupFilePaths.add('$backupDirPath${s}win32reboot_na$s${modFile.iceName}'); + } + } + + if (oriFilePaths.isNotEmpty) { + modFile.originalIcePath = oriFilePaths.join(' | '); + + final matchedBackup = Directory(backupDirPath).listSync(recursive: true).whereType().where((e) => p.extension(e.path) == '' && e.path.split(s).last == modFile.iceName); + + if (matchedBackup.isEmpty) { + for (int i = 0; i < oriFilePaths.length; i++) { + File(oriFilePaths[i]).copySync(backupFilePaths[i]); + } + modFile.backupIcePath = backupFilePaths.join(' | '); + } + + //File actions + for (var oriPath in oriFilePaths) { + File(modFile.icePath).copySync(oriPath); + } + DateTime now = DateTime.now(); + String formattedDate = DateFormat('MM-dd-yyyy HH:mm:ss').format(now); + modFile.appliedDate = formattedDate; + modFile.isApplied = true; + modFile.isNew = false; + final curCate = cateList.firstWhere((element) => element.categoryName == modFile.categoryName && element.categoryPath == modFile.categoryPath); + final curItemIndex = curCate.itemNames.indexOf(modFile.modName); + curCate.numOfApplied[curItemIndex]++; + if (modFile.isFav) { + final favIndex = cateList.firstWhere((element) => element.categoryName == 'Favorites').itemNames.indexOf(modFile.modName); + cateList.firstWhere((element) => element.categoryName == 'Favorites').numOfApplied[favIndex]++; + } + } else { + originalFilesMissingList.add(modFile); + } } }, ); @@ -59,15 +145,10 @@ Future reapplyMods(List modList) async { } else { for (var modFile in modList) { //Backup file check and apply - final matchedFile = iceFiles.firstWhere( - (e) => e.path.split(s).last == modFile.iceName, - orElse: () { - return File(''); - }, - ); + final matchedFiles = iceFiles.where((e) => e.path.split(s).last == modFile.iceName); - if (matchedFile.path != '') { - modFile.originalIcePath = matchedFile.path; + if (matchedFiles.length == 1) { + modFile.originalIcePath = matchedFiles.first.path; final matchedBackup = Directory(backupDirPath).listSync(recursive: true).whereType().firstWhere( (e) => p.extension(e.path) == '' && e.path.split(s).last == modFile.iceName, orElse: () { @@ -79,6 +160,10 @@ Future reapplyMods(List modList) async { modFile.backupIcePath = '$backupDirPath$s${modFile.iceName}'; //Backup file if not already File(modFile.originalIcePath).copySync(modFile.backupIcePath); + } else { + //check for dub applied mod + //set backup path to file + modFile.backupIcePath = '$backupDirPath$s${modFile.iceName}'; } //File actions @@ -86,8 +171,62 @@ Future reapplyMods(List modList) async { DateTime now = DateTime.now(); String formattedDate = DateFormat('MM-dd-yyyy HH:mm:ss').format(now); modFile.appliedDate = formattedDate; - } else { - originalFilesMissingList.add(modFile); + modFile.isApplied = true; + modFile.isNew = false; + final curCate = cateList.firstWhere((element) => element.categoryName == modFile.categoryName && element.categoryPath == modFile.categoryPath); + final curItemIndex = curCate.itemNames.indexOf(modFile.modName); + curCate.numOfApplied[curItemIndex]++; + if (modFile.isFav) { + final favIndex = cateList.firstWhere((element) => element.categoryName == 'Favorites').itemNames.indexOf(modFile.modName); + cateList.firstWhere((element) => element.categoryName == 'Favorites').numOfApplied[favIndex]++; + } + //More than 1 og file + } else if (matchedFiles.length > 1) { + List oriFilePaths = []; + List backupFilePaths = []; + + for (var file in matchedFiles) { + oriFilePaths.add(file.path); + if (file.path.split(s).indexWhere((element) => element == 'win32' || element == 'win32reboot') != -1) { + backupFilePaths.add('$backupDirPath$s${modFile.iceName}'); + } else if (file.path.split(s).indexWhere((element) => element == 'win32_na') != -1) { + backupFilePaths.add('$backupDirPath${s}win32_na$s${modFile.iceName}'); + } else if (file.path.split(s).indexWhere((element) => element == 'win32reboot_na') != -1) { + backupFilePaths.add('$backupDirPath${s}win32reboot_na$s${modFile.iceName}'); + } + } + + if (oriFilePaths.isNotEmpty) { + modFile.originalIcePath = oriFilePaths.join(' | '); + + final matchedBackup = Directory(backupDirPath).listSync(recursive: true).whereType().where((e) => p.extension(e.path) == '' && e.path.split(s).last == modFile.iceName); + + if (matchedBackup.isEmpty) { + for (int i = 0; i < oriFilePaths.length; i++) { + File(oriFilePaths[i]).copySync(backupFilePaths[i]); + } + modFile.backupIcePath = backupFilePaths.join(' | '); + } + + //File actions + for (var oriPath in oriFilePaths) { + File(modFile.icePath).copySync(oriPath); + } + DateTime now = DateTime.now(); + String formattedDate = DateFormat('MM-dd-yyyy HH:mm:ss').format(now); + modFile.appliedDate = formattedDate; + modFile.isApplied = true; + modFile.isNew = false; + final curCate = cateList.firstWhere((element) => element.categoryName == modFile.categoryName && element.categoryPath == modFile.categoryPath); + final curItemIndex = curCate.itemNames.indexOf(modFile.modName); + curCate.numOfApplied[curItemIndex]++; + if (modFile.isFav) { + final favIndex = cateList.firstWhere((element) => element.categoryName == 'Favorites').itemNames.indexOf(modFile.modName); + cateList.firstWhere((element) => element.categoryName == 'Favorites').numOfApplied[favIndex]++; + } + } else { + originalFilesMissingList.add(modFile); + } } } } @@ -111,15 +250,10 @@ Future modsToDataAdder(List modList) async { await Future( () { //Backup file check and apply - final matchedFile = iceFiles.firstWhere( - (e) => e.path.split(s).last == modFile.iceName, - orElse: () { - return File(''); - }, - ); - - if (matchedFile.path != '') { - modFile.originalIcePath = matchedFile.path; + final matchedFiles = iceFiles.where((e) => e.path.split(s).last == modFile.iceName); + + if (matchedFiles.length == 1) { + modFile.originalIcePath = matchedFiles.first.path; final matchedBackup = Directory(backupDirPath).listSync(recursive: true).whereType().firstWhere( (e) => p.extension(e.path) == '' && e.path.split(s).last == modFile.iceName, orElse: () { @@ -139,21 +273,15 @@ Future modsToDataAdder(List modList) async { for (var file in allModFiles) { if (file.iceName == modFile.iceName && file.isApplied) { duplicateModsApplied.add([file]); - - // if (appliedModsList.isNotEmpty) { - // // for (var appliedList in appliedModsList) { - // // //appliedList.remove(file); - // // } - - // appliedModsList.removeWhere((element) => element.isEmpty); - // appliedModsList.removeWhere((element) => element.every((file) => file.isApplied == false)); - // } } } } //File actions File(modFile.icePath).copySync(modFile.originalIcePath); + DateTime now = DateTime.now(); + String formattedDate = DateFormat('MM-dd-yyyy HH:mm:ss').format(now); + modFile.appliedDate = formattedDate; modFile.isApplied = true; modFile.isNew = false; actualAppliedMods.add(modFile); @@ -164,8 +292,60 @@ Future modsToDataAdder(List modList) async { final favIndex = cateList.firstWhere((element) => element.categoryName == 'Favorites').itemNames.indexOf(modFile.modName); cateList.firstWhere((element) => element.categoryName == 'Favorites').numOfApplied[favIndex]++; } - } else { - originalFilesMissingList.add(modFile); + //More than 1 og file + } else if (matchedFiles.length > 1) { + List oriFilePaths = []; + List backupFilePaths = []; + + for (var file in matchedFiles) { + oriFilePaths.add(file.path); + if (file.path.split(s).indexWhere((element) => element == 'win32' || element == 'win32reboot') != -1) { + backupFilePaths.add('$backupDirPath$s${modFile.iceName}'); + } else if (file.path.split(s).indexWhere((element) => element == 'win32_na') != -1) { + backupFilePaths.add('$backupDirPath${s}win32_na$s${modFile.iceName}'); + } else if (file.path.split(s).indexWhere((element) => element == 'win32reboot_na') != -1) { + backupFilePaths.add('$backupDirPath${s}win32reboot_na$s${modFile.iceName}'); + } + } + + if (oriFilePaths.isNotEmpty) { + modFile.originalIcePath = oriFilePaths.join(' | '); + + final matchedBackup = Directory(backupDirPath).listSync(recursive: true).whereType().where((e) => p.extension(e.path) == '' && e.path.split(s).last == modFile.iceName); + + if (matchedBackup.isEmpty) { + for (int i = 0; i < oriFilePaths.length; i++) { + File(oriFilePaths[i]).copySync(backupFilePaths[i]); + } + modFile.backupIcePath = backupFilePaths.join(' | '); + } else { + for (var file in allModFiles) { + if (file.iceName == modFile.iceName && file.isApplied) { + duplicateModsApplied.add([file]); + } + } + } + + //File actions + for (var oriPath in oriFilePaths) { + File(modFile.icePath).copySync(oriPath); + } + DateTime now = DateTime.now(); + String formattedDate = DateFormat('MM-dd-yyyy HH:mm:ss').format(now); + modFile.appliedDate = formattedDate; + modFile.isApplied = true; + modFile.isNew = false; + actualAppliedMods.add(modFile); + final curCate = cateList.firstWhere((element) => element.categoryName == modFile.categoryName && element.categoryPath == modFile.categoryPath); + final curItemIndex = curCate.itemNames.indexOf(modFile.modName); + curCate.numOfApplied[curItemIndex]++; + if (modFile.isFav) { + final favIndex = cateList.firstWhere((element) => element.categoryName == 'Favorites').itemNames.indexOf(modFile.modName); + cateList.firstWhere((element) => element.categoryName == 'Favorites').numOfApplied[favIndex]++; + } + } else { + originalFilesMissingList.add(modFile); + } } }, ); @@ -184,15 +364,10 @@ Future modsToDataAdder(List modList) async { } else { for (var modFile in modList) { //Backup file check and apply - final matchedFile = iceFiles.firstWhere( - (e) => e.path.split(s).last == modFile.iceName, - orElse: () { - return File(''); - }, - ); + final matchedFiles = iceFiles.where((e) => e.path.split(s).last == modFile.iceName); - if (matchedFile.path != '') { - modFile.originalIcePath = matchedFile.path; + if (matchedFiles.length == 1) { + modFile.originalIcePath = matchedFiles.first.path; final matchedBackup = Directory(backupDirPath).listSync(recursive: true).whereType().firstWhere( (e) => p.extension(e.path) == '' && e.path.split(s).last == modFile.iceName, orElse: () { @@ -212,21 +387,15 @@ Future modsToDataAdder(List modList) async { for (var file in allModFiles) { if (file.iceName == modFile.iceName && file.isApplied) { duplicateModsApplied.add([file]); - - // if (appliedModsList.isNotEmpty) { - // for (var appliedList in appliedModsList) { - // //appliedList.remove(file); - // appliedList.firstWhere((element) => element.iceName == file.iceName).isApplied = false; - // } - // appliedModsList.removeWhere((element) => element.every((file) => file.isApplied == false)); - // appliedModsList.removeWhere((element) => element.isEmpty); - // } } } } //File actions File(modFile.icePath).copySync(modFile.originalIcePath); + DateTime now = DateTime.now(); + String formattedDate = DateFormat('MM-dd-yyyy HH:mm:ss').format(now); + modFile.appliedDate = formattedDate; modFile.isApplied = true; modFile.isNew = false; actualAppliedMods.add(modFile); @@ -237,9 +406,118 @@ Future modsToDataAdder(List modList) async { final favIndex = cateList.firstWhere((element) => element.categoryName == 'Favorites').itemNames.indexOf(modFile.modName); cateList.firstWhere((element) => element.categoryName == 'Favorites').numOfApplied[favIndex]++; } - } else { - originalFilesMissingList.add(modFile); + //More than 1 og file + } else if (matchedFiles.length > 1) { + List oriFilePaths = []; + List backupFilePaths = []; + + for (var file in matchedFiles) { + oriFilePaths.add(file.path); + if (file.path.split(s).indexWhere((element) => element == 'win32' || element == 'win32reboot') != -1) { + backupFilePaths.add('$backupDirPath$s${modFile.iceName}'); + } else if (file.path.split(s).indexWhere((element) => element == 'win32_na') != -1) { + backupFilePaths.add('$backupDirPath${s}win32_na$s${modFile.iceName}'); + } else if (file.path.split(s).indexWhere((element) => element == 'win32reboot_na') != -1) { + backupFilePaths.add('$backupDirPath${s}win32reboot_na$s${modFile.iceName}'); + } + } + + if (oriFilePaths.isNotEmpty) { + modFile.originalIcePath = oriFilePaths.join(' | '); + + final matchedBackup = Directory(backupDirPath).listSync(recursive: true).whereType().where((e) => p.extension(e.path) == '' && e.path.split(s).last == modFile.iceName); + + if (matchedBackup.isEmpty) { + for (int i = 0; i < oriFilePaths.length; i++) { + File(oriFilePaths[i]).copySync(backupFilePaths[i]); + } + modFile.backupIcePath = backupFilePaths.join(' | '); + } else { + for (var file in allModFiles) { + if (file.iceName == modFile.iceName && file.isApplied) { + duplicateModsApplied.add([file]); + } + } + } + + //File actions + for (var oriPath in oriFilePaths) { + File(modFile.icePath).copySync(oriPath); + } + DateTime now = DateTime.now(); + String formattedDate = DateFormat('MM-dd-yyyy HH:mm:ss').format(now); + modFile.appliedDate = formattedDate; + modFile.isApplied = true; + modFile.isNew = false; + actualAppliedMods.add(modFile); + final curCate = cateList.firstWhere((element) => element.categoryName == modFile.categoryName && element.categoryPath == modFile.categoryPath); + final curItemIndex = curCate.itemNames.indexOf(modFile.modName); + curCate.numOfApplied[curItemIndex]++; + if (modFile.isFav) { + final favIndex = cateList.firstWhere((element) => element.categoryName == 'Favorites').itemNames.indexOf(modFile.modName); + cateList.firstWhere((element) => element.categoryName == 'Favorites').numOfApplied[favIndex]++; + } + } else { + originalFilesMissingList.add(modFile); + } } + + // final matchedFile = iceFiles.firstWhere( + // (e) => e.path.split(s).last == modFile.iceName, + // orElse: () { + // return File(''); + // }, + // ); + + // if (matchedFile.path != '') { + // modFile.originalIcePath = matchedFile.path; + // final matchedBackup = Directory(backupDirPath).listSync(recursive: true).whereType().firstWhere( + // (e) => p.extension(e.path) == '' && e.path.split(s).last == modFile.iceName, + // orElse: () { + // return File(''); + // }, + // ); + + // if (matchedBackup.path == '') { + // modFile.backupIcePath = '$backupDirPath$s${modFile.iceName}'; + // //Backup file if not already + // File(modFile.originalIcePath).copySync(modFile.backupIcePath); + // } else { + // //check for dub applied mod + // //set backup path to file + // modFile.backupIcePath = '$backupDirPath$s${modFile.iceName}'; + + // for (var file in allModFiles) { + // if (file.iceName == modFile.iceName && file.isApplied) { + // duplicateModsApplied.add([file]); + + // // if (appliedModsList.isNotEmpty) { + // // for (var appliedList in appliedModsList) { + // // //appliedList.remove(file); + // // appliedList.firstWhere((element) => element.iceName == file.iceName).isApplied = false; + // // } + // // appliedModsList.removeWhere((element) => element.every((file) => file.isApplied == false)); + // // appliedModsList.removeWhere((element) => element.isEmpty); + // // } + // } + // } + // } + + // //File actions + // File(modFile.icePath).copySync(modFile.originalIcePath); + // modFile.isApplied = true; + // modFile.isNew = false; + // actualAppliedMods.add(modFile); + // final curCate = cateList.firstWhere((element) => element.categoryName == modFile.categoryName && element.categoryPath == modFile.categoryPath); + // final curItemIndex = curCate.itemNames.indexOf(modFile.modName); + // curCate.numOfApplied[curItemIndex]++; + // if (modFile.isFav) { + // final favIndex = cateList.firstWhere((element) => element.categoryName == 'Favorites').itemNames.indexOf(modFile.modName); + // cateList.firstWhere((element) => element.categoryName == 'Favorites').numOfApplied[favIndex]++; + // } + // } else { + // originalFilesMissingList.add(modFile); + // } } //Unapply, restore old dub for (var modList in duplicateModsApplied) { @@ -288,15 +566,20 @@ void modsRemover(List modsList) { backupFilesMissingList.clear(); for (var mod in modsList) { - final matchedBackup = backupFiles.firstWhere( - (e) => p.extension(e.path) == '' && e.path.split(s).last == mod.iceName, - orElse: () { - return File(''); - }, - ); + final matchedBackup = backupFiles.where((e) => p.extension(e.path) == '' && e.path.split(s).last == mod.iceName); + List backupPaths = mod.backupIcePath.split(' | '); + List oriPaths = mod.originalIcePath.split(' | '); + + if (matchedBackup.isNotEmpty) { + for (int i = 0; i < backupPaths.length; i++) { + if (File(backupPaths[i]).existsSync()) { + File(backupPaths[i]).copySync(oriPaths[i]); + File(backupPaths[i]).deleteSync(); + } else { + backupFilesMissingList.add(mod); + } + } - if (matchedBackup.path != '') { - File(mod.backupIcePath).copySync(mod.originalIcePath); mod.isApplied = false; actualRemovedMods.add(mod); final curCate = cateList.firstWhere((element) => element.categoryName == mod.categoryName && element.categoryPath == mod.categoryPath); @@ -306,7 +589,6 @@ void modsRemover(List modsList) { final favIndex = cateList.firstWhere((element) => element.categoryName == 'Favorites').itemNames.indexOf(mod.modName); cateList.firstWhere((element) => element.categoryName == 'Favorites').numOfApplied[favIndex]--; } - File(mod.backupIcePath).deleteSync(); //remove from applied list if (appliedModsList.isNotEmpty) { @@ -608,7 +890,7 @@ Future dragDropSingleFilesAdd(context, List newItemDragDropList, XF } cate.allModFiles.addAll(newModList); cate.imageIcons.insert(index, icons); - cate.numOfMods.add(0); + cate.numOfMods.insert(0, 0); cate.numOfMods[index] = numOfMods; cate.numOfItems++; cate.numOfApplied.add(0); diff --git a/lib/main.dart b/lib/main.dart index 2cefad4d..8185c86c 100644 --- a/lib/main.dart +++ b/lib/main.dart @@ -202,6 +202,12 @@ class _MyHomePageState extends State with WindowListener { if (!Directory(backupDirPath).existsSync()) { await Directory(backupDirPath).create(recursive: true); } + if (!Directory('$backupDirPath${s}win32_na').existsSync()) { + await Directory('$backupDirPath${s}win32_na').create(recursive: true); + } + if (!Directory('$backupDirPath${s}win32reboot_na').existsSync()) { + await Directory('$backupDirPath${s}win32reboot_na').create(recursive: true); + } if (!Directory(checksumDirPath).existsSync()) { await Directory(checksumDirPath).create(recursive: true); } @@ -590,9 +596,7 @@ class _MyHomePageState extends State with WindowListener { children: [ Text( 'New Update Available!', - style: TextStyle( - color: MyApp.themeNotifier.value == ThemeMode.light ? Theme.of(context).primaryColorDark : Colors.amberAccent, - fontWeight: FontWeight.w500), + style: TextStyle(color: MyApp.themeNotifier.value == ThemeMode.light ? Theme.of(context).primaryColorDark : Colors.amberAccent, fontWeight: FontWeight.w500), ), Padding( padding: const EdgeInsets.only(left: 5), diff --git a/lib/mods_loader.dart b/lib/mods_loader.dart index e72e91c8..cb2b1b7c 100644 --- a/lib/mods_loader.dart +++ b/lib/mods_loader.dart @@ -61,6 +61,7 @@ Future> modsLoader() async { } //iceParents = iceFile.path.split(modName).last.split('$s${iceFilePathSplit.last}').first.replaceAll('$s', ' > ').trim(); List pathSplit = iceFile.path.split(s); + // ignore: unused_local_variable final iceName = pathSplit.removeLast(); pathSplit.removeRange(0, pathSplit.indexWhere((element) => element == modName) + 1); iceParents = pathSplit.join(' > ').trim(); diff --git a/lib/popup_handlers.dart b/lib/popup_handlers.dart index 82f1a497..c8df3fbf 100644 --- a/lib/popup_handlers.dart +++ b/lib/popup_handlers.dart @@ -221,6 +221,12 @@ Future mainModManDirDialog(context, String popupTitle, String popupMessage, bool if (!Directory(backupDirPath).existsSync()) { await Directory(backupDirPath).create(recursive: true); } + if (!Directory('$backupDirPath${s}win32_na').existsSync()) { + await Directory('$backupDirPath${s}win32_na').create(recursive: true); + } + if (!Directory('$backupDirPath${s}win32reboot_na').existsSync()) { + await Directory('$backupDirPath${s}win32reboot_na').create(recursive: true); + } if (!Directory(checksumDirPath).existsSync()) { await Directory(checksumDirPath).create(recursive: true); } @@ -287,6 +293,12 @@ Future mainModManDirDialog(context, String popupTitle, String popupMessage, bool if (!Directory(backupDirPath).existsSync()) { await Directory(backupDirPath).create(recursive: true); } + if (!Directory('$backupDirPath${s}win32_na').existsSync()) { + await Directory('$backupDirPath${s}win32_na').create(recursive: true); + } + if (!Directory('$backupDirPath${s}win32reboot_na').existsSync()) { + await Directory('$backupDirPath${s}win32reboot_na').create(recursive: true); + } if (!Directory(checksumDirPath).existsSync()) { await Directory(checksumDirPath).create(recursive: true); } diff --git a/windows/runner/Runner.rc b/windows/runner/Runner.rc index 3633ec4c..bc94f945 100644 --- a/windows/runner/Runner.rc +++ b/windows/runner/Runner.rc @@ -63,13 +63,13 @@ IDI_APP_ICON ICON "resources\\app_icon.ico" #ifdef FLUTTER_BUILD_NUMBER #define VERSION_AS_NUMBER FLUTTER_BUILD_NUMBER #else -#define VERSION_AS_NUMBER 1,4,5 +#define VERSION_AS_NUMBER 1,4,6 #endif #ifdef FLUTTER_BUILD_NAME #define VERSION_AS_STRING #FLUTTER_BUILD_NAME #else -#define VERSION_AS_STRING "1.4.5" +#define VERSION_AS_STRING "1.4.6" #endif VS_VERSION_INFO VERSIONINFO