1919 from .hw .hw import QlHwManager
2020 from .loader .loader import QlLoader
2121
22- from .const import QL_ARCH_ENDIAN , QL_ENDIAN , QL_VERBOSE , QL_OS_INTERPRETER , QL_OS_BAREMETAL , QL_OS_ALL
22+ from .const import QL_ARCH_ENDIAN , QL_ENDIAN , QL_VERBOSE , QL_OS_INTERPRETER , QL_OS_BAREMETAL
2323from .exception import QlErrorFileNotFound , QlErrorArch , QlErrorOsType
2424from .utils import *
2525from .core_struct import QlCoreStructs
@@ -194,24 +194,19 @@ def __init__(
194194 ##############
195195 # Components #
196196 ##############
197- if self . gpos or self .baremetal :
197+ if not self .interpreter :
198198 self ._mem = component_setup ("os" , "memory" , self )
199199 self ._reg = component_setup ("arch" , "register" , self )
200-
201- if self .baremetal :
202- self ._hw = component_setup ("hw" , "hw" , self )
200+
203201
204202 self ._arch = arch_setup (self .archtype , self )
205203
206204 # Once we finish setting up arch layer, we can init QlCoreHooks.
207- self .uc = self .arch .init_uc
208- QlCoreHooks .__init__ (self , self .uc )
205+ if not self .interpreter :
206+ self .uc = self .arch .init_uc
207+ QlCoreHooks .__init__ (self , self .uc )
209208
210- # Setup Outpt
211- if self .gpos or self .baremetal :
212209 self .arch .utils .setup_output ()
213-
214- if self .gpos :
215210 self ._os = os_setup (self .archtype , self .ostype , self )
216211
217212 if stdin is not None :
@@ -225,10 +220,7 @@ def __init__(
225220
226221 # Run the loader
227222 self .loader .run ()
228-
229- if self .gpos :
230- # Add extra guard options when configured to do so
231- self ._init_stop_guard ()
223+ self ._init_stop_guard ()
232224
233225 #####################
234226 # Qiling Components #
@@ -481,15 +473,6 @@ def baremetal(self) -> bool:
481473 """
482474 return self .ostype in QL_OS_BAREMETAL
483475
484- @property
485- def gpos (self ) -> bool :
486- """ General purpose OS
487- - Windows, Linux, MacOS and etc
488-
489- Type: bool
490- """
491- return self .ostype in QL_OS_ALL
492-
493476 @property
494477 def platform_os (self ):
495478 """ Specify current platform os where Qiling runs on.
0 commit comments