Skip to content

Commit

Permalink
Merge pull request #195 from KizKizz/system-rework
Browse files Browse the repository at this point in the history
prep
  • Loading branch information
KizKizz committed Apr 8, 2024
2 parents 6889062 + 9d97c7f commit 55e5797
Show file tree
Hide file tree
Showing 8 changed files with 31 additions and 8 deletions.
Binary file added 7zip-x64/7z.dll
Binary file not shown.
2 changes: 1 addition & 1 deletion Language/LanguageSettings.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,4 @@
"langFilePath": "E:\\Flutter project\\pso2_mod_manager\\Language\\JP.json",
"selected": false
}
]
]
8 changes: 7 additions & 1 deletion app_version_check/app_version.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,13 @@
{
"name": "PSO2NGS Mod Manager",
"version": "2.6.0",
"version": "2.6.1",
"description": [
"v2.6.1:",
"Added adding progress text to Add Mods - Thanks Melodii (@melo.dii) for the suggestion!",
"Hot-fixes for v2.6.0",
"MODの追加にプログレス・テキストを追加 - 提案してくれたMelodii (@melo.dii) に感謝!",
"2.6.0のホットフィックス",
"v2.6.0:",
"Added support for .rar and .7z files through 7-zip",
"Added export mods feature (Individual mods and applied mods in Applied Mods, hope it would make it easier to share mods)",
"Added import mods feature (Imported mods will be automatically added to Mod Sets and can be applied right away)",
Expand Down
3 changes: 3 additions & 0 deletions lib/modsAdder/mods_adder_add_function.dart
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ import 'package:pso2_mod_manager/state_provider.dart';

//Auto Files adder
Future<bool> modsAdderModFilesAdder(context, List<ModsAdderItem> itemsToAddList) async {
Provider.of<StateProvider>(context, listen: false).setModAdderProgressStatus('');
//List<List<String>> addedItems = [];
for (var item in itemsToAddList) {
if (item.toBeAdded) {
Expand Down Expand Up @@ -48,6 +49,8 @@ Future<bool> modsAdderModFilesAdder(context, List<ModsAdderItem> itemsToAddList)
String newFilePath = file.path.replaceFirst(modManModsAdderPath, modManModsDirPath);
Directory(p.dirname(newFilePath)).createSync(recursive: true);
file.copySync(newFilePath);
Provider.of<StateProvider>(context, listen: false).setModAdderProgressStatus('$category > $itemName > ${mod.modName} > ${submod.submodName} > ${p.basename(file.path)}');
await Future.delayed(const Duration(milliseconds: 10));
}
}
}
Expand Down
13 changes: 10 additions & 3 deletions lib/modsAdder/mods_adder_homepage.dart
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,7 @@ void modsAdderHomePage(context) {
for (var element in detail.files) {
// if (p.extension(element.path) == '.rar' || p.extension(element.path) == '.7z') {
// modsAdderUnsupportedFileTypeDialog(context, p.basename(element.path));
// } else
// } else
if (modAdderDragDropFiles.indexWhere((file) => file.path == element.path) == -1) {
modAdderDragDropFiles.add(element);
//newModMainFolderList.add(element);
Expand Down Expand Up @@ -476,6 +476,13 @@ void modsAdderHomePage(context) {
height: 20,
),
const CircularProgressIndicator(),
if (_isAddingMods)
Padding(
padding: const EdgeInsets.only(top: 15),
child: Text(
context.watch<StateProvider>().modAdderProgressStatus,
textAlign: TextAlign.center,
))
],
),
);
Expand Down Expand Up @@ -1998,8 +2005,8 @@ Future<List<ModsAdderItem>> modsAdderFilesProcess(context, List<XFile> xFilePath
final specialParentDirNames = ['win32', 'win32_na', 'win32reboot', 'win32reboot_na'];
List<File> extraFiles = Directory(iceFile.parent.path).listSync().whereType<File>().where((element) => p.extension(element.path).isNotEmpty).toList();
if (specialParentDirNames.contains(p.basename(iceFile.parent.path)) && p.basename(iceFile.parent.parent.path) != p.basename(modManAddModsTempDirPath)) {
extraFiles.addAll(Directory(iceFile.parent.parent.path).listSync().whereType<File>().where((element) => p.extension(element.path).isNotEmpty));
}
extraFiles.addAll(Directory(iceFile.parent.parent.path).listSync().whereType<File>().where((element) => p.extension(element.path).isNotEmpty));
}
for (var extraFile in extraFiles) {
String newExtraFilePath = Uri.file('${p.dirname(newIceFilePath)}/${p.basename(extraFile.path)}').toFilePath();
if (!File(newExtraFilePath).existsSync()) {
Expand Down
7 changes: 7 additions & 0 deletions lib/state_provider.dart
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ class StateProvider with ChangeNotifier {
bool _profanityFilterRemove = false;
bool _removeBoundaryRadiusOnModsApply = false;
bool _prioritizeLocalBackup = false;
String _modAdderProgressStatus = '';

bool get isMainBinFound => _isMainBinFound;
bool get isMainModManPathFound => _isMainModManPathFound;
Expand Down Expand Up @@ -71,6 +72,12 @@ class StateProvider with ChangeNotifier {
bool get profanityFilterRemove => _profanityFilterRemove;
bool get removeBoundaryRadiusOnModsApply => _removeBoundaryRadiusOnModsApply;
bool get prioritizeLocalBackup => _prioritizeLocalBackup;
String get modAdderProgressStatus => _modAdderProgressStatus;

void setModAdderProgressStatus(String status) {
_modAdderProgressStatus = status;
notifyListeners();
}

void prioritizeLocalBackupTrue() {
_prioritizeLocalBackup = true;
Expand Down
2 changes: 1 addition & 1 deletion pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ publish_to: 'none' # Remove this line if you wish to publish to pub.dev
# In iOS, build-name is used as CFBundleShortVersionString while build-number used as CFBundleVersion.
# Read more about iOS versioning at
# https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html
version: 2.6.0
version: 2.6.1

environment:
sdk: ">=3.0.0"
Expand Down
4 changes: 2 additions & 2 deletions windows/runner/Runner.rc
Original file line number Diff line number Diff line change
Expand Up @@ -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 2,6,0
#define VERSION_AS_NUMBER 2,6,1
#endif

#ifdef FLUTTER_BUILD_NAME
#define VERSION_AS_STRING #FLUTTER_BUILD_NAME
#else
#define VERSION_AS_STRING "2.6.0"
#define VERSION_AS_STRING "2.6.1"
#endif

VS_VERSION_INFO VERSIONINFO
Expand Down

0 comments on commit 55e5797

Please sign in to comment.