Merge branch 'master' into bugfixes/mac-fix-encodingproblems

This commit is contained in:
Hylke Bons 2021-02-15 11:59:38 +01:00 committed by GitHub
commit ba49f81af6
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
7 changed files with 30 additions and 20 deletions

2
.gitignore vendored
View file

@ -18,8 +18,8 @@ obj/
git-*
Sparkles/InstallationInfo.Directory.cs
SparkleShare/Linux/sparkleshare
SparkleShare/Mac/git/*
SparkleShare/Mac/git*
SparkleShare/Mac/*.tar.gz
/sparkleshare-*
desktop.ini
_ReSharper.*

View file

@ -11,6 +11,8 @@ function abspath()
esac
}
export projectFolder=$(dirname $0)
export projectFolder=$(abspath ${projectFolder})
LINE=$(cat ${projectFolder}/git.download)
TMP=()
@ -19,23 +21,22 @@ for val in $LINE ; do
TMP+=("$val")
done
export projectFolder=$(dirname $0)
export projectFolder=$(abspath ${projectFolder})
export gitDownload="${TMP[0]}"
export gitName=${gitDownload##*/}
export gitSHA256="${TMP[1]}"
set -e
if [ ! -f ${projectFolder}/git.tar.gz ]
if [[ ! -f ${projectFolder}/${gitName} ]];
then
curl --silent --location ${gitDownload} > git.tar.gz
test -e git.tar.gz || { echo "Failed to download git"; exit 1; }
curl --silent --location ${gitDownload} > ${gitName}
test -e ${gitName} || { echo "Failed to download git"; exit 1; }
printf "${gitSHA256} git.tar.gz" | shasum --check --algorithm 256
printf "${gitSHA256} ${gitName}" | shasum --check --algorithm 256
mkdir git/
tar xzf git.tar.gz --directory git/
tar czf git.tar.gz git/
rm -rf git/
fi
rm git.tar.gz
ln -s $gitName git.tar.gz

View file

@ -1,2 +0,0 @@
<configuration>
</configuration>

View file

@ -1 +1 @@
https://github.com/desktop/dugite-native/releases/download/v2.16.2/dugite-native-v2.16.2-macOS-119.tar.gz 65d608eb16e0e262bae6bd7828b28cf640455e949003fec94c1233e084b9ccde
https://github.com/desktop/dugite-native/releases/download/v2.29.2-2/dugite-native-v2.29.2-f9ceb12-macOS.tar.gz ff16488ebbb3a0000fac34c8afc01bc4e839ad478717fbcbbe0c207642b5872c

View file

@ -8,12 +8,17 @@ echo packing ${bundle} for release without Mono framework dependency
export MONO_PATH=`readlink /Library/Frameworks/Mono.framework/Versions/Current`
export PKG_CONFIG_PATH=/usr/lib/pkgconfig:${MONO_PATH}/lib/pkgconfig
export AS="as -arch i386"
export CC="cc -arch i386 -lobjc -liconv -framework Foundation"
export PATH=/usr/local/bin:/opt/local/bin:/Library/Frameworks/Mono.framework/Versions/Current/bin:/usr/bin:/bin
cd ${bundle}/Contents/MonoBundle/
# merge all Assemblies into one Mac binary
mkbundle --static --deps --config ./config -o ../MacOS/SparkleShare SparkleShare.exe Sparkles.dll Xamarin.Mac.dll Sparkles.Git.dll
mkbundle \
--simple \
-v \
--config ./config \
--library libxammac.dylib \
--library libmono-native-compat.0.dylib \
-o ../MacOS/SparkleShare \
SparkleShare.exe Sparkles.dll Sparkles.Git.dll
rm *.dll *.exe

View file

@ -9,6 +9,7 @@ echo Postprocessing ${bundle}...
export PATH=/usr/local/bin:/opt/local/bin:/Library/Frameworks/Mono.framework/Versions/Current/bin:/usr/bin:/bin
${projectFolder}/checkGit.sh
tar -x -f ${projectFolder}/git.tar.gz --directory ${bundle}/Contents/Resources
rm -rf ${bundle}/Contents/Resources/git
mkdir ${bundle}/Contents/Resources/git
tar -x -f ${projectFolder}/git.tar.gz --directory ${bundle}/Contents/Resources/git
cp -R SparkleShareInviteOpener.app ${bundle}/Contents/Resources
cp config ${bundle}/Contents/MonoBundle

View file

@ -936,7 +936,12 @@ namespace Sparkles.Git {
string HEAD_file_path = Path.Combine (child_path, "HEAD");
if (File.Exists (HEAD_file_path)) {
File.Move (HEAD_file_path, HEAD_file_path + ".backup");
string HEAD_file_path_backup = Path.Combine (child_path, "HEAD.backup");
if (File.Exists (HEAD_file_path_backup)) {
File.Delete (HEAD_file_path_backup);
}
File.Move (HEAD_file_path, HEAD_file_path_backup);
Logger.LogInfo ("Git", Name + " | Renamed " + HEAD_file_path);
}