gibbed / Gibbed.BorderlandsOz

Tools & code for use with Borderlands: The Pre-Sequel!
zlib License
176 stars 40 forks source link

Can this be compiled with Mono? #19

Closed themightyoarfish closed 5 years ago

themightyoarfish commented 5 years ago

I'm currently experimenting with using Mono on this code in order to run it on Linux, but I have never used C# before. It seems xbuild can be used to compile visual studio projects, but running

xbuild The\ Pre-Sequel\!.sln /verbosity:detailed

gives me this:

[…]
/opt/local/lib/mono/4.5/Microsoft.Common.targets:  warning : Reference 'PresentationFramework' not resolved
                For searchpath {CandidateAssemblyFiles}
                Warning: {CandidateAssemblyFiles} not supported currently
                For searchpath {HintPathFromItem}
                HintPath attribute not found
                For searchpath {TargetFrameworkDirectory}
                Considered target framework dir /opt/local/lib/mono/4.0, assembly named 'PresentationFramework' not found.
                For searchpath {PkgConfig}
                Considered PresentationFramework, but could not find in any pkg-config files.
                For searchpath {GAC}
                Considered PresentationFramework, but could not find in the GAC.
                For searchpath {RawFileName}
                Considered '/Volumes/Data/Downloads/Sources/Gibbed.BorderlandsOz/projects/Gibbed.BorderlandsOz.SaveEdit/PresentationFramework' as a file, but the file does not exist
                For searchpath ../../bin/
                Considered '/Volumes/Data/Downloads/Sources/Gibbed.BorderlandsOz/bin/PresentationFramework' as a file, but the file does not exist
                Considered '/Volumes/Data/Downloads/Sources/Gibbed.BorderlandsOz/bin/PresentationFramework.exe' as a file, but the file does not exist
                Considered '/Volumes/Data/Downloads/Sources/Gibbed.BorderlandsOz/bin/PresentationFramework.dll' as a file, but the file does not exist
            Target GenerateSatelliteAssemblies:
            No input files were specified for target GenerateSatelliteAssemblies, skipping.
            Target GenerateTargetFrameworkMonikerAttribute:
            Skipping target "GenerateTargetFrameworkMonikerAttribute" because its outputs are up-to-date.
            Target CoreCompile:
                Tool /opt/local/lib/mono/4.5/mcs.exe execution started with arguments: /noconfig /debug:full /debug+ /optimize- /out:obj/Debug/Gibbed.BorderlandsOz.SaveEdit.exe /resource:obj/Debug/Gibbed.BorderlandsOz.SaveEdit.Properties.Resources.resources /resource:obj/Debug/Gibbed.BorderlandsOz.SaveEdit.Caliburn.Micro.dll,Caliburn.Micro.dll /resource:obj/Debug/Gibbed.BorderlandsOz.SaveEdit.Caliburn.Micro.Contrib.dll,Caliburn.Micro.dll /resource:obj/Debug/Gibbed.BorderlandsOz.SaveEdit.System.Windows.Interactivity.dll,Caliburn.Micro.dll /resource:obj/Debug/Gibbed.BorderlandsOz.SaveEdit.Xceed.Wpf.Toolkit.dll,Caliburn.Micro.dll /resource:obj/Debug/Gibbed.BorderlandsOz.SaveEdit.Gibbed.BorderlandsOz.FileFormats.dll,Caliburn.Micro.dll /resource:obj/Debug/Gibbed.BorderlandsOz.SaveEdit.Gibbed.BorderlandsOz.GameInfo.dll,Caliburn.Micro.dll /resource:obj/Debug/Gibbed.BorderlandsOz.SaveEdit.Gibbed.BorderlandsOz.ProtoBufFormats.dll,Caliburn.Micro.dll /resource:obj/Debug/Gibbed.BorderlandsOz.SaveEdit.Gibbed.IO.dll,Caliburn.Micro.dll /resource:obj/Debug/Gibbed.BorderlandsOz.SaveEdit.protobuf-net.dll,Caliburn.Micro.dll /resource:obj/Debug/Gibbed.BorderlandsOz.SaveEdit.MiniLZO.dll,Caliburn.Micro.dll /resource:obj/Debug/Gibbed.BorderlandsOz.SaveEdit.ICSharpCode.SharpZipLib.dll,Caliburn.Micro.dll /resource:obj/Debug/Gibbed.BorderlandsOz.SaveEdit.Newtonsoft.Json.dll,Caliburn.Micro.dll App.xaml.cs Helpers/AssetCache.cs Helpers/Blacklisting.cs Helpers/DelegateCommand.cs Helpers/EnumToBooleanConverter.cs Helpers/GearCalculatorView.xaml.cs Helpers/GearCalculatorViewModel.cs Helpers/HyperlinkExtensions.cs Helpers/InputBindingTrigger.cs Helpers/MyClipboard.cs Helpers/MyFileFilterCollection.cs Helpers/MyMessageBox.cs Helpers/ShortcutParser.cs Items/BackpackItemView.xaml.cs Items/BackpackItemViewModel.cs Items/IBaseSlotViewModel.cs Items/ItemTypeFilter.cs SaveLoad.cs Startup.cs Tabs/AboutView.xaml.cs Tabs/AboutViewModel.cs Tabs/BackpackView.xaml.cs Items/BackpackWeaponView.xaml.cs Items/BackpackWeaponViewModel.cs Items/BaseItemViewModel.cs Items/BaseWeaponViewModel.cs Helpers/ContainsToVisiblityConverter.cs Tabs/BankView.xaml.cs Tabs/BankViewModel.cs Tabs/CharacterView.xaml.cs Tabs/CharacterViewModel.cs Tabs/CurrencyOnHandView.xaml.cs Tabs/CurrencyOnHandViewModel.cs Helpers/AssetDisplay.cs Items/IBackpackSlotViewModel.cs Helpers/MyOpenFileResult.cs Helpers/MySaveFileResult.cs Helpers/NullToBooleanConverter.cs Items/BaseItemView.xaml.cs Items/BaseWeaponView.xaml.cs Helpers/MyComboBox.cs Tabs/FastTravelView.xaml.cs Tabs/FastTravelViewModel.cs Tabs/GeneralView.xaml.cs Helpers/PropertyProxy.cs ShellView.xaml.cs Tabs/VehicleView.xaml.cs Tabs/VehicleViewModel.cs Validators/AssetLibrarySetIdValidationRule.cs Validators/AssetValidationRule.cs Validators/BalanceValidationRule.cs Validators/ItemPartValidationRule.cs Validators/ItemTypeValidationRule.cs Validators/ManufacturerValidationRule.cs Validators/WeaponPartValidationRule.cs Validators/WeaponTypeValidationRule.cs Version.cs AppBootstrapper.cs AppWindowManager.cs Tabs/BackpackViewModel.cs Tabs/GeneralViewModel.cs ShellViewModel.cs Properties/AssemblyInfo.cs Properties/Resources.Designer.cs Properties/Settings.Designer.cs /target:winexe /define:"DEBUG;TRACE" /main:Gibbed.BorderlandsOz.SaveEdit.Startup /nostdlib /platform:AnyCPU /reference:../../packages/Caliburn.Micro.1.5.1/lib/net40/Caliburn.Micro.dll /reference:../../other/wpf/Caliburn.Micro.Contrib.dll /reference:/opt/local/lib/mono/4.0/System.dll /reference:/opt/local/lib/mono/4.0/System.ComponentModel.Composition.dll /reference:/opt/local/lib/mono/4.0/System.Data.dll /reference:/opt/local/lib/mono/4.0/System.Drawing.dll /reference:../../packages/Caliburn.Micro.1.5.1/lib/net40/System.Windows.Interactivity.dll /reference:/opt/local/lib/mono/4.0/System.Xml.dll /reference:/opt/local/lib/mono/4.0/Microsoft.CSharp.dll /reference:/opt/local/lib/mono/4.0/System.Xml.Linq.dll /reference:/opt/local/lib/mono/4.0/System.Data.DataSetExtensions.dll /reference:/opt/local/lib/mono/4.0/System.Xaml.dll /reference:/opt/local/lib/mono/4.0/WindowsBase.dll /reference:../../packages/Extended.Wpf.Toolkit.2.0.0/lib/net40/Xceed.Wpf.Toolkit.dll /reference:/opt/local/lib/mono/4.0/System.Core.dll /reference:/Volumes/Data/Downloads/Sources/Gibbed.BorderlandsOz/projects/Gibbed.BorderlandsOz.FileFormats/bin/Debug//Gibbed.BorderlandsOz.FileFormats.dll /reference:/Volumes/Data/Downloads/Sources/Gibbed.BorderlandsOz/projects/Gibbed.BorderlandsOz.GameInfo/bin/Debug//Gibbed.BorderlandsOz.GameInfo.dll /reference:/Volumes/Data/Downloads/Sources/Gibbed.BorderlandsOz/projects/Gibbed.BorderlandsOz.ProtoBufFormats/bin/Debug//Gibbed.BorderlandsOz.ProtoBufFormats.dll /reference:/Volumes/Data/Downloads/Sources/Gibbed.BorderlandsOz/projects/Gibbed.IO/bin/Debug//Gibbed.IO.dll /reference:/opt/local/lib/mono/4.0/mscorlib.dll /warn:4
CSC: error CS1508: The resource identifier `Caliburn.Micro.dll' has already been used in this assembly
CSC: error CS1508: The resource identifier `Caliburn.Micro.dll' has already been used in this assembly
CSC: error CS1508: The resource identifier `Caliburn.Micro.dll' has already been used in this assembly
CSC: error CS1508: The resource identifier `Caliburn.Micro.dll' has already been used in this assembly
CSC: error CS1508: The resource identifier `Caliburn.Micro.dll' has already been used in this assembly
CSC: error CS1508: The resource identifier `Caliburn.Micro.dll' has already been used in this assembly
CSC: error CS1508: The resource identifier `Caliburn.Micro.dll' has already been used in this assembly
CSC: error CS1508: The resource identifier `Caliburn.Micro.dll' has already been used in this assembly
CSC: error CS1508: The resource identifier `Caliburn.Micro.dll' has already been used in this assembly
CSC: error CS1508: The resource identifier `Caliburn.Micro.dll' has already been used in this assembly
CSC: error CS1508: The resource identifier `Caliburn.Micro.dll' has already been used in this assembly
            Task "Csc" execution -- FAILED
            Done building target "CoreCompile" in project "/Volumes/Data/Downloads/Sources/Gibbed.BorderlandsOz/projects/Gibbed.BorderlandsOz.SaveEdit/Gibbed.BorderlandsOz.SaveEdit.csproj".-- FAILED
        Done building project "/Volumes/Data/Downloads/Sources/Gibbed.BorderlandsOz/projects/Gibbed.BorderlandsOz.SaveEdit/Gibbed.BorderlandsOz.SaveEdit.csproj".-- FAILED
    Task "MSBuild" execution -- FAILED
    Done building target "Build" in project "/Volumes/Data/Downloads/Sources/Gibbed.BorderlandsOz/The Pre-Sequel!.sln".-- FAILED
Done building project "/Volumes/Data/Downloads/Sources/Gibbed.BorderlandsOz/The Pre-Sequel!.sln".-- FAILED

Build FAILED.

Warnings:

/Volumes/Data/Downloads/Sources/Gibbed.BorderlandsOz/The Pre-Sequel!.sln (default targets) ->
(Build target) ->
/Volumes/Data/Downloads/Sources/Gibbed.BorderlandsOz/projects/Gibbed.BorderlandsOz.SaveEdit/Gibbed.BorderlandsOz.SaveEdit.csproj (default targets) ->
/opt/local/lib/mono/4.5/Microsoft.Common.targets (ResolveAssemblyReferences target) ->

    /opt/local/lib/mono/4.5/Microsoft.Common.targets:  warning : Reference 'PresentationFramework.Aero' not resolved
    /opt/local/lib/mono/4.5/Microsoft.Common.targets:  warning : Reference 'PresentationCore' not resolved
    /opt/local/lib/mono/4.5/Microsoft.Common.targets:  warning : Reference 'PresentationFramework' not resolved

Errors:

/Volumes/Data/Downloads/Sources/Gibbed.BorderlandsOz/The Pre-Sequel!.sln (default targets) ->
(Build target) ->
/Volumes/Data/Downloads/Sources/Gibbed.BorderlandsOz/projects/Gibbed.BorderlandsOz.SaveEdit/Gibbed.BorderlandsOz.SaveEdit.csproj (default targets) ->
/opt/local/lib/mono/4.5/Microsoft.CSharp.targets (CoreCompile target) ->

    CSC: error CS1508: The resource identifier `Caliburn.Micro.dll' has already been used in this assembly
    CSC: error CS1508: The resource identifier `Caliburn.Micro.dll' has already been used in this assembly
    CSC: error CS1508: The resource identifier `Caliburn.Micro.dll' has already been used in this assembly
    CSC: error CS1508: The resource identifier `Caliburn.Micro.dll' has already been used in this assembly
    CSC: error CS1508: The resource identifier `Caliburn.Micro.dll' has already been used in this assembly
    CSC: error CS1508: The resource identifier `Caliburn.Micro.dll' has already been used in this assembly
    CSC: error CS1508: The resource identifier `Caliburn.Micro.dll' has already been used in this assembly
    CSC: error CS1508: The resource identifier `Caliburn.Micro.dll' has already been used in this assembly
    CSC: error CS1508: The resource identifier `Caliburn.Micro.dll' has already been used in this assembly
    CSC: error CS1508: The resource identifier `Caliburn.Micro.dll' has already been used in this assembly
    CSC: error CS1508: The resource identifier `Caliburn.Micro.dll' has already been used in this assembly

     3 Warning(s)
     11 Error(s)

Time Elapsed 00:00:02.9127500

What steps would need to be taken in order for the app to run on Linux?

gibbed commented 5 years ago

I don't think there's a viable implementation of WPF in Mono, I think they only covered what Silverlight needed?

themightyoarfish commented 5 years ago

Dunno, I ran mono .nuget/NuGet.exe install PresentationFramework from the source dir and it seemed to install just fine.

gibbed commented 5 years ago

Oh I'm sorry, I just realized you asked if it can be compiled with Mono. As opposed to running it with Mono.