Copying Cross-Compiled Files to Your Amiga for Testing

So, you’ve set up a cross-compiler, and have built some Amiga software. Now you need a fast and efficient way to copy them to an Amiga for testing.

USB flash drives are tedious and slow. We’re developers and sometimes need to test multiple versions an hour. If you’re some kind of wizard, then you could set up a samba server on your Amiga. For the rest of us, we need an easier way…

Here’s what I do: I set up ZitaFTP Server on my Amiga, and then have a special build rule in my makefile that copies files to the Amiga using CURL.

Setting Up ZitaFTP Server on the Amiga

Here’s how to set it all up. First, if you don’t have it already, then head to https://keasigmadelta.com/zitaftpserver. Download ZitaFTP Server, and install it on your machine. I’m using ZitaFTP Server because it’s easy to set up, fast, and supports end-to-end encryption, so it’s secure.

Full disclosure: I wrote ZitaFTP Server. And one of the big reasons that it exists, is because I needed an efficient way to copy cross-compiled files from my laptop to my Amiga for testing.

Once you’ve installed ZitaFTP, go into Settings => Server, and make sure you set the default permissions to execute. Otherwise you’ll have to manually make the uploaded files executable every time.

One of the downsides of FTP, is that there’s no official way to set the file permission bits. A future version of ZitaFTP Server will have a way to set the file permission bits. In the meantime, make uploaded files executable by default.

Creating the Remote Install Build Script and Rule

Now, create a remoteinstall.sh script in your Amiga software project. I recommend putting it in a Tools/ subdirectory for tidiness. Enter the script shown in the video (or join the Kea Campus as a Creator or Elite member, and download a complete template). Here’s the CURL command line:

curl-u$ftp_user-Q“-*SITE CHMOD 775 $remote_path/$remote_name-T$local_name“ftp://$ftp_addr/$remote_path/$remote_name-k–ftp-ssl-reqd

The line above uploads the the file given by $local_name to the FTP server at $remote_path, and is given the name $remote_name. The “SITE CHMOD” section sets the file’s execute permission bits with servers that support it. This will be supported in a future version of ZitaFTP Server.

Now create a “remoteinstall” build rule in your Makefile that calls this script. I recommend copying the *.debug version of the binary, because that way you get a full stack trace complete with function names and line numbers.

With all of the above done, you can now build and upload the program to your Amiga in one go by executing the following line in the terminal:

makeremoteinstall

If it doesn’t work, then compare your code with that shown in the video. or, download the template below.

Get 20-40% Off ZitaFTP Server

If you’re watching this before Oct. 12 2024, then you can get a 20-40% off ZitaFTP Server:

To get 20% off, use the following coupon code at checkout: AMIGACODER20

To get 40% off, join the Kea Campus. If you join as a Creator or Elite member, then you also get a fully downloadable template for everything you’ve seen in this video, and more.

Click here to get ZitaFTP Server.

Leave a Comment

Your email address will not be published. Required fields are marked *

 


Shopping Cart
Scroll to Top