forked from Maximus5/ConEmu
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
10 changed files
with
404 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
param([String]$file) | ||
|
||
function CreateHash($path,$aname) | ||
{ | ||
$algo = [System.Security.Cryptography.HashAlgorithm]::Create($aname) | ||
$stream = New-Object System.IO.FileStream($path, [System.IO.FileMode]::Open, [System.IO.FileAccess]::Read) | ||
|
||
$md5StringBuilder = New-Object System.Text.StringBuilder | ||
$algo.ComputeHash($stream) | % { [void] $md5StringBuilder.Append($_.ToString("x2")) } | ||
|
||
$stream.Dispose() | ||
|
||
$md5StringBuilder.ToString() | ||
} | ||
|
||
$fullPath = Resolve-Path $file | ||
|
||
$md5 = CreateHash -path $fullPath -aname "MD5" | ||
|
||
$f = Get-Item $fullPath | ||
|
||
Write-Host (Get-Item $file).Name (("{0:N1}" -f ($f.Length/(1024*1024)))+"MB "+$md5) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
$rels = (conemuc -download https://api.github.com/repos/Maximus5/ConEmu/releases - 2>$null) | ||
$rel = ConvertFrom-JSON $rels | ||
$rel | foreach { Write-Host -NoNewLine "$($_.name): "; $total=0; $_.Assets | foreach { $total+=$_.download_count; Write-Host -NoNewLine " $($_.download_count)"}; Write-Host "; Total $total"; }; Write-Host "Done" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,61 @@ | ||
@echo off | ||
|
||
setlocal | ||
|
||
if exist "%~dp0user_env.cmd" ( | ||
call "%~dp0user_env.cmd" | ||
) else ( | ||
call "%~dp0user_env.default.cmd" | ||
) | ||
|
||
call "%UPLOADERS%init_env.cmd" | ||
|
||
pushd "%~dp0.." | ||
|
||
set L10N_PATH=Release/ConEmu/ConEmu.l10n | ||
|
||
call "%PYTHON3%" "%~dp0l10n.py" --l10n %L10N_PATH% --tx-pull all --write-l10n | ||
if errorlevel 1 ( | ||
echo [1;31;40mFailed to load updated translations from transifex[0m | ||
goto :err | ||
) | ||
|
||
call "%GIT%" status --porcelain | %windir%\system32\find "%L10N_PATH%" | ||
if errorlevel 1 ( | ||
echo [1;31;40mConEmu.l10n was not updated[0m | ||
goto fin | ||
) | ||
|
||
call "%~dp0GetCurVer.cmd" | ||
|
||
call "%GIT%" --no-pager diff %L10N_PATH% -new_console:cs50V | ||
|
||
echo [1;33;40mPress Enter to create commit "l10n: translations were updated"[0m | ||
pause > nul | ||
|
||
call "%GIT%" reset | ||
if errorlevel 1 ( | ||
echo [1;31;40mGit reset failed, l10n was not committed[0m | ||
goto :err | ||
) | ||
call "%GIT%" add %L10N_PATH% | ||
if errorlevel 1 ( | ||
echo [1;31;40mGit add failed, l10n was not committed[0m | ||
goto :err | ||
) | ||
call "%GIT%" commit -m "l10n: translations were updated" | ||
if errorlevel 1 ( | ||
echo [1;31;40mGit commit failed, l10n was not committed[0m | ||
goto :err | ||
) | ||
|
||
goto fin | ||
|
||
:err | ||
endlocal | ||
popd | ||
exit /b 1 | ||
|
||
:fin | ||
endlocal | ||
popd |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
@setlocal | ||
@set dt=%date:~8,2%%date:~3,2%%date:~0,2% | ||
@conemuc -download https://api.github.com/repos/Maximus5/ConEmu/releases "%~dp0downloads-%dt%.json" 2>nul |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
@setlocal | ||
@set dt=%date:~8,2%%date:~3,2%%date:~0,2% | ||
@powershell -noprofile -command "%~dp0github-release-downloads.ps1" > "%~dp0downloads-%dt%.txt" | ||
@type "%~dp0downloads-%dt%.txt" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
@echo off | ||
|
||
setlocal | ||
|
||
if exist "%~dp0user_env.cmd" ( | ||
call "%~dp0user_env.cmd" | ||
) else ( | ||
call "%~dp0user_env.default.cmd" | ||
) | ||
|
||
signtool sign /fd SHA256 %* | ||
|
||
endlocal |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,59 @@ | ||
@echo off | ||
|
||
if not exist "%~dp0sign_any.cmd" ( | ||
echo ********************************** | ||
echo ********************************** | ||
echo ** SKIPPING code signing ** | ||
echo ********************************** | ||
echo ********************************** | ||
goto :EOF | ||
) | ||
|
||
echo Signing code | ||
if exist "%~1ConEmu\ConEmuC64.exe" set RELDIR=%~1&goto RelDirSet | ||
set RELDIR=..\Release\ | ||
:RelDirSet | ||
|
||
|
||
set RELDIRCTH=%RELDIR%plugins\ConEmu\Thumbs | ||
|
||
set SIGFILES=%RELDIR%ConEmu.exe %RELDIR%ConEmu64.exe | ||
set SIGFILES=%SIGFILES% %RELDIR%ConEmu\ConEmuC.exe %RELDIR%ConEmu\ConEmuC64.exe | ||
set SIGFILES=%SIGFILES% %RELDIR%ConEmu\ConEmuCD.dll %RELDIR%ConEmu\ConEmuCD64.dll | ||
set SIGFILES=%SIGFILES% %RELDIR%ConEmu\ConEmuHk.dll %RELDIR%ConEmu\ConEmuHk64.dll | ||
set SIGFILES=%SIGFILES% %RELDIR%ConEmu\ExtendedConsole.dll %RELDIR%ConEmu\ExtendedConsole64.dll | ||
set SIGFILES=%SIGFILES% %RELDIR%plugins\ConEmu\conemu.dll %RELDIR%plugins\ConEmu\Lines\ConEmuLn.dll | ||
set SIGFILES=%SIGFILES% %RELDIRCTH%\ConEmuTh.dll %RELDIRCTH%\gdi+.t32 %RELDIRCTH%\ico.t32 %RELDIRCTH%\pe.t32 | ||
|
||
if "%~2"=="/NOSIGN64PLUG" goto skip_64 | ||
set SIGFILES=%SIGFILES% %RELDIR%plugins\ConEmu\conemu.x64.dll %RELDIR%plugins\ConEmu\Lines\ConEmuLn.x64.dll | ||
set SIGFILES=%SIGFILES% %RELDIRCTH%\ConEmuTh.x64.dll %RELDIRCTH%\gdi+.t64 %RELDIRCTH%\ico.t64 %RELDIRCTH%\pe.t64 | ||
:skip_64 | ||
|
||
call :dosign %SIGFILES% | ||
if errorlevel 1 goto failsign | ||
|
||
if "%TS"=="" ( | ||
echo ********************************** | ||
echo ********************************** | ||
echo ** Binaries was NOT timestamped ** | ||
echo ********************************** | ||
echo ********************************** | ||
) | ||
|
||
goto end | ||
|
||
:dosign | ||
echo %* | ||
call "%~dp0sign_any.cmd" %* | ||
if errorlevel 1 goto :EOF | ||
goto :EOF | ||
|
||
|
||
:failsign | ||
echo . | ||
echo !!! Signing code failed !!! | ||
echo . | ||
pause | ||
|
||
:end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
@if "%~1" == "-v" echo preparing environment | ||
|
||
@rem MSys2 breaks on 'TERM=msys' | ||
@rem set TERM=msys | ||
@set TERM= | ||
@set LANG=en_US.UTF-8 | ||
|
||
@if exist %~d0\MinGW\msys\1.0\bin\head.exe set MINGWRT=%~d0\MinGW\msys\1.0\bin\ | ||
@if exist %~d0\MinGW\msys32\bin\head.exe set MINGWRT=%~d0\MinGW\msys32\bin\ | ||
@if exist "%~dp0..\..\Tools\MSYS\msys2-x64\usr\bin\head.exe" set "MINGWRT=%~dp0..\..\Tools\MSYS\msys2-x64\usr\bin\" | ||
@if exist "%~dp0..\..\..\..\tools\msys64\usr\bin\head.exe" set "MINGWRT=%~dp0..\..\..\..\tools\msys64\usr\bin\" | ||
@if "%~1" == "-v" echo\ MINGWRT: '%MINGWRT%' | ||
|
||
@set CONEMU_WWW= | ||
@if exist "%~dp0..\..\conemu.github.io\index.html" set "CONEMU_WWW=%~dp0..\..\conemu.github.io\" | ||
@if exist "%~dp0..\..\ConEmu-GitHub-io\conemu.github.io\index.html" set "CONEMU_WWW=%~dp0..\..\ConEmu-GitHub-io\conemu.github.io\" | ||
@if "%~1" == "-v" echo\ CONEMU_WWW: '%CONEMU_WWW%' | ||
|
||
@set CONEMU_DEPLOY= | ||
@if exist "%~dp0..\..\conemu-deploy\foss.cmd" set "CONEMU_DEPLOY=%~dp0..\..\conemu-deploy\" | ||
@if "%~1" == "-v" echo\ CONEMU_DEPLOY: '%CONEMU_DEPLOY%' | ||
|
||
@set UPLOADERS= | ||
@if exist "%~dp0..\..\tools\Uploaders\Check-VirusTotal.cmd" set "UPLOADERS=%~dp0..\..\tools\Uploaders\" | ||
@if "%~1" == "-v" echo\ UPLOADERS: '%UPLOADERS%' | ||
|
||
@set FARRUN_EXIST=NO | ||
@farrun.exe -? 1> nul 2> nul | ||
@if errorlevel 1 ( | ||
set FARRUN_EXIST=NO | ||
) else ( | ||
set FARRUN_EXIST=YES | ||
) | ||
@if "%~1" == "-v" echo\ FARRUN_EXIST: '%FARRUN_EXIST%' | ||
|
||
@set GIT=git.exe | ||
@if exist %~d0\gitsdk\cmd\git.exe set GIT=%~d0\gitsdk\cmd\git.exe | ||
@if exist "C:\Program Files\Git\bin\git.exe" set "GIT=C:\Program Files\Git\bin\git.exe" | ||
@if "%~1" == "-v" echo\ GIT: '%GIT%' | ||
|
||
@set PYTHON3=python3.exe | ||
@if exist "%USERPROFILE%\AppData\Local\Programs\Python\Python37-32\python3.exe" set "PYTHON3=%USERPROFILE%\AppData\Local\Programs\Python\Python37-32\python3.exe" | ||
@if "%~1" == "-v" echo\ PYTHON3: '%PYTHON3%' | ||
|
||
@set ZIP7=7z.exe | ||
@if exist "%~dp0..\..\tools\Arch\7z.exe" set "ZIP7=%~dp0..\..\tools\Arch\7z.exe" | ||
@if "%~1" == "-v" echo\ ZIP7: '%ZIP7%' |
Oops, something went wrong.