From 21d69a67cdfd78a747bf158243d1304f221adb1a Mon Sep 17 00:00:00 2001 From: Calyx Hikari Date: Sat, 15 Nov 2025 23:45:48 +0800 Subject: [PATCH 1/9] Add Linux build script --- generate.sh | 111 +++++++++++++++++++++++++++++++++++++ install_AllOS.nsi | 117 +++++++++++++++++++++++++++++++++++++++ install_AtLeastWin10.nsi | 94 +++++++++++++++++++++++++++++++ install_AtLeastWin7.nsi | 103 ++++++++++++++++++++++++++++++++++ 4 files changed, 425 insertions(+) create mode 100644 generate.sh create mode 100644 install_AllOS.nsi create mode 100644 install_AtLeastWin10.nsi create mode 100644 install_AtLeastWin7.nsi diff --git a/generate.sh b/generate.sh new file mode 100644 index 0000000..b0289a9 --- /dev/null +++ b/generate.sh @@ -0,0 +1,111 @@ +#!/bin/bash +shopt -s nocasematch + +cat << EOF > downloadLink.txt +https://get.msvc.win/favicon.ico + out=favicon.ico + +https://download.microsoft.com/download/8/b/4/8b42259f-5d70-43f4-ac2e-4b208fd8d66a/vcredist_x86.exe + out=vcredist_2005_x86.exe + +https://download.microsoft.com/download/8/b/4/8b42259f-5d70-43f4-ac2e-4b208fd8d66a/vcredist_x64.exe + out=vcredist_2005_x64.exe + +https://download.microsoft.com/download/5/D/8/5D8C65CB-C849-4025-8E95-C3966CAFD8AE/vcredist_x86.exe + out=vcredist_2008_x86.exe + +https://download.microsoft.com/download/5/D/8/5D8C65CB-C849-4025-8E95-C3966CAFD8AE/vcredist_x64.exe + out=vcredist_2008_x64.exe + +https://download.microsoft.com/download/1/6/5/165255E7-1014-4D0A-B094-B6A430A6BFFC/vcredist_x86.exe + out=vcredist_2010_x86.exe + +https://download.microsoft.com/download/1/6/5/165255E7-1014-4D0A-B094-B6A430A6BFFC/vcredist_x64.exe + out=vcredist_2010_x64.exe + +https://download.microsoft.com/download/1/6/B/16B06F60-3B20-4FF2-B699-5E9B7962F9AE/VSU_4/vcredist_x86.exe + out=vcredist_2012_x86.exe + +https://download.microsoft.com/download/1/6/B/16B06F60-3B20-4FF2-B699-5E9B7962F9AE/VSU_4/vcredist_x64.exe + out=vcredist_2012_x64.exe + +https://aka.ms/highdpimfc2013x86enu + out=vcredist_2013_x86.exe + +https://aka.ms/highdpimfc2013x64enu + out=vcredist_2013_x64.exe +EOF + +if [[ $1 = "win7" || $1 = "win8" ]]; then + script=https://get.msvc.win/install_AtLeastWin7.nsi + cat << EOF >> downloadLink.txt +https://aka.ms/vs/17/release/vc_redist.x86.exe + out=vcredist_v14_nt63_x86.exe + +https://aka.ms/vs/17/release/vc_redist.x64.exe + out=vcredist_v14_nt63_x64.exe + +https://aka.ms/vc14/vc_redist.x86.exe + out=vcredist_v14_latest_x86.exe + +https://aka.ms/vc14/vc_redist.x64.exe + out=vcredist_v14_latest_x64.exe + +${script} + out=installer.nsi +EOF +elif [[ $1 = "win10" ]]; then + script=https://get.msvc.win/install_AtLeastWin10.nsi + cat << EOF >> downloadLink.txt +https://aka.ms/vc14/vc_redist.x86.exe + out=vcredist_v14_latest_x86.exe + +https://aka.ms/vc14/vc_redist.x64.exe + out=vcredist_v14_latest_x64.exe + +${script} + out=installer.nsi +EOF +else + script=https://get.msvc.win/install_AllOS.nsi + cat << EOF >> downloadLink.txt +https://download.visualstudio.microsoft.com/download/pr/566435ac-4e1c-434b-b93f-aecc71e8cffc/0D59EC7FDBF05DE813736BF875CEA5C894FFF4769F60E32E87BD48406BBF0A3A/VC_redist.x86.exe + out=vcredist_v14_nt52_x86.exe + +https://download.visualstudio.microsoft.com/download/pr/566435ac-4e1c-434b-b93f-aecc71e8cffc/B75590149FA14B37997C35724BC93776F67E08BFF9BD5A69FACBF41B3846D084/VC_redist.x64.exe + out=vcredist_v14_nt52_x64.exe + +https://download.visualstudio.microsoft.com/download/pr/ed95ef9e-da02-4735-9064-bd1f7f69b6ed/CF92A10C62FFAB83B4A2168F5F9A05E5588023890B5C0CC7BA89ED71DA527B0F/VC_redist.x86.exe + out=vcredist_v14_nt60_x86.exe + +https://download.visualstudio.microsoft.com/download/pr/ed95ef9e-da02-4735-9064-bd1f7f69b6ed/CE6593A1520591E7DEA2B93FD03116E3FC3B3821A0525322B0A430FAA6B3C0B4/VC_redist.x64.exe + out=vcredist_v14_nt60_x64.exe + +https://aka.ms/vs/17/release/vc_redist.x86.exe + out=vcredist_v14_nt63_x86.exe + +https://aka.ms/vs/17/release/vc_redist.x64.exe + out=vcredist_v14_nt63_x64.exe + +https://aka.ms/vc14/vc_redist.x86.exe + out=vcredist_v14_latest_x86.exe + +https://aka.ms/vc14/vc_redist.x64.exe + out=vcredist_v14_latest_x64.exe + +${script} + out=installer.nsi +fi + +mkdir msvc_offline +aria2c --dir=msvc_offline --allow-overwrite=true --retry-wait=5 --max-connection-per-server=8 --split=8 --min-split-size=1M -i downloadLink.txt + +pushd msvc_offline +makensis installer.nsi +rm vcredist*.exe +installerFileName=$(ls *.exe) +mv *.exe ../ +popd + +echo -e "Installer generated. " +echo -e "Filename: ${installerFileName}" \ No newline at end of file diff --git a/install_AllOS.nsi b/install_AllOS.nsi new file mode 100644 index 0000000..c7fa612 --- /dev/null +++ b/install_AllOS.nsi @@ -0,0 +1,117 @@ +!include "FileFunc.nsh" +!include "LogicLib.nsh" +!include "WinVer.nsh" +!include "x64.nsh" + +!define /date BUILD_YEAR "%Y" +!define /date BUILD_MONTH "%m" +!define /date BUILD_DAY "%d" + + +Name "MSVC Redistributable Runtime Offline Installer" +Icon "favicon.ico" +OutFile "MSVC_Offline_Setup_${BUILD_YEAR}.${BUILD_MONTH}.${BUILD_DAY}_AllOS.exe" +InstallDir $TEMP + +VIProductVersion "${BUILD_YEAR}.${BUILD_MONTH}.${BUILD_DAY}.0" +VIAddVersionKey /LANG=0x0409 "ProductName" "MSVC Offline Installer" +VIAddVersionKey /LANG=0x0409 "FileDescription" "MSVC Offline Installer" +VIAddVersionKey /LANG=0x0409 "FileVersion" "${BUILD_YEAR}.${BUILD_MONTH}.${BUILD_DAY}.0" +VIAddVersionKey /LANG=0x0409 "LegalCopyright" "msvc.win Project" + +VIAddVersionKey /LANG=0x0804 "ProductName" "MSVC 运行时离线安装程序" +VIAddVersionKey /LANG=0x0804 "FileDescription" "MSVC 运行时离线安装程序" +VIAddVersionKey /LANG=0x0804 "FileVersion" "${BUILD_YEAR}.${BUILD_MONTH}.${BUILD_DAY}.0" +VIAddVersionKey /LANG=0x0804 "LegalCopyright" "msvc.win Project" + +SetCompressor /solid /final lzma + +RequestExecutionLevel admin + +Function .onInit +${IfNot} ${AtLeastWinXP} + MessageBox MB_ICONSTOP "This installer requires Windows XP or newer." + Abort +${EndIf} +FunctionEnd + +Section "MSVC Install" + + ; Create a temp folder + SetOutPath $TEMP\vcredist + + ; --- VC++ 2005 --- + File "vcredist_2005_x86.exe" + ExecWait '"$TEMP\vcredist\vcredist_2005_x86.exe" /Q' + ${If} ${RunningX64} + File "vcredist_2005_x64.exe" + ExecWait '"$TEMP\vcredist\vcredist_2005_x64.exe" /Q' + ${EndIf} + + ; --- VC++ 2008 --- + File "vcredist_2008_x86.exe" + ExecWait '"$TEMP\vcredist\vcredist_2008_x86.exe" /Q' + ${If} ${RunningX64} + File "vcredist_2008_x64.exe" + ExecWait '"$TEMP\vcredist\vcredist_2008_x64.exe" /Q' + ${EndIf} + + ; --- VC++ 2010 --- + File "vcredist_2010_x86.exe" + ExecWait '"$TEMP\vcredist\vcredist_2010_x86.exe" /quiet /norestart' + ${If} ${RunningX64} + File "vcredist_2010_x64.exe" + ExecWait '"$TEMP\vcredist\vcredist_2010_x64.exe" /quiet /norestart' + ${EndIf} + + ; --- VC++ 2012 --- + File "vcredist_2012_x86.exe" + ExecWait '"$TEMP\vcredist\vcredist_2012_x86.exe" /quiet /norestart' + ${If} ${RunningX64} + File "vcredist_2012_x64.exe" + ExecWait '"$TEMP\vcredist\vcredist_2012_x64.exe" /quiet /norestart' + ${EndIf} + + ; --- VC++ 2013 --- + File "vcredist_2013_x86.exe" + ExecWait '"$TEMP\vcredist\vcredist_2013_x86.exe" /quiet /norestart' + ${If} ${RunningX64} + File "vcredist_2013_x64.exe" + ExecWait '"$TEMP\vcredist\vcredist_2013_x64.exe" /quiet /norestart' + ${EndIf} + + ; --- VC++ 14 --- + ${If} ${AtMostWin2003} + File /r "vcredist_v14_nt52_x86.exe" + ExecWait '"$TEMP\vcredist\vcredist_v14_nt52_x86.exe" /quiet /norestart' + ${If} ${RunningX64} + File /r "vcredist_v14_nt52_x64.exe" + ExecWait '"$TEMP\vcredist\vcredist_v14_nt52_x64.exe" /quiet /norestart' + ${EndIf} + ${ElseIf} ${IsWinVista} + File "vcredist_v14_nt60_x86.exe" + ExecWait '"$TEMP\vcredist\vcredist_v14_nt60_x86.exe" /quiet /norestart' + ${If} ${RunningX64} + File "vcredist_v14_nt60_x64.exe" + ExecWait '"$TEMP\vcredist\vcredist_v14_nt60_x64.exe" /quiet /norestart' + ${EndIf} + ${ElseIf} ${AtMostWin8} + File "vcredist_v14_nt63_x86.exe" + ExecWait '"$TEMP\vcredist\vcredist_v14_nt63_x86.exe" /quiet /norestart' + ${If} ${RunningX64} + File "vcredist_v14_nt63_x64.exe" + ExecWait '"$TEMP\vcredist\vcredist_v14_nt63_x64.exe" /quiet /norestart' + ${EndIf} + ${Else} + File "vcredist_v14_latest_x86.exe" + ExecWait '"$TEMP\vcredist\vcredist_v14_latest_x86.exe" /quiet /norestart' + ${If} ${RunningX64} + File "vcredist_v14_latest_x64.exe" + ExecWait '"$TEMP\vcredist\vcredist_v14_latest_x64.exe" /quiet /norestart' + ${EndIf} + ${EndIf} + + ; Cleanup + RMDir /r $TEMP\vcredist + +SectionEnd diff --git a/install_AtLeastWin10.nsi b/install_AtLeastWin10.nsi new file mode 100644 index 0000000..f4e4095 --- /dev/null +++ b/install_AtLeastWin10.nsi @@ -0,0 +1,94 @@ +!include "FileFunc.nsh" +!include "LogicLib.nsh" +!include "WinVer.nsh" +!include "x64.nsh" + +!define /date BUILD_YEAR "%Y" +!define /date BUILD_MONTH "%m" +!define /date BUILD_DAY "%d" + + +Name "MSVC Redistributable Runtime Offline Installer" +Icon "favicon.ico" +OutFile "MSVC_Offline_Setup_${BUILD_YEAR}.${BUILD_MONTH}.${BUILD_DAY}_Win10_11.exe" +InstallDir $TEMP + +VIProductVersion "${BUILD_YEAR}.${BUILD_MONTH}.${BUILD_DAY}.0" +VIAddVersionKey /LANG=0x0409 "ProductName" "MSVC Offline Installer" +VIAddVersionKey /LANG=0x0409 "FileDescription" "MSVC Offline Installer" +VIAddVersionKey /LANG=0x0409 "FileVersion" "${BUILD_YEAR}.${BUILD_MONTH}.${BUILD_DAY}.0" +VIAddVersionKey /LANG=0x0409 "LegalCopyright" "msvc.win Project" + +VIAddVersionKey /LANG=0x0804 "ProductName" "MSVC 运行时离线安装程序" +VIAddVersionKey /LANG=0x0804 "FileDescription" "MSVC 运行时离线安装程序" +VIAddVersionKey /LANG=0x0804 "FileVersion" "${BUILD_YEAR}.${BUILD_MONTH}.${BUILD_DAY}.0" +VIAddVersionKey /LANG=0x0804 "LegalCopyright" "msvc.win Project" + +SetCompressor /solid /final lzma + +RequestExecutionLevel admin + +Function .onInit +${IfNot} ${AtLeastWin10} + MessageBox MB_ICONSTOP "This installer requires Windows 10 or newer." + Abort +${EndIf} +FunctionEnd + +Section "MSVC Install" + + ; Create a temp folder + SetOutPath $TEMP\vcredist + + ; --- VC++ 2005 --- + File "vcredist_2005_x86.exe" + ExecWait '"$TEMP\vcredist\vcredist_2005_x86.exe" /Q' + ${If} ${RunningX64} + File "vcredist_2005_x64.exe" + ExecWait '"$TEMP\vcredist\vcredist_2005_x64.exe" /Q' + ${EndIf} + + ; --- VC++ 2008 --- + File "vcredist_2008_x86.exe" + ExecWait '"$TEMP\vcredist\vcredist_2008_x86.exe" /Q' + ${If} ${RunningX64} + File "vcredist_2008_x64.exe" + ExecWait '"$TEMP\vcredist\vcredist_2008_x64.exe" /Q' + ${EndIf} + + ; --- VC++ 2010 --- + File "vcredist_2010_x86.exe" + ExecWait '"$TEMP\vcredist\vcredist_2010_x86.exe" /quiet /norestart' + ${If} ${RunningX64} + File "vcredist_2010_x64.exe" + ExecWait '"$TEMP\vcredist\vcredist_2010_x64.exe" /quiet /norestart' + ${EndIf} + + ; --- VC++ 2012 --- + File "vcredist_2012_x86.exe" + ExecWait '"$TEMP\vcredist\vcredist_2012_x86.exe" /quiet /norestart' + ${If} ${RunningX64} + File "vcredist_2012_x64.exe" + ExecWait '"$TEMP\vcredist\vcredist_2012_x64.exe" /quiet /norestart' + ${EndIf} + + ; --- VC++ 2013 --- + File "vcredist_2013_x86.exe" + ExecWait '"$TEMP\vcredist\vcredist_2013_x86.exe" /quiet /norestart' + ${If} ${RunningX64} + File "vcredist_2013_x64.exe" + ExecWait '"$TEMP\vcredist\vcredist_2013_x64.exe" /quiet /norestart' + ${EndIf} + + ; --- VC++ 14 --- + File "vcredist_v14_latest_x86.exe" + ExecWait '"$TEMP\vcredist\vcredist_v14_latest_x86.exe" /quiet /norestart' + ${If} ${RunningX64} + File "vcredist_v14_latest_x64.exe" + ExecWait '"$TEMP\vcredist\vcredist_v14_latest_x64.exe" /quiet /norestart' + ${EndIf} + + ; Cleanup + RMDir /r $TEMP\vcredist + +SectionEnd diff --git a/install_AtLeastWin7.nsi b/install_AtLeastWin7.nsi new file mode 100644 index 0000000..5fb5e15 --- /dev/null +++ b/install_AtLeastWin7.nsi @@ -0,0 +1,103 @@ +!include "FileFunc.nsh" +!include "LogicLib.nsh" +!include "WinVer.nsh" +!include "x64.nsh" + +!define /date BUILD_YEAR "%Y" +!define /date BUILD_MONTH "%m" +!define /date BUILD_DAY "%d" + + +Name "MSVC Redistributable Runtime Offline Installer" +Icon "favicon.ico" +OutFile "MSVC_Offline_Setup_${BUILD_YEAR}.${BUILD_MONTH}.${BUILD_DAY}_Win7.exe" +InstallDir $TEMP + +VIProductVersion "${BUILD_YEAR}.${BUILD_MONTH}.${BUILD_DAY}.0" +VIAddVersionKey /LANG=0x0409 "ProductName" "MSVC Offline Installer" +VIAddVersionKey /LANG=0x0409 "FileDescription" "MSVC Offline Installer" +VIAddVersionKey /LANG=0x0409 "FileVersion" "${BUILD_YEAR}.${BUILD_MONTH}.${BUILD_DAY}.0" +VIAddVersionKey /LANG=0x0409 "LegalCopyright" "msvc.win Project" + +VIAddVersionKey /LANG=0x0804 "ProductName" "MSVC 运行时离线安装程序" +VIAddVersionKey /LANG=0x0804 "FileDescription" "MSVC 运行时离线安装程序" +VIAddVersionKey /LANG=0x0804 "FileVersion" "${BUILD_YEAR}.${BUILD_MONTH}.${BUILD_DAY}.0" +VIAddVersionKey /LANG=0x0804 "LegalCopyright" "msvc.win Project" + +SetCompressor /solid /final lzma + +RequestExecutionLevel admin + +Function .onInit +${IfNot} ${AtLeastWin7} + MessageBox MB_ICONSTOP "This installer requires Windows 7 or newer." + Abort +${EndIf} +FunctionEnd + +Section "MSVC Install" + + ; Create a temp folder + SetOutPath $TEMP\vcredist + + ; --- VC++ 2005 --- + File "vcredist_2005_x86.exe" + ExecWait '"$TEMP\vcredist\vcredist_2005_x86.exe" /Q' + ${If} ${RunningX64} + File "vcredist_2005_x64.exe" + ExecWait '"$TEMP\vcredist\vcredist_2005_x64.exe" /Q' + ${EndIf} + + ; --- VC++ 2008 --- + File "vcredist_2008_x86.exe" + ExecWait '"$TEMP\vcredist\vcredist_2008_x86.exe" /Q' + ${If} ${RunningX64} + File "vcredist_2008_x64.exe" + ExecWait '"$TEMP\vcredist\vcredist_2008_x64.exe" /Q' + ${EndIf} + + ; --- VC++ 2010 --- + File "vcredist_2010_x86.exe" + ExecWait '"$TEMP\vcredist\vcredist_2010_x86.exe" /quiet /norestart' + ${If} ${RunningX64} + File "vcredist_2010_x64.exe" + ExecWait '"$TEMP\vcredist\vcredist_2010_x64.exe" /quiet /norestart' + ${EndIf} + + ; --- VC++ 2012 --- + File "vcredist_2012_x86.exe" + ExecWait '"$TEMP\vcredist\vcredist_2012_x86.exe" /quiet /norestart' + ${If} ${RunningX64} + File "vcredist_2012_x64.exe" + ExecWait '"$TEMP\vcredist\vcredist_2012_x64.exe" /quiet /norestart' + ${EndIf} + + ; --- VC++ 2013 --- + File "vcredist_2013_x86.exe" + ExecWait '"$TEMP\vcredist\vcredist_2013_x86.exe" /quiet /norestart' + ${If} ${RunningX64} + File "vcredist_2013_x64.exe" + ExecWait '"$TEMP\vcredist\vcredist_2013_x64.exe" /quiet /norestart' + ${EndIf} + + ; --- VC++ 14 --- + ${If} ${AtMostWin8} + File "vcredist_v14_nt63_x86.exe" + ExecWait '"$TEMP\vcredist\vcredist_v14_nt63_x86.exe" /quiet /norestart' + ${If} ${RunningX64} + File "vcredist_v14_nt63_x64.exe" + ExecWait '"$TEMP\vcredist\vcredist_v14_nt63_x64.exe" /quiet /norestart' + ${EndIf} + ${Else} + File "vcredist_v14_latest_x86.exe" + ExecWait '"$TEMP\vcredist\vcredist_v14_latest_x86.exe" /quiet /norestart' + ${If} ${RunningX64} + File "vcredist_v14_latest_x64.exe" + ExecWait '"$TEMP\vcredist\vcredist_v14_latest_x64.exe" /quiet /norestart' + ${EndIf} + ${EndIf} + + ; Cleanup + RMDir /r $TEMP\vcredist + +SectionEnd From abb4d379d29466db22aae89c4d0074b8466d364a Mon Sep 17 00:00:00 2001 From: Calyx Hikari Date: Sat, 15 Nov 2025 23:48:08 +0800 Subject: [PATCH 2/9] Add eof --- generate.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/generate.sh b/generate.sh index b0289a9..45ca31b 100644 --- a/generate.sh +++ b/generate.sh @@ -95,6 +95,7 @@ https://aka.ms/vc14/vc_redist.x64.exe ${script} out=installer.nsi +EOF fi mkdir msvc_offline From 3485a5a9a3a99acbc29be15f1f6bc2b7fa5395d8 Mon Sep 17 00:00:00 2001 From: Calyx Hikari Date: Sun, 16 Nov 2025 00:08:27 +0800 Subject: [PATCH 3/9] Add automated generator --- .github/workflows/build.yml | 39 +++++++++++++++++ generate.sh | 2 + generate_all.sh | 87 +++++++++++++++++++++++++++++++++++++ install_AllOS.nsi | 2 +- install_AtLeastWin10.nsi | 2 +- install_AtLeastWin7.nsi | 2 +- 6 files changed, 131 insertions(+), 3 deletions(-) create mode 100644 .github/workflows/build.yml create mode 100644 generate_all.sh diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml new file mode 100644 index 0000000..3eebc1b --- /dev/null +++ b/.github/workflows/build.yml @@ -0,0 +1,39 @@ +name: Run generate.sh + +on: + push: + branches: [ main ] + pull_request: + branches: [ main ] + workflow_dispatch: + +jobs: + build: + runs-on: ubuntu-24.04 + + steps: + - name: Checkout repository + uses: actions/checkout@v4 + + - name: Install dependencies + run: | + sudo apt-get update + sudo apt-get install -y aria2 nsis + + - name: Run generate.sh + run: | + chmod +x ./generate_all.sh + ./generate_all.sh + + - name: Get build date + id: date + run: echo "date=$(date +'%Y.%m.%d')" >> $GITHUB_OUTPUT + + - name: Create GitHub Release + uses: softprops/action-gh-release@v2 + with: + tag_name: v${{ steps.date.outputs.date }} + name: Release ${{ steps.date.outputs.date }} + files: MSVC_Offline_Setup_*.exe + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/generate.sh b/generate.sh index 45ca31b..d0af1b9 100644 --- a/generate.sh +++ b/generate.sh @@ -108,5 +108,7 @@ installerFileName=$(ls *.exe) mv *.exe ../ popd +rm -rf msvc_offline + echo -e "Installer generated. " echo -e "Filename: ${installerFileName}" \ No newline at end of file diff --git a/generate_all.sh b/generate_all.sh new file mode 100644 index 0000000..7edb18e --- /dev/null +++ b/generate_all.sh @@ -0,0 +1,87 @@ +#!/bin/bash +shopt -s nocasematch + +cat << EOF > downloadLink.txt +https://get.msvc.win/favicon.ico + out=favicon.ico + +https://download.microsoft.com/download/8/b/4/8b42259f-5d70-43f4-ac2e-4b208fd8d66a/vcredist_x86.exe + out=vcredist_2005_x86.exe + +https://download.microsoft.com/download/8/b/4/8b42259f-5d70-43f4-ac2e-4b208fd8d66a/vcredist_x64.exe + out=vcredist_2005_x64.exe + +https://download.microsoft.com/download/5/D/8/5D8C65CB-C849-4025-8E95-C3966CAFD8AE/vcredist_x86.exe + out=vcredist_2008_x86.exe + +https://download.microsoft.com/download/5/D/8/5D8C65CB-C849-4025-8E95-C3966CAFD8AE/vcredist_x64.exe + out=vcredist_2008_x64.exe + +https://download.microsoft.com/download/1/6/5/165255E7-1014-4D0A-B094-B6A430A6BFFC/vcredist_x86.exe + out=vcredist_2010_x86.exe + +https://download.microsoft.com/download/1/6/5/165255E7-1014-4D0A-B094-B6A430A6BFFC/vcredist_x64.exe + out=vcredist_2010_x64.exe + +https://download.microsoft.com/download/1/6/B/16B06F60-3B20-4FF2-B699-5E9B7962F9AE/VSU_4/vcredist_x86.exe + out=vcredist_2012_x86.exe + +https://download.microsoft.com/download/1/6/B/16B06F60-3B20-4FF2-B699-5E9B7962F9AE/VSU_4/vcredist_x64.exe + out=vcredist_2012_x64.exe + +https://aka.ms/highdpimfc2013x86enu + out=vcredist_2013_x86.exe + +https://aka.ms/highdpimfc2013x64enu + out=vcredist_2013_x64.exe + +https://download.visualstudio.microsoft.com/download/pr/566435ac-4e1c-434b-b93f-aecc71e8cffc/0D59EC7FDBF05DE813736BF875CEA5C894FFF4769F60E32E87BD48406BBF0A3A/VC_redist.x86.exe + out=vcredist_v14_nt52_x86.exe + +https://download.visualstudio.microsoft.com/download/pr/566435ac-4e1c-434b-b93f-aecc71e8cffc/B75590149FA14B37997C35724BC93776F67E08BFF9BD5A69FACBF41B3846D084/VC_redist.x64.exe + out=vcredist_v14_nt52_x64.exe + +https://download.visualstudio.microsoft.com/download/pr/ed95ef9e-da02-4735-9064-bd1f7f69b6ed/CF92A10C62FFAB83B4A2168F5F9A05E5588023890B5C0CC7BA89ED71DA527B0F/VC_redist.x86.exe + out=vcredist_v14_nt60_x86.exe + +https://download.visualstudio.microsoft.com/download/pr/ed95ef9e-da02-4735-9064-bd1f7f69b6ed/CE6593A1520591E7DEA2B93FD03116E3FC3B3821A0525322B0A430FAA6B3C0B4/VC_redist.x64.exe + out=vcredist_v14_nt60_x64.exe + +https://aka.ms/vs/17/release/vc_redist.x86.exe + out=vcredist_v14_nt63_x86.exe + +https://aka.ms/vs/17/release/vc_redist.x64.exe + out=vcredist_v14_nt63_x64.exe + +https://aka.ms/vc14/vc_redist.x86.exe + out=vcredist_v14_latest_x86.exe + +https://aka.ms/vc14/vc_redist.x64.exe + out=vcredist_v14_latest_x64.exe + +https://get.msvc.win/install_AllOS.nsi + out=installer1.nsi + +https://get.msvc.win/install_AtLeastWin7.nsi + out=installer2.nsi + +https://get.msvc.win/install_AtLeastWin10.nsi + out=installer3.nsi +EOF +fi + +mkdir msvc_offline +aria2c --dir=msvc_offline --allow-overwrite=true --retry-wait=5 --max-connection-per-server=8 --split=8 --min-split-size=1M -i downloadLink.txt + +pushd msvc_offline +makensis installer1.nsi +makensis installer2.nsi +makensis installer3.nsi +rm vcredist*.exe +installerFileName=$(ls *.exe) +mv *.exe ../ +popd + +rm -rf msvc_offline + +echo -e "All installer files are generated at current directory. " \ No newline at end of file diff --git a/install_AllOS.nsi b/install_AllOS.nsi index c7fa612..d64fba6 100644 --- a/install_AllOS.nsi +++ b/install_AllOS.nsi @@ -24,8 +24,8 @@ VIAddVersionKey /LANG=0x0804 "FileDescription" "MSVC 运行时离线安装程序 VIAddVersionKey /LANG=0x0804 "FileVersion" "${BUILD_YEAR}.${BUILD_MONTH}.${BUILD_DAY}.0" VIAddVersionKey /LANG=0x0804 "LegalCopyright" "msvc.win Project" +Unicode true SetCompressor /solid /final lzma - RequestExecutionLevel admin Function .onInit diff --git a/install_AtLeastWin10.nsi b/install_AtLeastWin10.nsi index f4e4095..71e51c5 100644 --- a/install_AtLeastWin10.nsi +++ b/install_AtLeastWin10.nsi @@ -24,8 +24,8 @@ VIAddVersionKey /LANG=0x0804 "FileDescription" "MSVC 运行时离线安装程序 VIAddVersionKey /LANG=0x0804 "FileVersion" "${BUILD_YEAR}.${BUILD_MONTH}.${BUILD_DAY}.0" VIAddVersionKey /LANG=0x0804 "LegalCopyright" "msvc.win Project" +Unicode true SetCompressor /solid /final lzma - RequestExecutionLevel admin Function .onInit diff --git a/install_AtLeastWin7.nsi b/install_AtLeastWin7.nsi index 5fb5e15..47b32bd 100644 --- a/install_AtLeastWin7.nsi +++ b/install_AtLeastWin7.nsi @@ -24,8 +24,8 @@ VIAddVersionKey /LANG=0x0804 "FileDescription" "MSVC 运行时离线安装程序 VIAddVersionKey /LANG=0x0804 "FileVersion" "${BUILD_YEAR}.${BUILD_MONTH}.${BUILD_DAY}.0" VIAddVersionKey /LANG=0x0804 "LegalCopyright" "msvc.win Project" +Unicode true SetCompressor /solid /final lzma - RequestExecutionLevel admin Function .onInit From 0cc792122bffa458f6b02af5c0009c53700e51a4 Mon Sep 17 00:00:00 2001 From: Calyx Hikari Date: Sun, 16 Nov 2025 00:09:35 +0800 Subject: [PATCH 4/9] Update generate_all.sh --- generate_all.sh | 1 - 1 file changed, 1 deletion(-) diff --git a/generate_all.sh b/generate_all.sh index 7edb18e..4d1a224 100644 --- a/generate_all.sh +++ b/generate_all.sh @@ -68,7 +68,6 @@ https://get.msvc.win/install_AtLeastWin7.nsi https://get.msvc.win/install_AtLeastWin10.nsi out=installer3.nsi EOF -fi mkdir msvc_offline aria2c --dir=msvc_offline --allow-overwrite=true --retry-wait=5 --max-connection-per-server=8 --split=8 --min-split-size=1M -i downloadLink.txt From 08446c8d7bfa71fcd622e8e69ac7218e825b11fa Mon Sep 17 00:00:00 2001 From: Calyx Hikari Date: Sun, 16 Nov 2025 00:13:37 +0800 Subject: [PATCH 5/9] Update workflow --- .github/workflows/build.yml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 3eebc1b..4f18be4 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -1,12 +1,17 @@ name: Run generate.sh on: + schedule: + - cron: "0 0 1,15 * *" push: branches: [ main ] pull_request: branches: [ main ] workflow_dispatch: +permissions: + contents: write + jobs: build: runs-on: ubuntu-24.04 From d8fb20001f1f2a0f2a299558ede3b6c16903f630 Mon Sep 17 00:00:00 2001 From: Calyx Hikari Date: Sun, 16 Nov 2025 00:32:01 +0800 Subject: [PATCH 6/9] Update build.yml --- .github/workflows/build.yml | 27 ++++++++++++++++++++++++++- 1 file changed, 26 insertions(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 4f18be4..6ef6871 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -1,4 +1,4 @@ -name: Run generate.sh +name: Automatic Build Script on: schedule: @@ -34,11 +34,36 @@ jobs: id: date run: echo "date=$(date +'%Y.%m.%d')" >> $GITHUB_OUTPUT + - name: Compute SHA256 checksum + id: checksum + run: | + FILE=$(ls exampleinstaller_*.exe) + SUM=$(sha256sum "$FILE" | awk '{print $1}') + echo "file=$FILE" >> $GITHUB_OUTPUT + echo "sha256=$SUM" >> $GITHUB_OUTPUT + - name: Create GitHub Release uses: softprops/action-gh-release@v2 with: tag_name: v${{ steps.date.outputs.date }} name: Release ${{ steps.date.outputs.date }} + body: | + MSVC Offline Installer build automatically generated on ${{ steps.date.outputs.date }}. It does not include DirectX installation. + + [You can download DirectX Redistributable from here.](https://download.microsoft.com/download/8/4/a/84a35bf1-dafe-4ae8-82af-ad2ae20b6b14/directx_jun2010_redist.exe) + + AllOS variant: Supports at least Windows XP. + Win7 variant: Supports at least Windows 7. + Win10_11 variant: Supports at least Windows 10. + + Following Redistributable Runtime will be installed: + Windows XP: 14.28.29213.0 (2015-2019) + Windows Vista: 14.32.31332.0 (2015-2022) + Windows 7, 8, 8.1: 14.44.35211.0 (2015-2022) + Windows 10, 11: Latest Version when this build is released (2015-2026) + + File: ${{ steps.checksum.outputs.file }} + SHA256: ${{ steps.checksum.outputs.sha256 }} files: MSVC_Offline_Setup_*.exe env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} From 71f65c4e526ea52d69cf1c8923468174f4451d1e Mon Sep 17 00:00:00 2001 From: Calyx Hikari Date: Sun, 16 Nov 2025 00:34:42 +0800 Subject: [PATCH 7/9] Update build.yml --- .github/workflows/build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 6ef6871..50b131c 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -37,7 +37,7 @@ jobs: - name: Compute SHA256 checksum id: checksum run: | - FILE=$(ls exampleinstaller_*.exe) + FILE=$(ls MSVC_Offline_Setup_*.exe) SUM=$(sha256sum "$FILE" | awk '{print $1}') echo "file=$FILE" >> $GITHUB_OUTPUT echo "sha256=$SUM" >> $GITHUB_OUTPUT From cf1cde84eae4cf482a88b9efc15067139ee0ab00 Mon Sep 17 00:00:00 2001 From: Calyx Hikari Date: Sun, 16 Nov 2025 00:43:27 +0800 Subject: [PATCH 8/9] Add README --- .github/workflows/build.yml | 18 ++++++++++------ LICENSE | 2 +- README.md | 41 +++++++++++++++++++++++++++++++++++++ 3 files changed, 54 insertions(+), 7 deletions(-) create mode 100644 README.md diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 50b131c..61c6c3a 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -34,13 +34,19 @@ jobs: id: date run: echo "date=$(date +'%Y.%m.%d')" >> $GITHUB_OUTPUT - - name: Compute SHA256 checksum - id: checksum + - name: Compute SHA256 checksums + id: checksums run: | - FILE=$(ls MSVC_Offline_Setup_*.exe) - SUM=$(sha256sum "$FILE" | awk '{print $1}') - echo "file=$FILE" >> $GITHUB_OUTPUT - echo "sha256=$SUM" >> $GITHUB_OUTPUT + echo "body<> $GITHUB_OUTPUT + echo "Installer build for ${{ steps.date.outputs.date }}" >> $GITHUB_OUTPUT + echo "" >> $GITHUB_OUTPUT + for f in MSVC_Offline_Setup_*.exe; do + sum=$(sha256sum "$f" | awk '{print $1}') + echo "File: $f" >> $GITHUB_OUTPUT + echo "SHA256: $sum" >> $GITHUB_OUTPUT + echo "" >> $GITHUB_OUTPUT + done + echo "EOF" >> $GITHUB_OUTPUT - name: Create GitHub Release uses: softprops/action-gh-release@v2 diff --git a/LICENSE b/LICENSE index f6853aa..940f52a 100644 --- a/LICENSE +++ b/LICENSE @@ -1,6 +1,6 @@ MIT License -Copyright (c) 2025 Calyx Hikari +Copyright (c) 2025 Hikari Calyx Tech Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/README.md b/README.md new file mode 100644 index 0000000..833182b --- /dev/null +++ b/README.md @@ -0,0 +1,41 @@ +# get.msvc.win Scripts +This repository served as host of MSVC.win Project. + +## Mirroring +We encourage you to mirror this website, you'll need to follow this requirement: + +- Replace `get.msvc.win` inside of all scripts into your own domain, and your own domain must use msvc as prefix, like `msvc.example.com` + - However, you should not replace the script inside of `$OEM$.zip` + +## Build +This repository also provide automatically generated offline installers. + +If you prefer build yourself, you can follow these procedures: + +### Windows (TBD) + +### Linux +We assume you're using Debian-based Linux distro (e.g. Ubuntu). + +1. Install required dependencies. +```bash +sudo apt-get install aria2 nsis curl +``` + +2. Build installer. +```bash +# Build installer for Windows XP or newer +curl https://get.msvc.win/generate.sh | bash + +# Build installer for Windows 7 or newer +curl https://get.msvc.win/generate.sh | bash -s - win7 + +# Build installer for Windows 10 or newer +curl https://get.msvc.win/generate.sh | bash -s - win10 + +# Build all 3 installers at once +curl https://get.msvc.win/generate_all.sh | bash +``` + +### Contribute +Do you think it needs any improvements? Feel free to create Pull Request. \ No newline at end of file From af55622768ae8adfeb816f9f244a9380ca8baee1 Mon Sep 17 00:00:00 2001 From: Calyx Hikari Date: Sun, 16 Nov 2025 00:47:52 +0800 Subject: [PATCH 9/9] Fix checksum display --- .github/workflows/build.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 61c6c3a..94a9462 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -68,8 +68,7 @@ jobs: Windows 7, 8, 8.1: 14.44.35211.0 (2015-2022) Windows 10, 11: Latest Version when this build is released (2015-2026) - File: ${{ steps.checksum.outputs.file }} - SHA256: ${{ steps.checksum.outputs.sha256 }} + ${{ steps.checksums.outputs.body }} files: MSVC_Offline_Setup_*.exe env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}