summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoan Touzet <wohali@atypical.net>2016-07-18 05:41:46 -0400
committerJoan Touzet <wohali@atypical.net>2016-07-18 05:41:46 -0400
commit7b06c98de5af2877369b3cb43b04ca5a1e05c39c (patch)
tree0a55c92785c8a3f399d8b572a7018a7d0f82de5a
parent9620ff68e19920d08a05a0d3254dc6dfbc93a7f8 (diff)
downloadcouchdb-7b06c98de5af2877369b3cb43b04ca5a1e05c39c.tar.gz
More Windows fixes; make release now works
-rw-r--r--Makefile.win45
-rw-r--r--configure.ps112
-rw-r--r--rel/overlay/bin/couchdb.cmd31
3 files changed, 58 insertions, 30 deletions
diff --git a/Makefile.win b/Makefile.win
index 6794bf900..b0336a1a8 100644
--- a/Makefile.win
+++ b/Makefile.win
@@ -186,48 +186,45 @@ dist: all
# target: release - Create an Erlang release including CouchDB!
-include install.mk
release: all
- @echo "Installing CouchDB into rel\couchdb\ ..."
+ @echo Installing CouchDB into rel\couchdb\ ...
-@rmdir /s/q rel\couchdb
- @$(REBAR) generate > \dev\null 2>&1 # make full erlang release
+ @$(REBAR) generate
ifeq ($(with_fauxton), 1)
-@mkdir rel\couchdb\share
- @robocopy /E share\www rel\couchdb\share
+ -@xcopy share\www rel\couchdb\share\www /E/I
endif
ifeq ($(with_docs), 1)
-ifeq ($(IN_RELEASE), true)
-@mkdir rel\couchdb\share\www\docs
-@mkdir rel\couchdb\share\docs
- @robocopy /E share\docs\html\* rel\couchdb\share\www\docs
-# @copy share\docs\pdf\CouchDB.pdf rel\couchdb\share\docs\CouchDB.pdf
+ifeq ($(IN_RELEASE), true)
+ @xcopy share\docs\html rel\couchdb\share\www\docs /E /I
@copy share\docs\man\apachecouchdb.1 rel\couchdb\share\docs\couchdb.1
- @copy share\docs\info\CouchDB.info rel\couchdb\share\docs\CouchDB.info
+ -@copy share\docs\info\CouchDB.info rel\couchdb\share\docs\CouchDB.info
else
- -@mkdir rel\couchdb\share\docs
- @robocopy /E src\docs\build\html\* rel\couchdb\share\www\docs
-# @copy src\docs\build\latex\CouchDB.pdf rel\couchdb\share\docs\CouchDB.pdf
+ @xcopy src\docs\build\html rel\couchdb\share\www\docs /E /I
@copy src\docs\build\man\apachecouchdb.1 rel\couchdb\share\docs\couchdb.1
- @copy src\docs\build\texinfo\CouchDB.info rel\couchdb\share\docs\CouchDB.info
+ -@copy src\docs\build\texinfo\CouchDB.info rel\couchdb\share\docs\CouchDB.info
endif
endif
- @echo "... done"
- @echo
- @echo " You can now copy the rel\couchdb directory anywhere on your system."
- @echo " Start CouchDB with .\bin\couchdb from within that directory."
- @echo
+ @echo ... done
+ @echo .
+ @echo You can now copy the rel\couchdb directory anywhere on your system.
+ @echo Start CouchDB with .\bin\couchdb.cmd from within that directory.
+ @echo .
.PHONY: install
# target: install- install CouchDB :)
install:
- @echo
- @echo "Notice: There is no 'make install' command for CouchDB 2.0 yet."
- @echo
- @echo " To install CouchDB into your system, copy the rel\couchdb"
- @echo " to your desired installation location. For example:"
- @echo " robocopy /E rel\couchdb \usr\local\lib"
- @echo
+ @echo .
+ @echo Notice: There is no 'make install' command for CouchDB 2.0 yet.
+ @echo .
+ @echo To install CouchDB into your system, copy the rel\couchdb
+ @echo to your desired installation location. For example:
+ @echo xcopy /E rel\couchdb \usr\local\lib
+ @echo .
################################################################################
# Cleaning
@@ -316,5 +313,5 @@ endif
share\www:
ifeq ($(with_fauxton), 1)
@echo "Building Fauxton"
- @cd src\fauxton && npm install --production && .\node_modules\grunt-cli\bin\grunt couchdb
+ @cd src\fauxton && npm install --production && .\node_modules\.bin\grunt couchdb
endif
diff --git a/configure.ps1 b/configure.ps1
index 23f2a5b6f..b9ed80587 100644
--- a/configure.ps1
+++ b/configure.ps1
@@ -133,13 +133,13 @@ $CouchDBConfig = @"
% The contents of this file are auto-generated by configure
%
{package_author_name, "$PackageAuthorName"}.
-{prefix, "$InstallDir"}.
-{data_dir, "$DatabaseDir"}.
-{view_index_dir, "$ViewDir"}.
-{log_file, "$LogFile"}.
-{fauxton_root, "$DataRootDir/couchdb/www"}.
+{prefix, "."}.
+{data_dir, "./data"}.
+{view_index_dir, "./data"}.
+{log_file, ""}.
+{fauxton_root, "./share/www"}.
{user, "$CouchDBUser"}.
-{node_name, "-name $Hostname"}.
+{node_name, "-name couchdb@localhost"}.
{cluster_port, 5984}.
{backend_port, 5986}.
"@
diff --git a/rel/overlay/bin/couchdb.cmd b/rel/overlay/bin/couchdb.cmd
new file mode 100644
index 000000000..831511f1d
--- /dev/null
+++ b/rel/overlay/bin/couchdb.cmd
@@ -0,0 +1,31 @@
+@ECHO OFF
+
+:: Licensed under the Apache License, Version 2.0 (the "License"); you may not
+:: use this file except in compliance with the License. You may obtain a copy of
+:: the License at
+::
+:: http://www.apache.org/licenses/LICENSE-2.0
+::
+:: Unless required by applicable law or agreed to in writing, software
+:: distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+:: WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
+:: License for the specific language governing permissions and limitations under
+:: the License.
+
+SET COUCHDB_BIN_DIR=%~dp0
+SET ROOTDIR=%COUCHDB_BIN_DIR%\..\
+CD %ROOTDIR%
+
+SET /P START_ERL= < releases\start_erl.data
+FOR /F "tokens=1" %%G IN ("%START_ERL%") DO SET ERTS_VSN=%%G
+FOR /F "tokens=2" %%G IN ("%START_ERL%") DO SET APP_VSN=%%G
+
+set BINDIR=%ROOTDIR%/erts-%ERTS_VSN%/bin
+set EMU=beam
+set PROGNAME=%~n0
+
+%BINDIR%\erl -boot %ROOTDIR%\releases\%APP_VSN%\couchdb ^
+-args_file %ROOTDIR%\etc\vm.args ^
+-config %ROOTDIR%\releases\%APP_VSN%\sys.config
+
+:: EXIT /B