diff --git a/DBPass b/DBPass deleted file mode 100644 index 568e37d..0000000 --- a/DBPass +++ /dev/null @@ -1 +0,0 @@ -goldenowl \ No newline at end of file diff --git a/DBUser b/DBUser deleted file mode 100644 index 93ca142..0000000 --- a/DBUser +++ /dev/null @@ -1 +0,0 @@ -root \ No newline at end of file diff --git a/Windows Setup/7z.dll b/Windows Setup/7z.dll new file mode 100644 index 0000000..928fe61 Binary files /dev/null and b/Windows Setup/7z.dll differ diff --git a/Windows Setup/7z.exe b/Windows Setup/7z.exe new file mode 100644 index 0000000..37b8514 Binary files /dev/null and b/Windows Setup/7z.exe differ diff --git a/Windows Setup/Librography b/Windows Setup/Librography new file mode 100644 index 0000000..370bf32 Binary files /dev/null and b/Windows Setup/Librography differ diff --git a/Windows Setup/images b/Windows Setup/images new file mode 100644 index 0000000..33b62f6 Binary files /dev/null and b/Windows Setup/images differ diff --git a/Windows Setup/lib b/Windows Setup/lib new file mode 100644 index 0000000..59ec7e1 Binary files /dev/null and b/Windows Setup/lib differ diff --git a/Windows Setup/setupFiles.bat b/Windows Setup/setupFiles.bat new file mode 100644 index 0000000..7ac25d9 --- /dev/null +++ b/Windows Setup/setupFiles.bat @@ -0,0 +1,16 @@ +Rem populate folders +md C:\Librography +@echo off +echo gowl>C:\Librography\DBUser +echo gowl>C:\Librography\DBPass +echo. 2>C:\Librography\ticket.txt +echo Dialogo>C:\Librography\DefaultPrinter +set var1=1 +echo %var1%>C:\Librography\LoggedIn + +Rem extract files +7z.exe x lib -oC:\Librography -aoa +7z.exe x images -oC:\Librography -aoa +7z.exe x Librography -oC:\Librography -aoa + +pause \ No newline at end of file diff --git a/Windows Setup/setupJava.bat b/Windows Setup/setupJava.bat new file mode 100644 index 0000000..f18cec5 --- /dev/null +++ b/Windows Setup/setupJava.bat @@ -0,0 +1,46 @@ +Rem check java version +@echo off +cls +setlocal ENABLEEXTENSIONS +set KEY_NAME="HKLM\SOFTWARE\JavaSoft\Java Runtime Environment" +set VALUE_NAME=CurrentVersion +:: +:: get the current version +:: +FOR /F "usebackq skip=2 tokens=3" %%A IN (`REG QUERY %KEY_NAME% /v %VALUE_NAME% 2^>nul`) DO ( + set ValueValue=%%A +) +if defined ValueValue ( + @echo the current Java runtime is %ValueValue% +) else ( + @echo %KEY_NAME%\%VALUE_NAME% not found. + goto end +) +set JAVA_CURRENT="HKLM\SOFTWARE\JavaSoft\Java Runtime Environment\%ValueValue%" +set JAVA_HOME=JavaHome +:: +:: get the javahome +:: +FOR /F "usebackq skip=2 tokens=3*" %%A IN (`REG QUERY %JAVA_CURRENT% /v %JAVA_HOME% 2^>nul`) DO ( + set JAVA_PATH=%%A %%B +) +echo the path of the current Java JVM according to the registry is +echo %JAVA_PATH% +echo. +echo now if we try it : +"%JAVA_PATH%\bin\java.exe" -version +:end + +Rem if %ValueValue% ==1.8 + + +if %ValueValue%==1.8 ( + echo "Java 8 encontrado" + pause + ) +else ( + echo Java versão 8 não encontrado: você quer abrir a página de download? + START Https://www.oracle.com/java/technologies/javase/javase8-archive-downloads.html + pause + ) + diff --git a/Windows Setup/setupMysql.bat b/Windows Setup/setupMysql.bat new file mode 100644 index 0000000..7cd3489 --- /dev/null +++ b/Windows Setup/setupMysql.bat @@ -0,0 +1,82 @@ + + + + + + + +Rem check Mysql + +Rem download mysql +START Https://dev.mysql.com/downloads/installer/ + + +@echo off +setlocal +:pick_a_new_port + set /P port=Insert a %new%port? + netstat -an | findstr /RC:":%port% .*LISTENING" 1>nul 2>nul && (ECHO Port is in use & set new=new & goto pick_a_new_port) +echo %port% ok + +pause + + +pause + +cls +:start +ECHO What do you want to do? +ECHO 1. Click 1 to setup a Server machine +ECHO 2. Click 2 to setup a Client Machine +ECHO 3. Click 3 to setup a Student Terminal +ECHO 4. Click 4 to cancel and quit +set /p choice=Type the number to proceed to setup. +rem if not '%choice%'=='' set choice=%choice:~0;1% ( don`t use this command, because it takes only first digit in the case you type more digits. After that for example choice 23455666 is choice 2 and you get "bye" +if '%choice%'=='' ECHO "%choice%" is not valid please try again +if '%choice%'=='1' goto server +if '%choice%'=='2' goto client +if '%choice%'=='3' goto terminal +if '%choice%'=='4' goto quit +ECHO. +goto start +:server +ECHO Starting installing and setup the server.... +ECHO ------------------------------------------------- +ECHO First take a note of your ip number shown above. +ECHO You will need this to install the clients and terminals: +for /f "delims=[] tokens=2" %%a in ('ping -4 -n 1 %ComputerName% ^| findstr [') do set NetworkIP=%%a +echo Network IP: +ECHO ------------------------------------------------------ +ECHO %NetworkIP% +ECHO ------------------------------------------------------ +pause +call setupFiles.bat +ECHO ok +ECHO ------------------------------------------------------- +echo localhost>C:\Librography\ipserver +call setupJava.bat + +ECHO +goto end +:client +ECHO Starting installing and setup the client.... +ECHO ------------------------------------------------- +call setupFiles.bat +Rem setup server ip +echo Enter the server ip : +set /p ipserver= +echo The server ip is %ipserver% +echo %ipserver%>C:\Librography\ipserver + + +ECHO BYE +goto end +:terminal +ECHO TEST +goto end +:quit +ECHO Bye +goto end +:end +pause +Rem exit \ No newline at end of file