Comments (22)
Though i'm not very found of how it was implemented from a quick glance I believe I could create a sort of "shared library" that both the CLI and GUI version can both use thus removing lots of possible code duplication and put it into 2 separate projects files, keeping it cleaner than putting it all into one project file.
from switchpresence-rewritten.
If you would like to help start on that it would be much appreciated :) (do make sure to pr it as a draft too!)
from switchpresence-rewritten.
I'm not sure I'm adept enough at C# for that. This port was my first time working with the language.
from switchpresence-rewritten.
CLI SwitchPresence
GUI SwitchPresence
:)
Please do test I have no clue if they work lol.
from switchpresence-rewritten.
➤ mono SwitchPresence-CLI.exe
Cannot open assembly 'SwitchPresence-CLI.exe': File does not contain a valid CIL image.
➤ file SwitchPresence-CLI.exe
SwitchPresence-CLI.exe: PE32+ executable (console) x86-64, for MS Windows
➤ chmod +x SwitchPresence-CLI.exe
➤ ./SwitchPresence-CLI.exe
0026:fixme:msvcrt:_configure_wide_argv (1) stub
0026:fixme:msvcrt:_initialize_wide_environment stub
A fatal error occurred. The required library hostfxr.dll could not be found.
If this is a self-contained application, that library should exist in [Z:\home\user\Downloads\SwitchPresence-Client\].
If this is a framework-dependent application, install the runtime in the global location [C:\Program Files\dotnet] or use the DOTNET_ROOT environment variable to specify the runtime location or register the runtime location in [HKLM\SOFTWARE\dotnet\Setup\InstalledVersions\x64\InstallLocation].
0026:fixme:advapi:RegisterEventSourceW ((null),L".NET Runtime"): stub
0026:fixme:advapi:ReportEventW (0xcafe4242,0x0001,0x0000,0x000003ff,(nil),0x0001,0x00000000,0x2afc90,(nil)): stub
0026:err:eventlog:ReportEventW L"Description: A .NET Core application failed.\nApplication: SwitchPresence-CLI.exe\nPath: Z:\\home\\user\\Downloads\\SwitchPresence-Client\\SwitchPresence-CLI.exe\nMessage: A fatal error occurred. The required library hostfxr.dll could not be found.\nIf this is a self-contained application"...
0026:fixme:advapi:DeregisterEventSource (0xcafe4242) stub
The one you gave me fails because it's not compiled for my platform. But compiling it myself works fine 👍
from switchpresence-rewritten.
The application was built with DotNet core so try downloading that and running it with dotnet instead
from switchpresence-rewritten.
i'll double check my compilation setting as well
from switchpresence-rewritten.
How do I "run it with dotnet"? dotnet build
produces native executables for me. I have dotnet core installed, since it works for me when I compile it myself. I don't need to run my compiled copy with dotnet
or anything, just the path to the executable.
from switchpresence-rewritten.
The command I used is env FrameworkPathOverride=/usr/lib/mono/4.7.2-api/ dotnet build
. I am using Arch Linux.
from switchpresence-rewritten.
ah my bad it should be a 'publish' version
from switchpresence-rewritten.
What does that mean?
from switchpresence-rewritten.
VS allows you to compile it into two different ways one of them being a publish version which out a dll instead of an exe iirc
from switchpresence-rewritten.
So is that an error on your end or something I need to change?
from switchpresence-rewritten.
you should be running the dll in the zip with dotnet run
from switchpresence-rewritten.
My bad that actually might only be for windows, try this one instead
publish.zip
from switchpresence-rewritten.
/tmp/foo
➤ dotnet run SwitchPresence-CLI.dll
Couldn't find a project to run. Ensure a project exists in /tmp/foo, or pass the path to the project using --project.
/tmp/foo
➤ file SwitchPresence-CLI.exe
SwitchPresence-CLI.exe: PE32+ executable (console) x86-64, for MS Windows
/tmp/foo
➤ file SwitchPresence-CLI.dll
SwitchPresence-CLI.dll: PE32 executable (console) Intel 80386 Mono/.Net assembly, for MS Windows
/tmp/foo
➤ mono SwitchPresence-CLI.dll
Unhandled Exception:
System.BadImageFormatException: Could not resolve field token 0x04000005, due to: Could not load type of field 'SwitchPresence_CLI.Program:timer' (0) due to: Could not resolve type with token 0100000d from typeref (expected class 'System.Timers.Timer' in assembly 'System.ComponentModel.TypeConverter, Version=4.2.1.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a') assembly:System.ComponentModel.TypeConverter, Version=4.2.1.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a type:System.Timers.Timer member:(null) assembly:/tmp/foo/SwitchPresence-CLI.dll type:Program member:(null)
File name: 'SwitchPresence-CLI'
[ERROR] FATAL UNHANDLED EXCEPTION: System.BadImageFormatException: Could not resolve field token 0x04000005, due to: Could not load type of field 'SwitchPresence_CLI.Program:timer' (0) due to: Could not resolve type with token 0100000d from typeref (expected class 'System.Timers.Timer' in assembly 'System.ComponentModel.TypeConverter, Version=4.2.1.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a') assembly:System.ComponentModel.TypeConverter, Version=4.2.1.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a type:System.Timers.Timer member:(null) assembly:/tmp/foo/SwitchPresence-CLI.dll type:Program member:(null)
File name: 'SwitchPresence-CLI'
from switchpresence-rewritten.
my bad it should be "dotnet "
from switchpresence-rewritten.
/tmp/tmp.6WE5t5Gao2
➤ dotnet SwitchPresence-CLI.exe
Error:
An assembly specified in the application dependencies manifest (SwitchPresence-CLI.deps.json) has already been found but with a different file extension:
package: 'SwitchPresence-CLI', version: '1.0.0'
path: 'SwitchPresence-CLI.dll'
previously found assembly: '/tmp/tmp.6WE5t5Gao2/SwitchPresence-CLI.exe'
from switchpresence-rewritten.
oh wait my bad, dotnet SwitchPresence-CLI.dll
seems to work
from switchpresence-rewritten.
uh i think something is wrong on your end try clearing temp?
from switchpresence-rewritten.
oh ok
from switchpresence-rewritten.
at it seems it functions i will be closing this issue and merging
from switchpresence-rewritten.
Related Issues (20)
- Client Cannot Connect Via MAC Address After PC Reboot HOT 4
- Icon! HOT 1
- switch-lan-play and SwitchPresence-Rewritten HOT 3
- Enabling the Server at boot fails if the flags/ dir does not exist HOT 2
- dump icon error HOT 3
- Create Seperate Settings Tab in GUI Client HOT 4
- Does this require homebrew? HOT 2
- CLI client: change the first arg to a MAC address HOT 4
- Fix HID Input HOT 1
- Doesn't connect - like it froze HOT 1
- Status disappears from discord after some time. HOT 3
- not showing in discord. HOT 3
- Unchecking "Show Time Lapsed" still shows elapsed time HOT 2
- [10.0.4 Atmosphere] Switch Presence Rewritten Manager Crashes upon Boot HOT 9
- Individual games in the 3D All-Stars collection are not detected HOT 7
- Switch presence not found when disabling
- Dumped icons not found HOT 1
- Am I doing something wrong? HOT 3
- Crashes when running Smash Ultimate as of 16.0.0
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from switchpresence-rewritten.