提交 dfd8e5a7 编写于 作者: C Corey Butler

Simplified build to leverage version number from generated executable."

上级 08fb7000
The MIT License (MIT)
Copyright (c) 2014 Corey Butler and contributors.
Copyright (c) 2018 Ecor Ventures LLC.
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
......
......@@ -3,52 +3,52 @@ SET INNOSETUP=%CD%\nvm.iss
SET ORIG=%CD%
REM SET GOPATH=%CD%\src
SET GOBIN=%CD%\bin
REM Support for older architectures
SET GOARCH=386
SET version=1.1.7
SET DIST=%CD%\dist\%version%
echo Building NVM for Windows
echo Remove existing build at %DIST%
rd /s /q "%DIST%"
echo Creating %DIST%
mkdir "%DIST%"
echo Creating distribution in %DIST%
REM Cleanup existing build if it exists
if exist src\nvm.exe (
del src\nvm.exe
)
echo Building nvm.exe:
REM Make the executable and add to the binary directory
echo Building nvm.exe
go build src\nvm.go
REM Group the file with the helper binaries
move nvm.exe %GOBIN%
for /f %%i in ('%GOBIN%\nvm.exe version') do set BUILT_VERSION=%%i
REM Codesign the executable
.\buildtools\signtools\x64\signtool.exe sign /debug /tr http://timestamp.digicert.com /td sha256 /fd sha256 /a %GOBIN%\nvm.exe
for /f %%i in ('%GOBIN%\nvm.exe version') do set AppVersion=%%i
echo nvm.exe v%AppVersion% built.
REM Create the distribution folder
SET DIST=%CD%\dist\%AppVersion%
if NOT %BUILT_VERSION% == %version% (
echo Expected nvm.exe version %version% but created version %BUILT_VERSION%
exit 1
) else (
echo nvm.exe v%BUILT_VERSION% built.
REM Remove old build files if they exist.
if exist %DIST% (
echo Clearing old build in %DIST%
rd /s /q "%DIST%"
)
echo Codesign nvm.exe...
.\buildtools\signtools\x64\signtool.exe sign /debug /tr http://timestamp.digicert.com /td sha256 /fd sha256 /a %GOBIN%\nvm.exe
REM Create the distribution directory
mkdir "%DIST%"
echo Building "noinstall" zip...
REM Create the "no install" zip version
for %%a in (%GOBIN%) do (buildtools\zip -j -9 -r "%DIST%\nvm-noinstall.zip" "%CD%\LICENSE" "%%a\*" -x "%GOBIN%\nodejs.ico")
echo "Building the primary installer..."
REM Generate the installer (InnoSetup)
buildtools\iscc %INNOSETUP% /o%DIST%
buildtools\zip -j -9 -r "%DIST%\nvm-setup.zip" "%DIST%\nvm-setup.exe"
echo "Generating Checksums for release files..."
REM Generate checksums
for %%f in (%DIST%\*.*) do (certutil -hashfile "%%f" MD5 | find /i /v "md5" | find /i /v "certutil" >> "%%f.checksum.txt")
echo "Distribution created. Now cleaning up...."
REM Cleanup
del %GOBIN%\nvm.exe
echo "Done."
echo NVM for Windows v%AppVersion% build completed.
@echo on
#define MyAppName "NVM for Windows"
#define MyAppShortName "nvm"
#define MyAppLCShortName "nvm"
#define MyAppVersion "1.1.7"
#define MyAppVersion ""
#define MyAppPublisher "Ecor Ventures LLC"
#define MyAppURL "https://github.com/coreybutler/nvm"
#define MyAppURL "https://github.com/coreybutler/nvm-windows"
#define MyAppExeName "nvm.exe"
#define MyIcon "bin\nodejs.ico"
#define ProjectRoot "."
......@@ -17,8 +17,8 @@ SignTool=MsSign $f
SignedUninstaller=yes
AppId=40078385-F676-4C61-9A9C-F9028599D6D3
AppName={#MyAppName}
AppVersion={#MyAppVersion}
AppVerName={#MyAppName} {#MyAppVersion}
AppVersion={%AppVersion}
AppVerName={#MyAppName} {%AppVersion}
AppPublisher={#MyAppPublisher}
AppPublisherURL={#MyAppURL}
AppSupportURL={#MyAppURL}
......@@ -28,7 +28,7 @@ DisableDirPage=no
DefaultGroupName={#MyAppName}
AllowNoIcons=yes
LicenseFile={#ProjectRoot}\LICENSE
OutputDir={#ProjectRoot}\dist\{#MyAppVersion}
OutputDir={#ProjectRoot}\dist\{%AppVersion}
OutputBaseFilename={#MyAppLCShortName}-setup
SetupIconFile={#ProjectRoot}\{#MyIcon}
Compression=lzma
......@@ -37,7 +37,7 @@ ChangesEnvironment=yes
DisableProgramGroupPage=yes
ArchitecturesInstallIn64BitMode=x64 ia64
UninstallDisplayIcon={app}\{#MyIcon}
AppCopyright=Copyright (C) 2016 Corey Butler and contributors.
AppCopyright=Copyright (C) 2018 Ecor Ventures LLC and contributors.
[Languages]
Name: "english"; MessagesFile: "compiler:Default.isl"
......
......@@ -21,7 +21,7 @@ import (
)
const (
NvmVersion = "1.1.7"
NvmVersion = "1.1.8"
)
type Environment struct {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册