Dave Jarvis' Repositories

git clone https://repo.autonoma.ca/repo/keenwrite.git
bin/LICENSE-linux-x64.warp-packer
+MIT License
+
+Copyright (c) 2018 Diego Giagio <diego@giagio.com>
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all
+copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+SOFTWARE.
bin/LICENSE-osslsigncode
+OpenSSL based Authenticode signing for PE/MSI/Java CAB files.
+
+Copyright (C) 2005-2014 Per Allansson <pallansson@gmail.com>
+Copyright (C) 2018-2022 MichaƂ Trojnara <Michal.Trojnara@stunnel.org>
+
+This program is free software: you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation, either version 3 of the License, or
+(at your option) any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+In addition, as a special exception, the copyright holders give
+permission to link the code of portions of this program with the
+OpenSSL library under certain conditions as described in each
+individual source file, and distribute linked combinations
+including the two.
+You must obey the GNU General Public License in all respects
+for all of the code used other than OpenSSL. If you modify
+file(s) with this exception, you may extend this exception to your
+version of the file(s), but you are not obligated to do so. If you
+do not wish to do so, delete this exception statement from your
+version. If you delete this exception statement from all source
+files in the program, then also delete it here.
bin/LICENSE-warp-packer
+MIT License
+
+Copyright (c) 2018 Diego Giagio <diego@giagio.com>
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all
+copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+SOFTWARE.
bin/linux-x64.warp-packer
Binary files differ
bin/osslsigncode
Binary files differ
bin/warp-packer
Binary files differ
fonts/install.sh
+#!/usr/bin/env bash
+
+readonly FONTS_DIR="/usr/local/share/fonts"
+readonly DOWNLOAD_DIR=$(mktemp -d)
+
+cleanup() {
+ if [ -d "${DOWNLOAD_DIR}" ]; then
+ rm -rf "${DOWNLOAD_DIR}"
+ fi
+}
+
+trap cleanup EXIT
+
+if [ ! -d "${FONTS_DIR}" ]; then
+ echo "ERROR: Create ${FONTS_DIR} and ensure write access."
+ exit 1
+fi
+
+while IFS=',' read -r url extension; do
+ [[ -n "$url" ]] || continue
+
+ filename=$(basename "${url}")
+
+ if [ ! -d "${FONTS_DIR}/${extension}" ]; then
+ echo "ERROR: Create ${FONTS_DIR}/${extension} and ensure write access."
+ exit 1
+ fi
+
+ echo "Downloading ${url} to ${DOWNLOAD_DIR}"
+ wget --quiet -P "${DOWNLOAD_DIR}" "${url}"
+
+ font_dir="${FONTS_DIR}/${extension}"
+
+ echo "Extracting ${extension} to ${font_dir}"
+ unzip -j -o -d "${font_dir}" "${DOWNLOAD_DIR}/${filename}" "*.${extension}"
+done < urls.csv
+
fonts/urls.csv
+https://fonts.keenwrite.com/download/andada-pro.zip,otf
+https://fonts.keenwrite.com/download/archivo-narrow.zip,otf
+https://fonts.keenwrite.com/download/carlito.zip,ttf
+https://fonts.keenwrite.com/download/courier-prime.zip,ttf
+https://fonts.keenwrite.com/download/inconsolata.zip,ttf
+https://fonts.keenwrite.com/download/libre-baskerville.zip,ttf
+https://fonts.keenwrite.com/download/niconne.zip,ttf
+https://fonts.keenwrite.com/download/nunito.zip,ttf
+https://fonts.keenwrite.com/download/open-sans-emoji.zip,ttf
+https://fonts.keenwrite.com/download/pt-mono.zip,ttf
+https://fonts.keenwrite.com/download/pt-sans.zip,ttf
+https://fonts.keenwrite.com/download/pt-serif.zip,ttf
+https://fonts.keenwrite.com/download/roboto.zip,ttf
+https://fonts.keenwrite.com/download/roboto-mono.zip,ttf
+https://fonts.keenwrite.com/download/source-serif-4.zip,otf
+https://fonts.keenwrite.com/download/underwood.zip,ttf
+
installer.sh
DEPENDENCIES=(
"gradle,https://gradle.org"
- "warp-packer,https://github.com/Reisz/warp/releases"
- "linux-x64.warp-packer,https://github.com/dgiagio/warp/releases"
- "osslsigncode,https://www.winehq.org"
"tar,https://www.gnu.org/software/tar"
"wine,https://www.winehq.org"
$log "Sign ${FILE_BINARY}"
- osslsigncode sign \
+ ${SCRIPT_DIR}/bin/osslsigncode sign \
-pkcs12 "${FILE_CERTIFICATE}" \
-askpass \
# ---------------------------------------------------------------------------
utile_create_launcher() {
- packer=warp-packer
+ packer=${SCRIPT_DIR}/bin/warp-packer
packer_opt_pack="pack"
packer_opt_input="input-dir"
# The warp-packer fork that fixes Windows doesn't support MacOS.
if [ "${ARG_JAVA_OS}" = "macos" ]; then
- packer=linux-x64.warp-packer
+ packer=${SCRIPT_DIR}/bin/linux-x64.warp-packer
packer_opt_pack=""
packer_opt_input="input_dir"
src/main/java/com/keenwrite/io/SysFile.java
}
+ public static Path normalize( final File file ) {
+ return file == null
+ ? USER_DIRECTORY.toPath()
+ : normalize( file.toPath() );
+ }
+
public static File toFile( final Path path ) {
return path == null
src/main/java/com/keenwrite/ui/explorer/FilePickerFactory.java
import com.keenwrite.Messages;
+import com.keenwrite.io.SysFile;
import com.keenwrite.preferences.Workspace;
import javafx.beans.property.ObjectProperty;
final Window owner, final SelectionType options ) {
final var picker = new NativeFilePicker( owner, options );
+ final var directory = SysFile.normalize( mDirectory.get() );
- picker.setInitialDirectory( mDirectory.get().toPath() );
+ picker.setInitialDirectory( directory );
return picker;

Fix NPE, update installation

Author DaveJarvis <email>
Date 2024-11-14 00:07:37 GMT-0800
Commit 8ac99b9f16941932c63a53d2781a2d5fbd55085d
Parent 01a828d
Delta 138 lines added, 7 lines removed, 131-line increase