diff --git a/.gitignore b/.gitignore index ec74b0fa49..3196fa9e88 100644 --- a/.gitignore +++ b/.gitignore @@ -26,3 +26,8 @@ src/common/scm_rev.cpp # Windows global filetypes Thumbs.db +# QtIFW builds +dist/installer/redist +dist/installer/citra-installer* +dist/installer/*.zip +dist/installer/*.tar.gz diff --git a/dist/installer/README.md b/dist/installer/README.md new file mode 100644 index 0000000000..984c5a58f9 --- /dev/null +++ b/dist/installer/README.md @@ -0,0 +1,30 @@ +Citra Qt Installer +================== + +This contains the configuration files for building Citra's installer. + +`packages` is empty as Qt expects that it gets a valid directory for offline + packages, even if you are a online-only installer. + +Installers can only be built on the platform that they are targeting. + +Windows +------- + +Using Powershell 2.0 (Windows 10): + +```powershell +cd dist\installer +powershell –ExecutionPolicy Bypass .\build.ps1 +``` + +Linux/Mac +--------- + +Curl + Bash must be available. + +```bash +cd dist/installer +chmod +x build.sh +./build.sh +``` diff --git a/dist/installer/build.ps1 b/dist/installer/build.ps1 new file mode 100644 index 0000000000..22be17f04e --- /dev/null +++ b/dist/installer/build.ps1 @@ -0,0 +1,14 @@ +if (!(Test-Path redist\installerbase_win.exe)) { + echo "Downloading dependencies..." + if (!(Test-Path redist)) { + New-Item -path . -name redist -itemtype directory + } + Invoke-WebRequest -Uri "https://github.com/citra-emu/ext-windows-bin/raw/master/qtifw/windows.zip" -OutFile windows.zip + echo "Extracting..." + Expand-Archive windows.zip -DestinationPath redist +} else { + echo "Found pre-downloaded redist." +} + +echo "Building Qt Installer to '.\citra-installer-windows.exe'..." +.\redist\binarycreator_win.exe -t .\redist\installerbase_win.exe -n -c .\config\config_windows.xml -p .\packages\ citra-installer-windows diff --git a/dist/installer/build.sh b/dist/installer/build.sh new file mode 100755 index 0000000000..ea5c0af479 --- /dev/null +++ b/dist/installer/build.sh @@ -0,0 +1,36 @@ +#!/bin/bash + +set -e + +PLATFORM="" +if [[ "$OSTYPE" == "linux-gnu" ]]; then + PLATFORM="linux" +elif [[ "$OSTYPE" == "darwin"* ]]; then + PLATFORM="mac" +else + echo Your platform is not supported. + exit 1 +fi + +if [ ! -f redist/installerbase_$PLATFORM ]; then + echo Downloading dependencies... + curl -L -O https://github.com/citra-emu/ext-windows-bin/raw/master/qtifw/$PLATFORM.tar.gz + + echo Extracting... + mkdir -p redist + cd redist + tar -zxvf ../$PLATFORM.tar.gz + cd .. + + chmod +x redist/* +fi + +TARGET_FILE=citra-installer-$PLATFORM +CONFIG_FILE=config/config_$PLATFORM.xml +REDIST_BASE=redist/installerbase_$PLATFORM +BINARY_CREATOR=redist/binarycreator_$PLATFORM +PACKAGES_DIR=packages + +echo Building to \'$TARGET_FILE\'... + +$BINARY_CREATOR -t $REDIST_BASE -n -c $CONFIG_FILE -p $PACKAGES_DIR $TARGET_FILE diff --git a/dist/installer/config/config_linux.xml b/dist/installer/config/config_linux.xml new file mode 100644 index 0000000000..f5bcda6b1d --- /dev/null +++ b/dist/installer/config/config_linux.xml @@ -0,0 +1,18 @@ + + + Citra + 1.0.0 + Citra Updater + Citra team + + @HomeDir@/Citra + icon + icon.png + + + https://repo.citra-emu.org + 1 + Official Citra Repository + + + diff --git a/dist/installer/config/config_mac.xml b/dist/installer/config/config_mac.xml new file mode 100644 index 0000000000..6440d45f5b --- /dev/null +++ b/dist/installer/config/config_mac.xml @@ -0,0 +1,18 @@ + + + Citra + 1.0.0 + Citra Updater + Citra team + + @ApplicationsDir@/Citra + icon + icon.png + + + https://repo.citra-emu.org + 1 + Official Citra Repository + + + diff --git a/dist/installer/config/config_windows.xml b/dist/installer/config/config_windows.xml new file mode 100644 index 0000000000..6527f53dec --- /dev/null +++ b/dist/installer/config/config_windows.xml @@ -0,0 +1,19 @@ + + + Citra + 1.0.0 + Citra Updater + Citra team + Citra + + @HomeDir@/AppData/Local/Citra + icon + icon.png + + + https://repo.citra-emu.org + 1 + Official Citra Repository + + + diff --git a/dist/installer/config/icon.icns b/dist/installer/config/icon.icns new file mode 100644 index 0000000000..477e0c568e Binary files /dev/null and b/dist/installer/config/icon.icns differ diff --git a/dist/installer/config/icon.ico b/dist/installer/config/icon.ico new file mode 100644 index 0000000000..c531052884 Binary files /dev/null and b/dist/installer/config/icon.ico differ diff --git a/dist/installer/config/icon.png b/dist/installer/config/icon.png new file mode 100644 index 0000000000..fd102724c1 Binary files /dev/null and b/dist/installer/config/icon.png differ diff --git a/dist/installer/packages/.gitkeep b/dist/installer/packages/.gitkeep new file mode 100644 index 0000000000..e69de29bb2