Skip to content

Commit e1b64df

Browse files
committed
enable folder creation by default on IDA 9.3+
testing showed that this is now fast enough to not cause meaningful slowdowns
1 parent c72bd21 commit e1b64df

File tree

1 file changed

+6
-9
lines changed
  • Il2CppInspector.Common/Outputs/ScriptResources/Targets

1 file changed

+6
-9
lines changed

Il2CppInspector.Common/Outputs/ScriptResources/Targets/IDA.py

Lines changed: 6 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -10,19 +10,16 @@
1010
import ida_segment
1111
import ida_funcs
1212
import ida_xref
13+
import ida_pro
1314

14-
try: # 7.7+
15+
if ida_pro.IDA_SDK_VERSION > 770:
1516
import ida_srclang
17+
import ida_dirtree
1618
IDACLANG_AVAILABLE = True
19+
FOLDERS_AVAILABLE = True
1720
print("IDACLANG available")
18-
except ImportError:
21+
else:
1922
IDACLANG_AVAILABLE = False
20-
21-
try:
22-
import ida_dirtree
23-
FOLDERS_AVAILABLE = True
24-
print("folders available")
25-
except ImportError:
2623
FOLDERS_AVAILABLE = False
2724

2825
#try:
@@ -179,7 +176,7 @@ def import_c_typedef(self, type_def: str):
179176

180177
# optional
181178
def add_function_to_group(self, address: int, group: str):
182-
if not FOLDERS_AVAILABLE or True: # enable at your own risk - this is slow
179+
if not FOLDERS_AVAILABLE or ida_pro.IDA_SDK_VERSION < 930: # enable at your own risk on pre 9.3 - this is slow
183180
return
184181

185182
if group not in self._folders:

0 commit comments

Comments
 (0)