diff --git a/gitsync.sh b/gitsync.sh deleted file mode 100755 index 524b09e..0000000 --- a/gitsync.sh +++ /dev/null @@ -1,35 +0,0 @@ -#!/bin/bash -# -# https://help.github.com/articles/syncing-a-fork/ -# -# https://help.github.com/articles/configuring-a-remote-for-a-fork/ -# -# https://www.opentechguides.com/how-to/article/git/177/git-sync-repos.html -# -# Setup: -# -# git remote add github https://github.com/PerryWerneck/lib3270.git -# -# - -git push - -git fetch origin -git merge - -BRANCH=$(git symbolic-ref --short HEAD) -REPOS=$(git remote -v | grep -v origin | grep "(push)" | awk '{print $1}') - -for repo in ${REPOS} -do - echo "Getting updates to branch ${BRANCH} from ${repo} ..." - git fetch "${repo}" "${BRANCH}" -# git merge 2>&1 > /dev/null -done - -for repo in ${REPOS} -do - echo "Updating ${repo} ..." - git push ${repo} -done - diff --git a/pushtag.sh b/pushtag.sh deleted file mode 100755 index 6d17116..0000000 --- a/pushtag.sh +++ /dev/null @@ -1,32 +0,0 @@ -#!/bin/bash -# -# https://help.github.com/articles/syncing-a-fork/ -# -# https://help.github.com/articles/configuring-a-remote-for-a-fork/ -# -# https://www.opentechguides.com/how-to/article/git/177/git-sync-repos.html -# -# Setup: -# -# git remote add github https://github.com/PerryWerneck/lib3270.git -# -# - -if [ -z ${1} ]; then - echo "Inform target tag" - exit -1 -fi - -git push - -git fetch origin - -git tag -f ${1} -git push -f --tags - -for repo in $(git remote -v | grep -v origin | grep "(push)" | awk '{print $1}') -do - echo "Updating ${repo} ..." - git push ${repo} -f --tags -done - diff --git a/update.sh b/update.sh deleted file mode 100755 index 99e4ab3..0000000 --- a/update.sh +++ /dev/null @@ -1,7 +0,0 @@ -#!/bin/bash - -git pull -git fetch origin - -git submodule update --remote --recursive - diff --git a/win/makeruntime.sh.in b/win/makeruntime.sh.in index 8126ac0..eb741f1 100755 --- a/win/makeruntime.sh.in +++ b/win/makeruntime.sh.in @@ -1,28 +1,21 @@ #!/bin/bash # -# "Software pw3270, desenvolvido com base nos códigos fontes do WC3270 e X3270 -# (Paul Mattes Paul.Mattes@usa.net), de emulação de terminal 3270 para acesso a -# aplicativos mainframe. Registro no INPI sob o nome G3270. +# SPDX-License-Identifier: LGPL-3.0-or-later # -# Copyright (C) <2008> +# Copyright (C) 2021 Perry Werneck # -# Este programa é software livre. Você pode redistribuí-lo e/ou modificá-lo sob -# os termos da GPL v.2 - Licença Pública Geral GNU, conforme publicado pela -# Free Software Foundation. +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU Lesser General Public License as published +# by the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. # -# Este programa é distribuído na expectativa de ser útil, mas SEM QUALQUER -# GARANTIA; sem mesmo a garantia implícita de COMERCIALIZAÇÃO ou de ADEQUAÇÃO -# A QUALQUER PROPÓSITO EM PARTICULAR. Consulte a Licença Pública Geral GNU para -# obter mais detalhes. +# 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. # -# Você deve ter recebido uma cópia da Licença Pública Geral GNU junto com este -# programa; se não, escreva para a Free Software Foundation, Inc., 59 Temple -# Place, Suite 330, Boston, MA, 02111-1307, USA -# -# Contatos: -# -# perry.werneck@gmail.com (Alexandre Perry de Souza Werneck) -# erico.mendonca@gmail.com (Erico Mascarenhas de Mendonça) +# You should have received a copy of the GNU Lesser General Public License +# along with this program. If not, see . # # @@ -32,39 +25,26 @@ # http://drup.org/gtk-warning-error-loading-icon-couldnt-recognize-image-file-format # -# Get myDIR -myDIR=$(dirname $(readlink -f "${0}")) - -# Disable i18n -export LANG=C - +# Setup default paths +srcdir="$(dirname $(dirname $(readlink -f "${0}")))" prefix="@prefix@" -PKG_CONFIG="@PKG_CONFIG@" -GTK_VERSION="gtk+-@GTK_VERSION@" -GTK_PREFIX=$($PKG_CONFIG --variable=prefix ${GTK_VERSION}) -GDK_LOADERS=$(${PKG_CONFIG} --variable=gdk_pixbuf_binarydir gdk-pixbuf-2.0 | sed -e "s@${prefix}@@g") +imgdir=.build +bindir="${imgdir}/bin" -TARGET="@BUILDDIR@/.bin/runtime" -BINDIR="@BUILDDIR@/.bin/Release/" -SCHEMADIR="@BUILDDIR@/schemas/" - -# Change to bin path -mkdir -p ${TARGET} -rm -fr ${TARGET}/* +export LANG=C -copy_dll() { +install_bin() { AGAIN=1 - until [ $AGAIN = 0 ]; do + until [ $AGAIN = 0 ]; do SOURCES=$(mktemp) REQUIRES=$(mktemp) - find "${BINDIR}" -iname "*.dll" > ${SOURCES} - find "${BINDIR}" -iname "*.exe" >> ${SOURCES} - find "${TARGET}" -iname *.dll >> ${SOURCES} - + find "${imgdir}" -iname "*.dll" > ${SOURCES} + find "${imgdir}" -iname "*.exe" >> ${SOURCES} + while read FILENAME do objdump -p ${FILENAME} | grep "DLL Name:" | cut -d: -f2 | tr "[:upper:]" "[:lower:]" >> ${REQUIRES} @@ -124,227 +104,54 @@ copy_dll() { winhttp " - # Excluo DLLs do sistema + # Remove system DLLs from list for i in $libs_to_exclude; do sed -i -e "/${i}/d" ${REQUIRES} done - # Procuro pelas DLLs que faltam AGAIN=0 while read FILENAME do - if [ ! -e "${TARGET}/${FILENAME}" ]; then - - COUNT=$(find "${BINDIR}" -iname ${FILENAME} | wc --lines) - if [ "${COUNT}" == "0" ]; then - echo ${FILENAME} + if [ ! -e "${bindir}/${FILENAME}" ]; then - if [ -e ${prefix}/bin/${FILENAME} ]; then + if [ -e ${prefix}/bin/${FILENAME} ]; then - echo "Copiando $(basename ${FILENAME})..." + echo "${prefix}/bin/${FILENAME}" - AGAIN=1 - cp -v "${prefix}/bin/${FILENAME}" "${TARGET}/${FILENAME}" - if [ "$?" != "0" ]; then - exit -1 - fi - - elif [ -e ${prefix}/lib/${FILENAME} ]; then - - echo "Copiando $(basename ${FILENAME})..." + AGAIN=1 + cp -v "${prefix}/bin/${FILENAME}" "${bindir}/${FILENAME}" + if [ "$?" != "0" ]; then + exit -1 + fi - AGAIN=1 - cp -v "${prefix}/lib/${FILENAME}" "${TARGET}/${FILENAME}" - if [ "$?" != "0" ]; then - exit -1 - fi + elif [ -e ${prefix}/lib/${FILENAME} ]; then - else + echo "${prefix}/lib/${FILENAME}" - echo "Can't find ${FILENAME}" + AGAIN=1 + cp -v "${prefix}/lib/${FILENAME}" "${bindir}/${FILENAME}" + if [ "$?" != "0" ]; then exit -1 - fi - fi + else + echo "Can't find ${FILENAME}" + exit -1 + fi + fi - + done < ${REQUIRES} rm -f ${SOURCES} rm -f ${REQUIRES} - - done - -} - -copy_locale() { - - rm -fr ${TARGET}/share/locale/pt_BR/LC_MESSAGES - mkdir -p ${TARGET}/share/locale/pt_BR/LC_MESSAGES - - locales=" - gettext-runtime.mo - gettext-tools.mo - glib20.mo - gtk30.mo - gtk30-properties.mo - " - - for i in $locales; do - if [ -e "${GTK_PREFIX}/share/locale/pt_BR/LC_MESSAGES/${i}" ]; then - echo "${GTK_PREFIX}/share/locale/pt_BR/LC_MESSAGES/${i} ..." - cp "${GTK_PREFIX}/share/locale/pt_BR/LC_MESSAGES/${i}" "${TARGET}/share/locale/pt_BR/LC_MESSAGES" - if [ "$?" != "0" ]; then - exit -1 - fi - fi + done } -copy_loaders() { - - mkdir -p "${TARGET}/${GDK_LOADERS}" - cp -rv "${prefix}/${GDK_LOADERS}/loaders" "${TARGET}/${GDK_LOADERS}" - if [ "$?" != "0" ]; then - exit -1 - fi - -} - -copy_schemes() { - - mkdir -p "${TARGET}/share/glib-2.0/schemas" - - cp -v \ - ${SCHEMADIR}/windows/*.xml \ - "${TARGET}/share/glib-2.0/schemas" - - if [ "$?" != "0" ]; then - exit -1 - fi - - cp -rv \ - "${prefix}/share/glib-2.0/schemas/org.gtk.Settings.FileChooser.gschema.xml" \ - "${TARGET}/share/glib-2.0/schemas" - - if [ "$?" != "0" ]; then - exit -1 - fi - - cp -rv \ - "${prefix}/share/glib-2.0/schemas/gschema.dtd" \ - "${TARGET}/share/glib-2.0/schemas" - - if [ "$?" != "0" ]; then - exit -1 - fi - - glib-compile-schemas \ - --targetdir="${TARGET}/share/glib-2.0/schemas" \ - "${TARGET}/share/glib-2.0/schemas" - - if [ "$?" != "0" ]; then - exit -1 - fi -} - - -copy_theme() { - - mkdir -p "${TARGET}/etc" - cp -rv "${prefix}/etc/gtk-3.0" "${TARGET}/etc" - - # https://stackoverflow.com/questions/37035936/how-to-get-native-windows-decorations-on-gtk3-on-windows-7-and-msys2 - mkdir -p ${TARGET}/etc/gtk-3.0 - rm -f ${TARGET}/etc/gtk-3.0/settings.ini - rm -f ${TARGET}/etc/gtk-3.0/gtkrc - - mkdir -p ${TARGET}/share/icons - if [ "$?" != 0 ]; then - echo "Can´t create icons folder" - exit -1 - fi - - cp -rv /usr/share/icons/${1} ${TARGET}/share/icons - if [ "$?" != 0 ]; then - echo "Can´t copy ${1} icons" - exit -1 - fi - - mkdir -p ${TARGET}/share/themes - if [ "$?" != 0 ]; then - echo "Can´t create themes folder" - exit -1 - fi - -# cp -rv /usr/share/themes/${1} ${TARGET}/share/themes -# if [ "$?" != 0 ]; then -# echo "Can´t copy ${1} theme" -# exit -1 -# fi - - echo "${myDIR}/gtk.css" - if [ -e "${myDIR}/gtk.css" ]; then - cp "${myDIR}/gtk.css" "${TARGET}/share/themes/${1}/gtk-3.0/gtk.css" - fi - -} - -# -# Check command line parameters -# -until [ -z "$1" ] -do - if [ ${1:0:2} = '--' ]; then - tmp=${1:2} - parameter=${tmp%%=*} - parameter=$(echo $parameter | tr "[:lower:]" "[:upper:]") - value=${tmp##*=} - - case "$parameter" in - OUTPUT-DIR) - TARGET=$value - ;; - - BINDIR) - BINDIR=$value - ;; - - HELP) - echo "${0} [options]" - echo "" - echo "Options:" - echo "" - echo " --path Set runtime instalation path (default is $TARGET)" - echo " --bindir Set binaries source path (default is $BINDIR)" - echo "" - exit 0 - - ;; - - esac - fi - - shift - -done - -# -# Make runtime -# -copy_dll -copy_locale -copy_loaders -copy_schemes -copy_theme "Adwaita" - -# Otimiza todos os pngs -#echo "Optimizing..." -#find ${TARGET} -iname *.png -exec optipng -o7 -quiet {} \; 2>&1 > /dev/null +install_bin -echo "Runtime ok" -- libgit2 0.21.2