This is an automated email from the ASF dual-hosted git repository.

ronny pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/couchdb-glazier.git


The following commit(s) were added to refs/heads/main by this push:
     new c6ff860  Changes for 3.3. release (#19)
c6ff860 is described below

commit c6ff860ad13232c942fee34ec557b21c1d1c6789
Author: Ronny Berndt <[email protected]>
AuthorDate: Fri Dec 30 18:56:45 2022 +0100

    Changes for 3.3. release (#19)
    
    - update erlang version to latest v24 patch release
    - generic path to v143 merge module
    - add variable to CouchDB directory
---
 bin/build_installer.ps1  | 28 ++++++++++++++++++++--------
 bin/variables.ps1        |  2 +-
 installer/couchdb.wxs.in |  2 +-
 3 files changed, 22 insertions(+), 10 deletions(-)

diff --git a/bin/build_installer.ps1 b/bin/build_installer.ps1
index d5b37e0..ee724e3 100644
--- a/bin/build_installer.ps1
+++ b/bin/build_installer.ps1
@@ -10,9 +10,21 @@
 # License for the specific language governing permissions and limitations under
 # the License.
 
-if (-Not (Test-Path "${PSScriptRoot}\..\..\couchdb\rel\couchdb"))
+# PLEASE EDIT ME AND CHANGE $CouchDB_Root to the CouchDB folder on disk ####
+# Example:
+# $CouchDB_Root = "C:\relax\apache-couchdb-3.3.0"
+$CouchDB_Root = "PLEASE_SET_PATH_TO_COUCHDB_DIR"
+# ###################
+
+$CouchDB = "${CouchDB_Root}\rel\couchdb"
+if ($CouchDB_Root -eq "PLEASE_SET_PATH_TO_COUCHDB_DIR")
+{
+   Write-Error "Please set the env variable CouchDB_Root in this script. 
Exiting..."
+   exit 1
+}
+if (-Not ((Test-Path $CouchDB) -and ($CouchDB.EndsWith("rel\couchdb"))))
 {
-   Write-Error "CouchDB release directory not found. Have you run make 
release?"
+   Write-Error "CouchDB release directory not found. Have you run make 
release? Exiting..."
    exit 1
 }
 if (! $env:VCPKG_BIN)
@@ -21,7 +33,6 @@ if (! $env:VCPKG_BIN)
    exit 1
 }
 
-$CouchDB = "${PSScriptRoot}\..\..\couchdb\rel\couchdb"
 $Glazier = "${PSScriptRoot}\.."
 $CouchDBVersion = Get-Content "${CouchDB}\releases\start_erl.data" |
       ForEach-Object {$_.Split(" ")[1]}
@@ -36,7 +47,7 @@ Remove-Item "${CouchDB}\bin\*.dll", "${CouchDB}\bin\nssm.exe" 
-ErrorAction Ignor
 # add build assets we need in the package
 Copy-Item -Path "${env:VCPKG_BIN}\*.dll" -Destination "${CouchDB}\bin"
 Copy-Item -Path "C:\ProgramData\Chocolatey\lib\nssm\tools\nssm.exe" 
-Destination "${CouchDB}\bin"
-Copy-Item -Path "${CouchDB}\etc\default.ini" -Destination "."
+Move-Item -Path "${CouchDB}\etc\default.ini" -Destination "."
 Move-Item -Path "${CouchDB}\etc\local.ini" -Destination 
"${CouchDB}\etc\local.ini.dist"
 Move-Item -Path "${CouchDB}\etc\vm.args" -Destination 
"${CouchDB}\etc\vm.args.dist"
 
@@ -46,11 +57,12 @@ Move-Item -Path "${CouchDB}\etc\vm.args" -Destination 
"${CouchDB}\etc\vm.args.di
       -replace "###RELNOTESVERSION###", "${RelNotesVersion}" |
       Set-Content "couchdb.wxs"
 (Get-Content "default.ini") `
-      -replace "^; file =.*", "file = ./var/log/couchdb.log" `
-      -replace "^writer = stderr", "writer = file" |
-      Out-File "default.ini"
+      -replace "^;file =.*", "file = ./var/log/couchdb.log" `
+      -replace "^;writer = stderr", "writer = file" |
+      Out-File "default.ini" -Encoding ascii
+Move-Item -Path ".\default.ini" -Destination "${CouchDB}\etc\default.ini"
 # WiX skips empty directories, so we create a dummy logfile
-New-Item -Name "${CouchDB}\var\log\couchdb.log" -ItemType File
+Out-File -FilePath "${CouchDB}\var\log\couchdb.log" -Encoding ascii
 
 # Build our custom action.
 Push-Location CustomAction
diff --git a/bin/variables.ps1 b/bin/variables.ps1
index 91262db..7e78700 100644
--- a/bin/variables.ps1
+++ b/bin/variables.ps1
@@ -19,7 +19,7 @@ $mozBuildFile = Split-Path $mozBuildUri -Leaf
 # ERLANG BUILD SETTINGS
 
 # Download location of the Erlang/OTP Environment for Windows (x64)
-$erlBuildUri = 
"https://github.com/erlang/otp/releases/download/OTP-24.3.4.6/otp_win64_24.3.4.6.exe";
+$erlBuildUri = 
"https://github.com/erlang/otp/releases/download/OTP-24.3.4.7/otp_win64_24.3.4.7.exe";
 $erlBuildFile = Split-Path $erlBuildUri -Leaf
 $erlDir = "erl24"
 $erlInstallPath = "C:\Program Files\${erlDir}"
diff --git a/installer/couchdb.wxs.in b/installer/couchdb.wxs.in
index f979547..0127138 100644
--- a/installer/couchdb.wxs.in
+++ b/installer/couchdb.wxs.in
@@ -48,7 +48,7 @@
       </Directory>
 
       <DirectoryRef Id="TARGETDIR">
-         <Merge Id="VCRedist143" SourceFile="C:\Program Files (x86)\Microsoft 
Visual 
Studio\2022\BuildTools\VC\Redist\MSVC\14.31.31103\MergeModules\Microsoft_VC143_CRT_x64.msm"
 DiskId="1" Language="0"/>
+         <Merge Id="VCRedist143" SourceFile="C:\Program Files (x86)\Microsoft 
Visual 
Studio\2022\BuildTools\VC\Redist\MSVC\v143\MergeModules\Microsoft_VC143_CRT_x64.msm"
 DiskId="1" Language="0"/>
       </DirectoryRef>
 
       <SetProperty Id="ARPINSTALLLOCATION" Value="[APPLICATIONFOLDER]"

Reply via email to