mirror of
https://github.com/Maschell/hid_to_vpad.git
synced 2024-12-22 11:21:49 +01:00
Optimized the travis build script
This commit is contained in:
parent
aa3849b31f
commit
c22ba1d5c0
92
.travis.yml
92
.travis.yml
@ -1,90 +1,55 @@
|
||||
language: c
|
||||
|
||||
sudo: false
|
||||
|
||||
branches:
|
||||
except:
|
||||
- /^*-v[0-9]/
|
||||
- /^build-[0-9a-z\-]*/
|
||||
os:
|
||||
- linux
|
||||
|
||||
notifications:
|
||||
email: false
|
||||
env:
|
||||
global:
|
||||
- DEVKITPRO=$HOME/devkitPro
|
||||
- DEVKITPPC=${DEVKITPRO}/devkitPPC
|
||||
|
||||
cache:
|
||||
apt: true
|
||||
directories:
|
||||
- "/home/travis/devkitPro"
|
||||
|
||||
before_cache:
|
||||
- rm -rf $DEVKITPRO/*.7z
|
||||
- rm -rf $DEVKITPRO/*.bz2
|
||||
- rm -rf $DEVKITPRO/examples
|
||||
- ${DEVKITPRO}
|
||||
|
||||
addons:
|
||||
apt:
|
||||
packages:
|
||||
- p7zip-full
|
||||
- zip
|
||||
- zip
|
||||
|
||||
before_install:
|
||||
- export DEVKITPRO=/home/travis/devkitPro
|
||||
- export DEVKITPPC=${DEVKITPRO}/devkitPPC
|
||||
- export DEVKITTMP=${DEVKITPRO}/tmp
|
||||
- mkdir -p $DEVKITPRO
|
||||
- mkdir -p $DEVKITPRO/portlibs
|
||||
- mkdir -p $DEVKITTMP
|
||||
- cd $DEVKITPRO
|
||||
- wget -N https://raw.githubusercontent.com/Maschell/hid_to_vpad/master/other/devkitPPCupdatePPCr29.pl
|
||||
- mkdir -p "${DEVKITPRO}"
|
||||
- wget http://download.sourceforge.net/devkitpro/devkitPPC_r29-1-x86_64-linux.tar.bz2 -O devkitPPC-linux.tar.bz2
|
||||
- wget https://github.com/Maschell/dynamic_libs/archive/lib.tar.gz -O dynamic_libs.tar.gz
|
||||
- wget https://github.com/Maschell/libutils/archive/master.tar.gz -O libutils.tar.gz
|
||||
- wget https://github.com/Maschell/libgui/archive/master.tar.gz -O libgui.tar.gz
|
||||
- wget https://github.com/Maschell/controller_patcher/archive/master.tar.gz -O controller_patcher.tar.gz
|
||||
- wget https://github.com/Maschell/controller_patcher_configs/archive/master.tar.gz -O controller_patcher_configs.tar.gz
|
||||
|
||||
install:
|
||||
- cd $DEVKITPRO
|
||||
- perl devkitPPCupdatePPCr29.pl
|
||||
- cd $DEVKITTMP
|
||||
- git clone https://github.com/Maschell/dynamic_libs.git -b lib
|
||||
- cd dynamic_libs/libs
|
||||
- 7z x -y portlibs.zip
|
||||
- cp -R portlibs/* $DEVKITPRO
|
||||
- cd $DEVKITTMP/dynamic_libs
|
||||
- make -j8
|
||||
- make install
|
||||
- cd $DEVKITTMP
|
||||
- rm -rf *
|
||||
- git clone https://github.com/Maschell/libutils.git
|
||||
- cd libutils
|
||||
- make -j8
|
||||
- make install
|
||||
- cd $DEVKITTMP
|
||||
- rm -rf *
|
||||
- git clone https://github.com/Maschell/libgui.git
|
||||
- cd libgui/libs
|
||||
- 7z x -y portlibs.zip
|
||||
- cp -R portlibs/* $DEVKITPRO
|
||||
- cd $DEVKITTMP/libgui
|
||||
- make -j8
|
||||
- make install
|
||||
- cd $DEVKITTMP
|
||||
- rm -rf *
|
||||
- git clone https://github.com/Maschell/controller_patcher.git
|
||||
- cd controller_patcher
|
||||
- make -j8
|
||||
- make install
|
||||
- cd $DEVKITTMP
|
||||
- rm -rf *
|
||||
- cd $DEVKITPRO
|
||||
|
||||
before_script:
|
||||
- cd $TRAVIS_BUILD_DIR/
|
||||
- tar -xjf devkitPPC-linux.tar.bz2 -C ${DEVKITPRO}/
|
||||
- tar -xzvf dynamic_libs.tar.gz
|
||||
- tar -xzvf libutils.tar.gz
|
||||
- tar -xzvf libgui.tar.gz
|
||||
- tar -xzvf controller_patcher.tar.gz
|
||||
- tar -xzvf controller_patcher_configs.tar.gz
|
||||
- 7z x -y ./dynamic_libs-lib/libs/portlibs.zip -o${DEVKITPRO}
|
||||
- 7z x -y ./libgui-master/libs/portlibs.zip -o${DEVKITPRO}
|
||||
- (cd dynamic_libs-lib && make -j8 && make install)
|
||||
- (cd libutils-master && make -j8 && make install)
|
||||
- (cd libgui-master && make -j8 && make install)
|
||||
- (cd controller_patcher-master && make -j8 && make install)
|
||||
|
||||
script:
|
||||
- make -j8
|
||||
|
||||
before_deploy:
|
||||
- cd $TRAVIS_BUILD_DIR/
|
||||
- mkdir -p "wiiu/apps/hidtovpad"
|
||||
- mkdir -p "wiiu/apps/hidtovpad/languages"
|
||||
- mkdir -p "wiiu/controller"
|
||||
- git clone https://github.com/Maschell/controller_patcher_configs.git
|
||||
- cp ./controller_patcher_configs/*.ini ./wiiu/controller
|
||||
- cp ./controller_patcher_configs-master/*.ini ./wiiu/controller
|
||||
- cp ./languages/*.lang ./wiiu/apps/hidtovpad/languages
|
||||
- commit="$(git rev-parse --short=7 HEAD)"
|
||||
- chmod +x gitrev.sh
|
||||
@ -102,7 +67,6 @@ before_deploy:
|
||||
- git push --quiet https://$GITHUBKEY@github.com/Maschell/hid_to_vpad $GIT_TAG > /dev/null 2>&1
|
||||
- chmod +x ftpupload.sh
|
||||
- ./ftpupload.sh
|
||||
- cd $TRAVIS_BUILD_DIR/
|
||||
|
||||
deploy:
|
||||
provider: releases
|
||||
|
@ -1,250 +0,0 @@
|
||||
#!/usr/bin/perl
|
||||
#-----------------------------------------------------------------------------
|
||||
#
|
||||
# Copyright (C) 2011 - 2016
|
||||
# Michael Theall (mtheall)
|
||||
# Dave Murphy (WinterMute)
|
||||
#
|
||||
# This software is provided 'as-is', without any express or implied
|
||||
# warranty. In no event will the authors be held liable for any
|
||||
# damages arising from the use of this software.
|
||||
#
|
||||
# Permission is granted to anyone to use this software for any
|
||||
# purpose, including commercial applications, and to alter it and
|
||||
# redistribute it freely, subject to the following restrictions:
|
||||
#
|
||||
# 1. The origin of this software must not be misrepresented; you
|
||||
# must not claim that you wrote the original software. If you use
|
||||
# this software in a product, an acknowledgment in the product
|
||||
# documentation would be appreciated but is not required.
|
||||
# 2. Altered source versions must be plainly marked as such, and
|
||||
# must not be misrepresented as being the original software.
|
||||
# 3. This notice may not be removed or altered from any source
|
||||
# distribution.
|
||||
#
|
||||
#-----------------------------------------------------------------------------
|
||||
use strict;
|
||||
|
||||
my $dir = "$ENV{HOME}/devkitPro";
|
||||
my $downloader;
|
||||
my $archname;
|
||||
|
||||
if($ENV{"DEVKITPRO"} ne "")
|
||||
{
|
||||
$dir = $ENV{"DEVKITPRO"};
|
||||
}
|
||||
|
||||
if($#ARGV eq 0)
|
||||
{
|
||||
$dir = $ARGV[0];
|
||||
}
|
||||
|
||||
# Ensure full pathname
|
||||
if(!($dir =~ /^\//))
|
||||
{
|
||||
my $pwd = `pwd`;
|
||||
chomp($pwd);
|
||||
$dir = "$pwd/$dir";
|
||||
}
|
||||
|
||||
printf("devkitPPC Updater/Installer\n");
|
||||
printf("Installing to %s\n", $dir);
|
||||
|
||||
# Get OS information
|
||||
my $os = `uname`;
|
||||
my $arch = `uname -m`;
|
||||
chomp($os);
|
||||
chomp($arch);
|
||||
|
||||
# Check OS information
|
||||
if($os eq "Linux" and ($arch eq "i686" or $arch eq "x86_64"))
|
||||
{
|
||||
$downloader = "wget -q";
|
||||
$archname = $arch . "-linux";
|
||||
}
|
||||
elsif($os eq "Darwin" and ($arch eq "i386" or $arch eq "x86_64"))
|
||||
{
|
||||
$downloader = "curl -L -O -s";
|
||||
$archname = $arch . "-osx";
|
||||
}
|
||||
else
|
||||
{
|
||||
printf(STDERR "Not on Linux i686/x86_64 or Darwin i386/x86_64!\n");
|
||||
exit(1);
|
||||
}
|
||||
|
||||
# Set up directories
|
||||
if(!(-d "$dir"))
|
||||
{
|
||||
mkdir("$dir") or die $!;
|
||||
}
|
||||
|
||||
if(!(-d "$dir/libogc"))
|
||||
{
|
||||
mkdir("$dir/libogc") or die $!;
|
||||
}
|
||||
if(!(-d "$dir/examples"))
|
||||
{
|
||||
mkdir("$dir/examples") or die $!;
|
||||
}
|
||||
if(!(-d "$dir/examples/wii"))
|
||||
{
|
||||
mkdir("$dir/examples/wii") or die $!;
|
||||
}
|
||||
if(!(-d "$dir/examples/gamecube"))
|
||||
{
|
||||
mkdir("$dir/examples/gamecube") or die $!;
|
||||
}
|
||||
|
||||
# Grab update file
|
||||
if(-e "devkitProUpdatePPCr29.ini")
|
||||
{
|
||||
unlink("devkitProUpdatePPCr29.ini") or die $!;
|
||||
}
|
||||
printf("Downloading update file...");
|
||||
system($downloader . " https://raw.githubusercontent.com/Maschell/hid_to_vpad/master/other/devkitProUpdatePPCr29.ini") and die "Failed to download!";
|
||||
printf("OK!\n");
|
||||
|
||||
# Initialize versions & newVersions
|
||||
my %versions =
|
||||
(
|
||||
'devkitPPC' => 0,
|
||||
'libogc' => 0,
|
||||
'libogcfat' => 0,
|
||||
'wiiexamples' => 0,
|
||||
'cubeexamples' => 0,
|
||||
);
|
||||
my %newVersions = %versions;
|
||||
|
||||
my %files = ();
|
||||
my $current = "";
|
||||
|
||||
if(-e "$dir/dkppc-update.ini")
|
||||
{
|
||||
open(MYFILE, "<$dir/dkppc-update.ini") or die $!;
|
||||
while(<MYFILE>)
|
||||
{
|
||||
chomp;
|
||||
if($_ =~ /\[(.*)\]/)
|
||||
{
|
||||
$current = $1;
|
||||
}
|
||||
elsif($_ =~ /Version=(.*)/ and defined($versions{$current}))
|
||||
{
|
||||
$versions{$current} = $1;
|
||||
}
|
||||
elsif($_ =~ /File=(.*)/)
|
||||
{
|
||||
$files{$current} = $1;
|
||||
}
|
||||
}
|
||||
close(MYFILE);
|
||||
}
|
||||
|
||||
my %newFiles = ();
|
||||
|
||||
open(MYFILE, "<devkitProUpdatePPCr29.ini") or die $!;
|
||||
while(<MYFILE>)
|
||||
{
|
||||
chomp;
|
||||
if($_ =~ /\[(.*)\]/)
|
||||
{
|
||||
$current = $1;
|
||||
}
|
||||
elsif($_ =~ /Version=(.*)/ and defined($newVersions{$current}))
|
||||
{
|
||||
$newVersions{$current} = $1;
|
||||
}
|
||||
elsif($_ =~ /File=(.*)/)
|
||||
{
|
||||
$newFiles{$current} = $1;
|
||||
}
|
||||
}
|
||||
close(MYFILE);
|
||||
unlink("devkitProUpdatePPCr29.ini") or die $!;
|
||||
|
||||
# see what to update
|
||||
my %updates = ();
|
||||
foreach my $key (keys %versions)
|
||||
{
|
||||
if($versions{$key} ne $newVersions{$key} and $newVersions{$key} ne 0)
|
||||
{
|
||||
$newFiles{$key} =~ s/win32\.exe/$archname.tar.bz2/;
|
||||
$updates{$key} = $newFiles{$key};
|
||||
}
|
||||
else
|
||||
{
|
||||
printf("%s is up-to-date\n", $key);
|
||||
}
|
||||
}
|
||||
|
||||
# Download files
|
||||
foreach my $key (keys %updates)
|
||||
{
|
||||
printf("Update %s with %s\n", $key, $updates{$key});
|
||||
if(-e $updates{$key})
|
||||
{
|
||||
unlink($updates{$key});
|
||||
}
|
||||
|
||||
my $cmd = sprintf("%s http://download.sourceforge.net/devkitpro/%s", $downloader, $updates{$key});
|
||||
printf(" Downloading...");
|
||||
system($cmd) and die "Failed to download $updates{$key}\n";
|
||||
printf("OK!\n");
|
||||
}
|
||||
|
||||
# Install files
|
||||
my %install =
|
||||
(
|
||||
'devkitPPC' => '',
|
||||
'libogc' => 'libogc',
|
||||
'libogcfat' => 'libogc',
|
||||
'wiiexamples' => 'examples/wii',
|
||||
'cubeexamples' => 'examples/gamecube',
|
||||
);
|
||||
|
||||
foreach my $key (keys %updates)
|
||||
{
|
||||
my $cmd = sprintf("tar -xjf %s -C $dir/%s", $updates{$key}, $install{$key});
|
||||
printf("Extracting %s...", $updates{$key});
|
||||
system($cmd) and die "Failed\n";
|
||||
printf("OK!\n");
|
||||
}
|
||||
|
||||
# Output update info
|
||||
open(MYFILE, ">$dir/dkppc-update.ini") or die $!;
|
||||
foreach my $key (keys %newVersions)
|
||||
{
|
||||
printf(MYFILE "[%s]\n", $key);
|
||||
printf(MYFILE "Version=%s\n", $newVersions{$key});
|
||||
printf(MYFILE "File=%s\n", $newFiles{$key});
|
||||
printf(MYFILE "\n");
|
||||
}
|
||||
close(MYFILE);
|
||||
|
||||
# Check environment variables
|
||||
printf("Checking DEVKITPRO...");
|
||||
my $env = `echo \$DEVKITPRO`;
|
||||
chomp($env);
|
||||
if($env ne "$dir")
|
||||
{
|
||||
printf("Please set DEVKITPRO in your environment as $dir\n");
|
||||
}
|
||||
else
|
||||
{
|
||||
printf("OK!\n");
|
||||
}
|
||||
|
||||
printf("Checking DEVKITPPC...");
|
||||
$env = `echo \$DEVKITPPC`;
|
||||
chomp($env);
|
||||
if($env ne "$dir/devkitPPC")
|
||||
{
|
||||
printf("Please set DEVKITPPC in your environment as \${DEVKITPRO}/devkitPPC\n");
|
||||
}
|
||||
else
|
||||
{
|
||||
printf("OK!\n");
|
||||
}
|
||||
|
||||
exit(0);
|
@ -1,147 +0,0 @@
|
||||
[devkitProUpdate]
|
||||
Build=46
|
||||
URL=http://downloads.sourceforge.net/devkitpro
|
||||
Filename=devkitProUpdater-1.6.0.exe
|
||||
|
||||
[msys]
|
||||
Version=1.0.17-1
|
||||
File=msys-1.0.17-1.exe
|
||||
Size=118660
|
||||
|
||||
[devkitARM]
|
||||
Version=46
|
||||
File=devkitARM_r46-win32.exe
|
||||
Size=70461
|
||||
|
||||
[devkitPPC]
|
||||
Version=29-1
|
||||
File=devkitPPC_r29-1-win32.exe
|
||||
Size=65356
|
||||
|
||||
[devkitPSP]
|
||||
Version=16-1
|
||||
File=devkitPSP_r16-1-win32.exe
|
||||
Size=70915
|
||||
|
||||
[pspdoc]
|
||||
Version=20051113
|
||||
File=pspsdk-doc-20051113.tar.bz2
|
||||
Size=9344
|
||||
|
||||
[libgba]
|
||||
Version=0.5.0
|
||||
File=libgba-0.5.0.tar.bz2
|
||||
Size=268
|
||||
|
||||
[libgbafat]
|
||||
Version=1.1.0
|
||||
File=libfat-gba-1.1.0.tar.bz2
|
||||
Size=241
|
||||
|
||||
[maxmodgba]
|
||||
Version=1.0.10
|
||||
File=maxmod-gba-1.0.10.tar.bz2
|
||||
Size=
|
||||
|
||||
[libnds]
|
||||
Version=1.6.2
|
||||
File=libnds-1.6.2.tar.bz2
|
||||
Size=470
|
||||
|
||||
[libndsfat]
|
||||
Version=1.1.0
|
||||
File=libfat-nds-1.1.0.tar.bz2
|
||||
Size=272
|
||||
|
||||
[maxmodds]
|
||||
Version=1.0.10
|
||||
File=maxmod-nds-1.0.10.tar.bz2
|
||||
Size=
|
||||
|
||||
[dswifi]
|
||||
Version=0.4.0
|
||||
File=dswifi-0.4.0.tar.bz2
|
||||
Size=496
|
||||
|
||||
[libctru]
|
||||
Version=1.2.1
|
||||
File=libctru-1.2.1.tar.bz2
|
||||
Size=371
|
||||
|
||||
[citro3d]
|
||||
Version=1.2.0
|
||||
File=citro3d-1.2.0.tar.bz2
|
||||
Size=371
|
||||
|
||||
[libmirko]
|
||||
Version=0.9.7
|
||||
File=libmirko-0.9.7.tar.bz2
|
||||
Size=1056
|
||||
|
||||
[libogc]
|
||||
Version=1.8.16
|
||||
File=libogc-1.8.16.tar.bz2
|
||||
Size=2748
|
||||
|
||||
[libogcfat]
|
||||
Version=1.1.0
|
||||
File=libfat-ogc-1.1.0.tar.bz2
|
||||
Size=481
|
||||
|
||||
[pnotepad]
|
||||
Version=2.0.8.718
|
||||
File=pn2.0.8.718.zip
|
||||
Size=4958
|
||||
|
||||
[insight]
|
||||
Version=7.3.50.20110803
|
||||
File=insight-7.3.50.20110803-cvs.exe
|
||||
Size=32932
|
||||
|
||||
[ndsexamples]
|
||||
Version=20170124
|
||||
File=nds-examples-20170124.tar.bz2
|
||||
Size=1191
|
||||
|
||||
[defaultarm7]
|
||||
Version=0.7.1
|
||||
File=default_arm7-0.7.1.tar.bz2
|
||||
Size=9
|
||||
|
||||
[filesystem]
|
||||
Version=0.9.13-1
|
||||
File=libfilesystem-0.9.13-1.tar.bz2
|
||||
Size=9
|
||||
|
||||
[gbaexamples]
|
||||
Version=20170228
|
||||
File=gba-examples-20170228.tar.bz2
|
||||
Size=1019
|
||||
|
||||
[gp32examples]
|
||||
Version=20051021
|
||||
File=gp32-examples-20051021.tar.bz2
|
||||
Size=732
|
||||
|
||||
[cubeexamples]
|
||||
Version=20170228
|
||||
File=gamecube-examples-20170228.tar.bz2
|
||||
Size=198
|
||||
|
||||
[wiiexamples]
|
||||
Version=20170228
|
||||
File=wii-examples-20170228.tar.bz2
|
||||
Size=93
|
||||
|
||||
[3dsexamples]
|
||||
Version=20170226
|
||||
File=3ds-examples-20170226.tar.bz2
|
||||
Size=93
|
||||
|
||||
[gcube]
|
||||
Version=0.4.0
|
||||
File=gcube-0.4.0-win32.tar.bz2
|
||||
Size=1234
|
||||
|
||||
[Settings]
|
||||
RTL=0
|
Loading…
Reference in New Issue
Block a user