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

Linux Build #113

Closed
ajbogh opened this issue Mar 6, 2019 · 26 comments
Closed

Linux Build #113

ajbogh opened this issue Mar 6, 2019 · 26 comments

Comments

@ajbogh
Copy link

ajbogh commented Mar 6, 2019

Problem Statement
To increase adoption within other operating systems and add more contributors from other developer communities, Microsoft Calculator should be able to be built for Linux.

Goals
This can minimally be an instruction for Linux developers to compile the code, or it can include actual builds and additions to repositories.

@MicrosoftIssueBot
Copy link
Collaborator

This is your friendly Microsoft Issue Bot. I've seen this issue come in and have gone to tell a human about it.

@ocdtrekkie
Copy link

So, with this being a UWP app, are you basically asking Microsoft to port the Universal Windows Platform over to Linux by opening this issue? I mean, c'mon man.

@YOUR-WORST-TACO
Copy link

yes they should. port the uwp!

@ajbogh
Copy link
Author

ajbogh commented Mar 6, 2019

@ocdtrekkie I'm not suggesting anything but a working build. Whatever needs to occur to get it to work.

@elisaado
Copy link

elisaado commented Mar 6, 2019

@ajbogh, problem is they need to port their app framework to Linux for that.

@jedenastka
Copy link

jedenastka commented Mar 6, 2019

I tried everything, and ended with:

[  0%] Building CXX object CalcManager/CMakeFiles/CalcManager.dir/CalculatorHistory.cpp.o
In file included from /home/grzesiek11/Testy/calculator/src/Calculator/platform/cmake/CalcViewModel/platform/cmake/CalcManager/CalculatorHistory.cpp:4:
/home/grzesiek11/Testy/calculator/src/Calculator/platform/cmake/CalcViewModel/platform/cmake/CalcManager/pch.h:11:10: fatal error: windows.h: No such file or directory
 #include <windows.h>
          ^~~~~~~~~~~
compilation terminated.
make[2]: *** [CalcManager/CMakeFiles/CalcManager.dir/build.make:63: CalcManager/CMakeFiles/CalcManager.dir/CalculatorHistory.cpp.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:186: CalcManager/CMakeFiles/CalcManager.dir/all] Error 2
make: *** [Makefile:84: all] Error 2

So it's impossible. It uses Window$'s API.
Ever that, we can try porting everything to Qt... xD

@marekr
Copy link

marekr commented Mar 6, 2019

Aren't there numerous Linux calculators already?
Like gnome-calc which comes with gnome distros has the same alternate modes like programmer.
image

@jedenastka
Copy link

Aren't there numerous Linux calculators already?
Like gnome-calc which comes with gnome distros has the same alternate modes like programmer.

We have Qalculate! if someone want. On Debian(-based):

sudo apt install qalculate-gtk

It's about this particular calc :)

@YOUR-WORST-TACO
Copy link

all linux calculators are unimpressive compared to the windows one though :(

@abdhx
Copy link

abdhx commented Mar 6, 2019

Sorry to say that, but it is ABSOLUTELY impossible.
Calculator is a UWP, and UWPs works only in Windows 10.

@est31
Copy link

est31 commented Mar 6, 2019

The Microsoft C++ build tools can run on Wine and on Linux. If, on Windows, you can build the calculator app only using command line tools, there is a good chance that you can also compile it on Linux.

However, as @abinax pointed out, Wine currently lacks support for UWP apps. It's very likely that one day it will gain such support though.

From this comment:

it would be great to make the calculator engine code more portable so it can be reused in other projects.

So I guess what one could work on is to make the engine code portable enough to compile on a non-Wine Linux setup and then provide a GTK+ frontend for it or something, possibly in a separate project.

@iczero
Copy link

iczero commented Mar 7, 2019

@YOUR-WORST-TACO you underestimate the power of Qalculate

@YOUR-WORST-TACO
Copy link

YOUR-WORST-TACO commented Mar 7, 2019 via email

@marekr
Copy link

marekr commented Mar 7, 2019

@YOUR-WORST-TACO
Unfortunately, the windows calculator is mostly pretty because of Windows 10 itself with the UWP engine.
You can always switch to the prettier OS ;)

@YOUR-WORST-TACO
Copy link

YOUR-WORST-TACO commented Mar 7, 2019 via email

@mcooley
Copy link
Member

mcooley commented Mar 7, 2019

Although I'd also like to see some of Calculator's features on my Linux box, Calculator's UI is highly customized for Windows and it extensively uses Windows APIs. It's not impossible to add support for other platforms to this project, but it would be a huge amount of work. It's probably better for the ecosystem overall if we supported existing Linux calculator projects instead. We'd love to use some of code from this repo to help improve other projects (see #109).

I'm going to close this thread for now. If there are more specific proposals for how we could improve the calculator experience across platforms, please read our process for new features and then open a new issue.

@blogdron
Copy link

blogdron commented Mar 7, 2019

"Ненужно" © ® ™ с ❤️ LOR

@JAremko
Copy link

JAremko commented Mar 7, 2019

I dual boot just because of calculator.exe Plz port.

@xdevelnet
Copy link

I also dual boot just because of solitaire.exe Plz port.

@cluxter
Copy link

cluxter commented Mar 11, 2019

Guys, do you understand why Microsoft would release this software under such a permissive license?

This is probably the less monetizable MS app in Windows and one of the less complex, yet one of the most used by everyone. So this is the perfect tool to test the waters.

Microsoft is clearly testing the reactions of the FOSS community here and they want to learn from it. If it's a positive experience for MS, it's very likely that they will keep opening other software as FOSS. If it's negative, they will probably stop here.

So it's up to us to decide what we want. Do we want more FOSS from MS or less?

Welcoming FOSS from Microsoft could really pull the trigger and that could even end up one day with the NT kernel replaced by Linux (I mean look at Windows subsystem for Linux, WLinux,...). And yes, this Linux-based-Windows distribution would probably have lots of proprietary blobs and would cost X dollars (kind of the same thing than Android) but at the end of the day it would still mean more choice, more compatibility, more Linux fixes, more people working on Linux, etc.

On the other hand, we know that big companies can sometimes benefit from FOSS and embrace it to stifle it better. That makes me wonder if we shouldn't fix something in the FOSS licenses to make sure it doesn't happen though.

So just to sum up: maybe we should contribute in all the ways possible to port this little app to Linux, including porting UWP or things like that. They didn't chose it randomly... If we can make it run on Linux, then many other MS apps will be able to run on Linux. We should just make sure that these apps will have legally no choice but being FOSS too if they want to use the FOSS UWP, if that's even possible -- that would probably be a good way to avoid closed source binaries on Linux.

Just my two cents.

@ocdtrekkie
Copy link

@cluxter I am pretty sure you have no idea what amount of effort is required to port UWP to Linux. (Hint: Microsoft, with all it's resources and investment into supporting .NET on Linux, has not ported any of their UI stacks to Linux.)

If you want Microsoft to have a positive impression of the FOSS community, and push them to continue to open source components of Windows, opening or supporting troll issues like this is not a good way to do it.

@JAremko
Copy link

JAremko commented Mar 12, 2019

@cluxter Or we can make sure that Wine can run it all 🤔

@janisozaur
Copy link
Contributor

#212 has just landed, #211 hopefully is near.

@GeeLaw
Copy link

GeeLaw commented Mar 27, 2019

What can be done is to factor out the object model of Calculator, and then anyone bothering to have it on Linux could reuse the model part and rewrite the view (UI).

@meteorsnows
Copy link

meteorsnows commented Apr 13, 2019

There could be one point, that Microsoft's Open source to create a cross platform app, using Xamarin/CPP/some solution. Look like this isn't one. Nobody save us from bloated Electron, not even Microsoft.

Still Looking forward for .NET Core 3.0 AND Native UI, with real life success story.
Please make a lead in this direction, rather than focus on this repo. Let the community growth itself, As Giant like Microsoft, had to lead the future.

@nycnikato
Copy link

nycnikato commented May 9, 2019

Having the Windows Calculator on Linux would take a lot of work. I think it would be worth it. I understand the two operating systems are a universe apart. It is truly sad. I have taken the calculator code and it has no syntax errors in Gnome-Builder. The only error is "not a make build system". It is so easy to get Linux code to run on windows now with WSL 2, and yet so painful to get Microsoft code to run on Linux. This does not bode well for code portability. A developer would be better off to build their apps for gnome builder as flatpak and know they will run everywhere, including Windows, Chrome, and Linux. If Microsoft decides to port UWP, I hope they focus on Flatpak. Simplicity and ultimate portability are sorely needed. If they focus on Flaltpak, apps will run everywhere Recent past, present, and future.

@microsoft microsoft locked as resolved and limited conversation to collaborators Dec 3, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests