Skip to content

Building for OSX

Billy Willoughby edited this page Jul 17, 2020 · 3 revisions

Security Considerations

I have limited access to OSX for testing and review. I've found when the Data Lake Export application is downloaded from github on Catalina, it will not execute due to security settings. As I do not wish to globally disable the security, I was looking for a way to make it available. I don't know if there will be much of an audience for using this tool on OSX, so for now, this is my work around.

This script will download the current source code and build it locally on the OSX machine. It does require that the .Net Core framework 3.1 or greater be installed. I will put the script in the release section for download, or you can copy and paste the code below.

  1. Save the file locally
  2. Set the execute bit on the file (chmod 770 <script file name>)
  3. Run the script

This will download the source, restore any Nuget packages, build the binary for the application, then remove the source code.

#!/bin/bash
#This application requires the .NetCore 3.1 be installed
clear
echo This Script will download the Data Lake Export console program and build it.
echo It *Requires* the .Net Core 3.1+ Framework to build correctly.
echo Testing for .Net Core Version...
dotnet --version
echo
read -s -n 1 -p "Press any key to continue . . . (or Ctrl-C to stop)"
echo
echo Downloading Code ...
git clone https://github.com/BillyWilloughby/data-lake-export.git --single-branch
cd data-lake-export
echo
echo Restoring Packages ...
dotnet build
echo
echo Compling Executable ...
dotnet publish -c Release -r "osx-x64" --self-contained=false -p:PublishSingleFile=true
echo
echo Moving Files ...
mv bin/Release/netcoreapp3.1/osx-x64/publish/*.* ../
mv bin/Release/netcoreapp3.1/osx-x64/publish/DataLakeExport  ../
mv -f bin/Release/netcoreapp3.1/osx-x64/Samples/*.* ../Samples/
echo
echo Cleaning Up ...
cd ..
rm -rf data-lake-export
echo
echo Setting Up Executable ...
chmod 770 ./DataLakeExport
chmod 770 Samples/Build\ Samples.sh
echo
echo Complete
echo
echo To run the Samples, you must either edit the files to put in your Information
echo or have setup the Environment variables for your environment per the Wiki.
echo The Sample extract requires MITMAS in the Data Lake.
echo 
echo Run: "./Build\\ Samples.sh Basic.sql" from the command line in the Samples 
echo directory to test the Sample extracts.

Running the Script

You should see something like this when running the script on OSX. Image of Workflow

Clone this wiki locally