From 24bdb5a8913a4385ca555e6617b61ba61d645ea7 Mon Sep 17 00:00:00 2001 From: Qstick Date: Fri, 7 Dec 2018 22:04:36 -0500 Subject: [PATCH] Fixed: Update build.sh to fix macOS startup script issues (#565) --- .gitignore | 1 + appveyor-package.sh | 8 ---- appveyor.yml | 2 +- build.sh | 45 +++++++++++++----- {osx => macOS}/Lidarr | 0 {osx => macOS}/Lidarr.app/Contents/Info.plist | 0 .../Lidarr.app/Contents/Resources/lidarr.icns | Bin 7 files changed, 35 insertions(+), 21 deletions(-) rename {osx => macOS}/Lidarr (100%) rename {osx => macOS}/Lidarr.app/Contents/Info.plist (100%) rename {osx => macOS}/Lidarr.app/Contents/Resources/lidarr.icns (100%) diff --git a/.gitignore b/.gitignore index 32f3b4421..f25828171 100644 --- a/.gitignore +++ b/.gitignore @@ -113,6 +113,7 @@ src/UI/.idea/* *log.txt node_modules/ _output* +_artifacts _rawPackage/ _dotTrace* _tests/ diff --git a/appveyor-package.sh b/appveyor-package.sh index e1698bf5b..49bd7f393 100644 --- a/appveyor-package.sh +++ b/appveyor-package.sh @@ -11,18 +11,10 @@ PublishArtifacts() 7z a $artifactsFolder/Lidarr.${APPVEYOR_REPO_BRANCH}.${APPVEYOR_BUILD_VERSION}.windows.zip $artifactsFolderWindows/* 7z a $artifactsFolder/Lidarr.${APPVEYOR_REPO_BRANCH}.${APPVEYOR_BUILD_VERSION}.osx-app.zip $artifactsFolderMacOSApp/* - mkdir -p $artifactsFolderMacOSApp/StartScript/Lidarr.app/Contents/MacOS - cp ./osx/Lidarr $artifactsFolderMacOSApp/StartScript/Lidarr.app/Contents/MacOS - 7z a $artifactsFolder/Lidarr.${APPVEYOR_REPO_BRANCH}.${APPVEYOR_BUILD_VERSION}.osx-app.zip $artifactsFolderMacOSApp/StartScript/* - rm -rf $artifactsFolderMacOSApp/StartScript/ 7z a -ttar $artifactsFolder/Lidarr.${APPVEYOR_REPO_BRANCH}.${APPVEYOR_BUILD_VERSION}.osx.tar $artifactsFolderMacOS/* - mkdir -p $artifactsFolderMacOS/StartScript/Lidarr - cp ./osx/Lidarr $artifactsFolderMacOS/StartScript/Lidarr/Lidarr - 7z a -ttar $artifactsFolder/Lidarr.${APPVEYOR_REPO_BRANCH}.${APPVEYOR_BUILD_VERSION}.osx.tar $artifactsFolderMacOS/StartScript/* 7z a -tgzip $artifactsFolder/Lidarr.${APPVEYOR_REPO_BRANCH}.${APPVEYOR_BUILD_VERSION}.osx.tar.gz $artifactsFolder/Lidarr.${APPVEYOR_REPO_BRANCH}.${APPVEYOR_BUILD_VERSION}.osx.tar rm -f $artifactsFolder/Lidarr.${APPVEYOR_REPO_BRANCH}.${APPVEYOR_BUILD_VERSION}.osx.tar - rm -rf $artifactsFolderMacOS/StartScript/ 7z a -ttar $artifactsFolder/Lidarr.${APPVEYOR_REPO_BRANCH}.${APPVEYOR_BUILD_VERSION}.linux.tar $artifactsFolderLinux/* 7z a -tgzip $artifactsFolder/Lidarr.${APPVEYOR_REPO_BRANCH}.${APPVEYOR_BUILD_VERSION}.linux.tar.gz $artifactsFolder/Lidarr.${APPVEYOR_REPO_BRANCH}.${APPVEYOR_BUILD_VERSION}.linux.tar diff --git a/appveyor.yml b/appveyor.yml index 00abb4365..e5adc3824 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -1,6 +1,6 @@ version: '0.5.0.{build}' -image: Previous Visual Studio 2017 +image: Visual Studio 2017 assembly_info: patch: true diff --git a/build.sh b/build.sh index b0fe7c999..92c1de871 100755 --- a/build.sh +++ b/build.sh @@ -156,6 +156,8 @@ PackageMono() ProgressStart 'Creating Mono Package' rm -rf $outputFolderLinux + + echo "Copying Binaries" cp -r $outputFolder $outputFolderLinux echo "Creating MDBs" @@ -193,12 +195,19 @@ PackageMono() ProgressEnd 'Creating Mono Package' } -PackageOsx() +PackageMacOS() { ProgressStart 'Creating MacOS Package' rm -rf $outputFolderMacOS - cp -r $outputFolderLinux $outputFolderMacOS + mkdir $outputFolderMacOS + + echo "Adding Startup script" + cp ./macOS/Lidarr $outputFolderMacOS + dos2unix $outputFolderMacOS/Lidarr + + echo "Copying Binaries" + cp -r $outputFolderLinux/* $outputFolderMacOS echo "Adding sqlite dylibs" cp $sourceFolder/Libraries/Sqlite/*.dylib $outputFolderMacOS @@ -206,23 +215,35 @@ PackageOsx() echo "Adding MediaInfo dylib" cp $sourceFolder/Libraries/MediaInfo/*.dylib $outputFolderMacOS - echo "Adding Startup script" - cp ./osx/Lidarr $outputFolderMacOS - ProgressEnd 'Creating MacOS Package' } -PackageOsxApp() +PackageMacOSApp() { - ProgressStart 'Creating MacOS App Package' + ProgressStart 'Creating macOS App Package' rm -rf $outputFolderMacOSApp mkdir $outputFolderMacOSApp + cp -r ./macOS/Lidarr.app $outputFolderMacOSApp + mkdir -p $outputFolderMacOSApp/Lidarr.app/Contents/MacOS + + echo "Adding Startup script" + cp ./macOS/Lidarr $outputFolderMacOSApp/Lidarr.app/Contents/MacOS + dos2unix $outputFolderMacOSApp/Lidarr.app/Contents/MacOS/Lidarr + + echo "Copying Binaries" + cp -r $outputFolderLinux/* $outputFolderMacOSApp/Lidarr.app/Contents/MacOS + + echo "Adding sqlite dylibs" + cp $sourceFolder/Libraries/Sqlite/*.dylib $outputFolderMacOSApp/Lidarr.app/Contents/MacOS + + echo "Adding MediaInfo dylib" + cp $sourceFolder/Libraries/MediaInfo/*.dylib $outputFolderMacOSApp/Lidarr.app/Contents/MacOS - cp -r ./osx/Lidarr.app $outputFolderMacOSApp - cp -r $outputFolderMacOS $outputFolderMacOSApp/Lidarr.app/Contents/MacOS + echo "Removing Update Folder" + rm -r $outputFolderMacOSApp/Lidarr.app/Contents/MacOS/Lidarr.Update - ProgressEnd 'Creating MacOS App Package' + ProgressEnd 'Creating macOS App Package' } PackageTests() @@ -311,8 +332,8 @@ esac Build RunGulp PackageMono -PackageOsx -PackageOsxApp +PackageMacOS +PackageMacOSApp PackageTests CleanupWindowsPackage PackageArtifacts diff --git a/osx/Lidarr b/macOS/Lidarr similarity index 100% rename from osx/Lidarr rename to macOS/Lidarr diff --git a/osx/Lidarr.app/Contents/Info.plist b/macOS/Lidarr.app/Contents/Info.plist similarity index 100% rename from osx/Lidarr.app/Contents/Info.plist rename to macOS/Lidarr.app/Contents/Info.plist diff --git a/osx/Lidarr.app/Contents/Resources/lidarr.icns b/macOS/Lidarr.app/Contents/Resources/lidarr.icns similarity index 100% rename from osx/Lidarr.app/Contents/Resources/lidarr.icns rename to macOS/Lidarr.app/Contents/Resources/lidarr.icns