[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[lmi-commits] [lmi] master f15cb36 04/15: Refactor, handling "root name"
From: |
Greg Chicares |
Subject: |
[lmi-commits] [lmi] master f15cb36 04/15: Refactor, handling "root name" more naturally |
Date: |
Fri, 9 Oct 2020 12:05:26 -0400 (EDT) |
branch: master
commit f15cb36c1355b75470d2c69e144163fe991a2d93
Author: Gregory W. Chicares <gchicares@sbcglobal.net>
Commit: Gregory W. Chicares <gchicares@sbcglobal.net>
Refactor, handling "root name" more naturally
---
install_msw.sh | 31 ++++++++++++++++---------------
1 file changed, 16 insertions(+), 15 deletions(-)
diff --git a/install_msw.sh b/install_msw.sh
index c94529c..3084474 100755
--- a/install_msw.sh
+++ b/install_msw.sh
@@ -343,11 +343,23 @@ for z in company_logo.png group_quote_banner.png ; do
done
# Configurable settings.
-#
-# Tailored to msw; for POSIX, s|C:||.
mkdir --parents /opt/lmi/print
+# Like std::filesystem::root_name().
+root_name=C:
+
+# Don't use "C:" for wine: it designates the "wine prefix" directory.
+# "Z:" could be used instead, because that's where wine maps the
+# apparent root, but that wouldn't work with posix builds. Instead,
+# therefore, symlink the directories lmi uses as described in
+# 'README.schroot'.
+
+if [ "Cygwin" != "$platform" ] && [ "WSL" != "$platform" ]
+then
+ root_name=
+fi
+
cat >/opt/lmi/data/configurable_settings.xml <<EOF
<?xml version="1.0"?>
<configurable_settings version="2">
@@ -358,10 +370,10 @@ cat >/opt/lmi/data/configurable_settings.xml <<EOF
<custom_input_1_filename>custom.inix</custom_input_1_filename>
<custom_output_0_filename>custom.out0</custom_output_0_filename>
<custom_output_1_filename>custom.out1</custom_output_1_filename>
- <default_input_filename>C:/etc/opt/lmi/default.ill</default_input_filename>
+
<default_input_filename>${root_name}/etc/opt/lmi/default.ill</default_input_filename>
<libraries_to_preload/>
<offer_hobsons_choice>0</offer_hobsons_choice>
- <print_directory>C:/opt/lmi/print</print_directory>
+ <print_directory>${root_name}/opt/lmi/print</print_directory>
<seconds_to_pause_between_printouts>10</seconds_to_pause_between_printouts>
<skin_filename>skin.xrc</skin_filename>
<spreadsheet_file_extension>.tsv</spreadsheet_file_extension>
@@ -369,17 +381,6 @@ cat >/opt/lmi/data/configurable_settings.xml <<EOF
</configurable_settings>
EOF
-# Remove "C:" for wine: it designates the "wine prefix" directory.
-# "Z:" could be used instead, because that's where wine maps the
-# apparent root, but that wouldn't work with posix builds. Instead,
-# therefore, symlink the directories lmi uses as described in
-# 'README.schroot'.
-
-if [ "Cygwin" != "$platform" ] && [ "WSL" != "$platform" ]
-then
- sed -i /opt/lmi/data/configurable_settings.xml -e's/C://g'
-fi
-
# Restore any preexisting source directory that had been preserved
# above, renaming the pristine checkout that had replaced it.
#
- [lmi-commits] [lmi] master updated (14d582d -> 5f266c6), Greg Chicares, 2020/10/09
- [lmi-commits] [lmi] master f15cb36 04/15: Refactor, handling "root name" more naturally,
Greg Chicares <=
- [lmi-commits] [lmi] master a227fff 06/15: Update xmlwrapp submodule to the latest version, Greg Chicares, 2020/10/09
- [lmi-commits] [lmi] master c86548b 11/15: Upgrade xmlwrapp to support building as DLL without auto-import, Greg Chicares, 2020/10/09
- [lmi-commits] [lmi] master 22ba470 07/15: Re-upgrade libxml2 to the latest version, Greg Chicares, 2020/10/09
- [lmi-commits] [lmi] master 24c5d74 14/15: Add wxpdfdoc submodule and use wxPdfDocument version from it, Greg Chicares, 2020/10/09
- [lmi-commits] [lmi] master 70a973c 08/15: Build xmlwrapp as external library, similarly to libxml2, Greg Chicares, 2020/10/09
- [lmi-commits] [lmi] master 4f0d520 09/15: Fix caching xmlwrapp in GitHub CI workflow, Greg Chicares, 2020/10/09
- [lmi-commits] [lmi] master ae54a1d 13/15: Add wx submodule and use wxWidgets version from it, Greg Chicares, 2020/10/09
- [lmi-commits] [lmi] master fc15e23 12/15: Fix xml libraries building under Windows, Greg Chicares, 2020/10/09
- [lmi-commits] [lmi] master ab00f6d 02/15: Improve documentation, Greg Chicares, 2020/10/09
- [lmi-commits] [lmi] master a020e99 05/15: Add xmlwrapp submodule and use its sources and headers from it, Greg Chicares, 2020/10/09