Jump to content

Programming Windows apps on Apple Silicon?

nieblas008

I got a M1 MacBook Air and I got an idea for a Windows program I'd like to develop. I've been thinking about using C++ since it's the one I'm most familiar with and the Internet says it's easy to build GUIs on it. However, Visual Studio 2022 for Mac does not have support for C++ projects, and that's as far as I know.

 

Is there an easy way to create projects for Windows? All I want is something that will allow me to program a Windows app with GUI, no console project. I don't really care about the language, but I want to end up with a .exe. Maybe with a program like JetBrain's CLion, or maybe using Java, I honestly don't know. Any suggestions?

Link to comment
Share on other sites

Link to post
Share on other sites

6 minutes ago, nieblas008 said:

I got a M1 MacBook Air and I got an idea for a Windows program I'd like to develop. I've been thinking about using C++ since it's the one I'm most familiar with and the Internet says it's easy to build GUIs on it. However, Visual Studio 2022 for Mac does not have support for C++ projects, and that's as far as I know.

 

Is there an easy way to create projects for Windows? All I want is something that will allow me to program a Windows app with GUI, no console project. I don't really care about the language, but I want to end up with a .exe. Maybe with a program like JetBrain's CLion, or maybe using Java, I honestly don't know. Any suggestions?

Good news! There is indeed an easy way to create windows programs. Just get a windows-based system... They are kinda common.

Link to comment
Share on other sites

Link to post
Share on other sites

4 minutes ago, Budget DIY said:

Good news! There is indeed an easy way to create windows programs. Just get a windows-based system... They are kinda common.

I mean, that is an option, but I'm not considering to switch to Windows. I'd be making this program for someone else, so I'd just need to work on Windows stuff until I finish this project.

Link to comment
Share on other sites

Link to post
Share on other sites

In a different topic you mentioned picking up an older 30 currency units PC. Why not use that one to build your program for your client?

Link to comment
Share on other sites

Link to post
Share on other sites

1 minute ago, Budget DIY said:

In a different topic you mentioned picking up an older 30 currency units PC. Why not use that one to build your program for your client?

I'm thinking to pull double duty on it, but if I take that route, I will want to connect to it remotely and through VS Code use that machine, so I think it will be a lot of hassle. But yeah, it is something I'm considering, just seeing if there are other options worth checking out.

Link to comment
Share on other sites

Link to post
Share on other sites

You can run Windows as a VM on the mac and do it there... 

F@H
Desktop: i9-13900K, ASUS Z790-E, 64GB DDR5-6000 CL36, RTX3080, 2TB MP600 Pro XT, 2TB SX8200Pro, 2x16TB Ironwolf RAID0, Corsair HX1200, Antec Vortex 360 AIO, Thermaltake Versa H25 TG, Samsung 4K curved 49" TV, 23" secondary, Mountain Everest Max

Mobile SFF rig: i9-9900K, Noctua NH-L9i, Asrock Z390 Phantom ITX-AC, 32GB, GTX1070, 2x1TB SX8200Pro RAID0, 2x5TB 2.5" HDD RAID0, Athena 500W Flex (Noctua fan), Custom 4.7l 3D printed case

 

Asus Zenbook UM325UA, Ryzen 7 5700u, 16GB, 1TB, OLED

 

GPD Win 2

Link to comment
Share on other sites

Link to post
Share on other sites

5 hours ago, nieblas008 said:

I got a M1 MacBook Air and I got an idea for a Windows program I'd like to develop. I've been thinking about using C++ since it's the one I'm most familiar with and the Internet says it's easy to build GUIs on it. However, Visual Studio 2022 for Mac does not have support for C++ projects, and that's as far as I know.

 

Is there an easy way to create projects for Windows? All I want is something that will allow me to program a Windows app with GUI, no console project. I don't really care about the language, but I want to end up with a .exe. Maybe with a program like JetBrain's CLion, or maybe using Java, I honestly don't know. Any suggestions?

In Visual Studio for Mac you can still make .NET 6.0 or 7.0 apps. Install MAUI.NET, it's .NET 6.0 and you can compile the Mac, IOS, Android, Linux and Windows all at once. It uses the XAML UI which is 95% what WPF is and if you know HTML you shouldn't be too much lost.

 

Obviously you still can't test all your build option on the same computer as on a Mac only the Mac executable file will work. You still need VM or physical device for all the other.

 

https://github.com/dotnet/maui

Link to comment
Share on other sites

Link to post
Share on other sites

You will ultimately need a windows machine to test on, physical or VM. I have never done development on Mac but I would be willing to bet that Mingw is available which is GCC cross compiler setup for Windows. So you should be able to build it on your Mac and the deploy it to the windows machine. A lot of this can be automated through an IDE. I personally use CLion from Jetbrains though VSCode could probably be configured to the same. Otherwise you could probably use scp to transfer the binaries to the system.

CPU: Intel i7 - 5820k @ 4.5GHz, Cooler: Corsair H80i, Motherboard: MSI X99S Gaming 7, RAM: Corsair Vengeance LPX 32GB DDR4 2666MHz CL16,

GPU: ASUS GTX 980 Strix, Case: Corsair 900D, PSU: Corsair AX860i 860W, Keyboard: Logitech G19, Mouse: Corsair M95, Storage: Intel 730 Series 480GB SSD, WD 1.5TB Black

Display: BenQ XL2730Z 2560x1440 144Hz

Link to comment
Share on other sites

Link to post
Share on other sites

You can use a windows development machine and remote into it.

 

I wouldn't trust software that has not been tested on bare metal anyway.

If your question is answered, mark it so.  | It's probably just coil whine, and it is probably just fine |   LTT Movie Club!

Read the docs. If they don't exist, write them. | Professional Thread Derailer

Desktop: i7-8700K, RTX 2080, 16G 3200Mhz, EndeavourOS(host), win10 (VFIO), Fedora(VFIO)

Server: ryzen 9 5900x, GTX 970, 64G 3200Mhz, Unraid.

 

Link to comment
Share on other sites

Link to post
Share on other sites

48 minutes ago, trag1c said:

You will ultimately need a windows machine to compile on

You should have mentioned you were specially talking about C or C++ there.

Link to comment
Share on other sites

Link to post
Share on other sites

One option that would make this pretty easy would be to use a UI toolkit that's compatible with both windows and macOS. If you want to go the C++ route, Qt is a mature and well-regarded UI library that works on both. Building the main UI for your app as a webapp and turning it into a desktop application with electron is another popular solution which is widely used by popular apps like Slack, Discord, and Spotify. Going with something cross-platform will let you do most of the development on your mac, you'd only need a windows pc (or a VM, which should be fine for this), for testing any platform-specific code.

Link to comment
Share on other sites

Link to post
Share on other sites

If you're a total pervert, you can use QEMU to emulate an x86 processor and run Windows in this way. However, it would be incredibly slow. The second worst thing would be to install Windows on ARM on a VM, then at least you will be able to compile an ARM executable and make sure it works, before compiling and x86 one from the same code

Link to comment
Share on other sites

Link to post
Share on other sites

On 1/30/2023 at 3:59 PM, trag1c said:

You will ultimately need a windows machine to test on, physical or VM.

 

And, as Apple Silicon does (as of now) run several good operating systems (e.g. OpenBSD), but Windows won't work on it, this decision is relatively easy if you want to save some money. Parallels Desktop is pretty good.

Write in C.

Link to comment
Share on other sites

Link to post
Share on other sites

You can use a Windows VM in VMware or Parallels.

A PC Enthusiast since 2011
AMD Ryzen 7 5700X@4.65GHz | GIGABYTE GTX 1660 GAMING OC @ Core 2085MHz Memory 5000MHz
Cinebench R23: 15669cb | Unigine Superposition 1080p Extreme: 3566
Link to comment
Share on other sites

Link to post
Share on other sites

On 1/30/2023 at 9:15 AM, Kilrah said:

You can run Windows as a VM on the mac and do it there... 

Unfortunately you can only run Windows for ARM on an M1/M2 mac, you cannot run "regular" Windows.

 

We recently needed to develop Windows (x86) software at work and since most of use have ARM based Macs now, the only real solution was to get Windows machines.

 

6 hours ago, Vishera said:

You can use a Windows VM in VMware or Parallels.

No, you can't. We tried. At least not if you want Windows for x86. Because both of these don't do emulation and will only run Windows for ARM.

Remember to either quote or @mention others, so they are notified of your reply

Link to comment
Share on other sites

Link to post
Share on other sites

7 minutes ago, Eigenvektor said:

Unfortunately you can only run Windows for ARM on an M1/M2 mac, you cannot run "regular" Windows.

 

We recently needed to develop Windows (x86) software at work and since most of use have ARM based Macs now, the only real solution was to get Windows machines.

 

No, you can't. We tried. At least not if you want Windows for x86. Because both of these don't do emulation and will only run Windows for ARM.

I just looked into it deeper and you are correct.

A PC Enthusiast since 2011
AMD Ryzen 7 5700X@4.65GHz | GIGABYTE GTX 1660 GAMING OC @ Core 2085MHz Memory 5000MHz
Cinebench R23: 15669cb | Unigine Superposition 1080p Extreme: 3566
Link to comment
Share on other sites

Link to post
Share on other sites

3 hours ago, Eigenvektor said:

Unfortunately you can only run Windows for ARM on an M1/M2 mac

Sure, but VS should be able to cross-compile, no? Or at least you'd be able to code your app there and just use another machine to compile for release.

F@H
Desktop: i9-13900K, ASUS Z790-E, 64GB DDR5-6000 CL36, RTX3080, 2TB MP600 Pro XT, 2TB SX8200Pro, 2x16TB Ironwolf RAID0, Corsair HX1200, Antec Vortex 360 AIO, Thermaltake Versa H25 TG, Samsung 4K curved 49" TV, 23" secondary, Mountain Everest Max

Mobile SFF rig: i9-9900K, Noctua NH-L9i, Asrock Z390 Phantom ITX-AC, 32GB, GTX1070, 2x1TB SX8200Pro RAID0, 2x5TB 2.5" HDD RAID0, Athena 500W Flex (Noctua fan), Custom 4.7l 3D printed case

 

Asus Zenbook UM325UA, Ryzen 7 5700u, 16GB, 1TB, OLED

 

GPD Win 2

Link to comment
Share on other sites

Link to post
Share on other sites

5 hours ago, Kilrah said:

Sure, but VS should be able to cross-compile, no? Or at least you'd be able to code your app there and just use another machine to compile for release.

Sure, that's one possible setup. What we ended up doing is using VS with the Remote Development plugin. That way we can stay on the Mac for any code and the Windows stuff simply runs remotely on the Windows machine.

Remember to either quote or @mention others, so they are notified of your reply

Link to comment
Share on other sites

Link to post
Share on other sites

Do it like android studio or anything mobile dev for that matter. Cross compile code then use an emulator for test(I hope no one is writing mobile apps on their phones). You may want some type of script to automate this since there are few IDEs and plug-ins that support hot reload and auto launch with a windows virtual machine. 

 

If you use a cross platform framework like qt or even better, javafx/swing you can pretty much be sure if it works on Mac, it will work on windows as long as you don't do anything too os specific(e.g. if you hard code a path to /usr/bin dir, this obviously won't work on windows) 

Sudo make me a sandwich 

Link to comment
Share on other sites

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×