Getting started (new developer) - powerplanner/powerplannerapps GitHub Wiki
Here's detailed instructions on how to set up a fresh machine (assuming a Windows PC, not Mac) to build Power Planner.
1. Install Visual Studio 2022
The community version should be fine. When installing, make sure to select the following two workloads...
- Universal Windows Platform
- Mobile development with .NET (Xamarin)
That's it!
Optional: Enable Windows Hyper-V
If you're going to build the Android app AND want to use the emulator rather than your physical device, you need to enable Hyper-V...
- Open Start, search for "Turn Windows features on or off"
- Enable "Windows Hypervisor Platform"
2. Install GitHub for Desktop
This is sometimes my preferred Git client, you can use something else if you'd like. Install it here: https://desktop.github.com/
3. Install git
You'll need command-line git access, so install git if you haven't: https://git-scm.com/downloads
REBOOT after installation, otherwise git won't be in your command path.
4. Clone repository
Go to https://github.com/powerplanner/powerplannerapps and click Clone or Download and then click Open in Desktop. Complete cloning in the desktop app.
5. Create a topic branch
Create a new branch for your work. The most popular naming convention is yourusername/yourfeature
.
6. Clone submodules
In the GitHub Desktop app, go to Repository -> Open in Command Prompt
Then, in the command prompt, type
git submodule update --init --recursive
Go ahead and close the command prompt.
7. Apply secrets
First, you have to allow PowerShell scrips on your PC...
Open PowerShell as an admin, and execute...
Set-ExecutionPolicy -ExecutionPolicy Unrestricted
Then, in the GitHub Desktop app, go to Repository -> Show in Explorer
Then, right click ApplySecrets.ps1 and click Run with PowerShell.
8. Open the solution
Launch PowerPlannerApps.sln (ignore the UWP solution, even if you're developing UWP, it's just for the build server).
9. Select startup project and deploy!
Make sure correct configuration and start up project is selected. You'll be able to build and deploy Android and Windows (UWP), but you won't be able to build or deploy iOS (that requires a Mac computer).
UWP
- Set the start up project to
PowerPlannerUWP (Universal Windows)
, and ensure the build config is set toDebug
and architecture is one ofx86
orx64
- Click Local Machine to deploy!
Android
- Set the start up project to
PowerPlannerDroid
, and ensure the build config is set toDebug (Droid)
(important that it must be the(Droid)
config) and architecture isAny CPU
- Click Local Machine to deploy!
iOS
- Set the start up project to
PowerPlanneriOS
, and ensure the build config is set toDebug
and architecture isAny CPU
- Note that you'll also need a Mac paired with Visual Studio for Mac and XCode
- Click Local Machine to deploy!