Skip to content

Instantly share code, notes, and snippets.

View Ruzzz's full-sized avatar

Ruslan Zaporojets Ruzzz

View GitHub Profile
:: Author: Ruslan Zaporojets
:: Email: ruzzzua[]gmail.com
:: Date: 2017-10-12
:: Usage: this.cmd DIR GENERATOR [TOOLSET]
:: Example: this.cmd VS2017x64XP "Visual Studio 15 Win64" v141_xp
if "%1"=="" goto :MY
cd /d "%~dp0"
set BUILD_DIR=build
if not "%3"=="" ( set TOOLSET=-T %3 ) else ( set TOOLSET= )
@Ruzzz
Ruzzz / ffmpeg_video_encode_draft.md
Last active November 24, 2017 12:43
ffmpeg video encode draft

Initialize

  1. AVCodec* avcodec_find_encoder(AVCodecID)
  2. AVCodecContext* avcodec_alloc_context3(AVCodec*)
    1. av_opt_set(...)
    2. avcodec_open2(AVCodecContext*, AVCodecID)

Initialize additional

  • AVPacket* av_packet_alloc()
scoop bucket add extras
:: As Admin
scoop install git -g
:: Restart cmd
scoop bucket add extras
scoop install 7zip vcredist clink processhacker RapidEE SumatraPDF notepadplusplus ccleaner everything sysinternals keepass vscode python nodejs yarn nasm perl cmake ffmpeg sqlite upx wget youtube-dl oraclejdk android-studio foobar2000 kitty pandoc resource-hacker -g
clink autorun -a install
@Ruzzz
Ruzzz / vc++_from_cmd.cmd
Last active June 19, 2017 14:29
Using different versions of VC++ from the command line
:: Для использования XP TOOLCHAIN с нужным компилятором
:: нужно установить переменные до инициализации компилятора
:: INIT XP x32 TOOLCHAIN
set SDK71PATH=%ProgramFiles%\Microsoft SDKs\Windows\7.1A
path %SDK71PATH%\Bin;%PATH%
set INCLUDE=%SDK71PATH%\Include;%INCLUDE%
set LIB=%SDK71PATH%\Lib;%LIB%
:: Note: rename openssl.exe -> openssl64.exe
:: Edit: \Configurations\10-main.conf
:: Replace: /subsystem:console -> /subsystem:console,5.02
::
:: INIT XP x64 TOOLCHAIN
::
set SDK71PATH=%ProgramFiles%\Microsoft SDKs\Windows\7.1A
path %SDK71PATH%\Bin\x64;%PATH%
set INCLUDE=%SDK71PATH%\Include;%INCLUDE%
:: Edit: \Configurations\10-main.conf
:: Replace: /subsystem:console -> /subsystem:console,5.01
::
:: INIT XP x32 TOOLCHAIN
::
set SDK71PATH=%ProgramFiles%\Microsoft SDKs\Windows\7.1A
path %SDK71PATH%\Bin;%PATH%
set INCLUDE=%SDK71PATH%\Include;%INCLUDE%
set LIB=%SDK71PATH%\Lib;%LIB%
:: See file: INSTALL
:: See file: INSTALL.W64
:: Note: rename openssl.exe -> openssl64.exe
:: Note: rename libeay32.lib -> libeay64.lib
:: Note: rename ssleay32.lib -> ssleay64.lib
:: Edit: \util\pl\VC-32.pl
:: 1) if ($FLAVOR =~ /WIN64/) ... $lflags="/nologo /subsystem:console /opt:ref"
:: /subsystem:console -> /subsystem:console,5.02
:: 2) else # Win32 ... $lflags="/nologo /subsystem:console /opt:ref"
:: See file: INSTALL
:: See file: INSTALL.W32
:: Edit: \util\pl\VC-32.pl
:: 1) if ($FLAVOR =~ /WIN64/) ... $lflags="/nologo /subsystem:console /opt:ref"
:: /subsystem:console -> /subsystem:console,5.02
:: 2) else # Win32 ... $lflags="/nologo /subsystem:console /opt:ref"
:: /subsystem:console -> /subsystem:console,5.01
::
:: INIT XP x32 TOOLCHAIN
@Ruzzz
Ruzzz / VS140COMNTOOLS_in_VS2017_fix.reg
Created May 24, 2017 07:48
Fix VS140COMNTOOLS VS2017 (ERROR: Cannot determine the location of the VS Common Tools folder)
Windows Registry Editor Version 5.00
[HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\Microsoft\VisualStudio\SxS\VS7]
"14.0"="c:\\Program Files (x86)\\Microsoft Visual Studio\\Shared\\14.0\\"
if exist "%VS150COMNTOOLS%" goto :EOF
:: Build Tools
if not exist "%ProgramFiles(x86)%\Microsoft Visual Studio\2017\BuildTools" goto :VS2017_COMMUNITY
setx /M VS150COMNTOOLS "%ProgramFiles(x86)%\Microsoft Visual Studio\2017\BuildTools\Common7\Tools\\"
goto :EOF
:: Community
:VS2017_COMMUNITY
if not exist "%ProgramFiles(x86)%\Microsoft Visual Studio\2017\Community" goto :VS2017_PROFESSIONAL