Configure Symlinks for Windows Without Admin Privileges
If you try to download and build the Fire App Builder project on Windows and you don't have permissions to configure symlinks with git, you need to run the scripts described here.
If you download and build Fire App Builder without converting the symlinks using these scripts, you'll get an error that says "Content not allowed in prolog.xml," or the project won't build due to another issue. The instructions here explain how to configure symlinks on Windows for users that don't have administrative privileges.
Check Your User Rights
- Check whether you have administrative privileges on your Windows machine. Go to Start > Control Panel > User Accounts > Manage User Accounts. (The steps may vary slightly based on your version of Windows.) If your user account is within the Administrators Group, you have administrative privileges.
- If you have administrative privileges on your machine, open your command prompt as an administrator and run
git config –global core.symlinks true
as usual before cloning the repo, as described in Download Fire App Builder and Build an App. - If you don't have admin privileges, continue on to the next section, "Convert to Either Symlinks or Hard Links."
Convert to Either Symlinks or Hard Links
- If you don't have administrative privileges on your machine, download these Powershell scripts.
- Unzip and add the files into your fire-app-builder directory. The two files are:
- convert_to_windows_symlinks.ps1
- convert_to_windows_hardLinks.ps1
- Go to Start > Run and enter secpol.msc. Then click OK.
- In the Local Security Policy window that opens, go to Security Settings > Local Policies > User Rights Assignment.
- In the list, find the Create symbolic links item.
- If you have permissions, do the following:
- Double-click the item and add yourself (or the required user or the whole users group) to the list.
- After changing the policy, log out and then back in to your computer.
- Clone the Fire App Builder repo.
- Using Explorer, browse to the repo, right-click the convert_to_windows_symlinks.ps1 file, and select Run with Powershell.
-
At the prompt, click Open. Then confirm that you want to run the script by typing R. This script will change all XML files created during git clone to Windows symlinks.
When the script runs successfully, you see about 20 responses such as
symbolic link created for AMZNMediaPlayerComponent\src\main\res\values-en-rUS\strings.xml <<===>> ..\values\strings.xml
for each strings.xml file.If you're able to do this, stop here (don't run the next script in step 7). Return to the instructions to Download Fire App Builder and Build an App.
- If you can't add yourself to the list for this "Create symbolic links" permission, do the following:
- Using Explorer, browse to the repo where you cloned Fire App Builder, right-click the convert_to_windows_hardLinks.ps1 file, and select Run with Powershell.
-
At the prompt, click Open. Then confirm that you want to run the script by typing R. This script will change all the XML files that were created during git clone to hard links.
When the script runs successfully, you see about 20 responses such as
Hardlink created for AMZNMediaPlayerComponent\src\main\res\values-en-rUS\strings.xml <<===>> AMZNMediaPlayerComponent\src\main\res \values\strings.xml
for each strings.xml file.
Next Steps
After configuring symlinks in your repo, continue with the instructions to Download Fire App Builder and Build an App.
Last updated: Aug 22, 2017