PortableEverything For All!!!

Should I Include An Option To Download Other Projects On First Project Release?


  • Total voters
    67

MarioMasta64

hi. i make batch stuff and portable shiz
OP
Member
Joined
Dec 21, 2016
Messages
2,297
Trophies
0
Age
26
Website
github.com
XP
2,096
Country
United States
seems i cant do this without writing a file on pc on the computer... i could backup the user's file and put a new one there but bleh. that leaves many unwanted bugs that can happen. i dont exactly want to write $PWD/home but it seems to be the only way to do this..
 
  • Like
Reactions: Blauhasenpopo

MarioMasta64

hi. i make batch stuff and portable shiz
OP
Member
Joined
Dec 21, 2016
Messages
2,297
Trophies
0
Age
26
Website
github.com
XP
2,096
Country
United States
this is what PortableEverything - Linux Edition would look like. not so pretty :c
2017-11-14-121437_1366x768_scrot.png
 
  • Like
Reactions: Blauhasenpopo

MarioMasta64

hi. i make batch stuff and portable shiz
OP
Member
Joined
Dec 21, 2016
Messages
2,297
Trophies
0
Age
26
Website
github.com
XP
2,096
Country
United States
2017-11-14-130356_1366x768_scrot.png

got redirection working turns out its really simple in java :D

--------------------- MERGED ---------------------------

first linux portable app :D
launch_minecraft_poc.sh
Code:
#!/bin/sh

clear

# grep -q -F 'export PATH=$PWD/bin:$PATH' ~/.bashrc || echo 'export PATH=$PWD/bin:$PATH' >> ~/.bashrc
# grep -q -F 'export HOME=$PWD/home' ~/.bashrc || echo 'export PATH=$PWD/bin:$PATH' >> ~/.bashrc
# ~/.bashrc

# export PATH=$PWD/bin:$PATH
# export HOME=$PWD/home

# setenv PATH=$PWD/bin:$PATHHOME=$PWD/home

# setenv HOME=$PWD/home

# export HOME=$PWD/home

# export JAVA_HOME=$PWD/home

if [ ! -d ./home/ ]; then
   mkdir ./home/
fi

if [ ! -d ./extra/ ]; then
   mkdir ./extra/
fi

make_temp_dir() {
   if [ ! -d ./temp/ ]; then
       mkdir ./temp/
   fi
}

remove_temp_dir() {
   if [ -d ./temp/ ]; then
       rm -r ./temp/
   fi
}

check_wget() {
   if [ ! -f ./bin/wget ]; then
       download_wget
   fi
}

download_wget() {
   curl https://web.archive.org/web/20100514091027/http://ftp.gnu.org/gnu/wget/wget-latest.tar.gz -o ./extra/wget-latest.tar.gz
   extract_wget
   remove_temp_dir
}

extract_wget() {
   make_temp_dir
   if [ -f ./bin/pv ]; then
       ./bin/pv ./extra/wget-latest.tar.gz | tar zxC ./temp/
       build_wget
   else
       download_pv
       extract_wget
   fi
}

build_wget() {
   ./temp/wget-1.12/configure --prefix=$PWD && make && make install
}

check_pv() {
   if [ ! -f ./bin/pv ]; then
       download_pv
   fi
}

download_pv() {
   echo pv downloader not implemented
}

check_java() {
   if [ -f ./bin/java ]; then
       java -version
    else
       download_java
       check_java
    fi
}

download_java() {
   if [ "$arch" = "64" ]; then
       ./bin/wget -O ./extra/jre-8u151-linux-x64.tar.gz http://old-school-gamer.tk/misc/jre-8u151-linux-x64.tar.gz
   else
       ./bin/wget -O ./extra/jre-8u151-linux-i586.tar.gz http://old-school-gamer.tk/misc/jre-8u151-linux-i586.tar.gz
   fi
   remove_temp_dir
   extract_java
}

extract_java() {
   make_temp_dir
   if [ "$arch" = "64" ]; then
       ./bin/pv ./extra/jre-8u151-linux-x64.tar.gz | tar zxC $PWD/temp/;
   else
       ./bin/pv ./extra/jre-8u151-linux-i586.tar.gz | tar zxC $PWD/temp/;
   fi
   copy_java
}

copy_java() {
   if [ -d ./temp/jre1.8.0_151/ ]; then
       cp -rp ./temp/jre1.8.0_151/* ./
   fi
}

check_os() {
   export arch="$(getconf LONG_BIT)"
}

check_minecraft() {
   if [ ! -f ./home/Minecraft.jar ]; then
       ./bin/wget -O ./home/Minecraft.jar http://s3.amazonaws.com/Minecraft.Download/launcher/Minecraft.jar
       check_minecraft
   else
       cd ./bin/
       java -jar -Duser.home=$PWD/../home ../home/Minecraft.jar
   fi
}

remove_temp_dir
check_wget
check_pv
check_os
check_java
echo $arch
echo $PATH
echo $HOME
check_java
check_minecraft

--------------------- MERGED ---------------------------

it seems to have issues with ./temp/ sometimes with deleting. trying to figure it out.

--------------------- MERGED ---------------------------

youll need this btw: rename it pv and place it in ./bin/ and give it executable permissions.

--------------------- MERGED ---------------------------

fixed :D
 

Attachments

  • pv.zip
    59.1 KB · Views: 393
Last edited by MarioMasta64,
  • Like
Reactions: Blauhasenpopo

MarioMasta64

hi. i make batch stuff and portable shiz
OP
Member
Joined
Dec 21, 2016
Messages
2,297
Trophies
0
Age
26
Website
github.com
XP
2,096
Country
United States
a nice little menu + ./temp/ fix and proper home folder :^)
2017-11-14-134257_1366x768_scrot.png

Code:
#!/bin/sh

clear

if [ ! -d ./home/ ]; then
   mkdir ./home/
fi

if [ ! -d ./extra/ ]; then
   mkdir ./extra/
fi

make_temp_dir() {
   if [ ! -d ./temp/ ]; then
       mkdir ./temp/
   fi
}

remove_temp_dir() {
   if [ -d ./temp/ ]; then
       rm -r -f ./temp/
   fi
}

check_wget() {
   if [ ! -f ./bin/wget ]; then
       download_wget
   fi
}

download_wget() {
   curl https://web.archive.org/web/20100514091027/http://ftp.gnu.org/gnu/wget/wget-latest.tar.gz -o ./extra/wget-latest.tar.gz
   extract_wget
   remove_temp_dir
}

extract_wget() {
   make_temp_dir
   if [ -f ./bin/pv ]; then
       ./bin/pv ./extra/wget-latest.tar.gz | tar zxC ./temp/
       build_wget
   else
       download_pv
       extract_wget
   fi
}

build_wget() {
   ./temp/wget-1.12/configure --prefix=$PWD && make && make install
}

check_pv() {
   if [ ! -f ./bin/pv ]; then
       download_pv
   fi
}

download_pv() {
   echo pv downloader not implemented
}

check_java() {
   if [ -f ./bin/java ]; then
       java -version
    else
       download_java
       check_java
    fi
}

download_java() {
   if [ "$arch" = "64" ]; then
       ./bin/wget -O ./extra/jre-8u151-linux-x64.tar.gz http://old-school-gamer.tk/misc/jre-8u151-linux-x64.tar.gz
   else
       ./bin/wget -O ./extra/jre-8u151-linux-i586.tar.gz http://old-school-gamer.tk/misc/jre-8u151-linux-i586.tar.gz
   fi
   remove_temp_dir
   extract_java
}

extract_java() {
   make_temp_dir
   if [ "$arch" = "64" ]; then
       ./bin/pv ./extra/jre-8u151-linux-x64.tar.gz | tar zxC $PWD/temp/;
   else
       ./bin/pv ./extra/jre-8u151-linux-i586.tar.gz | tar zxC $PWD/temp/;
   fi
   copy_java
}

copy_java() {
   if [ -d ./temp/jre1.8.0_151/ ]; then
       cp -rp ./temp/jre1.8.0_151/* ./
   fi
}

check_os() {
   export arch="$(getconf LONG_BIT)"
}

check_minecraft() {
   if [ ! -f ./home/Minecraft.jar ]; then
       ./bin/wget -O ./home/Minecraft.jar http://s3.amazonaws.com/Minecraft.Download/launcher/Minecraft.jar
       check_minecraft
   else
       cd ./bin/
       java -jar -Duser.home=$PWD/../home ../home/Minecraft.jar
   fi
}

init() {
   remove_temp_dir
   check_wget
   check_pv
   check_os
   check_java
   echo $arch
   echo $PATH
   echo $HOME
   check_java
}

main_menu() {
   
   while true
   do
       clear
       echo "~~~~~~~~~~~~~~~~~~~~~"   
       echo " M A I N - M E N U"
       echo "~~~~~~~~~~~~~~~~~~~~~"
       echo "1. Start Minecraft"
       echo "2. Exit"
       echo "~~~~~~~~~~~~~~~~~~~~~"
       local choice
       read -p "Enter choice [ 1 - 2] " choice
       case $choice in
           1) check_minecraft ;;
           2) exit 0;;
           *) echo -e "${RED}Error...${STD}" && sleep 2
       esac
   done
}

init
main_menu
 
  • Like
Reactions: Blauhasenpopo

MarioMasta64

hi. i make batch stuff and portable shiz
OP
Member
Joined
Dec 21, 2016
Messages
2,297
Trophies
0
Age
26
Website
github.com
XP
2,096
Country
United States
currently adapting the suite for linux and...
Code:
#!/bin/sh

# @echo off

# setlocal enabledelayedexpansion

# Color 0A

# cls
clear

init() {
   # title PORTABLE EVERYTHING LAUNCHER
   echo 'PORTABLE EVERYTHING LAUNCHER'

   # set nag=BE SURE TO TURN CAPS LOCK OFF! (never said it was on just make sure)
   export nag='BE SURE TO TURN CAPS LOCK OFF! (never said it was on just make sure)'

   # set new_version=OFFLINE_OR_NO_UPDATES
   export new_version='OFFLINE_OR_NO_UPDATES'

   # if exist replacer.bat del replacer.bat
   if [ -f replacer.sh ]; then
       rm replacer.sh
   fi
}

# :FOLDERCHECK
# cls
# if not exist .\bin\ mkdir .\bin\
# if not exist .\doc\ mkdir .\doc\
# call :VERSION
# goto CREDITS
folder_check() {
   clear
   if [ ! -d ./bin/ ]; then
       mkdir ./bin/
   fi
   if [ ! -d ./home/ ]; then
       mkdir ./home/
   fi
   if [ ! -d ./home/doc/ ]; then
       mkdir ./home/doc/
   fi
}

# :VERSION
# cls
# echo 18 > .\doc\version.txt
# set /p current_version=<.\doc\version.txt
# if exist .\doc\version.txt del .\doc\version.txt
# exit /b
version() {
   clear
   echo 1 > ./home/doc/version.txt
   while read -r LINE; do
       export current_version='$LINE'
   done < ./home/doc/version.txt
   if [-f ./home/version.txt ]; then
       rm ./home/doc/version.txt
   fi
}

# :CREDITS
# cls
# if exist .\doc\everything_license.txt goto FILECHECK
# echo ================================================== > .\doc\everything_license.txt
# echo =              Script by MarioMasta64            = >> .\doc\everything_license.txt
# echo =           Script Version: v%current_version%- release        = >> .\doc\everything_license.txt
# echo ================================================== >> .\doc\everything_license.txt
# echo =You may Modify this WITH consent of the original= >> .\doc\everything_license.txt
# echo = creator, as long as you include a copy of this = >> .\doc\everything_license.txt
# echo =      as you include a copy of the License      = >> .\doc\everything_license.txt
# echo ================================================== >> .\doc\everything_license.txt
# echo =    You may also modify this script without     = >> .\doc\everything_license.txt
# echo =         consent for PERSONAL USE ONLY          = >> .\doc\everything_license.txt
# echo ================================================== >> .\doc\everything_license.txt
credits() {
   clear
   if [ -f ./home/doc/everything_license.txt ]; then
       file_check
   fi
   echo '==================================================' > ./home/doc/everything_license.txt
   echo '=              Script by MarioMasta64            =' >> ./home/doc/everything_license.txt
   echo '=           Script Version: v$current_version - release        =' >> ./home/doc/everything_license.txt
   echo '==================================================' >> ./home/doc/everything_license.txt
   echo '=You may Modify this WITH consent of the original=' >> ./home/doc/everything_license.txt
   echo '= creator, as long as you include a copy of this =' >> ./home/doc/everything_license.txt
   echo '=      as you include a copy of the License      =' >> ./home/doc/everything_license.txt
   echo '==================================================' >> ./home/doc/everything_license.txt
   echo '=    You may also modify this script without     =' >> ./home/doc/everything_license.txt
   echo '=         consent for PERSONAL USE ONLY          =' >> ./home/doc/everything_license.txt
   echo '==================================================' >> ./home/doc/everything_license.txt
}

# :CREDITSREAD
# cls
# title PORTABLE EVERYTHING LAUNCHER - ABOUT
# for /f "DELIMS=" %%i in (.\doc\everything_license.txt) do (echo %%i)
# pause
credits_read() {
   clear
   echo 'PORTABLE EVERYTHING LAUNCHER - ABOUT'
   while read -r LINE; do
       echo '$LINE'
   done < ./home/doc/everything_license.txt
   read -p 'Press [Enter] key to continue...'
}

# :FILECHECK
# cls
file_check() {
   clear
}

wget_check() {

   # :WGETUPDATE
   # cls
   # title PORTABLE EVERYTHING LAUNCHER - UPDATE WGET
   # wget https://eternallybored.org/misc/wget/current/wget.exe
   # move wget.exe .\bin\
   # goto MENU

   # :DOWNLOADWGET
   # cls
   # call :CHECKWGETDOWNLOADER
   # exit /b

   # :CHECKWGETDOWNLOADER
   # cls
   # if not exist .\bin\downloadwget.vbs call :CREATEWGETDOWNLOADER
   # if exist .\bin\downloadwget.vbs call :EXECUTEWGETDOWNLOADER
   # exit /b

   # :CREATEWGETDOWNLOADER
   # cls
   # echo ' Set your settings > .\bin\downloadwget.vbs
   # echo    strFileURL = "https://eternallybored.org/misc/wget/current/wget.exe" >> .\bin\downloadwget.vbs
   # echo    strHDLocation = "wget.exe" >> .\bin\downloadwget.vbs
   # echo. >> .\bin\downloadwget.vbs
   # echo ' Fetch the file >> .\bin\downloadwget.vbs
   # echo     Set objXMLHTTP = CreateObject("MSXML2.XMLHTTP") >> .\bin\downloadwget.vbs
   # echo. >> .\bin\downloadwget.vbs
   # echo     objXMLHTTP.open "GET", strFileURL, false >> .\bin\downloadwget.vbs
   # echo     objXMLHTTP.send() >> .\bin\downloadwget.vbs
   # echo. >> .\bin\downloadwget.vbs
   # echo If objXMLHTTP.Status = 200 Then >> .\bin\downloadwget.vbs
   # echo Set objADOStream = CreateObject("ADODB.Stream") >> .\bin\downloadwget.vbs
   # echo objADOStream.Open >> .\bin\downloadwget.vbs
   # echo objADOStream.Type = 1 'adTypeBinary >> .\bin\downloadwget.vbs
   # echo. >> .\bin\downloadwget.vbs
   # echo objADOStream.Write objXMLHTTP.ResponseBody >> .\bin\downloadwget.vbs
   # echo objADOStream.Position = 0    'Set the stream position to the start >> .\bin\downloadwget.vbs
   # echo. >> .\bin\downloadwget.vbs
   # echo Set objFSO = Createobject("Scripting.FileSystemObject") >> .\bin\downloadwget.vbs
   # echo If objFSO.Fileexists(strHDLocation) Then objFSO.DeleteFile strHDLocation >> .\bin\downloadwget.vbs
   # echo Set objFSO = Nothing >> .\bin\downloadwget.vbs
   # echo. >> .\bin\downloadwget.vbs
   # echo objADOStream.SaveToFile strHDLocation >> .\bin\downloadwget.vbs
   # echo objADOStream.Close >> .\bin\downloadwget.vbs
   # echo Set objADOStream = Nothing >> .\bin\downloadwget.vbs
   # echo End if >> .\bin\downloadwget.vbs
   # echo. >> .\bin\downloadwget.vbs
   # echo Set objXMLHTTP = Nothing >> .\bin\downloadwget.vbs
   # exit /b

   # :EXECUTEWGETDOWNLOADER
   # cls
   # title PORTABLE EVERYTHING LAUNCHER - DOWNLOAD WGET
   # cscript.exe .\bin\downloadwget.vbs
   # move wget.exe .\bin\
   # exit /b
   echo NOT IMPLEMENTED
}

# :MENU
# cls
# title PORTABLE EVERYTHING LAUNCHER - MAIN MENU
# echo %NAG%
# echo dont worry bugs will be fixed soon !
# set nag=SELECTION TIME!
# echo 1. download a program
# echo 2. launch a program
# echo 3. update a launcher
# echo 4. delete a program
# echo 5. about
# echo 6. exit
# echo 7. DOWNLOAD EVERYTHING
# echo 8. DELETE EVERYTHING
# echo.
# set /p choice="enter a number and press enter to confirm: "
# if "%CHOICE%"=="1" goto DOWNLOAD
# if "%CHOICE%"=="2" goto LAUNCH
# if "%CHOICE%"=="3" goto UPDATE
# if "%CHOICE%"=="4" goto DELETE
# if "%CHOICE%"=="5" goto ABOUT
# if "%CHOICE%"=="6" exit
# if "%CHOICE%"=="7" goto GETALLTHESTUFF
# if "%CHOICE%"=="8" goto DELETEALLTHESTUFF
# set nag="PLEASE SELECT A CHOICE 1-8"
# goto MENU
menu() {
   while true
   do
       clear
       echo '~~~~~~~~~~~~~~~~~~~~~~'
       echo '$NAG'
       echo '~~~~~~~~~~~~~~~~~~~~~~'
       echo ' M A I N - M E N U'
       echo '~~~~~~~~~~~~~~~~~~~~~~'
       echo '1. download a program'
       echo '2. launch a program'
       echo '3. update a program'
       echo '4. delete a program'
       echo '5. about'
       echo '6. exit'
       echo '7. DOWNLOAD EVERYTHING'
       echo '8. DELETE EVERYTHING'
       echo '~~~~~~~~~~~~~~~~~~~~~~'
       local choice
       read -p "Enter choice [ 1 - 8] " choice
       case $choice in
           1) download ;;
           2) launch ;;
           3) update ;;
           4) delete ;;
           5) about ;;
           6) exit 0;;
           7) get_all_the_stuff ;;
           8) delete_all_the_stuff ;;
           *) export nag='PLEASE SELECT A CHOICE 1-8' && sleep 2
       esac
   done
}

# :GET_LAUNCHERS
# dir /b /a-d launch_*.bat > .\doc\launchers.txt
# # set Counter=0
# # for /f "DELIMS=" %%i in ('type .\doc\launchers.txt') do (
# #    if "%%i" NEQ "launch_dlldownloader.bat" (
# #        set /a Counter+=1
# #        set Line_!Counter!=%%i
# #    )
# # )
# # if exist .\doc\launchers.txt del .\doc\launchers.txt
# # exit /b
get_launchers() {
   ls launch_*.sh > ./home/doc/launchers.txt
   grep -n '^' ./home/doc/launchers.txt
   while read -r LINE; do
       echo $n:'$LINE'
   done < ./home/doc/launchers.txt
}

# :GET_INFO
# if not exist .\bin\wget.exe call :DOWNLOADWGET
# if exist %launchername%.txt del %launchername%.txt
# .\bin\wget.exe -q --show-progress https://raw.githubusercontent.com/MarioMasta64/EverythingPortable/master/info/%launchername%.txt
# cls
# for /f "DELIMS=" %%i in ('type %launchername%.txt') do (
#     echo %%i
# )
# if not exist %launchername%.txt cls & echo you seem to be offline or there is a problem with the github
# if exist %launchername%.txt del %launchername%.txt
# exit /b
get_info() {
   if [ -f $launchername.txt ]; then
       rm $launchername.txt
   fi
   curl https://raw.githubusercontent.com/MarioMasta64/EverythingPortable/master/info/$launchername.txt -o $launchername.txt
   clear
   while read -r LINE; do
       echo '$LINE'
   done < $launchername.txt
   if [ -f $launchername.txt ]; then
       echo 'you seem to be offline or there is a problem with the github'
   else
       rm $launchername.txt
   fi
}

:GET_DOWNLOADS
if not exist .\bin\wget.exe call :DOWNLOADWGET
.\bin\wget.exe -q --show-progress https://raw.githubusercontent.com/MarioMasta64/EverythingPortable/master/version.txt
cls
set "num=1"
set "counter=0"
for /f "DELIMS=" %%i in (version.txt) do (
    set /a num+=1
:: this line says if num is equal to blah execute this. basically it counts by this many lines it also resets the counter on completion
    if "!num!"=="2" (
       set /a counter+=1&set "line_!counter!=%%i"&set num=0
       if "%launcher%"=="launch_%%i.bat" (set /a new_line=!counter!*2)
   )
)
if exist version.txt del version.txt
set nag="if it wasnt for http://stackoverflow.com/users/5269570/sam-denty this wouldnt work"
exit /b

:GET_NEW_DOWNLOADS
if not exist .\bin\wget.exe call :DOWNLOADWGET
.\bin\wget.exe -q --show-progress https://raw.githubusercontent.com/MarioMasta64/EverythingPortable/master/version.txt
cls
set "num=1"
set "counter=0"
for /f "DELIMS=" %%i in (version.txt) do (
    set /a num+=1
:: this line says if num is equal to blah execute this. basically it counts by this many lines it also resets the counter on completion
    if "!num!"=="2" (
       if not exist launch_%%i.bat (set /a counter+=1&set "line_!counter!=%%i")
       set num=0
   )
)
if exist version.txt del version.txt
set nag="if it wasnt for http://stackoverflow.com/users/5269570/sam-denty this wouldnt work"
exit /b

:DOWNLOAD
call :GET_NEW_DOWNLOADS
cls
title PORTABLE EVERYTHING LAUNCHER - DOWNLOAD LAUNCHER
echo %NAG%
set nag=SELECTION TIME!
:: first number is which line to start second number is how many lines to count by
For /L %%C in (1,1,%Counter%) Do (echo %%C. !Line_%%C!)
echo type menu to return to the main menu
set /p choice="launcher to download: "
set launchername=!Line_%CHOICE%!
set launcher=launch_%launchername%.bat
if "%CHOICE%"=="menu" goto MENU
:: cap output somehow
goto INFO

:LAUNCHERCHECK
cls
title PORTABLE EVERYTHING LAUNCHER - CHECK LAUNCHER
set /a verline = %CHOICE% * 2
if not exist launch_%launchername%.bat goto UPDATENOW
set nag="You Shouldn't Be Able To Trigger This. If You Do Let Me Know. Launcher %launcher% Exists"
goto UPDATECHECK
goto MENU

:LAUNCH
cls
title PORTABLE EVERYTHING LAUNCHER - SELECT LAUNCHER
echo %NAG%
set nag=SELECTION TIME!
call :GET_LAUNCHERS
For /L %%C in (1,1,%Counter%) Do (echo %%C. !Line_%%C!)
echo type menu to return to the main menu
:: typing "]" here opens cmd prompt. spoopy.
set /p choice="launcher to launch: "
set launcher=!Line_%CHOICE%!
if "%CHOICE%"=="menu" goto MENU
start %launcher%
exit

:DELETE
cls
title PORTABLE EVERYTHING LAUNCHER - DELETE LAUNCHER
echo %NAG%
set nag=SELECTION TIME!
call :GET_LAUNCHERS
For /L %%C in (1,1,%Counter%) Do (echo %%C. !Line_%%C!)
echo type menu to return to the main menu
set /p choice="launcher to delete: "
set launcher=!Line_%CHOICE%!
if "%CHOICE%"=="menu" goto MENU
del %launcher%
goto MENU

:UPDATE
cls
title PORTABLE EVERYTHING LAUNCHER - UPDATE LAUNCHER
echo %NAG%
set nag=SELECTION TIME!
call :GET_LAUNCHERS
For /L %%C in (1,1,%Counter%) Do (echo %%C. !Line_%%C!)
echo type menu to return to the main menu
set /p choice="launcher to update: "
set launcher=!Line_%CHOICE%!
if "%CHOICE%"=="menu" goto MENU
call :GET_DOWNLOADS

# :UPDATECHECK
# cls
# call %launcher% VERSION
# set current_version=!errorlevel!
# if exist version.txt del version.txt
# if not exist .\bin\wget.exe call :DOWNLOADWGET
# .\bin\wget.exe -q --show-progress https://raw.githubusercontent.com/MarioMasta64/EverythingPortable/master/version.txt
# # set Counter=0 & for /f "DELIMS=" %%i in ('type version.txt') do (set /a Counter+=1 & set "Line_!Counter!=%%i")
# if exist version.txt del version.txt
# # set new_version=!line_%new_line%!
# if "%new_version%"=="OFFLINE" goto ERROROFFLINE
# # if %current_version% EQU %new_version% goto LATEST
# # if %current_version% LSS %new_version% goto NEWUPDATE
# # if %current_version% GTR %new_version% goto NEWEST
# goto ERROROFFLINE
update_check() {
   clear
   ./$launcher version
   export current_version=$?
   if [ -f version.txt ]; then
       rm version.txt
   fi
   curl https://raw.githubusercontent.com/MarioMasta64/EverythingPortable/master/version.txt -o version.txt
   # insert counter lines section
   if [ -d version.txt ]; then
       rm version.txt
   fi
   # somehow import variable
   if [ $new_version == 'OFFLINE' ]; then
       error_offline
   fi
   # insert math stuff to determine version
}

:LATEST
cls
title PORTABLE EVERYTHING LAUNCHER - LATEST BUILD :D
echo %NAG%
set nag=SELECTION TIME!
echo you are using the latest version!!
echo Current Version: v%current_version%
echo New Version: v%new_version%
echo ENTER TO CONTINUE
pause
goto MENU

# :NEWUPDATE
# cls
# title PORTABLE EVERYTHING LAUNCHER - OLD BUILD D:
# echo %NAG%
# set nag=SELECTION TIME!
# echo you are using an older version
# echo enter yes or no
# echo Current Version: v%current_version%
# echo New Version: v%new_version%
# set /p choice="Update?: "
# if "%CHOICE%"=="yes" goto UPDATENOW
# if "%CHOICE%"=="no" goto MENU
# set nag="please enter YES or NO"
# goto NEWUPDATE
new_update() {
   clear
   while true
   do
       clear
       echo '~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~'
       echo '$NAG'
       export nag='SELECTION TIME!'
       echo '~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~'
       echo ' PORTABLE EVERYTHING LAUNCHER - OLD BUILD D:'
       echo '~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~'
       echo 'you are using an older version'
       echo 'enter (y)es or (n)o'
       echo 'Current Version: v',$current_version
       echo 'New Version: v',$new_version
       echo '~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~'
       local choice
       read -p "Enter choice [ y / n] " choice
       case $choice in
           y) update_now ;;
           n) menu ;;
           *) export nag='PLEASE SELECT A CHOICE y/n' && sleep 2
       esac
   done
}

# :INFO
# cls
# title PORTABLE EVERYTHING LAUNCHER - "%launchername%" MENU
# echo %NAG%
# set nag=SELECTION TIME!
# echo what would you like to do?
# echo 1. Download Launcher
# echo 2. View More Info
# echo back to go back or menu to go back to the menu
# set /p choice="action: "
# if "%CHOICE%"=="1" goto LAUNCHERCHECK
# if "%CHOICE%"=="2" goto MOREINFO
# if "%CHOICE%"=="back" goto DOWNLOAD
# if "%CHOICE%"=="menu" goto MENU
# set nag="please enter 1 or 2"
# goto INFO
new_update() {
   clear
   while true
   do
       clear
       echo '~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~'
       echo '$NAG'
       export nag='SELECTION TIME!'
       echo '~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~'
       echo ' PORTABLE EVERYTHING LAUNCHER - ',$launchername,' MENU'
       echo '~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~'
       echo '1. Download Launcher'
       echo '2. View More Info'
       echo '(b)ack to go back or (m)enu to return to the menu'
       echo '~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~'
       local choice
       read -p "Enter choice [ 1 - 2 / b / m] " choice
       case $choice in
           1) launcher_check ;;
           2) more_info ;;
           b) download ;;
           m) menu ;;
           *) export nag='PLEASE SELECT A CHOICE 1-2/b/m' && sleep 2
       esac
   done
}

# :MOREINFO
# cls
# call :GET_INFO
# title PORTABLE "%launchername%" LAUNCHER - MORE INFO
# pause
# goto INFO
more_info
   get_info
   echo 'PORTABLE $launchername LAUNCHER - MORE INFO'
   read -p 'Press [Enter] key to continue...'
   info
}

# :UPDATENOW
# cls
# if not exist .\bin\wget.exe call :DOWNLOADWGET
# .\bin\wget.exe -q --show-progress https://raw.githubusercontent.com/MarioMasta64/EverythingPortable/master/%launcher%
# cls
# if exist %launcher%.1 goto REPLACERCREATE
# if exist %launcher% goto MENU
# goto ERROROFFLINE
update_now() {
   clear
   curl https://raw.githubusercontent.com/MarioMasta64/EverythingPortable/master/$launcher -o $launcher
   clear
   if [ -f $launcher.1 ]; then
       replacer_create
   fi
   if [ -f $launcher ]; then
       menu
   else
       error_offline
   fi
}

# :REPLACERCREATE
# cls
# # echo @echo off > replacer.bat
# # echo Color 0A >> replacer.bat
# # echo del %launcher% >> replacer.bat
# # echo rename %launcher%.1 %launcher% >> replacer.bat
# # echo start launch_everything.bat >> replacer.bat
# # echo exit >> replacer.bat
# # start replacer.bat
# # exit
replacer_create() {
   clear
   echo 'NOT IMPLEMENTED YET'
}

# :NEWEST
# cls
# title PORTABLE EVERYTHING LAUNCHER - TEST BUILD :0
# echo YOURE USING A TEST BUILD MEANING YOURE EITHER
# echo CLOSE TO ME OR YOURE SOME SORT OF PIRATE
# echo Current Version: v%current_version%
# echo New Version: v%new_version%
# echo ENTER TO CONTINUE
# pause
# start launch_everything.bat
# exit
newest() {
   clear
   echo 'PORTABLE EVERYTHING LAUNCHER - TEST BUILD :O'
   echo 'YOURE USING A TEST BUILD MEANING YOURE EITHER'
   echo 'CLOSE TO ME OR YOURE SOME SORT OF PIRATE'
   echo 'Current Version: v$current_version'
   echo 'New Version: v$new_version'
   echo 'ENTER TO CONTINUE'
   read -p 'Press [Enter] key to continue...'
   ./launch_everything.bat
}

# :ABOUT
# cls
# del .\doc\everything_license.txt
# start launch_everything.bat
# exit
about() {
   clear
   rm ./home/doc/everything_license.txt
   ./launch_everything.sh
}

# :ERROROFFLINE
# cls
# echo an error occured
# pause
# goto MENU
error_offline() {
   clear
   echo 'an error has occured'
   read -p 'Press [Enter] key to continue...'
}

# :GETALLTHESTUFF
# if not exist .\bin\wget.exe call :DOWNLOADWGET
# .\bin\wget.exe -q --show-progress https://github.com/MarioMasta64/EverythingPortable/archive/master.zip
# set folder=%CD%
# if %CD%==%~d0\ set folder=%CD:~0,2%
# echo. > .\bin\extracteverything.vbs
# echo 'The location of the zip file. >> .\bin\extracteverything.vbs
# echo ZipFile="%folder%\master.zip" >> .\bin\extracteverything.vbs
# echo 'The folder the contents should be extracted to. >> .\bin\extracteverything.vbs
# echo ExtractTo="%folder%\" >> .\bin\extracteverything.vbs
# echo. >> .\bin\extracteverything.vbs
# echo 'If the extraction location does not exist create it. >> .\bin\extracteverything.vbs
# echo Set fso = CreateObject("Scripting.FileSystemObject") >> .\bin\extracteverything.vbs
# echo If NOT fso.FolderExists(ExtractTo) Then >> .\bin\extracteverything.vbs
# echo    fso.CreateFolder(ExtractTo) >> .\bin\extracteverything.vbs
# echo End If >> .\bin\extracteverything.vbs
# echo. >> .\bin\extracteverything.vbs
# echo 'Extract the contants of the zip file. >> .\bin\extracteverything.vbs
# echo set objShell = CreateObject("Shell.Application") >> .\bin\extracteverything.vbs
# echo set FilesInZip=objShell.NameSpace(ZipFile).items >> .\bin\extracteverything.vbs
# echo objShell.NameSpace(ExtractTo).CopyHere(FilesInZip) >> .\bin\extracteverything.vbs
# echo Set fso = Nothing >> .\bin\extracteverything.vbs
# echo Set objShell = Nothing >> .\bin\extracteverything.vbs
# echo. >> .\bin\extracteverything.vbs
# cscript .\bin\extracteverything.vbs
# for %%i in (.\EverythingPortable-master\launch_*.bat) do if not "%%i" == ".\EverythingPortable-master\launch_everything.bat" xcopy %%i .\ /e /i /y
# rmdir /s /q .\EverythingPortable-master\
# rmdir /s /q .\.vs\
# rmdir /s /q .\info\
# rmdir /s /q .\note\
# del /s /q  master.zip
# goto MENU
get_all_the_stuff() {
   curl https://github.com/MarioMasta64/EverythingPortable/archive/master.zip -o master.zip
   ./bin/pv ./extra/wget-latest.tar.gz | tar zxC ./temp/
    unzip master.zip -o -x launch_everything_poc.sh -d ./temp/
   if [ -d ./EverythingPortable-Linux-master/ ]; then
       rm -r -f ./EverythingPortable-Linux-master/
   fi
   if [ -d ./.vs/ ]; then
       rm -r -f ./.vs/
   fi
   if [ -d ./info/ ]; then
       rm -r -f ./info/
   fi
   if [ -d ./info/ ]; then
       rm -r -f ./note/
   fi
   rm master.zip
}  

# :DELETEALLTHESTUFF
# for %%i in (*) do if not "%%i" == "launch_everything.bat" del %%i
# goto MENU
delete_all_the_stuff() {
   find * ! -name 'launch_everything.sh' -type f -exec rm -f {} +
}


# if "%~1" neq "" (call :%~1 & exit /b !current_version!)
if [ '$1' != 'NULL' ]; then
   $1
   exit $current_version
fi
-insert blob but hyper sweat fast-
its gonna be a little while
 
  • Like
Reactions: Blauhasenpopo

MarioMasta64

hi. i make batch stuff and portable shiz
OP
Member
Joined
Dec 21, 2016
Messages
2,297
Trophies
0
Age
26
Website
github.com
XP
2,096
Country
United States
i decided to test a thing: counting backwards:
upload_2017-11-16_16-34-44.png

would y'all prefer to have something outdated but count forward or something new but count backwards for a long time? one thing i could try is setting a release to 10 places in the future and counting back from that and updating every so often? another thing is to find out if theres someway to ping if it exists or find a pattern more easily :/
 

MarioMasta64

hi. i make batch stuff and portable shiz
OP
Member
Joined
Dec 21, 2016
Messages
2,297
Trophies
0
Age
26
Website
github.com
XP
2,096
Country
United States
so an update: apparently extensions & apps get synced :D even chrome portable didnt sync apps

--------------------- MERGED ---------------------------

passwords and logins however dont sync. (you will be logged out everytime)
 
  • Like
Reactions: Blauhasenpopo

MarioMasta64

hi. i make batch stuff and portable shiz
OP
Member
Joined
Dec 21, 2016
Messages
2,297
Trophies
0
Age
26
Website
github.com
XP
2,096
Country
United States
so i updated a few things and im testing a new feature :D its a mass update feature (will update all launchers you have) its not uploaded yet, just making sure it works first but soon(tm) maybe

--------------------- MERGED ---------------------------

and... i overwrote itself :[ welp time to start from scratch,
 
  • Like
Reactions: Blauhasenpopo

MarioMasta64

hi. i make batch stuff and portable shiz
OP
Member
Joined
Dec 21, 2016
Messages
2,297
Trophies
0
Age
26
Website
github.com
XP
2,096
Country
United States
obs updated to 20.1.3
ppsspp updated to 1.5.4
suite updated with expiremental mass update option (9 at menu no option is displayed cause im unsure if it works well, but. in my tests ive had no problems with it,)

--------------------- MERGED ---------------------------

for those willing to test, please tell me if the mass updater works well (it will make updating launchers easier) so that i can make a clear menu entry for all users to see.
 
  • Like
Reactions: Blauhasenpopo

MarioMasta64

hi. i make batch stuff and portable shiz
OP
Member
Joined
Dec 21, 2016
Messages
2,297
Trophies
0
Age
26
Website
github.com
XP
2,096
Country
United States
ppsspp portable update pushed now with: upgrade (removes zip and reinstalls [for upgrades]) & reinstall (just extracts current zip [in case something messed up i guess])

--------------------- MERGED ---------------------------

vscode now has a reinstall option (due to the difficulty i had reinstalling manually mostly but still)
 
Last edited by MarioMasta64,
  • Like
Reactions: Blauhasenpopo

MarioMasta64

hi. i make batch stuff and portable shiz
OP
Member
Joined
Dec 21, 2016
Messages
2,297
Trophies
0
Age
26
Website
github.com
XP
2,096
Country
United States
Sorry for being stupid but what exactly is all this portable stuff?
exactly as you said, portable stuff. basically its portableapps but you can see each and everything thats happening in the file as plaintext (since its batch) also because for some reasons im displeased with portableapps.

the second reason is ive had drive failures and wanted to keep my files somewhere i can always ask them so i made them more user friendly (cause im uploading them publicly) and uploaded them to github, one thing lead to another and eventually it became this.

also for y'all here feel free to try out the mass update option in the suite (press 9 at the menu) it will quickly go through all the files and update them per-necessary
 
  • Like
Reactions: Blauhasenpopo

Site & Scene News

Popular threads in this forum

General chit-chat
Help Users
  • No one is chatting at the moment.
    I @ idonthave: :)