diff --git a/OSX Deployment Collator.bat b/OSX Deployment Collator.bat index 24d6d59..9f9ba6d 100755 --- a/OSX Deployment Collator.bat +++ b/OSX Deployment Collator.bat @@ -1,29 +1,54 @@ +REM This is a batch file to automate the process of making +REM an easy-to-download copy of the OSX UnoJoy! files. +REM It only works on Windows, and requires that you have +REM 7-Zip installed on your system. If you don't have 7-Zip, +REM well, you should go do that. + @echo off -if exist UnoJoy.h ( +set archiveName=UnoJoyOSX-%date:~-10,2%-%date:~-7,2%-%date:~-4,4%.zip +if exist UnoJoy/UnoJoy.h ( echo Found UnoJoy. echo. echo Collecting OSX files.. REM Don't add in the Windows batchisp files - xcopy /i /y "ATmega8u2Code\HexFiles\*.hex" "UnoJoyOSX\ATmega8u2Code\HexFiles" - xcopy /i /y "ATmega8u2Code\HexFiles\dfu-*" "UnoJoyOSX\ATmega8u2Code\HexFiles" + xcopy /i /y "UnoJoy\ATmega8u2Code\HexFiles\*.hex" "temp\UnoJoy\ATmega8u2Code\HexFiles" + xcopy /i /y "UnoJoy\ATmega8u2Code\HexFiles\dfu-*" "temp\UnoJoy\ATmega8u2Code\HexFiles" - xcopy /i /y "ATmega8u2Code" "UnoJoyOSX/ATmega8u2Code" - xcopy /i /y /s "LionUnoJoyDrivers.pkg" "UnoJoyOSX/LionUnoJoyDrivers.pkg" - xcopy /i /y /s "SnowLeopardUnoJoyDrivers.pkg" "UnoJoyOSX/SnowLeopardUnoJoyDrivers.pkg" - xcopy /i /y /s Examples "UnoJoyOSX/Examples" - xcopy /i /y /s UnoJoyArduinoSample "UnoJoyOSX/UnoJoyArduinoSample" + xcopy /i /y "UnoJoy/ATmega8u2Code" "temp/UnoJoy/ATmega8u2Code" + xcopy /i /y /s "Drivers/LionUnoJoyDrivers.pkg" "temp/UnoJoy/LionUnoJoyDrivers.pkg" + xcopy /i /y /s "Drivers/SnowLeopardUnoJoyDrivers.pkg" "temp/UnoJoy/SnowLeopardUnoJoyDrivers.pkg" + + xcopy /i /y /s "UnoJoy/Examples" "temp/UnoJoy/Examples" + xcopy /i /y /s "UnoJoy/UnoJoyArduinoSample" "temp/UnoJoy/UnoJoyArduinoSample" REM Don't add in the Windows visualizer files - xcopy /i /y "UnoJoyProcessingVisualizer/data" "UnoJoyOSX/UnoJoyProcessingVisualizer/data" - xcopy /i /y /s "UnoJoyProcessingVisualizer/UnoJoyProcessingVisualizer.app" "UnoJoyOSX/UnoJoyProcessingVisualizer/UnoJoyProcessingVisualizer.app" - xcopy /i /y "UnoJoyProcessingVisualizer\*.pde" "UnoJoyOSX/UnoJoyProcessingVisualizer" + xcopy /i /y "UnoJoy/UnoJoyProcessingVisualizer/data" "temp/UnoJoy/UnoJoyProcessingVisualizer/data" + xcopy /i /y /s "UnoJoy/UnoJoyProcessingVisualizer/UnoJoyProcessingVisualizer.app" "temp/UnoJoy/UnoJoyProcessingVisualizer/UnoJoyProcessingVisualizer.app" + xcopy /i /y "UnoJoy/UnoJoyProcessingVisualizer\*.pde" "temp/UnoJoy/UnoJoyProcessingVisualizer" REM Only take the OSX root files + copy /y "README.md" "temp\UnoJoy\README.txt" + copy /y "UnoJoy\TurnIntoAJoystick.command" "temp\UnoJoy\TurnIntoAJoystick.command" + copy /y "UnoJoy\TurnIntoAJoystick.command" "temp\UnoJoy\TurnIntoAJoystick.command" + copy /y "UnoJoy\TurnIntoAnArduino.command" "temp\UnoJoy\TurnIntoAnArduino.command" + copy /y "UnoJoy\UnoJoy.h" "temp/UnoJoy/UnoJoy.h" + + copy /y "Drivers\MountainLionUnoJoyDrivers.pkg" "temp\UnoJoy\MountainLionUnoJoyDrivers.pkg" + copy /y "Drivers\YosemiteUnoJoyDrivers.pkg" "temp\UnoJoy\YosemiteUnoJoyDrivers.pkg" + + + REM Move up a directory + cd temp/ + + REM Zip up all the files + 7z a "archive.zip" "UnoJoy" -o/../.. + + cd .. + + copy /y "temp\archive.zip" %archiveName% - copy /y README-GettingStarted.txt "UnoJoyOSX/README-GettingStarted.txt" - copy /y TurnIntoAJoystick.bat "UnoJoyOSX/TurnIntoAJoystick.command" - copy /y TurnIntoAnArduino.bat "UnoJoyOSX/TurnIntoAnArduino.command" - copy /y UnoJoy.h "UnoJoyOSX/UnoJoy.h" + REM Delete the files, now that we've got them in a zip file + rmdir temp /s /q ) else ( echo Didn't find UnoJoy... diff --git a/Windows Deployment Collator.bat b/Windows Deployment Collator.bat index 5a733c8..5377408 100755 --- a/Windows Deployment Collator.bat +++ b/Windows Deployment Collator.bat @@ -11,31 +11,39 @@ if exist "UnoJoy/UnoJoy.h" ( echo. echo Collecting Windows files.. REM Don't add in the OSX dfu-programmer files - xcopy /i /y "UnoJoy\ATmega8u2Code\HexFiles\*.hex" "UnoJoyWin\ATmega8u2Code\HexFiles" - xcopy /i /y "UnoJoy\ATmega8u2Code\HexFiles\*.exe" "UnoJoyWin\ATmega8u2Code\HexFiles" + xcopy /i /y "UnoJoy\ATmega8u2Code\HexFiles\*.hex" "temp\UnoJoy\ATmega8u2Code\HexFiles" + xcopy /i /y "UnoJoy\ATmega8u2Code\HexFiles\*.exe" "temp\UnoJoy\ATmega8u2Code\HexFiles" - xcopy /i /y "UnoJoy/ATmega8u2Code" "UnoJoyWin/ATmega8u2Code" - xcopy /i /y /s "Drivers/Windows" "UnoJoyWin/Drivers/Windows" - xcopy /i /y /s "UnoJoy/Examples" "UnoJoyWin/Examples" - xcopy /i /y /s "UnoJoy/UnoJoyArduinoSample" "UnoJoyWin/UnoJoyArduinoSample" + xcopy /i /y "UnoJoy/ATmega8u2Code" "temp/UnoJoy/ATmega8u2Code" + xcopy /i /y /s "Drivers/Windows" "temp/UnoJoy/Drivers/Windows" + xcopy /i /y /s "UnoJoy/Examples" "temp/UnoJoy/Examples" + xcopy /i /y /s "UnoJoy/UnoJoyArduinoSample" "temp/UnoJoy/UnoJoyArduinoSample" REM Don't add in the OSX visualizer files - xcopy /i /y "UnoJoy/UnoJoyProcessingVisualizer/data" "UnoJoyWin/UnoJoyProcessingVisualizer/data" - xcopy /i /y "UnoJoy/UnoJoyProcessingVisualizer/lib" "UnoJoyWin/UnoJoyProcessingVisualizer/lib" - xcopy /i /y "UnoJoy/UnoJoyProcessingVisualizer" "UnoJoyWin/UnoJoyProcessingVisualizer" + xcopy /i /y "UnoJoy/UnoJoyProcessingVisualizer/data" "temp/UnoJoy/UnoJoyProcessingVisualizer/data" + xcopy /i /y "UnoJoy/UnoJoyProcessingVisualizer/lib" "temp/UnoJoy/UnoJoyProcessingVisualizer/lib" + xcopy /i /y "UnoJoy/UnoJoyProcessingVisualizer" "temp/UnoJoy/UnoJoyProcessingVisualizer" REM Only take the Windows root files - copy /y "README.md" "UnoJoyWin/README.txt" - copy /y "UnoJoy\TurnIntoAJoystick.bat" "UnoJoyWin/TurnIntoAJoystick.bat" - copy /y "UnoJoy\TurnIntoAnArduino.bat" "UnoJoyWin/TurnIntoAnArduino.bat" - copy /y "UnoJoy\UnoJoy.h" "UnoJoyWin/UnoJoy.h" - copy /y "Drivers\UnoJoyDriverInstaller.bat" "UnoJoyWin/UnoJoyDriverInstaller.bat" + copy /y "README.md" "temp/UnoJoy/README.txt" + copy /y "UnoJoy\TurnIntoAJoystick.bat" "temp/UnoJoy/TurnIntoAJoystick.bat" + copy /y "UnoJoy\TurnIntoAnArduino.bat" "temp/UnoJoy/TurnIntoAnArduino.bat" + copy /y "UnoJoy\UnoJoy.h" "temp/UnoJoy/UnoJoy.h" + echo "stuff" + copy /y "Drivers\UnoJoyDriverInstaller.bat" "temp/UnoJoy/UnoJoyDriverInstaller.bat" + + REM Move up a directory + cd temp/ REM Zip up all the files - 7z a %archiveName% "UnoJoyWin" + 7z a "archive.zip" "UnoJoy" -o/../.. + + cd .. + + copy /y "temp\archive.zip" %archiveName% REM Delete the files, now that we've got them in a zip file - rmdir UnoJoyWin /s /q + rmdir temp /s /q ) else ( echo Didn't find UnoJoy...