Skip to content

Commit

Permalink
try to fix linux/win ci
Browse files Browse the repository at this point in the history
  • Loading branch information
llafuente committed May 18, 2017
1 parent ac49b36 commit f8739f9
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 14 deletions.
6 changes: 3 additions & 3 deletions Scripts/ci-linux-install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@ set -ex
UNITY_TEST_TOOL_BRANCH=5.5

# try to solve some dpkg errors
sudo apt-get clean
sudo apt-get update && sudo apt-get upgrade
#sudo apt-get clean
#sudo apt-get update && sudo apt-get upgrade

wget -O unity-editor.deb 'http://beta.unity3d.com/download/59c25c92588f/unity-editor_amd64-5.5.0xp1Linux.deb'
wget -O unity-editor.deb 'http://beta.unity3d.com/download/a2454d41e248/unity-editor_amd64-5.5.3xf1Linux.deb'
# install and fix dependencies broken by installing Unity
# in the same command, because dpkg will fail...
sudo dpkg -i unity-editor.deb || sudo apt-get -y -f install
Expand Down
4 changes: 2 additions & 2 deletions Scripts/ci-windows-install.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -26,13 +26,13 @@ $password = $env:UNITY_PASSWORD

$password = $password -split ''

$pass_commands = "Send, {" + ($password[1..($password.Length-2)] -join "}`nSleep, 100`nSend, {") + "}`n"
$pass_commands = "ControlSend, , {" + ($password[1..($password.Length-2)] -join "}, Unity`nSleep, 100`nControlSend, , {") + "}, Unity`n"

$username = $env:UNITY_USERNAME

$username = $username -split ''

$user_commands = "Send, {" + ($username[1..($username.Length-2)] -join "}`nSleep, 100`nSend, {") + "}`n"
$user_commands = "ControlSend, , {" + ($username[1..($username.Length-2)] -join "}, Unity`nSleep, 100`nControlSend, , {") + "}, Unity`n"

(Get-Content C:\projects\unity-platformer\Scripts\unity.ahk).replace('; username', $user_commands).replace('; password', $pass_commands) | Set-Content C:\projects\unity-platformer\unity.ahk

Expand Down
20 changes: 11 additions & 9 deletions Scripts/unity.ahk
Original file line number Diff line number Diff line change
Expand Up @@ -18,19 +18,18 @@ SetBatchLines -1
Macro1:
LOGFile = C:\projects\unity-platformer\autohotkey.txt
Run, C:\Program Files\Unity\Editor\Unity.exe, , , PID
Sleep, 5000
Sleep, 15000
; App window in CI never get active...
FileAppend, Waited 5 seconds, %LOGFile%
FileAppend, Waited for the window to start, %LOGFile%
; A window's title can contain WinTitle anywhere inside it to be a match.
SetTitleMatchMode 2

Sleep, 3500
; username
Sleep, 100
; move to next input, password
ControlSend, , {Tab}, Unity
; password
Sleep, 100
FileAppend, typed username and password, %LOGFile%
; tab to submit
ControlSend, , {Tab}, Unity
Sleep, 100
Expand All @@ -40,15 +39,18 @@ Sleep, 100
ControlSend, , {Enter}, Unity
; wait and close
Sleep, 7500
FileAppend, Choose Unity personal, %LOGFile%
;CoordMode, Mouse, Window
ControlClick x700 y290, Unity ; Unity personal
ControlClick x700 y430, Unity ; Next
ControlClick, x700 y290, Unity ; Unity personal
ControlClick, x700 y430, Unity ; Next
Sleep, 2500
ControlClick x268 y346, Unity ; I don't use Unity in a professional capacity
ControlClick x700 y430, Unity ; Next
ControlClick, x268 y346, Unity ; I don't use Unity in a professional capacity
ControlClick, x700 y430, Unity ; Next
Sleep, 2500
ControlClick x500 y390, Unity ; Start Using Unity
FileAppend, Start Using Unity, %LOGFile%
ControlClick, x500 y390, Unity ; Start Using Unity
Sleep, 2500
WinClose, ahk_pid %PID%
FileAppend, Close window, %LOGFile%
Sleep, 333
Return

0 comments on commit f8739f9

Please sign in to comment.