@@ -17,7 +17,8 @@ public static void PreloaderMain(string[] args)
17
17
18
18
PlatformUtils . SetPlatform ( ) ;
19
19
20
- Paths . SetExecutablePath ( EnvVars . DOORSTOP_PROCESS_PATH , bepinPath , EnvVars . DOORSTOP_MANAGED_FOLDER_DIR , EnvVars . DOORSTOP_DLL_SEARCH_DIRS ) ;
20
+ Paths . SetExecutablePath ( EnvVars . DOORSTOP_PROCESS_PATH , bepinPath , EnvVars . DOORSTOP_MANAGED_FOLDER_DIR ,
21
+ EnvVars . DOORSTOP_DLL_SEARCH_DIRS ) ;
21
22
22
23
// Cecil 0.11 requires one to manually set up list of trusted assemblies for assembly resolving
23
24
AppDomain . CurrentDomain . AddCecilPlatformAssemblies ( Paths . ManagedPath ) ;
@@ -67,12 +68,9 @@ public static void Main(string[] args)
67
68
// We set it to the current directory first as a fallback, but try to use the same location as the .exe file.
68
69
var silentExceptionLog = $ "preloader_{ DateTime . Now : yyyyMMdd_HHmmss_fff} .log";
69
70
Mutex mutex = null ;
70
-
71
+
71
72
try
72
73
{
73
- mutex = new Mutex ( false , Process . GetCurrentProcess ( ) . ProcessName + typeof ( DoorstopEntrypoint ) . FullName ) ;
74
- mutex . WaitOne ( ) ;
75
-
76
74
EnvVars . LoadVars ( ) ;
77
75
78
76
silentExceptionLog =
@@ -81,6 +79,11 @@ public static void Main(string[] args)
81
79
// Get the path of this DLL via Doorstop env var because Assembly.Location mangles non-ASCII characters on some versions of Mono for unknown reasons
82
80
preloaderPath = Path . GetDirectoryName ( Path . GetFullPath ( EnvVars . DOORSTOP_INVOKE_DLL_PATH ) ) ;
83
81
82
+ mutex = new Mutex ( false ,
83
+ Process . GetCurrentProcess ( ) . ProcessName + EnvVars . DOORSTOP_PROCESS_PATH +
84
+ typeof ( DoorstopEntrypoint ) . FullName ) ;
85
+ mutex . WaitOne ( ) ;
86
+
84
87
AppDomain . CurrentDomain . AssemblyResolve += ResolveCurrentDirectory ;
85
88
86
89
UnityPreloaderRunner . PreloaderMain ( args ) ;
0 commit comments