Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve linux support (new launcher) #1848

Open
wants to merge 606 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 250 commits
Commits
Show all changes
606 commits
Select commit Hold shift + click to select a range
644c0a5
Attempt fix SteamFinder for macos
Measurity Jul 7, 2024
f22b8ad
Attempt fix game paths for OSX
Measurity Jul 7, 2024
8e7d364
Attempt fix CurrentExecutablePath for OSX
Measurity Jul 7, 2024
ec209ae
Fixed more paths for OSX
Measurity Jul 7, 2024
e27911d
More path fixes for MacOS
Measurity Jul 7, 2024
b51b795
Fixed steam_api.bundle path for OSX
Measurity Jul 7, 2024
978d6b0
Fixed paths to resource data for server on OSX
Measurity Jul 7, 2024
e1d0cd1
Fixed asset bundle parsing on OSX
Measurity Jul 7, 2024
7e80e63
Added more logs for platform checks
Measurity Jul 7, 2024
24339bc
Fixed pipe is broken error when connection to launcher is not made
Measurity Jul 7, 2024
6b18074
Fixed steam platform check on OSX
Measurity Jul 7, 2024
e3b215e
Attempt fix to start Steam on OSX
Measurity Jul 7, 2024
7020727
Attempt fix StartSubnauticaAsync on OSX
Measurity Jul 7, 2024
d9737df
Attempt fix launch game through Steam on OSX
Measurity Jul 7, 2024
abd7855
Added create directory when serializing nitrox configs
Measurity Jul 7, 2024
13d908c
Attempt fix steam id env variable for process start on OSX
Measurity Jul 7, 2024
f6e26c1
Implemented Backup System and restore dialog + logic
NinjaPedroX Jul 11, 2024
7bfaf3a
Backup code cleanup and minor fixes
Measurity Jul 12, 2024
83bf80d
Fixed "Restore Backup" in ManageServerViewModel not changing UI
Measurity Jul 12, 2024
ba18e15
Fixed null value for TypedValidationAttribute to set expected validat…
Measurity Jul 12, 2024
5cd096a
Cleaned up converter types
Measurity Jul 12, 2024
fcc9b43
Various fixes and improvements
NinjaPedroX Jul 13, 2024
94c3758
Fixed log spam
NinjaPedroX Jul 13, 2024
b0646b8
Added property missing cache to not warn for the same value
Measurity Jul 13, 2024
950ca2d
Removed OldWorldManager.cs and improved Backup logic
NinjaPedroX Jul 13, 2024
0bf889d
Refactored Extensions.GetSavesFolderDir to be for KeyValueStore
Measurity Jul 13, 2024
8056f69
Moved clipboard code from DialogBoxModal.axaml.cs to its ViewModel
Measurity Jul 13, 2024
0ee6a56
Disabled OS styling for windows if CanReize is false
Measurity Jul 13, 2024
9fb9a22
Fixed cancel action on modals being interpreted as confirmation
Measurity Jul 13, 2024
0d8ba2f
Cleaned up get parent Window from Visual
Measurity Jul 13, 2024
0fc4b68
Fix typo
Measurity Jul 14, 2024
bbe50b0
Delayed init of game path out of OptionsViewModel ctor
Measurity Jul 14, 2024
99321b9
Fixed previewer not displaying views
Measurity Jul 14, 2024
235faa5
Fixed ManageServerView.axaml not working in previewer
Measurity Jul 14, 2024
ca2cb22
Minor readability improvements for RichTextBlock.cs
Measurity Jul 14, 2024
eb983d5
Fixed directory not found error when making backups on old saves
Measurity Jul 14, 2024
d74a753
Fixed bugs with backup logic
Measurity Jul 14, 2024
3c474fd
Fixed NRE when opening OptionsView.axaml
Measurity Jul 16, 2024
be702e8
Centralized OffScreenMargin padding and fixed window styling without …
NinjaPedroX Jul 20, 2024
132177b
Fixed OptionsView SavesFolderDir and LaunchGameView icon not updating
NinjaPedroX Jul 20, 2024
50e954d
Fixed OptionsView having no values in previewer
Measurity Jul 20, 2024
44de5a7
Minor improvements to EnableDefaultWindowAnimations
Measurity Jul 20, 2024
f0f35d6
Refactored scroll login from MangeServerView to NitroxAttached proper…
Measurity Jul 21, 2024
b982a02
RichTextBlock logic now uses ReadOnlySpan where possible
Measurity Jul 26, 2024
2f56dcb
More performance improvements to RichTextBlock
Measurity Jul 26, 2024
ff28d0c
Removed redundant null checking in RichTextBlock.cs
Measurity Jul 28, 2024
a9be096
Removed GameInstallation type in favor of GameFinderResult
Measurity Jul 29, 2024
76aa6d1
Fix registry check for Steam ready not using proper cancellation token
Measurity Jul 31, 2024
9aab019
Fixed date in BlogView being wrong in some cultures
Measurity Aug 12, 2024
89f79c9
Remove race condition at compile time
dartasen Aug 11, 2024
00eb859
Fix StackOverflow happening with .ressources
dartasen Aug 12, 2024
d63039c
Fixed editorconfig for space before closing tag in xml files
Measurity Aug 12, 2024
7f91b80
Fixed vines.png causing huge memory usage when opening BlogView
Measurity Aug 12, 2024
6cc8f44
Use Copy instead of Move in Debug mode for lib folder
dartasen Aug 12, 2024
2754ae8
Fix optional test
dartasen Aug 12, 2024
f0b663a
Optimize images
dartasen Aug 12, 2024
0dde824
Add ConfigureCulture in launcher
dartasen Aug 12, 2024
38fba08
Few fixes on blog UI performance
dartasen Aug 12, 2024
04c89e3
Add pointer cursor when hovering action buttons
dartasen Aug 12, 2024
0d8e43a
Tweak some code inside update view
dartasen Aug 12, 2024
04adf23
Few UI tweaks for colors and cursors
dartasen Aug 12, 2024
6bb468c
Add popup when launching game
dartasen Aug 12, 2024
7aaf264
Review changes
dartasen Aug 12, 2024
34ba1f1
Fixed JIT issue when starting Nitrox.Launcher
Measurity Aug 12, 2024
f3ef133
Prevented extra Nitrox Launcher from opening when one is running
NinjaPedroX Aug 12, 2024
36e3b54
Improved duplicate process code
NinjaPedroX Aug 13, 2024
15f718c
Update avalonia packages
dartasen Aug 12, 2024
cd6933f
Upgrade to 11.1.3
dartasen Aug 13, 2024
00462c8
Temporary fix for toggled switch style
dartasen Aug 13, 2024
a40b318
Added missing icons
dartasen Aug 13, 2024
96d096d
Few tweaks on notifications
dartasen Aug 13, 2024
4e36662
Fixed window animations again that works with Avalonia 11
Measurity Aug 13, 2024
50d1c81
Modified font for modal header
dartasen Aug 13, 2024
243591e
Fixed Nitrox Launcher window not going to front on Windows when a new…
Measurity Aug 13, 2024
8022f5f
Used MainWindowHandle from ProcessEx instead of title for use with Br…
Measurity Aug 13, 2024
91db692
Changed social icons to be vector paths
Measurity Aug 13, 2024
bdcfbf0
Added Nitrox Bluesky account to CommunityView.axaml
Measurity Aug 13, 2024
c62997f
Removed nitroxLogo.png to use Barlow font for "Nitrox" text
Measurity Aug 13, 2024
e9b0811
Fixed FittingWrapPanel oscillating when going past max width
Measurity Aug 13, 2024
28a3266
Used $parent instead of RelativeSource bindings
Measurity Aug 13, 2024
e25b863
Merged Server and Launcher DLLs together which saves ~3MB on release …
Measurity Aug 14, 2024
5ca0fa0
Merge branch 'master' into linux
Measurity Aug 14, 2024
23c5f51
Reverted a change in GenerateLibFolder.props that was used for debugg…
Measurity Aug 14, 2024
eea2f75
Implemented Tornac's "Instant Launch" profile
NinjaPedroX Aug 15, 2024
77b877a
Fixed native dependencies failing to load in release mode
Measurity Aug 15, 2024
47840de
Minor improvements to instant launch
Measurity Aug 15, 2024
7c181ea
Changed -nitrox argument to be --nitrox
Measurity Aug 15, 2024
a78e6e9
Added player name parameter to instantlaunch
Measurity Aug 15, 2024
71e78af
Changed instantlaunch to let server create the empty save when needed
Measurity Aug 15, 2024
bf39895
Removed unused references
NinjaPedroX Aug 15, 2024
0192db8
Fixed server save name not being used when using instantlaunch
Measurity Aug 15, 2024
477ec9f
Fixed color from player name conversion when using --instantlaunch
Measurity Aug 15, 2024
d960d0b
Cleanup images
dartasen Aug 13, 2024
d36348c
Merge remote-tracking branch 'upstream/master' into linux
Measurity Aug 23, 2024
55a0190
Removed extra \ path character from hintpaths in Directory.Build.targets
Measurity Aug 23, 2024
a307567
Remove unused DI and fixed Scrollviewer Style regression
NinjaPedroX Aug 23, 2024
0f3a313
Fixed "DoubleWrites" error in MSBuild for some launcher DLLs
Measurity Aug 24, 2024
987f9d0
Moved Assembly-Csharp dependencies to the top of Directory.Build.targets
Measurity Aug 24, 2024
ee2ffcd
Upgraded Nitrox.Discovery.MSBuild from 0.0.3 to 0.0.4
Measurity Aug 25, 2024
0ed9052
Fix VS deadlocking on DiscoverGame task
Measurity Aug 26, 2024
6c4e321
Merge remote-tracking branch 'upstream/master' into linux
Measurity Aug 26, 2024
9306ec1
fix locating game path
jumpers775 Sep 5, 2024
a938012
remove debug print, whoops
jumpers775 Sep 5, 2024
2421b96
Added "Open world folder" to ServersView.axaml
Measurity Sep 6, 2024
54a0f3b
fix linux URI handling
jumpers775 Sep 6, 2024
5b5ec09
allow game to launch with wine
jumpers775 Sep 6, 2024
ba5d90e
Merge branch 'Measurity:linux' into linux
jumpers775 Sep 6, 2024
7850864
fix game launching on linux
jumpers775 Sep 7, 2024
d6a8e23
remove dxvk cache file
jumpers775 Sep 7, 2024
8827e5e
disable proton logging
jumpers775 Sep 7, 2024
aa3ae7c
switch to using native titlebar on linux
jumpers775 Sep 8, 2024
501cf91
update ProcessEx to support linux and macOS
jumpers775 Sep 8, 2024
dbcc9cf
Updated Nitrox.Discovery.MSBuild to 0.0.10
Measurity Sep 8, 2024
01bcdfb
Fixed GetFullPath throwing NRE on linux
Measurity Sep 8, 2024
33669e9
revert unneeded path changes
jumpers775 Sep 8, 2024
3a7e855
move OS structures
jumpers775 Sep 8, 2024
1824870
revert changes to Nitrox.axaml
jumpers775 Sep 8, 2024
f14e736
use steam proton instead of umu-launcher
jumpers775 Sep 8, 2024
6843863
use proton version selected in steam
jumpers775 Sep 8, 2024
d35a718
fix not launching when no proton version is specified
jumpers775 Sep 8, 2024
62aa7ca
Fixed Nitrox.Launcher sub-project build paths sometimes not working
Measurity Sep 10, 2024
2e92a44
fix ProcessEx
jumpers775 Sep 11, 2024
85690e9
error handling for no proton
jumpers775 Sep 16, 2024
99ac3d3
Improved config.vdf parsing to extract proton version
Measurity Sep 17, 2024
72b63d0
Merge branch 'linux' into HEAD
Measurity Sep 17, 2024
21ebaf7
Added back ProcessEx.ProcessExists
Measurity Oct 16, 2024
d0f7c43
Merge pull request #19 from jumpers775/linux
Measurity Oct 16, 2024
8d42ed7
Cleaned up titlebar hiding logic for linux systems
Measurity Oct 20, 2024
8909f5b
Improved comments of RichTextBlock.cs
Measurity Oct 23, 2024
742522c
Fixed Subnautica not able to be started multiple times
Measurity Oct 28, 2024
d5a9423
Fix native window animations for Windows
NinjaPedroX Oct 29, 2024
d47a8d7
Fixed OSX build failing on wrong game version check
Measurity Nov 1, 2024
a9eaf7b
Updated Nitrox.Discovery.MSBuild dependency to v0.1.0
Measurity Nov 1, 2024
f113746
Fix process finding on macos
Measurity Nov 1, 2024
c153ebe
Used GetProcessesByName instead of GetProcesses in ProcessEx.cs
Measurity Nov 1, 2024
796d723
Merge remote-tracking branch 'upstream/master' into linux
Measurity Nov 1, 2024
3e6161a
Added BringToFront support for Linux systems with X11 window manager
Measurity Nov 3, 2024
25704bd
Fixed blur not being rounded in LaunchGameView.axaml
Measurity Nov 10, 2024
4c615c5
Only show error on inputs that user interacted with
Measurity Nov 10, 2024
c120824
Handle IpcHost case where stream ended while trying to read it
Measurity Nov 10, 2024
49b3d70
Change modal dialogs to use dark theme instead of white
Measurity Nov 12, 2024
6ec224d
Merge remote-tracking branch 'upstream/master' into linux
Measurity Nov 12, 2024
b3e59fb
Fixed asset path not working during tests on Linux
Measurity Nov 12, 2024
9a59c82
Macos bundling task
dartasen Nov 3, 2024
e92faa6
Improve Nitrox Build
dartasen Nov 8, 2024
b2d38d0
Add thing to app.manifest
dartasen Nov 9, 2024
732bd4c
Split up IsElevated to specific processEx
dartasen Nov 9, 2024
1f3ba30
Improve mac experience
dartasen Nov 11, 2024
854c97f
Remove processex code that cause crash with permissions
dartasen Nov 11, 2024
4fbc220
Change log directory
dartasen Nov 11, 2024
c8d7133
Add OS specific test
dartasen Nov 11, 2024
4bb8dfc
Fix NetHelper not working for macos
dartasen Nov 11, 2024
618c977
Cleanup
dartasen Nov 11, 2024
3b44c6d
Try to get modding working
dartasen Nov 12, 2024
4afc0dd
Fix server not being built in IDE
dartasen Nov 12, 2024
c8f51e3
Fixed dialog box styling (text invisible and too bold)
Measurity Nov 12, 2024
a04812c
Added progress indicator to buttons with async command
Measurity Nov 12, 2024
0c95a07
Added dispose impl. to AsyncCommandButtonTagger
Measurity Nov 12, 2024
bde913b
Updated to .net 9.0 and C# lang v13
Measurity Nov 13, 2024
7b3e3b8
Changed error tooltip foreground to black
Measurity Nov 13, 2024
99cc96c
Used source gen regex as partial property in RichTextBlock.cs
Measurity Nov 13, 2024
db6acac
Code comment improvements
Measurity Nov 13, 2024
8cad065
Optimized servers view rendering for many server entries
Measurity Nov 14, 2024
b0fa0ea
Merge remote-tracking branch 'upstream/master' into linux
Measurity Nov 22, 2024
657287e
Added support for starting automatically Steam on Linux
Measurity Nov 22, 2024
7531f0b
Minor changes to align with code style
Measurity Nov 22, 2024
1e0719d
Added ReadStreamExactly extension to ensure streams are read as expected
Measurity Nov 25, 2024
e2663f2
Fixed stream reading logic in BatchCellsParser
Measurity Nov 25, 2024
f01d83b
Moved UI folder into Models
Measurity Nov 25, 2024
e875485
Cleaned up namespaces
Measurity Nov 25, 2024
6362d22
Removed accidental comment from GlobalUsings.cs
Measurity Nov 25, 2024
9cb7be7
Moved MacOS platform files to assets folder
Measurity Nov 25, 2024
6f93854
Added msbuild target to generate Info.plist for MacOS
Measurity Nov 25, 2024
f5990c4
Changed CFBundleExecutable plist to be AssemblyName
Measurity Nov 25, 2024
e028520
Used CDATA tag for plist content in Nitrox.Shared.targets
Measurity Nov 25, 2024
7e5138d
Added embedded server support
Measurity Dec 1, 2024
6584858
Removed view padding in EmbeddedServerView
Measurity Dec 3, 2024
4b047c8
Fix embedded server output not always scrolling to the very bottom
Measurity Dec 3, 2024
befdcee
Added WhenActivated support to dialogs
Measurity Dec 3, 2024
45f62a7
Fix minor memory leak when using input auto focus
Measurity Dec 3, 2024
f36430d
Fixed async command buttons remaining busy when navigating away
Measurity Dec 3, 2024
66e3cd0
Fixed steam launch not using correct path to console_log.txt
Measurity Dec 3, 2024
7ae913b
Fixed server getting stuck via launcher
Measurity Dec 3, 2024
89a325f
Fixed server create not initializing from server.cfg
Measurity Dec 3, 2024
45b6b28
Merged duplicate server start code into ServerService.cs
Measurity Dec 3, 2024
97be24a
Added lock around Servers list changes
Measurity Dec 3, 2024
861aafb
Minor code cleanup of Steam.cs
Measurity Dec 9, 2024
bd7e731
Improved disposing of resources in RegistryEx.cs and Steam.cs
Measurity Dec 9, 2024
849d903
Fixed server duplication in servers list (for real this time)
Measurity Dec 9, 2024
2d4373f
Fixed server not loading correct server.cfg file when multiple saves …
Measurity Dec 9, 2024
f0d5a16
Workaround for bugged ScrollToEnd
Measurity Dec 9, 2024
9a27a5d
Added command history to EmbeddedServer view
Measurity Dec 9, 2024
07c9eca
Changed hotkeys to use KeyBindings collection in EmbeddedServerView
Measurity Dec 10, 2024
f9b99de
Set theme to dark by default
Measurity Dec 10, 2024
de55983
Fix regression of blogs not loading from previous commit
Measurity Dec 10, 2024
edaa5a1
Changed process start code to use ArgumentList
Measurity Dec 10, 2024
cb70f15
Changed notification styling to not use converters with hard coded paths
Measurity Dec 10, 2024
7e244c1
Fix caret not going to end when nav-ing command history
Measurity Dec 10, 2024
f0d3633
Fixed ConfigCommand
Measurity Dec 11, 2024
5134ce5
Fixed Directory.Move issue with using /tmp on Linux
Measurity Dec 11, 2024
039689c
Used Avalonia styling to set SystemDecorations based on current platform
Measurity Dec 11, 2024
22127d8
Changed server console CMD window to be hidden when server is embedded
NinjaPedroX Dec 11, 2024
4485570
Added loading indicator when switching views
Measurity Dec 11, 2024
8fc7c14
Force imbedded server on MacOS
NinjaPedroX Dec 12, 2024
1c1a7f8
Updated Avalonia and MVVM dependencies
Measurity Dec 12, 2024
6f64552
Used OnPlatform syntax to disable embedded on macOS
Measurity Dec 12, 2024
498cd84
Forgot to add back ServerIsOnline check for "embedded server" radio b…
Measurity Dec 12, 2024
ec12cc4
Fixed regression in logging where all sinks used redaction
Measurity Dec 12, 2024
190af88
Various improvements to EmbeddedServerView
NinjaPedroX Dec 12, 2024
3b23c7d
Changed Manage button text to "Console" when embedded, online server
Measurity Dec 12, 2024
81817e8
Added IRoutingScreen.BackAsync<TViewModel> to navigate back to a View…
Measurity Dec 12, 2024
a632280
Added CustomTitlebar control to share for all windows
Measurity Dec 14, 2024
a916fdb
Changed material icon PNGs to SVGs
Measurity Dec 14, 2024
0d25a9e
Cleaned up UpdatesViewModel.cs
Measurity Dec 14, 2024
6697e86
Fix titlebar not clickable
Measurity Dec 14, 2024
505dd3f
Fixed close.svg to allow stroke width
Measurity Dec 14, 2024
34b6b21
Removed server property change message as its not used
Measurity Dec 14, 2024
dabbb2e
Made improvements to the Title Bar
NinjaPedroX Dec 15, 2024
cd1421e
Reverted title bar to constant transparency
NinjaPedroX Dec 15, 2024
8a92bcc
Untangled ButtonStyle.axaml
Measurity Dec 15, 2024
44c2466
Updated CommunityView brand icons and colors
Measurity Dec 15, 2024
c26c67a
Changed notification PNG icons to SVG icons
Measurity Dec 15, 2024
05e25cc
Added support for icon theme switching
Measurity Dec 15, 2024
aae47a0
Fixed stutter when opening OptionsViewModel for first time
Measurity Dec 15, 2024
51b7572
Changed how launcher stops server to be persistent with 30s timeout
Measurity Dec 16, 2024
b8acdc0
Removed dynamic resource binding inside CustomTitlebar to be done in …
Measurity Dec 17, 2024
98b0788
Added dialog to ask if online servers should close onl launcher close
Measurity Dec 17, 2024
e5f514d
Fix wrong if check in ServerEntry.CloseAsync
Measurity Dec 17, 2024
259b449
Removed LoadingView in favor of displaying string
Measurity Dec 20, 2024
c0407d1
Forgot to remove LoadingViewModel.cs file
Measurity Dec 20, 2024
23c6656
Changed MainWindow navigation to use RadioButtons instead of Buttons
Measurity Dec 20, 2024
9f1018f
Fixed styling of send button in EmbeddedServerView
Measurity Dec 20, 2024
c62a840
Changed send.svg to be horizontally symmetric
Measurity Dec 20, 2024
69559e9
Fixed crash on EmbeddedServerView and fixed notification icons
NinjaPedroX Dec 21, 2024
920f115
Fixed broken pipe error on closing server on windows
Measurity Dec 21, 2024
c9828aa
Fixed SVG images not changing opacity correctly
NinjaPedroX Dec 21, 2024
8fd3d96
Fixed null view not binding to data context
Measurity Dec 21, 2024
5b759a9
Started work on making gallery images resize with window
NinjaPedroX Dec 21, 2024
4448a69
Added crash reporting
Measurity Dec 21, 2024
154d8f5
Fixed crash report text not being selectable when cursor is in-betwee…
Measurity Dec 22, 2024
a27ea5d
Handled more review comments
Measurity Dec 22, 2024
b66205d
Changed "copy to clipboard" hotkey to not override ctrl+c of selected…
Measurity Dec 23, 2024
23c9ef3
Fixed window titles to only show on CrashWindow
NinjaPedroX Dec 23, 2024
49e783f
Fixed regression of Avalonia not working in Release mode
Measurity Dec 23, 2024
fa4eac4
Reordered methods in Program.cs so they are chronological
Measurity Dec 23, 2024
89b295b
Changed ProcessUtils.RestartApp to StartSelf
Measurity Dec 23, 2024
44119af
Moved unhandled exception handler from Program.cs to App.axaml.cs
Measurity Dec 23, 2024
7f1061f
Fixed Crash Window not showing up on Windows
NinjaPedroX Dec 23, 2024
47b8e3b
Fixed messages being registered multiple times when quickly switching…
Measurity Dec 23, 2024
634c4b0
Improved launcher build times
Measurity Dec 27, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
8 changes: 5 additions & 3 deletions .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ resharper_braces_for_ifelse = required_for_multiline
resharper_braces_redundant = false
resharper_keep_existing_attribute_arrangement = true
resharper_wrap_object_and_collection_initializer_style = chop_if_long
resharper_space_before_self_closing = true
resharper_xmldoc_space_before_self_closing = true

[*.{proj,csproj,props,targets}]
indent_size = 4
Expand Down Expand Up @@ -107,9 +109,6 @@ csharp_style_var_elsewhere = false:silent
csharp_style_conditional_delegate_call = true:suggestion
csharp_using_directive_placement = outside_namespace:silent

[*.g.cs]
generated_code = true

# Newlines
csharp_new_line_before_open_brace = all
csharp_new_line_before_else = true
Expand Down Expand Up @@ -217,3 +216,6 @@ dotnet_naming_rule.public_fields.severity = warning
dotnet_naming_rule.general_types.symbols = types
dotnet_naming_rule.general_types.style = pascal_case_style
dotnet_naming_rule.general_types.severity = warning

[*.g.cs]
generated_code = true
7 changes: 6 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,11 @@
##
## Get latest from https://github.com/github/gitignore/blob/master/VisualStudio.gitignore

# MacOS specific
.DS_Store
# Generated by MSBuild for MacOS
Info.plist

# User-specific files
*.rsuser
*.suo
Expand Down Expand Up @@ -385,4 +390,4 @@ FodyWeavers.xsd

# JetBrains Rider
.idea/
*.sln.iml
*.sln.iml
74 changes: 39 additions & 35 deletions Directory.Build.props
Original file line number Diff line number Diff line change
@@ -1,29 +1,41 @@
<Project>
<!-- Set default properties for all projects (can be overridden per project) -->
<?xml version="1.0" encoding="utf-8"?>
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">

<Import Project="Nitrox.Shared.props" />

<!-- Framework properties -->
<PropertyGroup>
<LangVersion>12.0</LangVersion>
<LangVersion>13</LangVersion>
<Version>1.8.0.0</Version>
<NitroxProject>false</NitroxProject>
<TestLibrary>false</TestLibrary>
<NitroxLibrary>false</NitroxLibrary>
<UnityModLibrary>false</UnityModLibrary>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<Prefer32Bit>false</Prefer32Bit>
<DebugType>embedded</DebugType>
<AppendTargetFrameworkToOutputPath>false</AppendTargetFrameworkToOutputPath>
<Nullable>disable</Nullable>
<ImplicitUsings>disable</ImplicitUsings>
<PathMap>$(MSBuildProjectDirectory)=$(MSBuildProjectName)</PathMap>
<EnableNETAnalyzers>true</EnableNETAnalyzers>
<PolySharpUsePublicAccessibilityForGeneratedTypes>true</PolySharpUsePublicAccessibilityForGeneratedTypes>
<AccelerateBuildsInVisualStudio>false</AccelerateBuildsInVisualStudio>
</PropertyGroup>

<!-- Nitrox specific properties -->
<PropertyGroup>
<!-- Fix for dotnet build CLI ; MSBuildThisFileDirectory refers to the folder where Directory.Build.props is defined -->
<NitroxRootDir>$(MSBuildThisFileDirectory)</NitroxRootDir>
<Authors>Nitrox</Authors>
<Company>Nitrox</Company>
<NitroxProject>false</NitroxProject>
<TestLibrary>false</TestLibrary>
<NitroxLibrary>false</NitroxLibrary>
<UnityModLibrary>false</UnityModLibrary>
</PropertyGroup>

<PropertyGroup Condition="$([System.Text.RegularExpressions.Regex]::IsMatch($(MSBuildProjectName), '^Nitrox.*$'))">
<NitroxProject>true</NitroxProject>
</PropertyGroup>
<PropertyGroup Condition="'$(NitroxProject)' == 'true'">
<PropertyGroup Condition="'$(NitroxProject)' == 'true' and '$(MSBuildProjectName)' != 'Nitrox.Test'">
<NitroxLibrary>true</NitroxLibrary>
</PropertyGroup>
<PropertyGroup Condition="'$(NitroxLibrary)' == 'true' and '$(MSBuildProjectName)' != 'NitroxModel' and '$(MSBuildProjectName)' != 'NitroxServer'">
<PropertyGroup Condition="'$(NitroxLibrary)' == 'true' and '$(MSBuildProjectName)' != 'NitroxModel' and '$(MSBuildProjectName)' != 'NitroxServer' and '$(MSBuildProjectName)' != 'Nitrox.Launcher'">
<UnityModLibrary>true</UnityModLibrary>
</PropertyGroup>
<PropertyGroup Condition="'$(MSBuildProjectName)' == 'Nitrox.Test'">
Expand All @@ -35,50 +47,42 @@
</PropertyGroup>

<!-- Shared dependencies for all Nitrox.* projects -->
<Choose>
<When Condition="'$(NitroxProject)' == 'true'">
<ItemGroup>
<PackageReference Include="JetBrains.Annotations" Version="2023.3.0">
<Aliases>JB</Aliases>
</PackageReference>

<PackageReference Include="PolySharp" Version="1.14.1">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets>
</PackageReference>

<PackageReference Include="System.Memory" Version="4.5.5" />
<PackageReference Include="System.ValueTuple" Version="4.5.0" />
</ItemGroup>
</When>
</Choose>
<ItemGroup Condition="'$(NitroxProject)' == 'true'">
<PackageReference Include="JetBrains.Annotations" Version="2024.2.0">
<Aliases>JB</Aliases>
</PackageReference>
<PackageReference Include="IsExternalInit" Version="1.0.3">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Include="IndexRange" Version="1.0.3" />
<PackageReference Include="System.Memory" Version="4.5.5" />
<PackageReference Include="System.ValueTuple" Version="4.5.0" />
</ItemGroup>

<!-- Include default project references to all other "Nitrox*" projects -->
<Choose>
<When Condition="'$(UnityModLibrary)' == 'true'">
<When Condition="'$(UnityModLibrary)' == 'true' or '$(TestLibrary)' == 'true'">
<ItemGroup>
<PackageReference Include="BepInEx.AssemblyPublicizer.MSBuild" Version="0.4.2">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>build; native; contentfiles; analyzers</IncludeAssets>
</PackageReference>
<PackageReference Include="Nitrox.Discovery.MSBuild" Version="0.0.5">
<PackageReference Include="Nitrox.Discovery.MSBuild" Version="0.1.0">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>build; native; contentfiles; analyzers</IncludeAssets>
</PackageReference>
<ProjectReference Include="$(SolutionDir)NitroxModel\NitroxModel.csproj">
<Name>NitroxModel</Name>
</ProjectReference>
<PackageReference Include="Nitrox.Analyzers" Version="*">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
<IncludeAssets>build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
</ItemGroup>
</When>
</Choose>

<!-- Set internals visible for all projects for Nitrox.Test (excluding Nitrox.Test itself) -->
<Choose>
<When Condition="'$(NitroxLibrary)' == 'true' and '$(TestLibrary)' != 'true'">
<When Condition="'$(NitroxLibrary)' == 'true'">
<ItemGroup>
<AssemblyAttribute Include="System.Runtime.CompilerServices.InternalsVisibleTo">
<_Parameter1>Nitrox.Test</_Parameter1>
Expand Down
Loading