Skip to content

Commit

Permalink
[r3098] Изменение : По просьбе "телезрителей" изменен способ задания …
Browse files Browse the repository at this point in the history
…переменного окружения необходимого для сборки проекта. Теперь переменные задаются путем создания файла "environments.bat в корневой папке проекта без необходимости добавления в систему, весь процесс описан в Compilation.txt
  • Loading branch information
Aleksoid1978 committed Nov 9, 2017
1 parent 037d875 commit 355ca62
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 17 deletions.
2 changes: 2 additions & 0 deletions build.bat
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,8 @@ REM pre-build checks

IF NOT EXIST "include\version_rev.h" CALL "update_version.bat"

IF EXIST "environments.bat" CALL "environments.bat"

IF NOT DEFINED MPCBE_MINGW GOTO MissingVar
IF NOT DEFINED MPCBE_MSYS GOTO MissingVar

Expand Down
16 changes: 7 additions & 9 deletions docs/Compilation.txt
Original file line number Diff line number Diff line change
Expand Up @@ -12,15 +12,13 @@ Part B: Preparing the GCC environment
NOTES:
* If you installed the MSYS/MinGW package in an other directory you will have to use that path in the following steps.

1. Download and extract MSYS_MinGW-w64_GCC_720_x86-x64.7z to "C:\MSYS" -> http://mpc-be.org/MSYS/MSYS_MinGW-w64_GCC_720_x86-x64.7z
2. Add the following environment variables (in System Properties->Advanced->Environment Variables):

Variable Value
MPCBE_MSYS C:\MSYS
MPCBE_MINGW C:\MSYS\mingw

Optional, If you want to customize the Windows SDK version used, set the variable (the default version is 8.1)
MPCBE_WINSDK_VER 8.1
1. Download and extract "MSYS_MinGW-w64_GCC_720_x86-x64.7z" to "C:\MSYS" -> http://mpc-be.org/MSYS/MSYS_MinGW-w64_GCC_720_x86-x64.7z
2. Create a file named "environments.bat" in "C:\mpc-be\" containing the following entries:
@ECHO OFF
SET "MPCBE_MSYS=C:\MSYS"
SET "MPCBE_MINGW=C:\MSYS\mingw"
REM Optional, If you want to customize the Windows SDK version used, set the variable (the default version is 8.1)
SET "MPCBE_WINSDK_VER=8.1"

Part C: Downloading and compiling the MPC-BE source

Expand Down
7 changes: 2 additions & 5 deletions src/ExtLib/ffmpeg/ffmpeg.bat
Original file line number Diff line number Diff line change
Expand Up @@ -16,18 +16,16 @@ REM
REM You should have received a copy of the GNU General Public License
REM along with this program. If not, see <http://www.gnu.org/licenses/>.

SETLOCAL
PUSHD %~dp0

IF /I "%~1"=="help" GOTO SHOWHELP
IF /I "%~1"=="/help" GOTO SHOWHELP
IF /I "%~1"=="-help" GOTO SHOWHELP
IF /I "%~1"=="--help" GOTO SHOWHELP
IF /I "%~1"=="/?" GOTO SHOWHELP

IF EXIST "%~dp0..\..\..\environments.bat" CALL "%~dp0..\..\..\environments.bat"

IF DEFINED MPCBE_MINGW IF DEFINED MPCBE_MSYS GOTO VarOk
ECHO ERROR: Please define MPCBE_MINGW and MPCBE_MSYS environment variable(s)
ENDLOCAL
EXIT /B

:VarOk
Expand Down Expand Up @@ -83,5 +81,4 @@ ECHO Notes: The arguments are not case sensitive.
ECHO. & ECHO.
ECHO Executing "%~nx0" will use the defaults: "%~nx0"
ECHO.
ENDLOCAL
EXIT /B
4 changes: 1 addition & 3 deletions src/YASM.bat
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,10 @@ REM
REM You should have received a copy of the GNU General Public License
REM along with this program. If not, see <http://www.gnu.org/licenses/>.

SETLOCAL
CD /D %~dp0
IF EXIST "%~dp0..\environments.bat" CALL "%~dp0..\environments.bat"

IF DEFINED MPCBE_MSYS GOTO VarOk
ECHO ERROR: Please define MPCBE_MSYS environment variable(s)
ENDLOCAL
EXIT /B

:VarOk
Expand Down

0 comments on commit 355ca62

Please sign in to comment.