feat: 自包含安装包 — ld.lld + MinGW 库 (39MB, 零依赖)
This commit is contained in:
+24
-8
@@ -1,8 +1,7 @@
|
||||
; L Language 编译器 Windows 安装包
|
||||
Unicode true
|
||||
; L Language 编译器 Windows 安装包
|
||||
; 构建: makensis -DVERSION=x.y.z installer.nsi
|
||||
|
||||
Unicode true
|
||||
|
||||
!ifndef VERSION
|
||||
!define VERSION "0.6.0"
|
||||
!endif
|
||||
@@ -12,7 +11,7 @@ Unicode true
|
||||
!define EXE "l_lang.exe"
|
||||
|
||||
Name "${PRODUCT} ${VERSION}"
|
||||
OutFile "..\build\L-Language-${VERSION}-setup.exe"
|
||||
OutFile "..\release\L-Language-${VERSION}-setup.exe"
|
||||
InstallDir "$PROGRAMFILES\L Language"
|
||||
RequestExecutionLevel admin
|
||||
SetCompressor /SOLID lzma
|
||||
@@ -39,12 +38,29 @@ Section "Install"
|
||||
File "..\build\${EXE}"
|
||||
; LLVM 运行时 (编译必须)
|
||||
File "D:\settings\Language\LLVM\bin\LLVM-C.dll"
|
||||
; 链接器 (.o -> .exe)
|
||||
File "D:\settings\Language\LLVM\bin\clang.exe"
|
||||
; lld 链接器 (.o -> .exe)
|
||||
File "D:\settings\Language\LLVM\bin\ld.lld.exe"
|
||||
; MinGW 线程运行时
|
||||
; MinGW 线程运行时 DLL
|
||||
File "D:\settings\Language\C\mingw64\bin\libmcfgthread-2.dll"
|
||||
|
||||
; MinGW 链接库 (自包含,无需用户安装 MinGW)
|
||||
SetOutPath "$INSTDIR\mingw_lib"
|
||||
File "..\mingw_lib\crt2.o"
|
||||
File "..\mingw_lib\crtbegin.o"
|
||||
File "..\mingw_lib\crtend.o"
|
||||
File "..\mingw_lib\libmingw32.a"
|
||||
File "..\mingw_lib\libmcfgthread.a"
|
||||
File "..\mingw_lib\libgcc.a"
|
||||
File "..\mingw_lib\libgcc_eh.a"
|
||||
File "..\mingw_lib\libmoldname.a"
|
||||
File "..\mingw_lib\libmingwex.a"
|
||||
File "..\mingw_lib\libmsvcrt.a"
|
||||
File "..\mingw_lib\libadvapi32.a"
|
||||
File "..\mingw_lib\libshell32.a"
|
||||
File "..\mingw_lib\libuser32.a"
|
||||
File "..\mingw_lib\libkernel32.a"
|
||||
File "..\mingw_lib\libntdll.a"
|
||||
|
||||
; 示例程序
|
||||
SetOutPath "$INSTDIR\examples"
|
||||
File "..\test\programs\01_arithmetic.l"
|
||||
@@ -124,11 +140,11 @@ SectionEnd
|
||||
Section "Uninstall"
|
||||
Delete "$INSTDIR\${EXE}"
|
||||
Delete "$INSTDIR\LLVM-C.dll"
|
||||
Delete "$INSTDIR\clang.exe"
|
||||
Delete "$INSTDIR\ld.lld.exe"
|
||||
Delete "$INSTDIR\libmcfgthread-2.dll"
|
||||
Delete "$INSTDIR\快速入门.bat"
|
||||
Delete "$INSTDIR\uninstall.exe"
|
||||
RMDir /r "$INSTDIR\mingw_lib"
|
||||
RMDir /r "$INSTDIR\examples"
|
||||
RMDir "$INSTDIR"
|
||||
|
||||
|
||||
Reference in New Issue
Block a user