Skip to content

Commit

Permalink
Merge pull request #30 from FrederickGeek8/electra
Browse files Browse the repository at this point in the history
Fix Electra Problems
  • Loading branch information
FrederickGeek8 committed Jul 13, 2018
2 parents 83d9d68 + 1d26d74 commit 990539f
Show file tree
Hide file tree
Showing 19 changed files with 240 additions and 271 deletions.
1 change: 1 addition & 0 deletions Podfile
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,5 @@ target 'iNDS' do
# Pods for iNDS
pod 'ObjectiveDropboxOfficial'
pod 'UnrarKit', '~> 2.6'
pod 'MHWDirectoryWatcher', :git => 'https://github.com/hwaxxer/MHWDirectoryWatcher.git', :tag => '0.0.8'
end
19 changes: 16 additions & 3 deletions Podfile.lock
Original file line number Diff line number Diff line change
@@ -1,22 +1,35 @@
PODS:
- MHWDirectoryWatcher (0.0.8)
- ObjectiveDropboxOfficial (3.9.0)
- UnrarKit (2.8.1):
- UnrarKit/unrar-lib (= 2.8.1)
- UnrarKit/unrar-lib (2.8.1)

DEPENDENCIES:
- MHWDirectoryWatcher (from `https://github.com/hwaxxer/MHWDirectoryWatcher.git`, tag `0.0.8`)
- ObjectiveDropboxOfficial
- UnrarKit (~> 2.6)

SPEC REPOS:
https://github.com/CocoaPods/Specs.git:
https://github.com/cocoapods/specs.git:
- ObjectiveDropboxOfficial
- UnrarKit

EXTERNAL SOURCES:
MHWDirectoryWatcher:
:git: https://github.com/hwaxxer/MHWDirectoryWatcher.git
:tag: 0.0.8

CHECKOUT OPTIONS:
MHWDirectoryWatcher:
:git: https://github.com/hwaxxer/MHWDirectoryWatcher.git
:tag: 0.0.8

SPEC CHECKSUMS:
MHWDirectoryWatcher: 681d399d4bcc84116461b0a2fc1146b01783016b
ObjectiveDropboxOfficial: 64a809a85744ce58866bf98066f98be5d4c0582e
UnrarKit: 167602bda6542e575c4cdc068509d6b787f84468

PODFILE CHECKSUM: 033c1a530c71e8cc18a2c9f90523b156fb0eefef
PODFILE CHECKSUM: 26b3309b867f0429d12559e83fba372fe42e4ae1

COCOAPODS: 1.5.0
COCOAPODS: 1.5.3
16 changes: 16 additions & 0 deletions Tools/ent.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>com.apple.private.security.no-container</key>
<true/>
<key>com.apple.private.skip-library-validation</key>
<true/>
<key>get-task-allow</key>
<true/>
<key>platform-application</key>
<true/>
<key>com.apple.developer.networking.multipath</key>
<true/>
</dict>
</plist>
12 changes: 9 additions & 3 deletions gendeb.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,9 @@ if ! which ldid &> /dev/null; then
exit 1
fi

INDS_VER=$(/usr/libexec/PlistBuddy -c "Print :CFBundleShortVersionString" iNDS/Base.lproj/iNDS-Info.plist)
OUTDIR=./dist/out.xcarchive
OUTFILE="dist/net.nerd.iNDS_${INDS_VER}_iphoneos-arm.deb"
ORIG=$(pwd)

# Cleanup
Expand All @@ -18,13 +20,17 @@ if [ -d "$OUTDIR" ]; then
rm -r $OUTDIR
fi

if [ -f "$OUTFILE" ]; then
echo "Cleaning previous output..."
rm $OUTFILE
fi


xcodebuild -workspace iNDS.xcworkspace -scheme iNDS archive CODE_SIGNING_REQUIRED=NO CODE_SIGN_IDENTITY="" -archivePath "$OUTDIR" | xcpretty
xcodebuild -workspace iNDS.xcworkspace -scheme iNDS archive GCC_PREPROCESSOR_DEFINITIONS="JAILBROKEN=1 $GCC_PREPROCESSOR_DEFINITIONS" CODE_SIGNING_REQUIRED=NO CODE_SIGN_IDENTITY="" -archivePath "$OUTDIR" | xcpretty
if [ ${PIPESTATUS[0]} -eq 0 ]; then
cd "$OUTDIR/Products"
INDS_VER=$(/usr/libexec/PlistBuddy -c "Print :CFBundleShortVersionString" Applications/iNDS.app/Info.plist)
cp -R $ORIG/DEBIAN .
ldid -S "Applications/iNDS.app/iNDS"
ldid -S../../../Tools/ent.xml "Applications/iNDS.app/iNDS"
cd ..
INDS_VER=$INDS_VER unipkg build "Products"
cp "net.nerd.iNDS_${INDS_VER}_iphoneos-arm.deb" ../
Expand Down
20 changes: 6 additions & 14 deletions iNDS.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@
8BEA098D17872CF40060B347 /* throttle.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 8BEA098817872CF40060B347 /* throttle.cpp */; };
9C4DD2861891E5390075B66C /* GameController.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 9C4DD2851891E5390075B66C /* GameController.framework */; settings = {ATTRIBUTES = (Weak, ); }; };
AE2F3B6018EF7F5A007A4BA0 /* Localizable.strings in Resources */ = {isa = PBXBuildFile; fileRef = AE2F3B5E18EF7F5A007A4BA0 /* Localizable.strings */; };
B65CFF8420F70212009578FF /* WCEasySettingsButton.m in Sources */ = {isa = PBXBuildFile; fileRef = B65CFF8320F70212009578FF /* WCEasySettingsButton.m */; };
BF2AC478177FF0B700D3CF93 /* ArmLJit.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BF2AC475177FF06600D3CF93 /* ArmLJit.cpp */; };
BF9D514317865CD800B5864B /* SndOut.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BF9D514117865CD800B5864B /* SndOut.cpp */; };
BF9D516817867F7D00B5864B /* ABXYPad.png in Resources */ = {isa = PBXBuildFile; fileRef = BF9D516017867F7D00B5864B /* ABXYPad.png */; };
Expand Down Expand Up @@ -175,7 +176,6 @@
CA3224E31CD41D7C00C5BEA7 /* Security.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = D32C39D4178E73B500E6809E /* Security.framework */; };
CA4258111CADADF200BFD05E /* UIDevice-Hardware.m in Sources */ = {isa = PBXBuildFile; fileRef = CA4258101CADADF200BFD05E /* UIDevice-Hardware.m */; };
CA4258141CADBD4900BFD05E /* MBProgressHUD.m in Sources */ = {isa = PBXBuildFile; fileRef = CA4258131CADBD4900BFD05E /* MBProgressHUD.m */; };
CA570B651C3B8AA300918E3A /* MHWDirectoryWatcher.m in Sources */ = {isa = PBXBuildFile; fileRef = CA570B641C3B8AA300918E3A /* MHWDirectoryWatcher.m */; };
CA5F11D81CE0EE7500AA1419 /* SharkfoodMuteSwitchDetector.m in Sources */ = {isa = PBXBuildFile; fileRef = CA48465D1CDF9BF2005030EF /* SharkfoodMuteSwitchDetector.m */; };
CA5F11D91CE15F4F00AA1419 /* mute.caf in Resources */ = {isa = PBXBuildFile; fileRef = CA48465F1CDFA47D005030EF /* mute.caf */; };
CA68821D1CDC118500B0ED05 /* iNDSBuildStoreTableViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = CA68821C1CDC118500B0ED05 /* iNDSBuildStoreTableViewController.m */; };
Expand Down Expand Up @@ -354,6 +354,8 @@
AE2F3B6318EF7F75007A4BA0 /* ja */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = ja; path = iNDS/ja.lproj/Localizable.strings; sourceTree = SOURCE_ROOT; };
AE2F3B6418EF7F7F007A4BA0 /* zh-Hans */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = "zh-Hans"; path = "iNDS/zh-Hans.lproj/Localizable.strings"; sourceTree = SOURCE_ROOT; };
AE2F3B6518EF7F88007A4BA0 /* zh-Hant */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = "zh-Hant"; path = "iNDS/zh-Hant.lproj/Localizable.strings"; sourceTree = SOURCE_ROOT; };
B65CFF8220F70212009578FF /* WCEasySettingsButton.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = WCEasySettingsButton.h; path = WCEasySettings/WCEasySettingsButton.h; sourceTree = "<group>"; };
B65CFF8320F70212009578FF /* WCEasySettingsButton.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; name = WCEasySettingsButton.m; path = WCEasySettings/WCEasySettingsButton.m; sourceTree = "<group>"; };
BF2AC475177FF06600D3CF93 /* ArmLJit.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = ArmLJit.cpp; path = desmume/src/ArmLJit.cpp; sourceTree = SOURCE_ROOT; };
BF2AC476177FF06600D3CF93 /* ArmLJit.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ArmLJit.h; path = desmume/src/ArmLJit.h; sourceTree = SOURCE_ROOT; };
BF2AC47A177FF29000D3CF93 /* asm.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = asm.h; path = desmume/src/utils/lightning/arm/asm.h; sourceTree = "<group>"; };
Expand Down Expand Up @@ -621,8 +623,6 @@
CA48465C1CDF9BF2005030EF /* SharkfoodMuteSwitchDetector.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SharkfoodMuteSwitchDetector.h; sourceTree = "<group>"; };
CA48465D1CDF9BF2005030EF /* SharkfoodMuteSwitchDetector.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SharkfoodMuteSwitchDetector.m; sourceTree = "<group>"; };
CA48465F1CDFA47D005030EF /* mute.caf */ = {isa = PBXFileReference; lastKnownFileType = file; path = mute.caf; sourceTree = "<group>"; };
CA570B631C3B8AA300918E3A /* MHWDirectoryWatcher.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MHWDirectoryWatcher.h; sourceTree = "<group>"; };
CA570B641C3B8AA300918E3A /* MHWDirectoryWatcher.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MHWDirectoryWatcher.m; sourceTree = "<group>"; };
CA6614AF1BFF7D7800AAD7D4 /* libFlurry_7.0.0.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libFlurry_7.0.0.a; path = ../ShoutOut/ShoutOut/Flurry/libFlurry_7.0.0.a; sourceTree = "<group>"; };
CA68821B1CDC118500B0ED05 /* iNDSBuildStoreTableViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = iNDSBuildStoreTableViewController.h; sourceTree = "<group>"; };
CA68821C1CDC118500B0ED05 /* iNDSBuildStoreTableViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = iNDSBuildStoreTableViewController.m; sourceTree = "<group>"; };
Expand Down Expand Up @@ -1089,7 +1089,6 @@
BF9D51751786A60E00B5864B /* Settings */,
BFAE6FAB17675623000911CF /* Controls */,
BFAE6F8F176748CF000911CF /* Emulator View */,
BFCFE12E17650D3F000A70CF /* DocWatchHelper */,
BFCFE1191764FCDE000A70CF /* Categories */,
CA031CFE1BEBE1A700EDE98D /* 7z */,
CA031CBB1BEBDC3500EDE98D /* Zip */,
Expand Down Expand Up @@ -1123,15 +1122,6 @@
name = Categories;
sourceTree = "<group>";
};
BFCFE12E17650D3F000A70CF /* DocWatchHelper */ = {
isa = PBXGroup;
children = (
CA570B631C3B8AA300918E3A /* MHWDirectoryWatcher.h */,
CA570B641C3B8AA300918E3A /* MHWDirectoryWatcher.m */,
);
name = DocWatchHelper;
sourceTree = "<group>";
};
BFCFE12F17650ED0000A70CF /* DeSmuME */ = {
isa = PBXGroup;
children = (
Expand Down Expand Up @@ -1699,6 +1689,8 @@
CA32244F1CC9BEBC00C5BEA7 /* WCEasySettingsUrl.m */,
CA3224581CCA86FC00C5BEA7 /* WCEasySettingsCustom.h */,
CA3224591CCA86FC00C5BEA7 /* WCEasySettingsCustom.m */,
B65CFF8220F70212009578FF /* WCEasySettingsButton.h */,
B65CFF8320F70212009578FF /* WCEasySettingsButton.m */,
);
name = WCEasySettings;
sourceTree = "<group>";
Expand Down Expand Up @@ -2070,7 +2062,6 @@
CAB2C4C61CB5F7FC00ED22BB /* TPCircularBuffer.c in Sources */,
BFCFE245176634EE000A70CF /* slot2_paddle.cpp in Sources */,
CA031D271BEBE1EB00EDE98D /* Delta.c in Sources */,
CA570B651C3B8AA300918E3A /* MHWDirectoryWatcher.m in Sources */,
CAB2C4BD1CB5F2C300ED22BB /* EZAudioPlotGL.m in Sources */,
BFCFE246176634EE000A70CF /* slot2_piano.cpp in Sources */,
CAB2C4BA1CB5F2C300ED22BB /* EZAudioFloatData.m in Sources */,
Expand All @@ -2093,6 +2084,7 @@
CA031D331BEBE36200EDE98D /* 7zAlloc.c in Sources */,
8B4895C5178CE15D00BA61C3 /* iNDSROMTableViewController.m in Sources */,
CA908C081C2356F700B2A864 /* SCLAlertViewResponder.m in Sources */,
B65CFF8420F70212009578FF /* WCEasySettingsButton.m in Sources */,
8B28306B178DDC7F00E92785 /* iNDSDonationViewController.m in Sources */,
D31CC8A417927BCB0098FB9C /* CHBgDropboxSync.m in Sources */,
D31CC8A517927BCB0098FB9C /* DropboxClearer.m in Sources */,
Expand Down
4 changes: 2 additions & 2 deletions iNDS.xcodeproj/xcshareddata/xcschemes/iNDS.xcscheme
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
buildForAnalyzing = "YES">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "711B04D5E2C572F17F366B7AEE4CAB68"
BlueprintIdentifier = "D1472A4FC467EB132BFC5E4616B26273"
BuildableName = "libPods-iNDS.a"
BlueprintName = "Pods-iNDS"
ReferencedContainer = "container:Pods/Pods.xcodeproj">
Expand Down Expand Up @@ -42,7 +42,7 @@
buildForAnalyzing = "YES">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "A6FB3F6948043836EFEEA17D6C27E2FC"
BlueprintIdentifier = "E419D9020BB55800B1A1519B7032D0BB"
BuildableName = "libUnrarKit.a"
BlueprintName = "UnrarKit"
ReferencedContainer = "container:Pods/Pods.xcodeproj">
Expand Down
28 changes: 27 additions & 1 deletion iNDS/AppDelegate.m
Original file line number Diff line number Diff line change
Expand Up @@ -559,6 +559,32 @@ - (WCEasySettingsViewController *)getSettingsViewController
[[WCEasySettingsSwitch alloc] initWithIdentifier:@"showFPS"
title:@"Show FPS"]];

WCEasySettingsSection *resetSection = [[WCEasySettingsSection alloc] initWithTitle:@"RESET" subTitle:@"Erase All Content"];
WCEasySettingsButton *button = [[WCEasySettingsButton alloc] initWithTitle:@"Reset" subtitle:nil callback:^(bool finished) {
NSArray *everything = @[[self batteryDir],
[self documentsPath]];
NSFileManager *fileMgr = [NSFileManager defaultManager];
for (NSString *path in everything) {
NSArray *files = [fileMgr contentsOfDirectoryAtPath:path error:nil];
for (NSString *file in files) {
NSLog(@"Removing %@", [path stringByAppendingPathComponent:file]);
[fileMgr removeItemAtPath:[path stringByAppendingPathComponent:file] error:nil];
}
}

UIAlertController *alert = [UIAlertController alertControllerWithTitle:@"Success" message:@"Content successfully reset!" preferredStyle:UIAlertControllerStyleAlert];
UIAlertAction* defaultAction = [UIAlertAction actionWithTitle:@"OK" style:UIAlertActionStyleDefault
handler:^(UIAlertAction * action) {}];

[alert addAction:defaultAction];

[_settingsViewController presentViewController:alert animated:YES completion:nil];

}];
resetSection.items = @[
button
];


// Credits
NSString *myVersion = [[[NSBundle mainBundle] infoDictionary] objectForKey:@"CFBundleShortVersionString"];
Expand Down Expand Up @@ -589,7 +615,7 @@ - (WCEasySettingsViewController *)getSettingsViewController



_settingsViewController.sections = @[controlsSection, dropboxSection, /*buildStoreSection,*/ graphicsSection, coreSection, emulatorSection, audioSection, interfaceSection, creditsSection];
_settingsViewController.sections = @[controlsSection, dropboxSection, /*buildStoreSection,*/ graphicsSection, coreSection, emulatorSection, audioSection, interfaceSection, resetSection, creditsSection];
}

return _settingsViewController;
Expand Down
Loading

0 comments on commit 990539f

Please sign in to comment.