Macro: Copy XCode project to Mac, using SSH

Previous topic - Next topic

Kitty Hello

Hi,

this amcro can be used to copy an XCode project plus the .app/Media directory to your Mac (It's the green Macro in my IDE).
You can choose wether you want to copy all (overwrite all xcode settings and plist), or just the libs and the Media (for an update).

You need the ssh and scp programs in an executable path.
I did this in a C:\Program Files\linux directory and extended the environment variable PATH by that.

I attach the files for that directory, K.

Code (glbasic) Select

:: Copy the XCode project to your Mac
:: The first line is used as a ToolTip for the button

@ECHO OFF

:: your Mac Username@mac's_IP_address
SET MYMAC=johnrambo@192.168.178.27


:: get rid of password input:
:: http://www.nsgn.net/better_iphone_tethering/setup_public_key_authentication.htm

IF "%GLB_PROJ_NAME%" == "" EXIT

SET YESNO=0
SET /P YESNO=Want to update everything? (1/0)
IF %YESNO% EQU 0 GOTO skip


:: remove old project application
ECHO Remove all old stuff
ssh %MYMAC% rm -rf "~/Documents/%GLB_PROJ_NAME%"


:: copy new stuff
ECHO Copy FULL XCODE Project
scp -r -p "%CYG_GLB_PROJ_PATH%/XCode/GLBasic" %MYMAC%:"~/Documents/%GLB_PROJ_NAME%/"

:skip
ECHO Copy lib
:: copy new stuff, only LIB
scp -r -p "%CYG_GLB_PROJ_PATH%/XCode/GLBasic/Lib" %MYMAC%:"~/Documents/%GLB_PROJ_NAME%/"

ECHO Copy Media
:: copy merge the current Media directory
scp -r -p "%CYG_GLB_PROJ_PATH%/%GLB_PROJ_NAME%.app/Media" %MYMAC%:"~/Documents/%GLB_PROJ_NAME%/"

ECHO Copy Default.png
:: copy the Default.png (splash screen)
scp -r -p "%CYG_GLB_PROJ_PATH%/%GLB_PROJ_NAME%.app/Default.png" %MYMAC%:"~/Documents/%GLB_PROJ_NAME%/Default.png"

pause


[attachment deleted by admin]

bigsofty

This is really cool, kinda seeing the power of using Macros now! :)

Thanks Gernot,

Cheers,

Ian.

"It is practically impossible to teach good programming style to students that have had prior exposure to BASIC.  As potential programmers, they are mentally mutilated beyond hope of regeneration."
(E. W. Dijkstra)