-
-
Notifications
You must be signed in to change notification settings - Fork 14.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
mesen: init at 2.0.0-unstable-2024-09-15
- Loading branch information
Showing
3 changed files
with
429 additions
and
0 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,70 @@ | ||
diff --git a/UI/Config/ConfigManager.cs b/UI/Config/ConfigManager.cs | ||
index 56c1ff1..ed5fe8a 100644 | ||
--- a/UI/Config/ConfigManager.cs | ||
+++ b/UI/Config/ConfigManager.cs | ||
@@ -51,7 +51,6 @@ namespace Mesen.Config | ||
} else { | ||
homeFolder = DefaultDocumentsFolder; | ||
} | ||
- Program.ExtractNativeDependencies(homeFolder); | ||
_homeFolder = homeFolder; | ||
Config.Save(); | ||
} | ||
diff --git a/UI/Program.cs b/UI/Program.cs | ||
index dfc4ba3..632cef2 100644 | ||
--- a/UI/Program.cs | ||
+++ b/UI/Program.cs | ||
@@ -54,8 +54,6 @@ namespace Mesen | ||
Environment.CurrentDirectory = ConfigManager.HomeFolder; | ||
|
||
if(!File.Exists(ConfigManager.GetConfigFile())) { | ||
- //Could not find configuration file, show wizard | ||
- ExtractNativeDependencies(ConfigManager.HomeFolder); | ||
App.ShowConfigWindow = true; | ||
BuildAvaloniaApp().StartWithClassicDesktopLifetime(args, ShutdownMode.OnMainWindowClose); | ||
if(File.Exists(ConfigManager.GetConfigFile())) { | ||
@@ -68,9 +66,6 @@ namespace Mesen | ||
//Start loading config file in a separate thread | ||
Task.Run(() => ConfigManager.LoadConfig()); | ||
|
||
- //Extract core dll & other native dependencies | ||
- ExtractNativeDependencies(ConfigManager.HomeFolder); | ||
- | ||
if(CommandLineHelper.IsTestRunner(args)) { | ||
return TestRunner.Run(args); | ||
} | ||
@@ -147,7 +142,7 @@ namespace Mesen | ||
libraryName = libraryName + ".dylib"; | ||
} | ||
} | ||
- return NativeLibrary.Load(Path.Combine(ConfigManager.HomeFolder, libraryName)); | ||
+ return NativeLibrary.Load(Path.Combine(AppContext.BaseDirectory, libraryName)); | ||
} | ||
return IntPtr.Zero; | ||
} | ||
diff --git a/UI/UI.csproj b/UI/UI.csproj | ||
index 7ced93d..81e216b 100644 | ||
--- a/UI/UI.csproj | ||
+++ b/UI/UI.csproj | ||
@@ -591,21 +591,7 @@ | ||
<EmbeddedResource Include="Debugger\Utilities\LuaScripts\NtscSafeArea.lua" /> | ||
<EmbeddedResource Include="Debugger\Utilities\LuaScripts\NesPianoRoll.lua" /> | ||
<EmbeddedResource Include="Debugger\Utilities\LuaScripts\ReverseMode.lua" /> | ||
- <EmbeddedResource Include="Dependencies.zip" /> | ||
<EmbeddedResource Include="Localization\resources.en.xml" WithCulture="false" Type="Non-Resx" /> | ||
<EmbeddedResource Include="Utilities\DipSwitchDefinitions.xml" /> | ||
</ItemGroup> | ||
- | ||
- <Target Name="PreBuildWindows" BeforeTargets="PreBuildEvent" Condition="'$(RuntimeIdentifier)'=='win-x64'"> | ||
- <Exec Command="cd $(OutDir)
rd Dependencies /s /q
md Dependencies
xcopy /s $(ProjectDir)Dependencies\* Dependencies
copy libHarfBuzzSharp.dll Dependencies
copy libSkiaSharp.dll Dependencies
copy MesenCore.dll Dependencies
cd Dependencies
del ..\Dependencies.zip
powershell Compress-Archive -Path * -DestinationPath '..\Dependencies.zip' -Force
copy ..\Dependencies.zip $(ProjectDir)" /> | ||
- </Target> | ||
- | ||
- <Target Name="PreBuildLinux" BeforeTargets="PreBuildEvent" Condition="'$(RuntimeIdentifier)'=='linux-x64'"> | ||
- <Exec Command="cd $(OutDir)
rm -rf Dependencies
mkdir Dependencies
cp -R $(ProjectDir)/Dependencies/* Dependencies
cp libHarfBuzzSharp.so Dependencies
cp libSkiaSharp.so Dependencies
cp MesenCore.so Dependencies
cd Dependencies
rm ../Dependencies.zip
zip -r ../Dependencies.zip *
cp ../Dependencies.zip $(ProjectDir)" /> | ||
- </Target> | ||
- | ||
- <Target Name="PreBuildOsx" BeforeTargets="PreBuildEvent" Condition="'$(RuntimeIdentifier)'=='osx-x64' Or '$(RuntimeIdentifier)'=='osx-arm64'"> | ||
- <Exec Command="cp ./Assets/MesenIcon.icns $(OutDir)
cd $(OutDir)
rm -R Dependencies
mkdir Dependencies
cp -R $(ProjectDir)/Dependencies/* Dependencies
cp libHarfBuzzSharp.dylib Dependencies
cp libSkiaSharp.dylib Dependencies
cp MesenCore.dylib Dependencies
cd Dependencies
rm ../Dependencies.zip
zip -r ../Dependencies.zip *
cp ../Dependencies.zip $(ProjectDir)" /> | ||
- </Target> | ||
- | ||
</Project> |
Oops, something went wrong.