Skip to content

Commit 04a1175

Browse files
authored
Merge pull request #64 from e8tools/develop
3.0.42 `-P16` support
2 parents 4fcb76b + a38d551 commit 04a1175

13 files changed

+777
-39
lines changed

CMakeLists.txt

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,9 @@ else()
1010
set(RC_FILE "")
1111
endif()
1212

13+
set (V8UNPACK_SOURCES src/main.cpp src/V8File.cpp)
14+
set (V8UNPACK_HEADERS src/V8File.h src/version.h src/zconf.h src/zlib.h)
15+
1316
if(MSVC)
1417

1518
foreach(flag_var
@@ -22,12 +25,14 @@ if(MSVC)
2225

2326
endforeach(flag_var)
2427

25-
SET( CMAKE_SHARED_LINKER_FLAGS ${CMAKE_SHARED_LINKER_FLAGS} "/NODEFAULTLIBS:MSVCRT" )
28+
set (CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} /NODEFAULTLIB:MSVCRT")
29+
set (CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} /NODEFAULTLIB:MSVCRT")
30+
set (CMAKE_EXE_LINKER_FLAGS_DEBUG "${CMAKE_EXE_LINKER_FLAGS_DEBUG} /NODEFAULTLIB:MSVCRTD")
2631

2732
endif()
2833

2934
set(CMAKE_CXX_STANDARD 11)
30-
add_executable (v8unpack src/main.cpp src/V8File.cpp ${RC_FILE})
35+
add_executable (v8unpack ${V8UNPACK_SOURCES} ${V8UNPACK_HEADERS} ${RC_FILE})
3136

3237
add_definitions (-DBOOST_ALL_NO_LIB)
3338
set (Boost_USE_STATIC_LIBS ON)

README.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,10 @@ sudo wget http://download.opensuse.org/repositories/home:/pumbaEO/Fedora_22/home
4343
sudo dnf install v8unpack
4444
```
4545

46+
### Chocolatey
47+
```
48+
choco install v8unpack -source https://www.myget.org/F/onescript -y
49+
```
4650

4751
## Version 3.0
4852

VersionInfo.rc

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,19 @@
11
1 VERSIONINFO
2-
FILEVERSION 3,0,40,1
3-
PRODUCTVERSION 3,0,40,1
2+
FILEVERSION 3,0,42,1
3+
PRODUCTVERSION 3,0,42,1
44
BEGIN
55
BLOCK "StringFileInfo"
66
BEGIN
77
BLOCK "041904E3"
88
BEGIN
99
VALUE "CompanyName", "V8Unpack developers community"
1010
VALUE "FileDescription", "V8 Unpack Tool"
11-
VALUE "FileVersion", "3.0.40"
11+
VALUE "FileVersion", "3.0.42"
1212
VALUE "InternalName", "v8unpack"
1313
VALUE "LegalCopyright", "Denis Demidov, Sergey Batanov and others"
1414
VALUE "OriginalFilename", "v8unpack.exe"
1515
VALUE "ProductName", "V8 Unpack Tool"
16-
VALUE "ProductVersion", "3.0.40"
16+
VALUE "ProductVersion", "3.0.42"
1717
END
1818
END
1919

appveyor.yml

Lines changed: 21 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,13 @@
1-
version: 3.0.40.{build}
1+
version: 3.0.42.{build}
2+
image: Visual Studio 2015
23
pull_requests:
34
do_not_increment_build_number: true
45
clone_depth: 1
56
environment:
6-
VCDIR: C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\
7-
BOOST_ROOT: c:\Libraries\boost
8-
BOOST_LIBRARYDIR: C:\Libraries\boost\lib32-msvc-12.0
9-
BOOST_INCLUDEDIR: C:\Libraries\boost
7+
VCDIR: C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\
8+
BOOST_ROOT: C:\Libraries\boost_1_60_0
9+
BOOST_LIBRARYDIR: C:\Libraries\boost_1_60_0\lib32-msvc-14.0
10+
BOOST_INCLUDEDIR: C:\Libraries\boost_1_60_0
1011
install:
1112
- cmd: >-
1213
appveyor DownloadFile https://github.com/madler/zlib/archive/v1.2.8.zip -FileName zlib-1.2.8.zip
@@ -32,10 +33,24 @@ build_script:
3233
- cmd: >-
3334
"%VCDIR%"\vcvarsall.bat
3435
35-
cmake -G "Visual Studio 12" -DBOOST_ROOT="%BOOST_ROOT%" -DBOOST_LIBRARYDIR="%BOOST_LIBRARYDIR%" -DBOOST_INCLUDEDIR="%BOOST_INCLUDEDIR%" -DZLIB_LIBRARY=%APPVEYOR_BUILD_FOLDER%\zlib-1.2.8\build\Release\zlibstatic.lib -DZLIB_INCLUDE_DIR=%APPVEYOR_BUILD_FOLDER%\zlib-1.2.8 .
36+
cmake -G "Visual Studio 14" -DBOOST_ROOT="%BOOST_ROOT%" -DBOOST_LIBRARYDIR="%BOOST_LIBRARYDIR%" -DBOOST_INCLUDEDIR="%BOOST_INCLUDEDIR%" -DZLIB_LIBRARY=%APPVEYOR_BUILD_FOLDER%\zlib-1.2.8\build\Release\zlibstatic.lib -DZLIB_INCLUDE_DIR=%APPVEYOR_BUILD_FOLDER%\zlib-1.2.8 .
3637
3738
cmake --build . --config Release
39+
40+
after_build:
41+
- cmd: >-
42+
SET PATH=%PATH%;"C:/Program Files (x86)/WiX Toolset v3.11/bin"
43+
44+
candle v8unpack.wxs
45+
46+
light -out v8unpack-%APPVEYOR_BUILD_VERSION%.msi v8unpack.wixobj
47+
48+
choco pack
49+
3850
artifacts:
3951
- path: Release\*.exe
4052
name: v8unpack
53+
- path: v8unpack*.nupkg
54+
- path: v8unpack-*.msi
55+
name: installer
4156
deploy: off
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
# This runs in 0.9.10+ before upgrade and uninstall.
2+
# Use this file to do things like stop services prior to upgrade or uninstall.
3+
# NOTE: It is an anti-pattern to call chocolateyUninstall.ps1 from here. If you
4+
# need to uninstall an MSI prior to upgrade, put the functionality in this
5+
# file without calling the uninstall script. Make it idempotent in the
6+
# uninstall script so that it doesn't fail when it is already uninstalled.
7+
# NOTE: For upgrades - like the uninstall script, this script always runs from
8+
# the currently installed version, not from the new upgraded package version.
9+

choco/tools/chocolateyinstall.ps1

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
$ErrorActionPreference = 'Stop';
2+
3+
$packageName= 'v8unpack'
4+
$toolsDir = "$(Split-Path -parent $MyInvocation.MyCommand.Definition)"
5+
$url = "https://github.com/e8tools/v8unpack/releases/download/v.$version/v8unpack-$version.msi"
6+
$url64 = ''
7+
8+
$packageArgs = @{
9+
packageName = $packageName
10+
unzipLocation = $toolsDir
11+
fileType = 'MSI'
12+
url = $url
13+
url64bit = $url64
14+
#file = $fileLocation
15+
16+
softwareName = 'V8 Unpack tool'
17+
18+
checksum = ''
19+
checksumType = 'sha256'
20+
checksum64 = ''
21+
checksumType64= 'sha256'
22+
23+
#MSI
24+
silentArgs = "/qn /norestart /l*v `"$($env:TEMP)\$($packageName).$($env:chocolateyPackageVersion).MsiInstall.log`""
25+
validExitCodes= @(0, 3010, 1641)
26+
}
27+
28+
Install-ChocolateyPackage @packageArgs
29+
30+
##Install-ChocolateyPackage $packageName $fileType $silentArgs $url [$url64 -validExitCodes $validExitCodes -checksum $checksum -checksumType $checksumType -checksum64 $checksum64 -checksumType64 $checksumType64]

choco/tools/chocolateyuninstall.ps1

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
$ErrorActionPreference = 'Stop';
2+
3+
$packageName = 'v8unpack'
4+
$softwareName = 'V8 Unpack tool'
5+
$installerType = 'MSI'
6+
7+
$silentArgs = '/qn /norestart'
8+
# https://msdn.microsoft.com/en-us/library/aa376931(v=vs.85).aspx
9+
$validExitCodes = @(0, 3010, 1605, 1614, 1641)
10+
if ($installerType -ne 'MSI') {
11+
$validExitCodes = @(0)
12+
}
13+
14+
$uninstalled = $false
15+
[array]$key = Get-UninstallRegistryKey -SoftwareName $softwareName
16+
17+
if ($key.Count -eq 1) {
18+
$key | % {
19+
$file = "$($_.UninstallString)"
20+
21+
if ($installerType -eq 'MSI') {
22+
23+
$silentArgs = "$($_.PSChildName) $silentArgs"
24+
25+
$file = ''
26+
}
27+
28+
Uninstall-ChocolateyPackage -PackageName $packageName `
29+
-FileType $installerType `
30+
-SilentArgs "$silentArgs" `
31+
-ValidExitCodes $validExitCodes `
32+
-File "$file"
33+
}
34+
} elseif ($key.Count -eq 0) {
35+
36+
Write-Warning "$packageName has already been uninstalled by other means."
37+
38+
} elseif ($key.Count -gt 1) {
39+
40+
Write-Warning "$key.Count matches found!"
41+
Write-Warning "To prevent accidental data loss, no programs will be uninstalled."
42+
Write-Warning "Please alert package maintainer the following keys were matched:"
43+
$key | % {Write-Warning "- $_.DisplayName"}
44+
45+
}

0 commit comments

Comments
 (0)