pause at end of gam-setup.bat

This commit is contained in:
Jay Lee
2016-11-04 11:48:10 -04:00
4 changed files with 23 additions and 8 deletions

View File

@ -70,5 +70,6 @@
@goto saauth
:sadone
echo GAM installation and setup complete!
@echo GAM installation and setup complete!
:alldone
@pause

View File

@ -9962,7 +9962,6 @@ def doRequestOAuth(login_hint=None):
scopes.insert(0, u'email') # Email Display Scope, always included
return (True, u'')
cs_file = os.path.join(GM_Globals[GM_GAM_PATH], FN_CLIENT_SECRETS_JSON)
MISSING_CLIENT_SECRETS_MESSAGE = u"""Please configure OAuth 2.0
To make GAM run you will need to populate the {0} file found at:
@ -9976,7 +9975,7 @@ See this site for instructions:
""".format(FN_CLIENT_SECRETS_JSON, GC_Values[GC_CLIENT_SECRETS_JSON], GAM_WIKI_CREATE_CLIENT_SECRETS)
cs_data = readFile(cs_file, mode=u'rb', continueOnError=True, displayError=True, encoding=None)
cs_data = readFile(GC_Values[GC_CLIENT_SECRETS_JSON], mode=u'rb', continueOnError=True, displayError=True, encoding=None)
if not cs_data:
systemErrorExit(14, MISSING_CLIENT_SECRETS_MESSAGE)
try:
@ -9987,9 +9986,7 @@ See this site for instructions:
print u'ERROR: the format of your client secrets file:\n\n%s\n\n is incorrect. Please recreate the file.'
sys.exit(3)
try:
login_hint = sys.argv[3]
except IndexError:
if not login_hint:
while True:
login_hint = raw_input(u'\nWhat is your G Suite admin email address? ')
if login_hint.find(u'@') == -1:
@ -10442,7 +10439,11 @@ def ProcessGAMCommand(args):
elif command in [u'oauth', u'oauth2']:
argument = sys.argv[2].lower()
if argument in [u'request', u'create']:
doRequestOAuth()
try:
login_hint = sys.argv[3]
except IndexError:
login_hint = None
doRequestOAuth(login_hint)
elif argument in [u'info', u'verify']:
OAuthInfo()
elif argument in [u'delete', u'revoke']:

View File

@ -52,6 +52,12 @@
<Component Id="whatsnew_txt" Guid="6aa9863c-90d9-412f-9b73-fda82549a950">
<File Name="whatsnew.txt" KeyPath="yes" />
</Component>
<Component Id="gam_setup_bat" Guid="ef01f93a-4b50-488a-9c04-ec5e13e66218">
<File Name="gam-setup.bat" KeyPath="yes" />
</Component>
<Component Id="gamcommands_txt" Guid="58ff9c45-a7c9-4e22-8845-a9a92610c1f3">
<File Name="gamcommands.txt" KeyPath="yes" />
</Component>
</ComponentGroup>
</Fragment>
@ -59,7 +65,10 @@
<InstallUISequence>
<ExecuteAction />
<Show Dialog="WelcomeDlg" Before="ProgressDlg" />
<!-- <Show Dialog="ProgressDlg" After="" /> -->
</InstallUISequence>
<CustomAction Id="setup_gam" ExeCommand="[INSTALLFOLDER]gam-setup.bat" Directory="INSTALLFOLDER" Execute="commit" Impersonate="yes" Return="asyncWait"/>
<InstallExecuteSequence>
<Custom Action="setup_gam" After="InstallFiles" >NOT Installed AND NOT UPGRADINGPRODUCTCODE AND NOT WIX_UPGRADE_DETECTED</Custom>
</InstallExecuteSequence>
</Fragment>
</Wix>

View File

@ -11,12 +11,16 @@ del /q /f gam.wixpdb
c:\python27-32\scripts\pyinstaller --clean -F --distpath=gam windows-gam.spec
xcopy LICENSE gam\
xcopy whatsnew.txt gam\
xcopy gam-setup.bat gam\
xcopy gamcommands.txt gam\
del gam\w9xpopen.exe
"%ProgramFiles%\7-Zip\7z.exe" a -tzip gam-%1-windows.zip gam\ -xr!.svn
c:\python27-64\scripts\pyinstaller --clean -F --distpath=gam-64 windows-gam.spec
xcopy LICENSE gam-64\
xcopy whatsnew.txt gam-64\
xcopy gam-setup.bat gam-64\
xcopy gamcommands.txt gam-64\
"%ProgramFiles%\7-Zip\7z.exe" a -tzip gam-%1-windows-x64.zip gam-64\ -xr!.svn
set GAMVERSION=%1