File: make-weekly.bat

package info (click to toggle)
codelite 14.0+dfsg-1
  • links: PTS, VCS
  • area: main
  • in suites: bullseye, sid
  • size: 112,816 kB
  • sloc: cpp: 483,662; ansic: 150,144; php: 9,569; lex: 4,186; python: 3,417; yacc: 2,820; sh: 1,147; makefile: 52; xml: 13
file content (73 lines) | stat: -rw-r--r-- 2,282 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
@echo off

for /F "tokens=1,2 delims=#" %%a in ('"prompt #$H#$E# & echo on & for %%b in (1) do rem"') do (
  set "DEL=%%a"
)

:: Global environment variables
set CL_SRC_DIR=C:\src\codelite
set PATH=C:\Program Files\CodeLite;C:\Program Files (x86)\Inno Setup 6;%PATH%
set WXCFG=gcc_dll/mswu

:: Cleanup before we continue
del /Q %CL_SRC_DIR%\*.gch

:: Build the 32 bit version
call :ColorText 0A "Building CodeLite for i686"
call :MAKE_WEEKLY Win_x86_Release codelite_mingw.iss C:\src\wxWidgets32 C:\compilers\mingw64-i686\mingw32\bin

:: Build the 64 bit version
call :ColorText 0A "Building CodeLite for x86_64"
call :MAKE_WEEKLY Win_x64_Release codelite64_mingw.iss C:\src\wxWidgets C:\compilers\mingw64\bin

cd %CL_SRC_DIR%

call :ColorText 0A "Packaging Completed Successfuly!"
GOTO PACK_END

:: MAKE_WEEKLY method:
:: This function accepts 4 parameters:
:: @param configuration name
:: @param InnoSetup file name
:: @param wxWidgets directory 
:: @param the BIN folder for the compiler. We add this to the %PATH% environment variable
:MAKE_WEEKLY
    set CONFIG_NAME=%~1
    set ISCC_FILE=%~2
    set WXWIN=%~3
    set COMPILER_PATH=%~4
    set PATH=%WXWIN%\lib\gcc_dll;%COMPILER_PATH%;%PATH%
    cd %CL_SRC_DIR%
    
    if exist build.command del /Q build.command
    codelite-make.exe --workspace=CodeLiteIDE.workspace --config=%CONFIG_NAME% --project=CodeLiteIDE > build.command
    set /p BUILD_COMMAND=<build.command
    
    :: Execute the command
    echo Building CodeLite (config: %CONFIG_NAME%)
    %BUILD_COMMAND%
    
    echo Packging CodeLite (config: %CONFIG_NAME%)
    cd %CL_SRC_DIR%\InnoSetup
    if exist installer.txt del /Q installer.txt
    iscc %ISCC_FILE% > installer.txt
    
    :: Extract the installer file name from the output. It is the last line
    set INSTALLER_NAME=""
    FOR /f %%L IN (installer.txt) DO set INSTALLER_NAME=%%L
    
    echo Installer file: %INSTALLER_NAME%
    cd %CL_SRC_DIR%
    
    echo Uploading CodeLite (config: %CONFIG_NAME%)
    scp %INSTALLER_NAME% root@codelite.org:/var/www/html/downloads/codelite/wip
    exit /B 0

:ColorText
<nul set /p ".=%DEL%" > "%~2"
findstr /v /a:%1 /R "^$" "%~2" nul
del "%~2" > nul 2>&1
goto :eof

:PACK_END