Browse Source

PR #8

pull/11/head
R4SAS 7 years ago
parent
commit
0ae9827e22
  1. 14
      linux/README.md
  2. 12
      linux/build/build.sh
  3. 6
      windows/build/build.cmd

14
linux/README.md

@ -1,24 +1,24 @@
I2Pd Browser Portable builder for Linux I2Pd Browser Portable builder for Linux
===== =====
This is script-based builder of I2Pd Browser Portable This is a script-based builder of I2Pd Browser Portable
What works now What works now
----- -----
* Auto detecting system language * Auto detecting system language
* Auto detecting architecture * Auto detecting architecture
* Pre-configuring FireFox to use with I2Pd * Pre-configuring Firefox to use with I2Pd
* Auto downloading NoScript extension * Auto downloading NoScript extension
How to use How to use
----- -----
1. Build preconfigured FireFox using script `build.sh` from `build` folder 1. Build pre-configured Firefox using script `build.sh` from `build` folder
2. Run i2pd by executing `./i2pd` from `i2pd` folder 2. Run I2Pd by executing `./i2pd` from `i2pd` folder
3. Run FireFox by executing `./firefox-portable` 3. Run Firefox by executing `./firefox-portable`
Additional info Additional info
----- -----
`./i2pd` from `i2pd` folder starts screen session with i2pd in it. `./i2pd` from `i2pd` folder starts a screen session with i2pd in it.
To stop i2pd router you can use command `Start graceful shutdown` of `Force shutdown` To stop the i2pd router you can use the commands `Start graceful shutdown` or `Force shutdown`
from i2pd webconsole page `http://127.0.0.1:7070/?page=commands` from i2pd webconsole page `http://127.0.0.1:7070/?page=commands`
SHA512SUMS created with `find * -type f -print0 | xargs -0 -i sha512sum {}` command SHA512SUMS created with `find * -type f -print0 | xargs -0 -i sha512sum {}` command

12
linux/build/build.sh

@ -14,11 +14,11 @@ ftpmirror="https://ftp.mozilla.org/pub/$application/releases/$version"
curlfind=$(which curl) curlfind=$(which curl)
if [ -z $curlfind ]; then if [ -z $curlfind ]; then
echo "Can't find 'cURL' installed. That script needs it!"; echo "'cURL' does not seem to be installed. The script needs it!";
exit 1; exit 1;
fi fi
echo "This script prepearing $application $version for use with I2Pd" echo "This script is preparing $application $version for use with I2Pd"
file="$application-$version.tar.bz2" file="$application-$version.tar.bz2"
filepath="linux-$arch/$language/$file" filepath="linux-$arch/$language/$file"
@ -26,13 +26,13 @@ filepath="linux-$arch/$language/$file"
echo "Downloading $application..." echo "Downloading $application..."
curl -L -f -# -O $ftpmirror/$filepath curl -L -f -# -O $ftpmirror/$filepath
if [ $? -ne 0 ]; then # Not found error, trying to cut language variable if [ $? -ne 0 ]; then # Not found error, trying to cut language variable
echo "[TRY 2] I'll try download Firefox with shortener language code"; echo "[TRY 2] I'll try downloading Firefox with shorter language code";
language=$(echo $language | cut -c-2) language=$(echo $language | cut -c-2)
# re-create variable with cutted lang # re-create variable with cutted lang
filepath="linux-$arch/$language/$file" filepath="linux-$arch/$language/$file"
curl -L -f -# -O $ftpmirror/$filepath curl -L -f -# -O $ftpmirror/$filepath
if [ $? -ne 0 ]; then # Not found error, trying to download english version if [ $? -ne 0 ]; then # Not found error, trying to download english version
echo "[TRY 3] I'll try download Firefox with English language code"; echo "[TRY 3] I'll try downloading Firefox with the English language code";
language="en_US" language="en_US"
# re-create lang variable # re-create lang variable
filepath="linux-$arch/$language/$file" filepath="linux-$arch/$language/$file"
@ -45,7 +45,7 @@ if [ $? -ne 0 ]; then # Not found error, trying to cut language variable
fi fi
if [ ! -f $file ]; then if [ ! -f $file ]; then
echo "[Error] Can't find downloaded file. Is it really exists?" echo "[Error] Can't find downloaded file. Does it really exist?"
exit 1; exit 1;
fi fi
@ -85,7 +85,7 @@ echo "Downloading NoScript extension..."
curl -L -f -# -O https://addons.mozilla.org/firefox/downloads/latest/noscript/addon-722-latest.xpi curl -L -f -# -O https://addons.mozilla.org/firefox/downloads/latest/noscript/addon-722-latest.xpi
mv addon-722-latest.xpi ../app/browser/extensions/{73a6fe31-595d-460b-a920-fcc0f8843232}.xpi mv addon-722-latest.xpi ../app/browser/extensions/{73a6fe31-595d-460b-a920-fcc0f8843232}.xpi
echo "Adding standart configs..." echo "Adding standard configs..."
cp profile/* ../data/ cp profile/* ../data/
mkdir -p ../app/browser/defaults mkdir -p ../app/browser/defaults
cp -r preferences ../app/browser/defaults/ cp -r preferences ../app/browser/defaults/

6
windows/build/build.cmd

@ -36,7 +36,7 @@ echo.
if "%locale%"=="Russian" ( if "%locale%"=="Russian" (
echo <EFBFBD> á¯ ª®¢ª  ãáâ ­®¢é¨ª  ¨ 㤠«¥­¨¥ ­¥ ­ã¦­ëå ä ©«®¢ echo <EFBFBD> á¯ ª®¢ª  ãáâ ­®¢é¨ª  ¨ 㤠«¥­¨¥ ­¥ ­ã¦­ëå ä ©«®¢
) else ( ) else (
echo Unpacking the installer and delete unnecessary files echo Unpacking the installer and deleting unnecessary files
) )
7z x -y -o..\Firefox FirefoxPortableESR_%FFversion%_%locale%.paf.exe > nul 7z x -y -o..\Firefox FirefoxPortableESR_%FFversion%_%locale%.paf.exe > nul
@ -127,9 +127,9 @@ xcopy /E /I /Y i2pd ..\i2pd > nul
echo. echo.
if "%locale%"=="Russian" ( if "%locale%"=="Russian" (
echo I2Pd Browser portable £®â®¢ ª § ¯ãáªã! echo I2Pd Browser Portable £®â®¢ ª § ¯ãáªã!
) else ( ) else (
echo I2Pd Browser portable is ready to start! echo I2Pd Browser Portable is ready to start!
) )
pause pause
exit exit

Loading…
Cancel
Save