Skip to content

Commit

Permalink
Merge pull request #64 from e8tools/develop
Browse files Browse the repository at this point in the history
3.0.42 `-P16` support
  • Loading branch information
dmpas authored Dec 14, 2020
2 parents 4fcb76b + a38d551 commit 04a1175
Show file tree
Hide file tree
Showing 13 changed files with 777 additions and 39 deletions.
9 changes: 7 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,9 @@ else()
set(RC_FILE "")
endif()

set (V8UNPACK_SOURCES src/main.cpp src/V8File.cpp)
set (V8UNPACK_HEADERS src/V8File.h src/version.h src/zconf.h src/zlib.h)

if(MSVC)

foreach(flag_var
Expand All @@ -22,12 +25,14 @@ if(MSVC)

endforeach(flag_var)

SET( CMAKE_SHARED_LINKER_FLAGS ${CMAKE_SHARED_LINKER_FLAGS} "/NODEFAULTLIBS:MSVCRT" )
set (CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} /NODEFAULTLIB:MSVCRT")
set (CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} /NODEFAULTLIB:MSVCRT")
set (CMAKE_EXE_LINKER_FLAGS_DEBUG "${CMAKE_EXE_LINKER_FLAGS_DEBUG} /NODEFAULTLIB:MSVCRTD")

endif()

set(CMAKE_CXX_STANDARD 11)
add_executable (v8unpack src/main.cpp src/V8File.cpp ${RC_FILE})
add_executable (v8unpack ${V8UNPACK_SOURCES} ${V8UNPACK_HEADERS} ${RC_FILE})

add_definitions (-DBOOST_ALL_NO_LIB)
set (Boost_USE_STATIC_LIBS ON)
Expand Down
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,10 @@ sudo wget http://download.opensuse.org/repositories/home:/pumbaEO/Fedora_22/home
sudo dnf install v8unpack
```

### Chocolatey
```
choco install v8unpack -source https://www.myget.org/F/onescript -y
```

## Version 3.0

Expand Down
8 changes: 4 additions & 4 deletions VersionInfo.rc
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
1 VERSIONINFO
FILEVERSION 3,0,40,1
PRODUCTVERSION 3,0,40,1
FILEVERSION 3,0,42,1
PRODUCTVERSION 3,0,42,1
BEGIN
BLOCK "StringFileInfo"
BEGIN
BLOCK "041904E3"
BEGIN
VALUE "CompanyName", "V8Unpack developers community"
VALUE "FileDescription", "V8 Unpack Tool"
VALUE "FileVersion", "3.0.40"
VALUE "FileVersion", "3.0.42"
VALUE "InternalName", "v8unpack"
VALUE "LegalCopyright", "Denis Demidov, Sergey Batanov and others"
VALUE "OriginalFilename", "v8unpack.exe"
VALUE "ProductName", "V8 Unpack Tool"
VALUE "ProductVersion", "3.0.40"
VALUE "ProductVersion", "3.0.42"
END
END

Expand Down
27 changes: 21 additions & 6 deletions appveyor.yml
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
version: 3.0.40.{build}
version: 3.0.42.{build}
image: Visual Studio 2015
pull_requests:
do_not_increment_build_number: true
clone_depth: 1
environment:
VCDIR: C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\
BOOST_ROOT: c:\Libraries\boost
BOOST_LIBRARYDIR: C:\Libraries\boost\lib32-msvc-12.0
BOOST_INCLUDEDIR: C:\Libraries\boost
VCDIR: C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\
BOOST_ROOT: C:\Libraries\boost_1_60_0
BOOST_LIBRARYDIR: C:\Libraries\boost_1_60_0\lib32-msvc-14.0
BOOST_INCLUDEDIR: C:\Libraries\boost_1_60_0
install:
- cmd: >-
appveyor DownloadFile https://github.com/madler/zlib/archive/v1.2.8.zip -FileName zlib-1.2.8.zip
Expand All @@ -32,10 +33,24 @@ build_script:
- cmd: >-
"%VCDIR%"\vcvarsall.bat
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 .
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 .
cmake --build . --config Release
after_build:
- cmd: >-
SET PATH=%PATH%;"C:/Program Files (x86)/WiX Toolset v3.11/bin"
candle v8unpack.wxs
light -out v8unpack-%APPVEYOR_BUILD_VERSION%.msi v8unpack.wixobj
choco pack
artifacts:
- path: Release\*.exe
name: v8unpack
- path: v8unpack*.nupkg
- path: v8unpack-*.msi
name: installer
deploy: off
9 changes: 9 additions & 0 deletions choco/tools/chocolateybeforemodify.ps1
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# This runs in 0.9.10+ before upgrade and uninstall.
# Use this file to do things like stop services prior to upgrade or uninstall.
# NOTE: It is an anti-pattern to call chocolateyUninstall.ps1 from here. If you
# need to uninstall an MSI prior to upgrade, put the functionality in this
# file without calling the uninstall script. Make it idempotent in the
# uninstall script so that it doesn't fail when it is already uninstalled.
# NOTE: For upgrades - like the uninstall script, this script always runs from
# the currently installed version, not from the new upgraded package version.

30 changes: 30 additions & 0 deletions choco/tools/chocolateyinstall.ps1
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
$ErrorActionPreference = 'Stop';

$packageName= 'v8unpack'
$toolsDir = "$(Split-Path -parent $MyInvocation.MyCommand.Definition)"
$url = "https://github.com/e8tools/v8unpack/releases/download/v.$version/v8unpack-$version.msi"
$url64 = ''

$packageArgs = @{
packageName = $packageName
unzipLocation = $toolsDir
fileType = 'MSI'
url = $url
url64bit = $url64
#file = $fileLocation

softwareName = 'V8 Unpack tool'

checksum = ''
checksumType = 'sha256'
checksum64 = ''
checksumType64= 'sha256'

#MSI
silentArgs = "/qn /norestart /l*v `"$($env:TEMP)\$($packageName).$($env:chocolateyPackageVersion).MsiInstall.log`""
validExitCodes= @(0, 3010, 1641)
}

Install-ChocolateyPackage @packageArgs

##Install-ChocolateyPackage $packageName $fileType $silentArgs $url [$url64 -validExitCodes $validExitCodes -checksum $checksum -checksumType $checksumType -checksum64 $checksum64 -checksumType64 $checksumType64]
45 changes: 45 additions & 0 deletions choco/tools/chocolateyuninstall.ps1
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
$ErrorActionPreference = 'Stop';

$packageName = 'v8unpack'
$softwareName = 'V8 Unpack tool'
$installerType = 'MSI'

$silentArgs = '/qn /norestart'
# https://msdn.microsoft.com/en-us/library/aa376931(v=vs.85).aspx
$validExitCodes = @(0, 3010, 1605, 1614, 1641)
if ($installerType -ne 'MSI') {
$validExitCodes = @(0)
}

$uninstalled = $false
[array]$key = Get-UninstallRegistryKey -SoftwareName $softwareName

if ($key.Count -eq 1) {
$key | % {
$file = "$($_.UninstallString)"

if ($installerType -eq 'MSI') {

$silentArgs = "$($_.PSChildName) $silentArgs"

$file = ''
}

Uninstall-ChocolateyPackage -PackageName $packageName `
-FileType $installerType `
-SilentArgs "$silentArgs" `
-ValidExitCodes $validExitCodes `
-File "$file"
}
} elseif ($key.Count -eq 0) {

Write-Warning "$packageName has already been uninstalled by other means."

} elseif ($key.Count -gt 1) {

Write-Warning "$key.Count matches found!"
Write-Warning "To prevent accidental data loss, no programs will be uninstalled."
Write-Warning "Please alert package maintainer the following keys were matched:"
$key | % {Write-Warning "- $_.DisplayName"}

}
Loading

0 comments on commit 04a1175

Please sign in to comment.