Skip to content

Commit

Permalink
[Backport release-24.11] mesen: init at 2.0.0-unstable-2024-12-25 (#3…
Browse files Browse the repository at this point in the history
  • Loading branch information
corngood authored Jan 2, 2025
2 parents b69613f + 6864dc1 commit 54787d8
Show file tree
Hide file tree
Showing 4 changed files with 444 additions and 0 deletions.
272 changes: 272 additions & 0 deletions pkgs/by-name/me/mesen/deps.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

16 changes: 16 additions & 0 deletions pkgs/by-name/me/mesen/dont-use-alternative-restore-sources.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
diff --git a/UI/UI.csproj b/UI/UI.csproj
index 2a0eb78..74751bc 100644
--- a/UI/UI.csproj
+++ b/UI/UI.csproj
@@ -90,11 +90,6 @@
<None Remove="Styles\StartupStyles.xaml" />
<None Remove="Utilities\DipSwitchDefinitions.xml" />
</ItemGroup>
- <PropertyGroup>
- <RestoreSources>
- https://nuget-feed-nightly.avaloniaui.net/v3/index.json;https://api.nuget.org/v3/index.json
- </RestoreSources>
- </PropertyGroup>
<ItemGroup>
<TrimmerRootAssembly Include="Mesen" />
<TrimmerRootAssembly Include="AvaloniaEdit" />
74 changes: 74 additions & 0 deletions pkgs/by-name/me/mesen/dont-zip-libraries.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@
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 053d495..2a0eb78 100644
--- a/UI/UI.csproj
+++ b/UI/UI.csproj
@@ -634,7 +634,6 @@
<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>
@@ -644,16 +643,5 @@
</AvaloniaXaml>
</ItemGroup>

- <Target Name="PreBuildWindows" BeforeTargets="PreBuildEvent" Condition="'$(RuntimeIdentifier)'=='win-x64'">
- <Exec Command="cd $(OutDir)&#xD;&#xA;rd Dependencies /s /q&#xD;&#xA;md Dependencies&#xD;&#xA;xcopy /s $(ProjectDir)Dependencies\* Dependencies&#xD;&#xA;copy libHarfBuzzSharp.dll Dependencies&#xD;&#xA;copy libSkiaSharp.dll Dependencies&#xD;&#xA;copy MesenCore.dll Dependencies&#xD;&#xA;cd Dependencies&#xD;&#xA;del ..\Dependencies.zip&#xD;&#xA;powershell Compress-Archive -Path * -DestinationPath '..\Dependencies.zip' -Force&#xD;&#xA;copy ..\Dependencies.zip $(ProjectDir)" />
- </Target>
-
- <Target Name="PreBuildLinux" BeforeTargets="PreBuildEvent" Condition="'$(RuntimeIdentifier)'=='linux-x64'">
- <Exec Command="cd $(OutDir)&#xD;&#xA;rm -rf Dependencies&#xD;&#xA;mkdir Dependencies&#xD;&#xA;cp -R $(ProjectDir)/Dependencies/* Dependencies&#xD;&#xA;cp libHarfBuzzSharp.so Dependencies&#xD;&#xA;cp libSkiaSharp.so Dependencies&#xD;&#xA;cp MesenCore.so Dependencies&#xD;&#xA;cd Dependencies&#xD;&#xA;rm ../Dependencies.zip&#xD;&#xA;zip -r ../Dependencies.zip *&#xD;&#xA;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)&#xD;&#xA;cd $(OutDir)&#xD;&#xA;rm -R Dependencies&#xD;&#xA;mkdir Dependencies&#xD;&#xA;cp -R $(ProjectDir)/Dependencies/* Dependencies&#xD;&#xA;cp libHarfBuzzSharp.dylib Dependencies&#xD;&#xA;cp libSkiaSharp.dylib Dependencies&#xD;&#xA;cp MesenCore.dylib Dependencies&#xD;&#xA;cd Dependencies&#xD;&#xA;rm ../Dependencies.zip&#xD;&#xA;zip -r ../Dependencies.zip *&#xD;&#xA;cp ../Dependencies.zip $(ProjectDir)" />
- </Target>

</Project>

Loading

0 comments on commit 54787d8

Please sign in to comment.