@echo off
rem Ganttwright for Excel, on this PC. Made by https://app.ganttwright.com
rem
rem It lists Ganttwright in Excel for this Windows user (one value in your
rem own part of the registry), keeps two files in your own Ganttwright
rem folder, and puts the Ganttwright workbook on your Desktop. It needs no
rem administrator, installs no program and changes nothing else.
rem Ganttwright-Remove, from the same page, undoes it.
setlocal
set "GW_SERVER=https://app.ganttwright.com"
if not defined GANTTWRIGHT_SETUP_HOME set "GANTTWRIGHT_SETUP_HOME=%LOCALAPPDATA%\Ganttwright"
if not defined GANTTWRIGHT_SETUP_KEY set "GANTTWRIGHT_SETUP_KEY=HKCU\Software\Microsoft\Office\16.0\WEF\Developer"
set "GW_HOME=%GANTTWRIGHT_SETUP_HOME%"
set "GW_KEY=%GANTTWRIGHT_SETUP_KEY%"
set "GW_ID=8aab8b88-2e77-42a8-85af-7d1b7699e26f"
if not defined GANTTWRIGHT_SETUP_DESKTOP call :desktop
set "GW_MANIFEST=%GW_HOME%\manifest.xml"
set "GW_KEPT=%GW_HOME%\Ganttwright.xlsx"
set "GW_BOOK=%GANTTWRIGHT_SETUP_DESKTOP%\Ganttwright.xlsx"

rem 1. What Excel reads to show Ganttwright's tab and panel.
if not exist "%GW_HOME%" mkdir "%GW_HOME%"
if not exist "%GW_HOME%" goto :failed
call :manifest > "%GW_MANIFEST%"
if not exist "%GW_MANIFEST%" goto :failed

rem 2. Ganttwright listed in Excel, for this Windows user only.
reg add "%GW_KEY%" /v "%GW_ID%" /t REG_SZ /d "%GW_MANIFEST%" /f >nul
if errorlevel 1 goto :failed

rem 3. The Ganttwright workbook: an empty workbook that opens with Ganttwright.
if exist "%GW_KEPT%" del "%GW_KEPT%"
curl.exe -fsSL "https://app.ganttwright.com/excel/workbook" -o "%GW_KEPT%" 2>nul
if exist "%GW_KEPT%" for %%F in ("%GW_KEPT%") do if %%~zF LSS 1000 del "%GW_KEPT%"
if not exist "%GW_KEPT%" powershell -NoProfile -Command "[Net.ServicePointManager]::SecurityProtocol = 'Tls12'; Invoke-WebRequest -UseBasicParsing -Uri 'https://app.ganttwright.com/excel/workbook' -OutFile $env:GW_KEPT" 2>nul
set "GW_FRESH="
if exist "%GW_KEPT%" if not exist "%GW_BOOK%" set "GW_FRESH=1"
if defined GW_FRESH copy /y "%GW_KEPT%" "%GW_BOOK%" >nul

echo.
echo Ganttwright is set up in Excel on this PC, for %GW_SERVER%
echo.
tasklist /FI "IMAGENAME eq EXCEL.EXE" 2>nul | findstr /I /C:"EXCEL.EXE" >nul
if errorlevel 1 goto :closed
echo 1. Close Excel, every window of it: Excel looks for Ganttwright when it starts.
goto :next
:closed
echo 1. Excel is closed, which is right: it looks for Ganttwright when it starts.
:next
if not exist "%GW_KEPT%" goto :nobook
if not defined GW_FRESH goto :oldbook
echo 2. Open Ganttwright.xlsx on your Desktop: Excel shows the Ganttwright tab and the panel.
goto :last
:oldbook
echo 2. Open Ganttwright.xlsx on your Desktop. One was there already and was left as it is.
echo    A new empty one is at "%GW_KEPT%"
goto :last
:nobook
echo 2. The Ganttwright workbook could not be fetched from here. Download it in your browser:
echo    https://app.ganttwright.com/excel/workbook
echo    Open it, and choose Enable Editing if Excel asks.
:last
echo 3. Save it under your project's name. Every workbook saved from it opens the same way.
echo.
if not defined GANTTWRIGHT_SETUP_QUIET pause
exit /b 0

:failed
echo.
echo Ganttwright could not be set up on this PC. Nothing else was changed.
echo.
if not defined GANTTWRIGHT_SETUP_QUIET pause
exit /b 1

rem The Desktop, wherever Windows keeps it (OneDrive may hold it).
:desktop
set "GANTTWRIGHT_SETUP_DESKTOP=%USERPROFILE%\Desktop"
for /f "tokens=2,*" %%A in ('reg query "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folders" /v Desktop 2^>nul ^| findstr "REG_"') do call set "GANTTWRIGHT_SETUP_DESKTOP=%%B"
exit /b 0

rem The add-in's manifest, as Excel reads it: it names https://app.ganttwright.com and nothing else.
:manifest
echo(^<?xml version=^"1.0^" encoding=^"UTF-8^"?^>
echo(^<OfficeApp xmlns=^"http://schemas.microsoft.com/office/appforoffice/1.1^"
echo(  xmlns:xsi=^"http://www.w3.org/2001/XMLSchema-instance^"
echo(  xmlns:bt=^"http://schemas.microsoft.com/office/officeappbasictypes/1.0^"
echo(  xmlns:ov=^"http://schemas.microsoft.com/office/taskpaneappversionoverrides^"
echo(  xsi:type=^"TaskPaneApp^"^>
echo(  ^<Id^>8aab8b88-2e77-42a8-85af-7d1b7699e26f^</Id^>
echo(  ^<Version^>0.2.0.0^</Version^>
echo(  ^<ProviderName^>Ganttwright^</ProviderName^>
echo(  ^<DefaultLocale^>en-US^</DefaultLocale^>
echo(  ^<DisplayName DefaultValue=^"Ganttwright^"/^>
echo(  ^<Description DefaultValue=^"Build a Primavera P6 schedule step by step on the workbook's sheets.^"/^>
echo(  ^<IconUrl DefaultValue=^"https://app.ganttwright.com/excel/icon-32.png^"/^>
echo(  ^<HighResolutionIconUrl DefaultValue=^"https://app.ganttwright.com/excel/icon-64.png^"/^>
echo(  ^<SupportUrl DefaultValue=^"https://app.ganttwright.com/^"/^>
echo(  ^<AppDomains^>
echo(    ^<AppDomain^>https://app.ganttwright.com^</AppDomain^>
echo(  ^</AppDomains^>
echo(  ^<Hosts^>
echo(    ^<Host Name=^"Workbook^"/^>
echo(  ^</Hosts^>
echo(  ^<Requirements^>
echo(    ^<Sets DefaultMinVersion=^"1.1^"^>
echo(      ^<Set Name=^"ExcelApi^" MinVersion=^"1.8^"/^>
echo(    ^</Sets^>
echo(  ^</Requirements^>
echo(  ^<DefaultSettings^>
echo(    ^<SourceLocation DefaultValue=^"https://app.ganttwright.com/excel^"/^>
echo(  ^</DefaultSettings^>
echo(  ^<Permissions^>ReadWriteDocument^</Permissions^>
echo(  ^<VersionOverrides xmlns=^"http://schemas.microsoft.com/office/taskpaneappversionoverrides^" xsi:type=^"VersionOverridesV1_0^"^>
echo(    ^<Hosts^>
echo(      ^<Host xsi:type=^"Workbook^"^>
echo(        ^<DesktopFormFactor^>
echo(          ^<GetStarted^>
echo(            ^<Title resid=^"GW.Started.Title^"/^>
echo(            ^<Description resid=^"GW.Started.Text^"/^>
echo(            ^<LearnMoreUrl resid=^"GW.Home.Url^"/^>
echo(          ^</GetStarted^>
echo(          ^<FunctionFile resid=^"GW.Commands.Url^"/^>
echo(          ^<ExtensionPoint xsi:type=^"PrimaryCommandSurface^"^>
echo(            ^<CustomTab id=^"GW.Tab^"^>
echo(              ^<Group id=^"GW.G.project^"^>
echo(                ^<Label resid=^"GW.GL.project^"/^>
echo(                ^<Icon^>
echo(                  ^<bt:Image size=^"16^" resid=^"GW.I.brand.16^"/^>
echo(                  ^<bt:Image size=^"32^" resid=^"GW.I.brand.32^"/^>
echo(                  ^<bt:Image size=^"80^" resid=^"GW.I.brand.80^"/^>
echo(                ^</Icon^>
echo(                ^<Control xsi:type=^"Button^" id=^"GW.B.panel^"^>
echo(                  ^<Label resid=^"GW.L.panel^"/^>
echo(                  ^<Supertip^>
echo(                    ^<Title resid=^"GW.L.panel^"/^>
echo(                    ^<Description resid=^"GW.T.panel^"/^>
echo(                  ^</Supertip^>
echo(                  ^<Icon^>
echo(                    ^<bt:Image size=^"16^" resid=^"GW.I.brand.16^"/^>
echo(                    ^<bt:Image size=^"32^" resid=^"GW.I.brand.32^"/^>
echo(                    ^<bt:Image size=^"80^" resid=^"GW.I.brand.80^"/^>
echo(                  ^</Icon^>
echo(                  ^<Action xsi:type=^"ShowTaskpane^"^>
echo(                    ^<TaskpaneId^>Office.AutoShowTaskpaneWithDocument^</TaskpaneId^>
echo(                    ^<SourceLocation resid=^"GW.Panel.Url^"/^>
echo(                  ^</Action^>
echo(                ^</Control^>
echo(                ^<Control xsi:type=^"Button^" id=^"GW.B.open^"^>
echo(                  ^<Label resid=^"GW.L.open^"/^>
echo(                  ^<Supertip^>
echo(                    ^<Title resid=^"GW.L.open^"/^>
echo(                    ^<Description resid=^"GW.T.open^"/^>
echo(                  ^</Supertip^>
echo(                  ^<Icon^>
echo(                    ^<bt:Image size=^"16^" resid=^"GW.I.open.16^"/^>
echo(                    ^<bt:Image size=^"32^" resid=^"GW.I.open.32^"/^>
echo(                    ^<bt:Image size=^"80^" resid=^"GW.I.open.80^"/^>
echo(                  ^</Icon^>
echo(                  ^<Action xsi:type=^"ShowTaskpane^"^>
echo(                    ^<TaskpaneId^>Office.AutoShowTaskpaneWithDocument^</TaskpaneId^>
echo(                    ^<SourceLocation resid=^"GW.Go.open^"/^>
echo(                  ^</Action^>
echo(                ^</Control^>
echo(                ^<Control xsi:type=^"Menu^" id=^"GW.M.sheets^"^>
echo(                  ^<Label resid=^"GW.L.sheets^"/^>
echo(                  ^<Supertip^>
echo(                    ^<Title resid=^"GW.L.sheets^"/^>
echo(                    ^<Description resid=^"GW.T.sheets^"/^>
echo(                  ^</Supertip^>
echo(                  ^<Icon^>
echo(                    ^<bt:Image size=^"16^" resid=^"GW.I.sheets.16^"/^>
echo(                    ^<bt:Image size=^"32^" resid=^"GW.I.sheets.32^"/^>
echo(                    ^<bt:Image size=^"80^" resid=^"GW.I.sheets.80^"/^>
echo(                  ^</Icon^>
echo(                  ^<Items^>
echo(                    ^<Item id=^"GW.M.sheets.1^"^>
echo(                      ^<Label resid=^"GW.L.sheets.1^"/^>
echo(                      ^<Supertip^>
echo(                        ^<Title resid=^"GW.L.sheets.1^"/^>
echo(                        ^<Description resid=^"GW.T.sheets.1^"/^>
echo(                      ^</Supertip^>
echo(                      ^<Icon^>
echo(                        ^<bt:Image size=^"16^" resid=^"GW.I.sheet.16^"/^>
echo(                        ^<bt:Image size=^"32^" resid=^"GW.I.sheet.32^"/^>
echo(                        ^<bt:Image size=^"80^" resid=^"GW.I.sheet.80^"/^>
echo(                      ^</Icon^>
echo(                      ^<Action xsi:type=^"ExecuteFunction^"^>
echo(                        ^<FunctionName^>gwSheetP6Schedule^</FunctionName^>
echo(                      ^</Action^>
echo(                    ^</Item^>
echo(                    ^<Item id=^"GW.M.sheets.2^"^>
echo(                      ^<Label resid=^"GW.L.sheets.2^"/^>
echo(                      ^<Supertip^>
echo(                        ^<Title resid=^"GW.L.sheets.2^"/^>
echo(                        ^<Description resid=^"GW.T.sheets.2^"/^>
echo(                      ^</Supertip^>
echo(                      ^<Icon^>
echo(                        ^<bt:Image size=^"16^" resid=^"GW.I.sheet.16^"/^>
echo(                        ^<bt:Image size=^"32^" resid=^"GW.I.sheet.32^"/^>
echo(                        ^<bt:Image size=^"80^" resid=^"GW.I.sheet.80^"/^>
echo(                      ^</Icon^>
echo(                      ^<Action xsi:type=^"ExecuteFunction^"^>
echo(                        ^<FunctionName^>gwSheetP6WBS^</FunctionName^>
echo(                      ^</Action^>
echo(                    ^</Item^>
echo(                    ^<Item id=^"GW.M.sheets.3^"^>
echo(                      ^<Label resid=^"GW.L.sheets.3^"/^>
echo(                      ^<Supertip^>
echo(                        ^<Title resid=^"GW.L.sheets.3^"/^>
echo(                        ^<Description resid=^"GW.T.sheets.3^"/^>
echo(                      ^</Supertip^>
echo(                      ^<Icon^>
echo(                        ^<bt:Image size=^"16^" resid=^"GW.I.sheet.16^"/^>
echo(                        ^<bt:Image size=^"32^" resid=^"GW.I.sheet.32^"/^>
echo(                        ^<bt:Image size=^"80^" resid=^"GW.I.sheet.80^"/^>
echo(                      ^</Icon^>
echo(                      ^<Action xsi:type=^"ExecuteFunction^"^>
echo(                        ^<FunctionName^>gwSheetP6Resources^</FunctionName^>
echo(                      ^</Action^>
echo(                    ^</Item^>
echo(                    ^<Item id=^"GW.M.sheets.4^"^>
echo(                      ^<Label resid=^"GW.L.sheets.4^"/^>
echo(                      ^<Supertip^>
echo(                        ^<Title resid=^"GW.L.sheets.4^"/^>
echo(                        ^<Description resid=^"GW.T.sheets.4^"/^>
echo(                      ^</Supertip^>
echo(                      ^<Icon^>
echo(                        ^<bt:Image size=^"16^" resid=^"GW.I.sheet.16^"/^>
echo(                        ^<bt:Image size=^"32^" resid=^"GW.I.sheet.32^"/^>
echo(                        ^<bt:Image size=^"80^" resid=^"GW.I.sheet.80^"/^>
echo(                      ^</Icon^>
echo(                      ^<Action xsi:type=^"ExecuteFunction^"^>
echo(                        ^<FunctionName^>gwSheetP6Calendars^</FunctionName^>
echo(                      ^</Action^>
echo(                    ^</Item^>
echo(                    ^<Item id=^"GW.M.sheets.5^"^>
echo(                      ^<Label resid=^"GW.L.sheets.5^"/^>
echo(                      ^<Supertip^>
echo(                        ^<Title resid=^"GW.L.sheets.5^"/^>
echo(                        ^<Description resid=^"GW.T.sheets.5^"/^>
echo(                      ^</Supertip^>
echo(                      ^<Icon^>
echo(                        ^<bt:Image size=^"16^" resid=^"GW.I.sheet.16^"/^>
echo(                        ^<bt:Image size=^"32^" resid=^"GW.I.sheet.32^"/^>
echo(                        ^<bt:Image size=^"80^" resid=^"GW.I.sheet.80^"/^>
echo(                      ^</Icon^>
echo(                      ^<Action xsi:type=^"ExecuteFunction^"^>
echo(                        ^<FunctionName^>gwSheetP6Holidays^</FunctionName^>
echo(                      ^</Action^>
echo(                    ^</Item^>
echo(                    ^<Item id=^"GW.M.sheets.6^"^>
echo(                      ^<Label resid=^"GW.L.sheets.6^"/^>
echo(                      ^<Supertip^>
echo(                        ^<Title resid=^"GW.L.sheets.6^"/^>
echo(                        ^<Description resid=^"GW.T.sheets.6^"/^>
echo(                      ^</Supertip^>
echo(                      ^<Icon^>
echo(                        ^<bt:Image size=^"16^" resid=^"GW.I.sheet.16^"/^>
echo(                        ^<bt:Image size=^"32^" resid=^"GW.I.sheet.32^"/^>
echo(                        ^<bt:Image size=^"80^" resid=^"GW.I.sheet.80^"/^>
echo(                      ^</Icon^>
echo(                      ^<Action xsi:type=^"ExecuteFunction^"^>
echo(                        ^<FunctionName^>gwSheetBOQ^</FunctionName^>
echo(                      ^</Action^>
echo(                    ^</Item^>
echo(                    ^<Item id=^"GW.M.sheets.7^"^>
echo(                      ^<Label resid=^"GW.L.sheets.7^"/^>
echo(                      ^<Supertip^>
echo(                        ^<Title resid=^"GW.L.sheets.7^"/^>
echo(                        ^<Description resid=^"GW.T.sheets.7^"/^>
echo(                      ^</Supertip^>
echo(                      ^<Icon^>
echo(                        ^<bt:Image size=^"16^" resid=^"GW.I.sheet.16^"/^>
echo(                        ^<bt:Image size=^"32^" resid=^"GW.I.sheet.32^"/^>
echo(                        ^<bt:Image size=^"80^" resid=^"GW.I.sheet.80^"/^>
echo(                      ^</Icon^>
echo(                      ^<Action xsi:type=^"ExecuteFunction^"^>
echo(                        ^<FunctionName^>gwSheetMapping^</FunctionName^>
echo(                      ^</Action^>
echo(                    ^</Item^>
echo(                    ^<Item id=^"GW.M.sheets.8^"^>
echo(                      ^<Label resid=^"GW.L.sheets.8^"/^>
echo(                      ^<Supertip^>
echo(                        ^<Title resid=^"GW.L.sheets.8^"/^>
echo(                        ^<Description resid=^"GW.T.sheets.8^"/^>
echo(                      ^</Supertip^>
echo(                      ^<Icon^>
echo(                        ^<bt:Image size=^"16^" resid=^"GW.I.sheet.16^"/^>
echo(                        ^<bt:Image size=^"32^" resid=^"GW.I.sheet.32^"/^>
echo(                        ^<bt:Image size=^"80^" resid=^"GW.I.sheet.80^"/^>
echo(                      ^</Icon^>
echo(                      ^<Action xsi:type=^"ExecuteFunction^"^>
echo(                        ^<FunctionName^>gwSheetP6Activities^</FunctionName^>
echo(                      ^</Action^>
echo(                    ^</Item^>
echo(                  ^</Items^>
echo(                ^</Control^>
echo(              ^</Group^>
echo(              ^<Group id=^"GW.G.build^"^>
echo(                ^<Label resid=^"GW.GL.build^"/^>
echo(                ^<Icon^>
echo(                  ^<bt:Image size=^"16^" resid=^"GW.I.brand.16^"/^>
echo(                  ^<bt:Image size=^"32^" resid=^"GW.I.brand.32^"/^>
echo(                  ^<bt:Image size=^"80^" resid=^"GW.I.brand.80^"/^>
echo(                ^</Icon^>
echo(                ^<Control xsi:type=^"Button^" id=^"GW.B.dictionaries^"^>
echo(                  ^<Label resid=^"GW.L.dictionaries^"/^>
echo(                  ^<Supertip^>
echo(                    ^<Title resid=^"GW.L.dictionaries^"/^>
echo(                    ^<Description resid=^"GW.T.dictionaries^"/^>
echo(                  ^</Supertip^>
echo(                  ^<Icon^>
echo(                    ^<bt:Image size=^"16^" resid=^"GW.I.dictionaries.16^"/^>
echo(                    ^<bt:Image size=^"32^" resid=^"GW.I.dictionaries.32^"/^>
echo(                    ^<bt:Image size=^"80^" resid=^"GW.I.dictionaries.80^"/^>
echo(                  ^</Icon^>
echo(                  ^<Action xsi:type=^"ShowTaskpane^"^>
echo(                    ^<TaskpaneId^>Office.AutoShowTaskpaneWithDocument^</TaskpaneId^>
echo(                    ^<SourceLocation resid=^"GW.Go.dictionaries^"/^>
echo(                  ^</Action^>
echo(                ^</Control^>
echo(                ^<Control xsi:type=^"Button^" id=^"GW.B.wbs^"^>
echo(                  ^<Label resid=^"GW.L.wbs^"/^>
echo(                  ^<Supertip^>
echo(                    ^<Title resid=^"GW.L.wbs^"/^>
echo(                    ^<Description resid=^"GW.T.wbs^"/^>
echo(                  ^</Supertip^>
echo(                  ^<Icon^>
echo(                    ^<bt:Image size=^"16^" resid=^"GW.I.wbs.16^"/^>
echo(                    ^<bt:Image size=^"32^" resid=^"GW.I.wbs.32^"/^>
echo(                    ^<bt:Image size=^"80^" resid=^"GW.I.wbs.80^"/^>
echo(                  ^</Icon^>
echo(                  ^<Action xsi:type=^"ShowTaskpane^"^>
echo(                    ^<TaskpaneId^>Office.AutoShowTaskpaneWithDocument^</TaskpaneId^>
echo(                    ^<SourceLocation resid=^"GW.Go.wbs^"/^>
echo(                  ^</Action^>
echo(                ^</Control^>
echo(                ^<Control xsi:type=^"Button^" id=^"GW.B.activities^"^>
echo(                  ^<Label resid=^"GW.L.activities^"/^>
echo(                  ^<Supertip^>
echo(                    ^<Title resid=^"GW.L.activities^"/^>
echo(                    ^<Description resid=^"GW.T.activities^"/^>
echo(                  ^</Supertip^>
echo(                  ^<Icon^>
echo(                    ^<bt:Image size=^"16^" resid=^"GW.I.activities.16^"/^>
echo(                    ^<bt:Image size=^"32^" resid=^"GW.I.activities.32^"/^>
echo(                    ^<bt:Image size=^"80^" resid=^"GW.I.activities.80^"/^>
echo(                  ^</Icon^>
echo(                  ^<Action xsi:type=^"ShowTaskpane^"^>
echo(                    ^<TaskpaneId^>Office.AutoShowTaskpaneWithDocument^</TaskpaneId^>
echo(                    ^<SourceLocation resid=^"GW.Go.activities^"/^>
echo(                  ^</Action^>
echo(                ^</Control^>
echo(                ^<Control xsi:type=^"Button^" id=^"GW.B.resources^"^>
echo(                  ^<Label resid=^"GW.L.resources^"/^>
echo(                  ^<Supertip^>
echo(                    ^<Title resid=^"GW.L.resources^"/^>
echo(                    ^<Description resid=^"GW.T.resources^"/^>
echo(                  ^</Supertip^>
echo(                  ^<Icon^>
echo(                    ^<bt:Image size=^"16^" resid=^"GW.I.resources.16^"/^>
echo(                    ^<bt:Image size=^"32^" resid=^"GW.I.resources.32^"/^>
echo(                    ^<bt:Image size=^"80^" resid=^"GW.I.resources.80^"/^>
echo(                  ^</Icon^>
echo(                  ^<Action xsi:type=^"ShowTaskpane^"^>
echo(                    ^<TaskpaneId^>Office.AutoShowTaskpaneWithDocument^</TaskpaneId^>
echo(                    ^<SourceLocation resid=^"GW.Go.resources^"/^>
echo(                  ^</Action^>
echo(                ^</Control^>
echo(                ^<Control xsi:type=^"Button^" id=^"GW.B.relationships^"^>
echo(                  ^<Label resid=^"GW.L.relationships^"/^>
echo(                  ^<Supertip^>
echo(                    ^<Title resid=^"GW.L.relationships^"/^>
echo(                    ^<Description resid=^"GW.T.relationships^"/^>
echo(                  ^</Supertip^>
echo(                  ^<Icon^>
echo(                    ^<bt:Image size=^"16^" resid=^"GW.I.relationships.16^"/^>
echo(                    ^<bt:Image size=^"32^" resid=^"GW.I.relationships.32^"/^>
echo(                    ^<bt:Image size=^"80^" resid=^"GW.I.relationships.80^"/^>
echo(                  ^</Icon^>
echo(                  ^<Action xsi:type=^"ShowTaskpane^"^>
echo(                    ^<TaskpaneId^>Office.AutoShowTaskpaneWithDocument^</TaskpaneId^>
echo(                    ^<SourceLocation resid=^"GW.Go.relationships^"/^>
echo(                  ^</Action^>
echo(                ^</Control^>
echo(              ^</Group^>
echo(              ^<Group id=^"GW.G.send^"^>
echo(                ^<Label resid=^"GW.GL.send^"/^>
echo(                ^<Icon^>
echo(                  ^<bt:Image size=^"16^" resid=^"GW.I.brand.16^"/^>
echo(                  ^<bt:Image size=^"32^" resid=^"GW.I.brand.32^"/^>
echo(                  ^<bt:Image size=^"80^" resid=^"GW.I.brand.80^"/^>
echo(                ^</Icon^>
echo(                ^<Control xsi:type=^"Button^" id=^"GW.B.check^"^>
echo(                  ^<Label resid=^"GW.L.check^"/^>
echo(                  ^<Supertip^>
echo(                    ^<Title resid=^"GW.L.check^"/^>
echo(                    ^<Description resid=^"GW.T.check^"/^>
echo(                  ^</Supertip^>
echo(                  ^<Icon^>
echo(                    ^<bt:Image size=^"16^" resid=^"GW.I.check.16^"/^>
echo(                    ^<bt:Image size=^"32^" resid=^"GW.I.check.32^"/^>
echo(                    ^<bt:Image size=^"80^" resid=^"GW.I.check.80^"/^>
echo(                  ^</Icon^>
echo(                  ^<Action xsi:type=^"ShowTaskpane^"^>
echo(                    ^<TaskpaneId^>Office.AutoShowTaskpaneWithDocument^</TaskpaneId^>
echo(                    ^<SourceLocation resid=^"GW.Go.check^"/^>
echo(                  ^</Action^>
echo(                ^</Control^>
echo(                ^<Control xsi:type=^"Button^" id=^"GW.B.preview^"^>
echo(                  ^<Label resid=^"GW.L.preview^"/^>
echo(                  ^<Supertip^>
echo(                    ^<Title resid=^"GW.L.preview^"/^>
echo(                    ^<Description resid=^"GW.T.preview^"/^>
echo(                  ^</Supertip^>
echo(                  ^<Icon^>
echo(                    ^<bt:Image size=^"16^" resid=^"GW.I.preview.16^"/^>
echo(                    ^<bt:Image size=^"32^" resid=^"GW.I.preview.32^"/^>
echo(                    ^<bt:Image size=^"80^" resid=^"GW.I.preview.80^"/^>
echo(                  ^</Icon^>
echo(                  ^<Action xsi:type=^"ShowTaskpane^"^>
echo(                    ^<TaskpaneId^>Office.AutoShowTaskpaneWithDocument^</TaskpaneId^>
echo(                    ^<SourceLocation resid=^"GW.Go.preview^"/^>
echo(                  ^</Action^>
echo(                ^</Control^>
echo(                ^<Control xsi:type=^"Button^" id=^"GW.B.send^"^>
echo(                  ^<Label resid=^"GW.L.send^"/^>
echo(                  ^<Supertip^>
echo(                    ^<Title resid=^"GW.L.send^"/^>
echo(                    ^<Description resid=^"GW.T.send^"/^>
echo(                  ^</Supertip^>
echo(                  ^<Icon^>
echo(                    ^<bt:Image size=^"16^" resid=^"GW.I.send.16^"/^>
echo(                    ^<bt:Image size=^"32^" resid=^"GW.I.send.32^"/^>
echo(                    ^<bt:Image size=^"80^" resid=^"GW.I.send.80^"/^>
echo(                  ^</Icon^>
echo(                  ^<Action xsi:type=^"ShowTaskpane^"^>
echo(                    ^<TaskpaneId^>Office.AutoShowTaskpaneWithDocument^</TaskpaneId^>
echo(                    ^<SourceLocation resid=^"GW.Go.send^"/^>
echo(                  ^</Action^>
echo(                ^</Control^>
echo(              ^</Group^>
echo(              ^<Label resid=^"GW.Name^"/^>
echo(            ^</CustomTab^>
echo(          ^</ExtensionPoint^>
echo(        ^</DesktopFormFactor^>
echo(      ^</Host^>
echo(    ^</Hosts^>
echo(    ^<Resources^>
echo(      ^<bt:Images^>
echo(        ^<bt:Image id=^"GW.I.brand.16^" DefaultValue=^"https://app.ganttwright.com/excel/icon-16.png^"/^>
echo(        ^<bt:Image id=^"GW.I.brand.32^" DefaultValue=^"https://app.ganttwright.com/excel/icon-32.png^"/^>
echo(        ^<bt:Image id=^"GW.I.brand.80^" DefaultValue=^"https://app.ganttwright.com/excel/icon-80.png^"/^>
echo(        ^<bt:Image id=^"GW.I.open.16^" DefaultValue=^"https://app.ganttwright.com/excel/ribbon/open-16.png^"/^>
echo(        ^<bt:Image id=^"GW.I.open.32^" DefaultValue=^"https://app.ganttwright.com/excel/ribbon/open-32.png^"/^>
echo(        ^<bt:Image id=^"GW.I.open.80^" DefaultValue=^"https://app.ganttwright.com/excel/ribbon/open-80.png^"/^>
echo(        ^<bt:Image id=^"GW.I.sheets.16^" DefaultValue=^"https://app.ganttwright.com/excel/ribbon/sheets-16.png^"/^>
echo(        ^<bt:Image id=^"GW.I.sheets.32^" DefaultValue=^"https://app.ganttwright.com/excel/ribbon/sheets-32.png^"/^>
echo(        ^<bt:Image id=^"GW.I.sheets.80^" DefaultValue=^"https://app.ganttwright.com/excel/ribbon/sheets-80.png^"/^>
echo(        ^<bt:Image id=^"GW.I.sheet.16^" DefaultValue=^"https://app.ganttwright.com/excel/ribbon/sheet-16.png^"/^>
echo(        ^<bt:Image id=^"GW.I.sheet.32^" DefaultValue=^"https://app.ganttwright.com/excel/ribbon/sheet-32.png^"/^>
echo(        ^<bt:Image id=^"GW.I.sheet.80^" DefaultValue=^"https://app.ganttwright.com/excel/ribbon/sheet-80.png^"/^>
echo(        ^<bt:Image id=^"GW.I.dictionaries.16^" DefaultValue=^"https://app.ganttwright.com/excel/ribbon/dictionaries-16.png^"/^>
echo(        ^<bt:Image id=^"GW.I.dictionaries.32^" DefaultValue=^"https://app.ganttwright.com/excel/ribbon/dictionaries-32.png^"/^>
echo(        ^<bt:Image id=^"GW.I.dictionaries.80^" DefaultValue=^"https://app.ganttwright.com/excel/ribbon/dictionaries-80.png^"/^>
echo(        ^<bt:Image id=^"GW.I.wbs.16^" DefaultValue=^"https://app.ganttwright.com/excel/ribbon/wbs-16.png^"/^>
echo(        ^<bt:Image id=^"GW.I.wbs.32^" DefaultValue=^"https://app.ganttwright.com/excel/ribbon/wbs-32.png^"/^>
echo(        ^<bt:Image id=^"GW.I.wbs.80^" DefaultValue=^"https://app.ganttwright.com/excel/ribbon/wbs-80.png^"/^>
echo(        ^<bt:Image id=^"GW.I.activities.16^" DefaultValue=^"https://app.ganttwright.com/excel/ribbon/activities-16.png^"/^>
echo(        ^<bt:Image id=^"GW.I.activities.32^" DefaultValue=^"https://app.ganttwright.com/excel/ribbon/activities-32.png^"/^>
echo(        ^<bt:Image id=^"GW.I.activities.80^" DefaultValue=^"https://app.ganttwright.com/excel/ribbon/activities-80.png^"/^>
echo(        ^<bt:Image id=^"GW.I.resources.16^" DefaultValue=^"https://app.ganttwright.com/excel/ribbon/resources-16.png^"/^>
echo(        ^<bt:Image id=^"GW.I.resources.32^" DefaultValue=^"https://app.ganttwright.com/excel/ribbon/resources-32.png^"/^>
echo(        ^<bt:Image id=^"GW.I.resources.80^" DefaultValue=^"https://app.ganttwright.com/excel/ribbon/resources-80.png^"/^>
echo(        ^<bt:Image id=^"GW.I.relationships.16^" DefaultValue=^"https://app.ganttwright.com/excel/ribbon/relationships-16.png^"/^>
echo(        ^<bt:Image id=^"GW.I.relationships.32^" DefaultValue=^"https://app.ganttwright.com/excel/ribbon/relationships-32.png^"/^>
echo(        ^<bt:Image id=^"GW.I.relationships.80^" DefaultValue=^"https://app.ganttwright.com/excel/ribbon/relationships-80.png^"/^>
echo(        ^<bt:Image id=^"GW.I.check.16^" DefaultValue=^"https://app.ganttwright.com/excel/ribbon/check-16.png^"/^>
echo(        ^<bt:Image id=^"GW.I.check.32^" DefaultValue=^"https://app.ganttwright.com/excel/ribbon/check-32.png^"/^>
echo(        ^<bt:Image id=^"GW.I.check.80^" DefaultValue=^"https://app.ganttwright.com/excel/ribbon/check-80.png^"/^>
echo(        ^<bt:Image id=^"GW.I.preview.16^" DefaultValue=^"https://app.ganttwright.com/excel/ribbon/preview-16.png^"/^>
echo(        ^<bt:Image id=^"GW.I.preview.32^" DefaultValue=^"https://app.ganttwright.com/excel/ribbon/preview-32.png^"/^>
echo(        ^<bt:Image id=^"GW.I.preview.80^" DefaultValue=^"https://app.ganttwright.com/excel/ribbon/preview-80.png^"/^>
echo(        ^<bt:Image id=^"GW.I.send.16^" DefaultValue=^"https://app.ganttwright.com/excel/ribbon/send-16.png^"/^>
echo(        ^<bt:Image id=^"GW.I.send.32^" DefaultValue=^"https://app.ganttwright.com/excel/ribbon/send-32.png^"/^>
echo(        ^<bt:Image id=^"GW.I.send.80^" DefaultValue=^"https://app.ganttwright.com/excel/ribbon/send-80.png^"/^>
echo(      ^</bt:Images^>
echo(      ^<bt:Urls^>
echo(        ^<bt:Url id=^"GW.Panel.Url^" DefaultValue=^"https://app.ganttwright.com/excel^"/^>
echo(        ^<bt:Url id=^"GW.Commands.Url^" DefaultValue=^"https://app.ganttwright.com/excel/commands.html^"/^>
echo(        ^<bt:Url id=^"GW.Home.Url^" DefaultValue=^"https://app.ganttwright.com/^"/^>
echo(        ^<bt:Url id=^"GW.Go.open^" DefaultValue=^"https://app.ganttwright.com/excel?go=open^"/^>
echo(        ^<bt:Url id=^"GW.Go.dictionaries^" DefaultValue=^"https://app.ganttwright.com/excel?go=dictionaries^"/^>
echo(        ^<bt:Url id=^"GW.Go.wbs^" DefaultValue=^"https://app.ganttwright.com/excel?go=wbs^"/^>
echo(        ^<bt:Url id=^"GW.Go.activities^" DefaultValue=^"https://app.ganttwright.com/excel?go=activities^"/^>
echo(        ^<bt:Url id=^"GW.Go.resources^" DefaultValue=^"https://app.ganttwright.com/excel?go=resources^"/^>
echo(        ^<bt:Url id=^"GW.Go.relationships^" DefaultValue=^"https://app.ganttwright.com/excel?go=relationships^"/^>
echo(        ^<bt:Url id=^"GW.Go.check^" DefaultValue=^"https://app.ganttwright.com/excel?go=check^"/^>
echo(        ^<bt:Url id=^"GW.Go.preview^" DefaultValue=^"https://app.ganttwright.com/excel?go=preview^"/^>
echo(        ^<bt:Url id=^"GW.Go.send^" DefaultValue=^"https://app.ganttwright.com/excel?go=send^"/^>
echo(      ^</bt:Urls^>
echo(      ^<bt:ShortStrings^>
echo(        ^<bt:String id=^"GW.Name^" DefaultValue=^"Ganttwright^"/^>
echo(        ^<bt:String id=^"GW.Started.Title^" DefaultValue=^"Ganttwright is ready^"/^>
echo(        ^<bt:String id=^"GW.GL.project^" DefaultValue=^"Project^"/^>
echo(        ^<bt:String id=^"GW.L.panel^" DefaultValue=^"Ganttwright^"/^>
echo(        ^<bt:String id=^"GW.L.open^" DefaultValue=^"Open project^"/^>
echo(        ^<bt:String id=^"GW.L.sheets^" DefaultValue=^"Go to sheet^"/^>
echo(        ^<bt:String id=^"GW.L.sheets.1^" DefaultValue=^"P6 Schedule^"/^>
echo(        ^<bt:String id=^"GW.L.sheets.2^" DefaultValue=^"P6 WBS^"/^>
echo(        ^<bt:String id=^"GW.L.sheets.3^" DefaultValue=^"P6 Resources^"/^>
echo(        ^<bt:String id=^"GW.L.sheets.4^" DefaultValue=^"P6 Calendars^"/^>
echo(        ^<bt:String id=^"GW.L.sheets.5^" DefaultValue=^"P6 Holidays^"/^>
echo(        ^<bt:String id=^"GW.L.sheets.6^" DefaultValue=^"BOQ^"/^>
echo(        ^<bt:String id=^"GW.L.sheets.7^" DefaultValue=^"Mapping^"/^>
echo(        ^<bt:String id=^"GW.L.sheets.8^" DefaultValue=^"P6 Activities^"/^>
echo(        ^<bt:String id=^"GW.GL.build^" DefaultValue=^"Build^"/^>
echo(        ^<bt:String id=^"GW.L.dictionaries^" DefaultValue=^"Dictionaries^"/^>
echo(        ^<bt:String id=^"GW.L.wbs^" DefaultValue=^"WBS^"/^>
echo(        ^<bt:String id=^"GW.L.activities^" DefaultValue=^"Activities^"/^>
echo(        ^<bt:String id=^"GW.L.resources^" DefaultValue=^"Resources^"/^>
echo(        ^<bt:String id=^"GW.L.relationships^" DefaultValue=^"Relationships^"/^>
echo(        ^<bt:String id=^"GW.GL.send^" DefaultValue=^"Check and send^"/^>
echo(        ^<bt:String id=^"GW.L.check^" DefaultValue=^"Check^"/^>
echo(        ^<bt:String id=^"GW.L.preview^" DefaultValue=^"Preview^"/^>
echo(        ^<bt:String id=^"GW.L.send^" DefaultValue=^"Send to P6^"/^>
echo(      ^</bt:ShortStrings^>
echo(      ^<bt:LongStrings^>
echo(        ^<bt:String id=^"GW.Started.Text^" DefaultValue=^"Open the Ganttwright tab to build the schedule step by step and send it to P6.^"/^>
echo(        ^<bt:String id=^"GW.T.panel^" DefaultValue=^"Shows the Ganttwright panel beside the workbook.^"/^>
echo(        ^<bt:String id=^"GW.T.open^" DefaultValue=^"Lists your P6 databases and their projects, to open one on this workbook.^"/^>
echo(        ^<bt:String id=^"GW.T.sheets^" DefaultValue=^"Shows one of the sheets Ganttwright works on.^"/^>
echo(        ^<bt:String id=^"GW.T.sheets.1^" DefaultValue=^"Shows the P6 Schedule sheet: the project's levels and activities.^"/^>
echo(        ^<bt:String id=^"GW.T.sheets.2^" DefaultValue=^"Shows the P6 WBS sheet: the WBS, level by level.^"/^>
echo(        ^<bt:String id=^"GW.T.sheets.3^" DefaultValue=^"Shows the P6 Resources sheet: each activity's resources.^"/^>
echo(        ^<bt:String id=^"GW.T.sheets.4^" DefaultValue=^"Shows the P6 Calendars sheet: the calendars and their working time.^"/^>
echo(        ^<bt:String id=^"GW.T.sheets.5^" DefaultValue=^"Shows the P6 Holidays sheet: the days that differ.^"/^>
echo(        ^<bt:String id=^"GW.T.sheets.6^" DefaultValue=^"Shows the BOQ sheet: the bill of quantities.^"/^>
echo(        ^<bt:String id=^"GW.T.sheets.7^" DefaultValue=^"Shows the Mapping sheet: each BOQ line spread over the activities.^"/^>
echo(        ^<bt:String id=^"GW.T.sheets.8^" DefaultValue=^"Shows the P6 Activities sheet: the activities the mapping makes.^"/^>
echo(        ^<bt:String id=^"GW.T.dictionaries^" DefaultValue=^"Step 1. The activities, resources, activity codes and WBS trade codes every project builds from.^"/^>
echo(        ^<bt:String id=^"GW.T.wbs^" DefaultValue=^"Step 2. Builds the WBS level by level on the P6 WBS sheet. Send to P6 takes the levels to P6.^"/^>
echo(        ^<bt:String id=^"GW.T.activities^" DefaultValue=^"Step 3. Spreads each BOQ line over buildings and floors onto the dictionary's activities.^"/^>
echo(        ^<bt:String id=^"GW.T.resources^" DefaultValue=^"Step 4. Each activity's resources and their numbers, on a sheet of their own.^"/^>
echo(        ^<bt:String id=^"GW.T.relationships^" DefaultValue=^"Step 5. Links from the dictionary's successors, for every building and floor.^"/^>
echo(        ^<bt:String id=^"GW.T.check^" DefaultValue=^"Step 6. Lists what stops a send and what a schedule review would ask about.^"/^>
echo(        ^<bt:String id=^"GW.T.preview^" DefaultValue=^"Lists exactly what Send would write into P6. Changes nothing.^"/^>
echo(        ^<bt:String id=^"GW.T.send^" DefaultValue=^"Previews the changes, then waits for you to send them into P6 from the panel.^"/^>
echo(      ^</bt:LongStrings^>
echo(    ^</Resources^>
echo(  ^</VersionOverrides^>
echo(^</OfficeApp^>
exit /b 0
