diff --git a/.gitignore b/.gitignore index 284050f..c11a104 100644 --- a/.gitignore +++ b/.gitignore @@ -2,3 +2,4 @@ out/ temp-deps/ ra1nstorm.run ra1nstorm.exe +setup.exe diff --git a/README.md b/README.md index b393808..471a3db 100644 --- a/README.md +++ b/README.md @@ -2,6 +2,9 @@ The ra1nstorm helper prepares an environment adequate for running checkra1n. +* **[Join us on Discord](https://discord.gg/e9W8cv8)** +* **[Twitter](https://twitter.com/realra1nstorm)** + ## Stage1 Stage1 (`stage1/`) contains the Windows-part of the setup and is responsible diff --git a/stage1/idp/idp.iss b/stage1/idp/idp.iss index 3bbe9a4..0594f20 100644 --- a/stage1/idp/idp.iss +++ b/stage1/idp/idp.iss @@ -3,12 +3,12 @@ ; http://mitrichsoftware.wordpress.com/ ; https://code.google.com/p/inno-download-plugin/ -#define IDPROOT ExtractFilePath(__PATHFILENAME__) +#define IDPROOT "idp\" #ifdef UNICODE - #pragma include __INCLUDE__ + ";" + IDPROOT + "\unicode" + #pragma include __INCLUDE__ + ";" + IDPROOT + "unicode" #else - #pragma include __INCLUDE__ + ";" + IDPROOT + "\ansi" + #pragma include __INCLUDE__ + ";" + IDPROOT + "ansi" #endif ; If IDP_DEBUG is defined before including idp.iss, script will use debug version of idp.dll (not included, you need to build it yourself). @@ -20,9 +20,9 @@ #endif #ifdef UNICODE - #define IDPDLLDIR IDPROOT + "\unicode" + DBGSUFFIX + #define IDPDLLDIR IDPROOT + "unicode" + DBGSUFFIX #else - #define IDPDLLDIR IDPROOT + "\ansi" + DBGSUFFIX + #define IDPDLLDIR IDPROOT + "ansi" + DBGSUFFIX #endif #define IDP_VER_MAJOR @@ -31,7 +31,7 @@ #define IDP_VER_BUILD #expr ParseVersion(IDPDLLDIR + "\idp.dll", IDP_VER_MAJOR, IDP_VER_MINOR, IDP_VER_REV, IDP_VER_BUILD) -#define IDP_VER EncodeVer(IDP_VER_MAJOR, IDP_VER_MINOR, IDP_VER_REV, IDP_VER_BUILD) +;#define IDP_VER EncodeVer(IDP_VER_MAJOR, IDP_VER_MINOR, IDP_VER_REV, IDP_VER_BUILD) #define IDP_VER_STR GetFileVersion(IDPDLLDIR + "\idp.dll") @@ -659,4 +659,4 @@ begin idpInitMessages; end; -#include +#include "ansi\idplang\default.iss" diff --git a/stage1/main.iss b/stage1/main.iss index 44aba35..0b48a8d 100644 --- a/stage1/main.iss +++ b/stage1/main.iss @@ -1,24 +1,28 @@ +#pragma include __INCLUDE__ + ";" + "idp\" [Setup] AppName = ra1nstorm +AppVerName = 0.9 AppVersion = 0.9 -DefaultDirName = {pf}\ra1nstorm +DefaultDirName = {sd}\ra1nstorm DefaultGroupName = ra1nstorm +DisableDirPage = yes ; Size of files to download: OutputDir = ..\ #include "idp\idp.iss" -[Icons] -Name: "{group}\{cm:UninstallProgram,ra1nstorm}"; Filename: "{uninstallexe}" +[Files] +Source: "..\ra1nstorm.run"; DestDir: "{app}" -[UninstallDelete] +[Run] +Filename: "{tmp}\ra1nlinux\wubi.exe"; Parameters: "--size=64000 --dimagepath=xubuntu-18.04.2-desktop-amd64.iso" [Code] procedure InitializeWizard(); begin - idpAddFile('http://127.0.0.1/test1.zip', ExpandConstant('{tmp}\test1.zip')); - idpAddFile('http://127.0.0.1/test2.zip', ExpandConstant('{tmp}\test2.zip')); - idpAddFile('http://127.0.0.1/test3.zip', ExpandConstant('{tmp}\test3.zip')); + CreateDir(ExpandConstant('{tmp}\ra1nlinux')); + idpAddFile('https://github.com/hakuna-m/wubiuefi/releases/download/18042r333/wubi18042r333.exe', ExpandConstant('{tmp}\ra1nlinux\wubi.exe')); + idpAddFile('http://mirror.us.leaseweb.net/ubuntu-cdimage/xubuntu/releases/18.04/release/xubuntu-18.04.2-desktop-amd64.iso', ExpandConstant('{tmp}\ra1nlinux\xubuntu-18.04.2-desktop-amd64.iso')); idpDownloadAfter(wpReady); end; diff --git a/stage2/BootVM.sh b/stage2/BootVM.sh index ef474c7..1500e98 100755 --- a/stage2/BootVM.sh +++ b/stage2/BootVM.sh @@ -1,5 +1,10 @@ #!/bin/bash +if [ "$(id -u)" != 0 ]; then + echo "Run as root." + exec sudo $0 +fi + cd /opt/ra1nstorm . vmprepare.sh . vmconfig.sh