mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-09-20 15:27:32 +09:00
A lot of changes
Refactor Build guide Add build script Switch to Native VS Fix Redists Auto Detect and Use max threads for build
This commit is contained in:
parent
b34a6b75fb
commit
ca9cf2a080
7 changed files with 191 additions and 75 deletions
42
docs/build/windows.md
vendored
42
docs/build/windows.md
vendored
|
|
@ -1,37 +1,29 @@
|
|||
# How to compile Dactyloidae (as of version 13.2)
|
||||
# How to compile Dactyloidae
|
||||
|
||||
Step 0. INSTALL GIT FOR WINDOWS!!!!!
|
||||
Step 1. Install Git for Windows (win7 users should install 2.46.2)
|
||||
|
||||
Step 1. If you are on Windows 8.1 or older, mount your installation media.
|
||||
Step 2. Enable .NET 3.5 in optionalfeatures.exe\
|
||||
NOTE: Win8 users may need to use this https://github.com/abbodi1406/dotNetFx35W81
|
||||
|
||||
Step 2. Go Win+R and type 'optionalfeatures.exe' and check .NET 3.5
|
||||
Step 3. Install VS 2019 Community with Desktop Developement with C++ and "C++ Windows XP Support for VS 2017 (v141)\
|
||||
and MSVC v141 - VS 2017 C++ x64/x86 build tools (v14.16)\
|
||||
Make sure you also get 10.0.19041 sdk
|
||||
|
||||
Step 3. Get the DirectX SDK (June 2010) from HERE: https://archive.org/details/dxsdk_jun10
|
||||
Step 4. Get the DirectX SDK https://www.microsoft.com/en-us/download/details.aspx?id=6812\
|
||||
(NOTE if you get a S2023 error in the end you can safely ignore it)
|
||||
|
||||
Step 4. After that has installed, get MozillaBuild 3.2 from HERE: https://ftp.mozilla.org/pub/mozilla/libraries/win32/MozillaBuildSetup-3.2.exe
|
||||
Step 5. Get and Install MozillaBuild from here https://ftp.mozilla.org/pub/mozilla/libraries/win32/MozillaBuildSetup-3.2.exe
|
||||
|
||||
Step 5. After THAT has installed, you can commence onto installing the FWDK. First, get the .7z HERE: https://archive.org/details/funny-windows-development-kit
|
||||
Step 6. Copy shell-msvc-dactyl.bat from docs folder to your mozilla-build directory (usually at C:\mozilla-build)
|
||||
|
||||
Step 6. Extract the FWDK to C:\Dev
|
||||
Step 7. Run shell-msvc-dactyl.bat from the mozilla-build directory.
|
||||
|
||||
Step 7. Move the start-shell-ewdk and start-shell-ewdk-x64 from this folder into c:\mozilla-build.
|
||||
Step 8. Select the architecture that you want to build Dactyloidae for
|
||||
|
||||
Step 8. Now that you have done all those prerequisites, open your start-shell-ewdk (64 if you want to build a 64 bit browser)
|
||||
Step 9. CD to the Repo (msys uses unix style dirs, c:\ is /c/ for example)
|
||||
|
||||
Step 9. Git clone this repo if you have not already
|
||||
Step 10. Run ./build-msvc-win
|
||||
|
||||
Step 10. CD into the directory of where your git clone is, and execute THESE commands:
|
||||
Step 10.5. After the build, if you really feel fancy, you can test your build before packaging it with ``./mach run``
|
||||
|
||||
``git config core.autocrlf false``
|
||||
|
||||
``git config core.eof lf``
|
||||
|
||||
``git rm --cached -r .``
|
||||
|
||||
``git reset --hard``
|
||||
|
||||
Step 11. Now that you have FINALLY done all those, you are now free to do a ``./mach build`` (isn't mozillabuild fun?)
|
||||
|
||||
Step 11.5. After the build, if you really feel fancy, you can test your build before packaging it with ``./mach run``
|
||||
|
||||
Step 12. Run ``./mach installer `` (64-bit only for now, sorry)
|
||||
Step 11. Run ``./mach installer`` (if you want to build an installer)
|
||||
|
|
|
|||
73
docs/shell-msvc-dactyl.bat
Normal file
73
docs/shell-msvc-dactyl.bat
Normal file
|
|
@ -0,0 +1,73 @@
|
|||
@ECHO OFF
|
||||
|
||||
SETLOCAL ENABLEEXTENSIONS ENABLEDELAYEDEXPANSION
|
||||
|
||||
SET CYGWIN=
|
||||
SET INCLUDE=
|
||||
SET LIB=
|
||||
IF NOT DEFINED MOZ_NO_RESET_PATH (
|
||||
SET PATH=%SystemRoot%\System32;%SystemRoot%;%SystemRoot%\System32\Wbem;%SystemRoot%\System32\WindowsPowerShell\v1.0
|
||||
)
|
||||
|
||||
|
||||
SET MOZILLABUILD=%~dp0
|
||||
|
||||
SET WINCURVERKEY=HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion
|
||||
REG QUERY "%WINCURVERKEY%" /v "ProgramFilesDir (x86)" >nul 2>nul
|
||||
IF NOT ERRORLEVEL 1 (
|
||||
SET WIN64=1
|
||||
) ELSE (
|
||||
SET WIN64=0
|
||||
)
|
||||
|
||||
SET BUILD_ARCH=
|
||||
:ASK_ARCH
|
||||
ECHO.
|
||||
ECHO What architecture will you build for?
|
||||
ECHO [1] 64-bit
|
||||
ECHO [2] 32-bit
|
||||
ECHO.
|
||||
SET /P ARCH_CHOICE="Enter 1 or 2: "
|
||||
|
||||
IF "!ARCH_CHOICE!" == "1" (
|
||||
SET BUILD_ARCH=x64
|
||||
) ELSE IF "!ARCH_CHOICE!" == "2" (
|
||||
SET BUILD_ARCH=x86
|
||||
) ELSE (
|
||||
ECHO Invalid choice. Please enter 1 or 2.
|
||||
GOTO :ASK_ARCH
|
||||
)
|
||||
|
||||
ECHO Target architecture: !BUILD_ARCH!
|
||||
SET VCVARSALL=
|
||||
SET VS2019_BASE=%ProgramFiles(x86)%\Microsoft Visual Studio\2019
|
||||
|
||||
IF EXIST "!VS2019_BASE!\Community\VC\Auxiliary\Build\vcvarsall.bat" (
|
||||
SET VCVARSALL=!VS2019_BASE!\Community\VC\Auxiliary\Build\vcvarsall.bat
|
||||
SET VS2019_EDITION=Community
|
||||
) ELSE IF EXIST "!VS2019_BASE!\Professional\VC\Auxiliary\Build\vcvarsall.bat" (
|
||||
SET VCVARSALL=!VS2019_BASE!\Professional\VC\Auxiliary\Build\vcvarsall.bat
|
||||
SET VS2019_EDITION=Professional
|
||||
) ELSE IF EXIST "!VS2019_BASE!\Enterprise\VC\Auxiliary\Build\vcvarsall.bat" (
|
||||
SET VCVARSALL=!VS2019_BASE!\Enterprise\VC\Auxiliary\Build\vcvarsall.bat
|
||||
SET VS2019_EDITION=Enterprise
|
||||
) ELSE IF EXIST "!VS2019_BASE!\BuildTools\VC\Auxiliary\Build\vcvarsall.bat" (
|
||||
SET VCVARSALL=!VS2019_BASE!\BuildTools\VC\Auxiliary\Build\vcvarsall.bat
|
||||
SET VS2019_EDITION=BuildTools
|
||||
)
|
||||
|
||||
CALL "!VCVARSALL!" !BUILD_ARCH! -vcvars_ver=14.16
|
||||
IF ERRORLEVEL 1 (
|
||||
ECHO vcvarsall.bat failed.
|
||||
ECHO Ensure the v141 + v141 xp toolset is installed via the
|
||||
ECHO VS 2019 installer ^(Individual components tab^).
|
||||
pause
|
||||
exit
|
||||
)
|
||||
ECHO Build environment ready.
|
||||
|
||||
REM ============================================================
|
||||
REM Launch shell
|
||||
REM ============================================================
|
||||
START %MOZILLABUILD%msys\bin\mintty -e %MOZILLABUILD%msys\bin\console %MOZILLABUILD%msys\bin\bash --login
|
||||
EXIT /B
|
||||
|
|
@ -1,25 +0,0 @@
|
|||
@ECHO OFF
|
||||
SET MOZ_MSVCBITS=64
|
||||
SET MOZ_MSVCVERSION=14
|
||||
SET MOZ_MSVCYEAR=2017
|
||||
SET VCDIR=C:\DEV\MSVC14\
|
||||
SET TOOLCHAIN=64-bit
|
||||
SET MOZILLABUILD=%~dp0
|
||||
SET MOZ_TOOLS=%MOZILLABUILD%moztools
|
||||
SET VSINSTALLDIR=C:\DEV\MSVC14
|
||||
SET VCINSTALLDIR=C:\DEV\MSVC14
|
||||
SET FrameworkDir32=C:\Windows\Microsoft.NET\Framework\
|
||||
SET FrameworkVersion32=v4.0.30319
|
||||
SET Framework40Version=v4.0.30319
|
||||
SET UCRTVersion=10.0.19041.0
|
||||
SET WindowsSDKLibVersion=10.0.19041.0\
|
||||
SET INCLUDE=C:\Dev\MSVC14\include;C:\Dev\MSVC14\atlmfc\include;C:\Dev\Windows Kits\10\include\shared;C:\Dev\Windows Kits\10\include\10.0.19041.0\um;C:\Dev\Windows Kits\10\include\10.0.19041.0\winrt;C:\Dev\Windows Kits\10\include\10.0.19041.0\ucrt;
|
||||
SET LIB=C:\Dev\MSVC14\lib\x64;C:\Dev\MSVC14\atlmfc\lib\x64;C:\Dev\Windows Kits\10\lib\10.0.19041.0\um\x64;C:\Dev\Windows Kits\10\lib\10.0.19041.0\ucrt\x64;
|
||||
SET LIBPATH=C:\Dev\MSVC14\lib\x64;C:\Dev\MSVC14\atlmfc\lib\x64;C:\Dev\Windows Kits\10\lib\10.0.19041.0\ucrt\x64;
|
||||
SET PATH=C:\Dev\MSVC14\bin\Hostx64\x64;C:\Dev\MSVC14\bin\Hostx64\x64;C:\Dev\Windows Kits\10\bin\10.0.19041.0\x64;%PATH%
|
||||
|
||||
SET SDKDIR=C:\Dev\Windows Kits\10\
|
||||
SET WINDOWSSDKDIR=C:\Dev\Windows Kits\10\
|
||||
set "UCRTContentRoot=%WDKContentRoot%"
|
||||
set "UniversalCRTSdkDir=%WDKContentRoot%"
|
||||
START %MOZILLABUILD%msys\bin\mintty -e %MOZILLABUILD%msys\bin\console %MOZILLABUILD%msys\bin\bash --login
|
||||
|
|
@ -1,25 +0,0 @@
|
|||
@ECHO OFF
|
||||
SET MOZ_MSVCBITS=32
|
||||
SET MOZ_MSVCVERSION=14
|
||||
SET MOZ_MSVCYEAR=2017
|
||||
SET VCDIR=C:\DEV\MSVC14\
|
||||
SET TOOLCHAIN=32-bit
|
||||
SET MOZILLABUILD=%~dp0
|
||||
SET MOZ_TOOLS=%MOZILLABUILD%moztools
|
||||
SET VSINSTALLDIR=C:\DEV\MSVC14
|
||||
SET VCINSTALLDIR=C:\DEV\MSVC14
|
||||
SET FrameworkDir32=C:\Windows\Microsoft.NET\Framework\
|
||||
SET FrameworkVersion32=v4.0.30319
|
||||
SET Framework40Version=v4.0.30319
|
||||
SET UCRTVersion=10.0.19041.0
|
||||
SET WindowsSDKLibVersion=10.0.19041.0\
|
||||
SET INCLUDE=C:\Dev\MSVC14\include;C:\Dev\MSVC14\atlmfc\include;C:\Dev\Windows Kits\10\include\shared;C:\Dev\Windows Kits\10\include\10.0.19041.0\um;C:\Dev\Windows Kits\10\include\10.0.19041.0\winrt;C:\Dev\Windows Kits\10\include\10.0.19041.0\ucrt;
|
||||
SET LIB=C:\Dev\MSVC14\lib\x86;C:\Dev\MSVC14\atlmfc\lib\x86;C:\Dev\Windows Kits\10\lib\10.0.19041.0\um\x86;C:\Dev\Windows Kits\10\lib\10.0.19041.0\ucrt\x86;
|
||||
SET LIBPATH=C:\Dev\MSVC14\lib\x86;C:\Dev\MSVC14\atlmfc\lib\x86;C:\Dev\Windows Kits\10\lib\10.0.19041.0\ucrt\x86;
|
||||
SET PATH=C:\Dev\MSVC14\bin\Hostx64\x86;C:\Dev\MSVC14\bin\Hostx64\x64;C:\Dev\Windows Kits\10\bin\10.0.19041.0\x86;%PATH%
|
||||
|
||||
SET SDKDIR=C:\Dev\Windows Kits\10\
|
||||
SET WINDOWSSDKDIR=C:\Dev\Windows Kits\10\
|
||||
set "UCRTContentRoot=%WDKContentRoot%"
|
||||
set "UniversalCRTSdkDir=%WDKContentRoot%"
|
||||
START %MOZILLABUILD%msys\bin\mintty -e %MOZILLABUILD%msys\bin\console %MOZILLABUILD%msys\bin\bash --login
|
||||
Loading…
Add table
Add a link
Reference in a new issue