Merge pull request #336 from GlenDC/master

Added Ascii art, script improvements, readme files and automatic package script
This commit is contained in:
Nick Winter 2014-02-03 20:49:50 -08:00
commit 99aa9eab64
7 changed files with 94 additions and 6 deletions

View file

@ -1,2 +1,2 @@
# ignore unnecary files
/utilities
/batch/utilities

View file

@ -0,0 +1,10 @@
======================================================================
_____ _ _____ _ _
/ __ \ | | / __ \ | | | |
| / \/ ___ __| | ___ | / \/ ___ _ __ ___ | |__ __ _| |_
| | / _ \ / _` |/ _ \ | | / _ \| '_ ` _ \| '_ \ / _` | __|
| \__/\ (_) | (_| | __/ | \__/\ (_) | | | | | | |_) | (_| | |_
\____/\___/ \__,_|\___| \____/\___/|_| |_| |_|_.__/ \__,_|\__|
======================================================================
Readme: Hello World!

View file

@ -0,0 +1,10 @@
======================================================================
_____ _ _____ _ _
/ __ \ | | / __ \ | | | |
| / \/ ___ __| | ___ | / \/ ___ _ __ ___ | |__ __ _| |_
| | / _ \ / _` |/ _ \ | | / _ \| '_ ` _ \| '_ \ / _` | __|
| \__/\ (_) | (_| | __/ | \__/\ (_) | | | | | | |_) | (_| | |_
\____/\___/ \__,_|\___| \____/\___/|_| |_| |_|_.__/ \__,_|\__|
======================================================================
Readme: Hello World!

View file

@ -0,0 +1,3 @@
1.0
GlenDC
CodeCombat.com © 2013-2014

View file

@ -0,0 +1,8 @@
_____ _ _____ _ _
/ __ \ | | / __ \ | | | |
| / \/ ___ __| | ___ | / \/ ___ _ __ ___ | |__ __ _| |_
| | / _ \ / _` |/ _ \ | | / _ \| '_ ` _ \| '_ \ / _` | __|
| \__/\ (_) | (_| | __/ | \__/\ (_) | | | | | | |_) | (_| | |_
\____/\___/ \__,_|\___| \____/\___/|_| |_| |_|_.__/ \__,_|\__|

View file

@ -15,7 +15,7 @@ IF EXIST "%PROGRAMFILES(X86)%" (
set "ZU-app=utilities\7za.exe"
:: TODO:
:: + Download 7zip exe!!
:: + Full Automatic Package bat file.
:: + Write code to set environment variables...
:: + Write code to install vs if it's not yet installed on users pc
:: + Write Git Checkout repository code:
@ -35,7 +35,13 @@ mkdir %temp-dir%
:: Create Log File
copy /y nul %install-log% > nul
call:log_sse "Welcome to the automated Installation of the CodeCombat Dev. Environment!"
call:parse_aa_and_draw "config\header"
call:draw_dss
call:parse_file_new "config\config" cnfg n
call:log "Welcome to the automated Installation of the CodeCombat Dev. Environment!"
call:log_sse "v%%cnfg[1]%% authored by %%cnfg[2]%% and published by %%cnfg[3]%%."
:: Read Language Index
call:parse_file_new "localisation\languages" lang lang_c
@ -184,10 +190,18 @@ goto END
goto report_ok
:report_ok
call:log_lw_ss 18
call:log_lw 18
call:log_lw_sse 19
:: Open README file
call:open_readme
goto clean_up
:open_readme
call:open_txt_file "config/README.txt"
goto:eof
:warn_and_exit
call:log_lw_ss 20
call:log_lw_sse 21
@ -200,6 +214,7 @@ goto END
:clean_up
call:log_lw_sse 23
rmdir %temp-dir% /s /q
PAUSE
goto END
:: ============================ INSTALL SOFTWARE FUNCTIONS ======================
@ -278,11 +293,11 @@ goto:eof
goto:eof
:draw_ss
call:log "----------------------------------------------------------------------------"
call:log "-----------------------------------------------------------------------------"
goto:eof
:draw_dss
call:log "- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -"
call:log "- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -"
goto:eof
:log_ss
@ -302,6 +317,17 @@ goto:eof
:: ============================== IO FUNCTIONS ====================================
:open_txt_file
start "" notepad.exe %~1
goto:eof
:parse_aa_and_draw
set "file=%~1"
for /F "usebackq delims=" %%a in ("%file%") do (
echo.%%a
)
goto:eof
:parse_file
set "file=%~1"
for /F "usebackq delims=" %%a in ("%file%") do (

View file

@ -0,0 +1,31 @@
@echo off
setlocal EnableDelayedExpansion
:: ================= GLOBAL VARIABLES ===================
set "ZU-app=batch\utilities\7za.exe"
set "title=coco-dev-win-setup"
call:parse_file_new "batch\config\config" cnfg n
set "sf=%cnfg[1]%"
%ZU-app% a "%title%-%sf%.zip" .\batch\*
:: ================= FUNCTIONS =========================
:parse_file
set "file=%~1"
for /F "usebackq delims=" %%a in ("%file%") do (
set /A %~3+=1
call set %~2[%%%~3%%]=%%a
)
goto:eof
:parse_file_new
set /A %~3=0
call:parse_file %~1 %~2 %~3
goto:eof
:: =================== EOF =============================
endlocal