GithubHelp home page GithubHelp logo

linux support about ctr-studio HOT 21 CLOSED

mapstudioproject avatar mapstudioproject commented on June 29, 2024
linux support

from ctr-studio.

Comments (21)

CyberYoshi64 avatar CyberYoshi64 commented on June 29, 2024

These messages are mine.
CTR Studio succeeds launching when running it through dotnet with appropriate frameworks installed, but the program seems to not detect its plugins and ends up being useless.

Wine doesn't even launch at all because it tries to find a Windows executable somewhere it's not meant to.

A fatal error occurred, the required library hostfxr.dll could not be found in [Z:\usr\share\dotnet\
host\fxr\6.0.10]
0114:fixme:advapi:RegisterEventSourceW ((null),L".NET Runtime"): stub
0114:fixme:advapi:ReportEventW (00000000CAFE4242,0x0001,0x0000,0x000003ff,0000000000000000,0x0001,0x00000000,000000000019FC90,0000000000000000): stub
0114:err:eventlog:ReportEventW L"Description: A .NET application failed.\nApplication: CTR Studio.exe\nPath: D:\\Programme-Win\\CTR-Studio\\CTR Studio.exe\nMessage: A fatal error occurred, the required library hostfxr.dll could not be found in [Z:\\usr\\share\\dotnet\\host\\fxr\\6.0.10]\n\n"
0114:fixme:advapi:DeregisterEventSource (00000000CAFE4242) stub

(Not to mention .NET support is very thinnicky on Linux anyways. I'm generally disappointed at .NET for being prone to partially, to not working at all. Don't get me started on the different distros and how .NET works on these...)

from ctr-studio.

KillzXGaming avatar KillzXGaming commented on June 29, 2024

Try renaming the "plugins" folder to uppercase "Plugins". I think it is just picky with the paths, I need to default it correctly.

from ctr-studio.

 avatar commented on June 29, 2024

either with wine or with dotnet, the program still doesnt launch at all for me, even after renaming the folder

from ctr-studio.

KillzXGaming avatar KillzXGaming commented on June 29, 2024

Extract this to the Updater folder of the source code.

Updater.zip

This will fix those errors and should build with dotnet build --runtime linux-x64 --self-contained

from ctr-studio.

 avatar commented on June 29, 2024

this might just be my incompetence, but this was spewed at me:

(i ran this ->) dotnet --build --runtime linux-x64 --self-contained

Could not execute because the specified command or file was not found.
Possible reasons for this include:
  * You misspelled a built-in dotnet command.
  * You intended to execute a .NET program, but dotnet---build does not exist.
  * You intended to run a global tool, but a dotnet-prefixed executable with this name could not be found on the PATH.

with folder structure:

cimgui.dll
cimgui.dylib
cimgui.so
cimnodes.dll
CtrLibrary.dll
CtrLibrary.pdb
CTR Studio.deps.json
CTR Studio.dll
CTR Studio.exe
CTR Studio.pdb
CTR Studio.runtimeconfig.json
CurveEditorLibrary.dll
Default.png
Discord.Net.Core.dll
Discord.Net.Rest.dll
Discord.Net.Webhook.dll
GLFrameworkEngine.dll
GLFrameworkEngine.pdb
ImGui.NET.dll
IONET.dll
Lib
Logs
MapStudioUI.dll
MapStudioUI.dll.config
MapStudioUI.pdb
Microsoft.Win32.SystemEvents.dll
Newtonsoft.Json.dll
Octokit.dll
OpenTK.dll
Plugins
Resources
RG_ETC1.dll
runtimes
SharpEXR.dll
SixLabors.ImageSharp.dll
SPICA.dll
SPICA.dll.config
SPICA.Rendering.dll
SPICA.Rendering.dll.config
Syroot.BinaryData.dll
Syroot.Maths.dll
System.Drawing.Common.dll
System.Interactive.Async.dll
System.Linq.Async.dll
tinyfiledialogs.dll
tinyfiledialogs.so
Toolbox.Core.dll
Toolbox.Core.pdb
Updater
Updater.deps.json
Updater.dll
Updater.exe
Updater.pdb
Updater.runtimeconfig.json
x64
x86

(entries without an extension are folders)
and the .csproj file was in the Updater folder so yeah im not really sure what happened

just to clarify im on artix linux (runit) and have installed dotnet-host, dotnet-runtime, dotnet-sdk and dotnet-targeting-pack

EDIT: i did this on the not-newest version so this might be completely unrelevant
EDITEDIT: ALSO did not do this from git repo but from the release, skull emoji

from ctr-studio.

 avatar commented on June 29, 2024

so close...
this happened after doing everything: git cloning the repo with recursive submodules, copying the .csproj into the folder and running the compile command:

Microsoft (R) Build Engine version 17.0.1+b177f8fa7 for .NET
Copyright (C) Microsoft Corporation. All rights reserved.

  Determining projects to restore...
  Restored /media/D/Other/Modding/3ds/CTGP7/Tools/CTR-Studio/GLFrameworkEngine/GLFrameworkEngine.csproj (in 2.01 sec).
  Restored /media/D/Other/Modding/3ds/CTGP7/Tools/CTR-Studio/Toolbox.Core/Toolbox.Core.csproj (in 2.01 sec).
  Restored /media/D/Other/Modding/3ds/CTGP7/Tools/CTR-Studio/MapStudio.UI/MapStudio.UI.csproj (in 11.32 sec).
  Restored /media/D/Other/Modding/3ds/CTGP7/Tools/CTR-Studio/Updater/Updater.csproj (in 15.52 sec).
  Restored /media/D/Other/Modding/3ds/CTGP7/Tools/CTR-Studio/CTR Studio/CTR Studio.csproj (in 15.54 sec).
  Restored /media/D/Other/Modding/3ds/CTGP7/Tools/CTR-Studio/Plugins/CtrLibrary/CtrLibrary.csproj (in 15.55 sec).
/usr/share/dotnet/sdk/6.0.110/Current/SolutionFile/ImportAfter/Microsoft.NET.Sdk.Solution.targets(27,5): error NETSDK1134: Building a solution with a specific RuntimeIdentifier is not supported. If you would like to publish for a single RID, specifiy the RID at the individual project level instead. [/media/D/Other/Modding/3ds/CTGP7/Tools/CTR-Studio/CTR Studio.sln]

Build FAILED.

/usr/share/dotnet/sdk/6.0.110/Current/SolutionFile/ImportAfter/Microsoft.NET.Sdk.Solution.targets(27,5): error NETSDK1134: Building a solution with a specific RuntimeIdentifier is not supported. If you would like to publish for a single RID, specifiy the RID at the individual project level instead. [/media/D/Other/Modding/3ds/CTGP7/Tools/CTR-Studio/CTR Studio.sln]
    0 Warning(s)
    1 Error(s)

Time Elapsed 00:00:17.34

so so close

from ctr-studio.

KillzXGaming avatar KillzXGaming commented on June 29, 2024

Try running dotnet build --runtime linux-x64 --self-contained but run this inside CTR Studio folder where CTR Studio.csproj is located.

The source code also now contains BuildLinux.bat so you can try running that.

from ctr-studio.

 avatar commented on June 29, 2024

running the command in that folder actually did resolve the issue! my only issue now (bc im not familiar with dotnet) is where to find the actual file/executable to run

from ctr-studio.

KillzXGaming avatar KillzXGaming commented on June 29, 2024

You can run in command prompt with dotnet run inside the CTR Studio folder

from ctr-studio.

 avatar commented on June 29, 2024

this is really starting to drag itself...
i got this error when running that (having compiled with the command you told me and after git pull AND the updater.csproj file)

dotnet run /usr/share/dotnet/sdk/6.0.110/Sdks/Microsoft.NET.Sdk/targets/Microsoft.NET.Sdk.targets(1092,5): error NETSDK1151: The referenced project '../Updater/Updater.csproj' is a self-contained executable. A self-contained executable cannot be referenced by a non self-contained executable. For more information, see https://aka.ms/netsdk1151 [/media/D/Other/Modding/3ds/CTGP7/Tools/CTR-Studio/CTR Studio/CTR Studio.csproj] The build failed. Fix the build errors and run again.

from ctr-studio.

KillzXGaming avatar KillzXGaming commented on June 29, 2024

Should work from latest commit.

from ctr-studio.

 avatar commented on June 29, 2024

It exited dotnet build --runtime linux-x64 --self-contained with this error:

/media/D/Other/Modding/3ds/CTGP7/Tools/CTR-Studio/Plugins/CtrLibrary/Files/BCH/BCH.cs(104,30): error CS0115: 'BCH.DisplayViewport': no suitable method found to override [/media/D/Other/Modding/3ds/CTGP7/Tools/CTR-Studio/Plugins/CtrLibrary/CtrLibrary.csproj]
/media/D/Other/Modding/3ds/CTGP7/Tools/CTR-Studio/Plugins/CtrLibrary/Files/BCRES/BCRES.cs(78,30): error CS0115: 'BCRES.DisplayViewport': no suitable method found to override [/media/D/Other/Modding/3ds/CTGP7/Tools/CTR-Studio/Plugins/CtrLibrary/CtrLibrary.csproj]
    62 Warning(s)
    2 Error(s)

Time Elapsed 00:00:21.84

i dont know how this could be going wrong, i appreciate all of your effort yet this is frustrating even for me who doesnt even code the app

from ctr-studio.

KillzXGaming avatar KillzXGaming commented on June 29, 2024

Your MapStudio.UI is outdated. You want to update all the submodules, or reclone it.

from ctr-studio.

 avatar commented on June 29, 2024

oh, i didnt realize, ill do that when i get home

from ctr-studio.

 avatar commented on June 29, 2024

exited with this error:

/media/D/Other/Modding/3ds/CTGP7/Tools/CTR-Studio/Plugins/CtrLibrary/Files/H3DRender.cs(210,26): error CS1061: 'SkeletonRenderer' does not contain a definition for 'Update' and no accessible extension method 'Update' accepting a first argument of type 'SkeletonRenderer' could be found (are you missing a using directive or an assembly reference?) [/media/D/Other/Modding/3ds/CTGP7/Tools/CTR-Studio/Plugins/CtrLibrary/CtrLibrary.csproj]
    212 Warning(s)
    1 Error(s)

Time Elapsed 00:00:02.14

i did reclone the repo with recurse submodules
:/

from ctr-studio.

CyberYoshi64 avatar CyberYoshi64 commented on June 29, 2024

Bildschirmfoto_2022-11-28_13-20-13
Bildschirmfoto_2022-11-28_13-23-17

Success! It worked.

❯ cd CTR\ Studio
❯ dotnet build --runtime linux-x64 --self-contained
MSBuild version 17.4.0+18d5aef85 for .NET
  Determining projects to restore...
  All projects are up-to-date for restore.

[a lot of warnings cutoff here]

    274 Warnung(en)
    0 Fehler

Verstrichene Zeit 00:00:18.69
❯ cd bin/Debug/net6.0/
❯ linux-x64/CTR\ Studio
Args : 
FileInput 
Unhandled exception. System.TypeInitializationException: The type initializer for 'Gdip' threw an exception.
 ---> System.DllNotFoundException: Unable to load shared library 'libgdiplus' or one of its dependencies. In order to help diagnose loading problems, consider setting the LD_DEBUG environment variable: liblibgdiplus: cannot open shared object file: No such file or directory
   at System.Drawing.SafeNativeMethods.Gdip.GdiplusStartup(IntPtr& token, StartupInput& input, StartupOutput& output)
   at System.Drawing.SafeNativeMethods.Gdip..cctor()
   --- End of inner exception stack trace ---
   at System.Drawing.SafeNativeMethods.Gdip.GdipLoadImageFromDelegate_linux(StreamGetHeaderDelegate getHeader, StreamGetBytesDelegate getBytes, StreamPutBytesDelegate putBytes, StreamSeekDelegate doSeek, StreamCloseDelegate close, StreamSizeDelegate size, IntPtr& image)
   at System.Drawing.Image.InitializeFromStream(Stream stream)
   at System.Drawing.Image.LoadFromStream(Stream stream, Boolean keepAlive)
   at System.Drawing.Icon.GetInternalBitmap()
   at System.Drawing.Icon.ToBitmap()
   at OpenTK.Platform.X11.X11GLNative.set_Icon(Icon value)
   at OpenTK.NativeWindow.set_Icon(Icon value)
   at CTRStudio.Program.Main(String[] args) in /home/cyberyoshi64/Downloads/CTR-Studio/CTR Studio/src/Program.cs:line 51
zsh: IOT instruction (core dumped)  linux-x64/CTR\ Studio
❯ sudo pacman -S libgdiplus
:: Pakete werden empfangen …
 libgdiplus-5.6.1...   158,0 KiB   790 KiB/s 00:00 [######################] 100%
(1/1) Schlüssel im Schlüsselbund werden geprüft    [######################] 100%
(1/1) Paket-Integrität wird überprüft              [######################] 100%
(1/1) Paket-Dateien werden geladen                 [######################] 100%
(1/1) Auf Dateikonflikte wird geprüft              [######################] 100%
(1/1) Verfügbarer Festplattenspeicher wird erm...  [######################] 100%
:: Paketänderungen werden verarbeitet …
(1/1) Installiert wird libgdiplus                  [######################] 100%
:: Post-transaction-Hooks werden gestartet …
(1/1) Arming ConditionNeedsUpdate...
❯ linux-x64/CTR\ Studio
Args : 
FileInput 
Loading imgui controller
libpng warning: iCCP: known incorrect sRGB profile
libpng warning: iCCP: known incorrect sRGB profile

A bit of struggle and a missing dependency, but it's working.
Also, the batch script didn't work, had to issue these commands manually. (Wine will try to use batch files, maybe change the extension to .sh, add the shebang at the beginning of the script and advise to do chmod +x buildLinux.sh as well)

I think the intention of the build is to copy the Plugins folder into [platform]-[arch], otherwise, I couldn't get it to pick it up.
Let's see, if qube's penguin eventually bothers to do it XD

from ctr-studio.

CyberYoshi64 avatar CyberYoshi64 commented on June 29, 2024

Bildschirmfoto_2022-11-28_13-48-22
Not sure if it's Linux's fault or something, but this happens.

from ctr-studio.

 avatar commented on June 29, 2024

nevermind the last comment i posted and then deleted, after git pulling it finished without an error!!!!

lets see if the executable works

so, it did open!!
however upon loading a .bcmdl, nothing seems to happen

from ctr-studio.

 avatar commented on June 29, 2024

image
image

this is what it looks like after opening the file:
image

and the terminal output to that:

Args : 
FileInput 
Loading imgui controller
libpng warning: iCCP: known incorrect sRGB profile
libpng warning: iCCP: known incorrect sRGB profile
InitShader GIZMO
VertexShader:

FragmentShaderArb:

VertexShader:

FragmentShaderArb:

VertexShader:

FragmentShaderArb:

VertexShader:

FragmentShaderArb:

VertexShader:

FragmentShaderArb:

VertexShader:

FragmentShaderArb:

VertexShader:

FragmentShaderArb:

VertexShader:

FragmentShaderArb:

VertexShader:

FragmentShaderArb:

from ctr-studio.

 avatar commented on June 29, 2024

aha, after copying the Plugins folder into linux-x64 like cy did, it actually does the thing!!

image

feels very good

from ctr-studio.

 avatar commented on June 29, 2024

im pretty sure this is as working as itll get, ill close the issue for now, but i might reopen if issues occur with new commits! thanks for your commitment killz and cy!!

from ctr-studio.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.