Skip to content

Commit fa841c2

Browse files
committed
add precompiled mac version of curl (including sftp) and dbxcli, both code signed
1 parent 373580c commit fa841c2

7 files changed

Lines changed: 72 additions & 7 deletions

File tree

Documentation/Readme_GDrive.MD

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ For Windows, just copy in resource folder for easy deployment.
5353
For Mac: sign it, and then sign/notarize the embedding 4D application.
5454
To sign enter by example:
5555
```
56-
codesign –force --options runtime --timestamp –sign Developer ID Application: 4D Deutschland GmbH (4789QA2D2W)" /Users/thomas/Desktop/gdrive
56+
codesign –-force --options runtime --timestamp –-sign "Developer ID Application: 4D Deutschland GmbH" /Users/thomas/Desktop/gdrive
5757
```
5858

5959
If Gdrive changes the API, just download the latest release from the github repository.

Documentation/Readme_curl.MD

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,12 +35,20 @@ By installing "your" own version SFTP will be supported additionally, and this a
3535

3636
Precompiled versions for Windows can be loaded here:
3737
[curl.se](https://curl.se/download.html)
38+
You can deploy them with your application by adding curl.exe to your Resource folder or similar.
3839

39-
To use SFTP on Mac you need to install [Homebrew](https://brew.sh) and run:
40+
To use SFTP on Mac:
41+
If you need it just for you, internally:
42+
Recommended way is to install [Homebrew](https://brew.sh) and run:
4043
```
4144
homebrew install curl
4245
```
4346

47+
To get a deployable version of curl you can compile it yourself or use a precompiled version (compiled by the author in March 2022), see folder "Optional:curl_Mac_precompiled". This version is already signed to ease notarization.
48+
49+
To compile yourself (or use a newer version) follow the steps in optional:curl_Mac_precompiled:owToCompileYourself.txt
50+
51+
4452
Copy class methods:
4553
- FileTansfer_curl.4DM
4654
- SytemWorkerProperties.4dm

Documentation/Readme_dropbox.MD

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -45,11 +45,10 @@ You can compile it yourself (see instruction in link above) or download a precom
4545

4646
For Windows the downloaded version could be placed in Resources folder and so easily deployed.
4747

48-
For Mac, it needs to be signed by you. To sign enter by example:
49-
```
50-
codesign –force --options runtime --timestamp –sign "Developer ID Application: 4D Deutschland GmbH" /Users/thomas/Desktop/dbxcli
51-
```
52-
But the latest version as available in February 2022 was linked with a too old MacOS Version (<10.9) which does not allow to notarise the final application, forbidding to set the file inside the 4D application. This forces you to download on customer side and install it locally, to avoid the need to notarise. I tried to compile following the instructions myself, while the resulted executeable could upload/download, it could get get directory information for the root folder, so I'm not sure if recompilation is a solution for Mac.
48+
For Mac, you can either use my (new compiled and signed, based on 3.0.0) or compile and sign yourself, to allow shipping it as notarized merged application inside the Resource folder.
49+
The version published on GitHub (March 2022) is linked with macOS 10.9 and so too old to be notarized.
50+
The precompiled version is in /optional/dbxcli_Mac_precompiled.
51+
There is also a "HowToCompileYourself.txt" file, giving hints how to compile and sign yourself.
5352

5453

5554
Copy class methods:
Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
Download:
2+
https://github.com/Frugghi/iSSH2
3+
4+
this will handle compilation of OpenSSL and libSSH fully automatically!
5+
6+
cd to folder and then enter:
7+
./iSSH2.sh --archs="x86_64" --platform=macosx --min-version=11.5
8+
./iSSH2.sh --archs=x86_64 --platform=macosx --min-version=11.5
9+
10+
11+
Next step:
12+
Download:
13+
https://github.com/curl/curl
14+
15+
cd to folder and enter:
16+
17+
export ARCH=x86_64
18+
export SDK=macosx
19+
export DEPLOYMENT_TARGET=12
20+
21+
export CFLAGS="-arch $ARCH -isysroot $(xcrun -sdk $SDK --show-sdk-path) -m$SDK-version-min=$DEPLOYMENT_TARGET"
22+
23+
Then (replace my path with your path where you copied iSSH2):
24+
25+
./configure --host=x86_64-apple-darwin --prefix $(pwd)/artifacts -with-libssh2=/Users/thomasmaul/Documents/Development/iSSH2/libssh2_macosx --disable-shared --with-openssl=/Users/thomasmaul/Documents/Development/openssl-1.1.1m
26+
27+
Followed by:
28+
29+
make -j8
30+
make install
31+
32+
Now you have in the curl folder a subfolder named artefacts/bin and there you find "curl", which is the just build version.
33+
Last step:
34+
Copy it into your destination folder, such as resources and sign it. (Modify the path below fitting to your path), also use your certificate name:
35+
36+
codesign --sign "Developer ID Application: 4D Deutschland GmbH" /Users/thomas/Documents/4D/Komponenten/FileTransfer_Curl/optional/curl_Mac_precompiled/curl
37+

optional/curl_Mac_precompiled/curl

3.73 MB
Binary file not shown.
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
install go (https://go.dev/doc/install)
2+
3+
Download source from releases, such as
4+
dbxcli-3.0.0.zip
5+
unzip
6+
copy source in ~/go/src/github.com/dropbox/dbxcli
7+
cd ~/go/src/github.com/dropbox/dbxcli
8+
9+
go build
10+
11+
you should have now in this folder a file named dbxli. Test if it works:
12+
13+
thomas ~/go/src/github.com/dropbox/dbxcli $ ./dbxcli version
14+
dbxcli version: 0.1.0
15+
SDK version: 5.4.0
16+
Spec version: 097e9ba
17+
18+
Last step:
19+
Copy it into your destination folder, such as resources and sign it. (Modify the path below fitting to your path), also use your certificate name:
20+
21+
codesign --force --options runtime --sign "Developer ID Application: 4D Deutschland GmbH" /Users/thomas/Documents/4D/Komponenten/FileTransfer_Curl/optional/dbxcli_Mac_precompiled/dbxcli
9.38 MB
Binary file not shown.

0 commit comments

Comments
 (0)