removed postgres installer

This commit is contained in:
2023-01-04 12:20:47 -03:00
commit 4db7fd1781
602 changed files with 32919 additions and 0 deletions
@@ -0,0 +1,49 @@
; Script generated by the Inno Setup Script Wizard.
; SEE THE DOCUMENTATION FOR DETAILS ON CREATING INNO SETUP SCRIPT FILES!
#define MyAppName "Librography"
#define MyAppVersion "0.1-beta"
#define MyAppPublisher "FlashInformatics, Inc."
#define MyAppURL "https://www.librography.site/"
#define MyAppExeName "Librography.exe"
[Setup]
; NOTE: The value of AppId uniquely identifies this application. Do not use the same AppId value in installers for other applications.
; (To generate a new GUID, click Tools | Generate GUID inside the IDE.)
AppId={{EAC392A1-AC02-4CE1-9B71-18B555A85097}
AppName={#MyAppName}
AppVersion={#MyAppVersion}
;AppVerName={#MyAppName} {#MyAppVersion}
AppPublisher={#MyAppPublisher}
AppPublisherURL={#MyAppURL}
AppSupportURL={#MyAppURL}
AppUpdatesURL={#MyAppURL}
DefaultDirName=C:\{#MyAppName}
DisableDirPage=yes
DisableProgramGroupPage=yes
; Uncomment the following line to run in non administrative install mode (install for current user only.)
;PrivilegesRequired=lowest
OutputDir=F:\Desktop\goldenowl\Installers\InnoSetupFiles
OutputBaseFilename=LibrographyInstaller_0.1-beta
Compression=lzma
SolidCompression=yes
WizardStyle=modern
[Languages]
Name: "brazilianportuguese"; MessagesFile: "compiler:Languages\BrazilianPortuguese.isl"
[Tasks]
Name: "desktopicon"; Description: "{cm:CreateDesktopIcon}"; GroupDescription: "{cm:AdditionalIcons}"; Flags: unchecked
[Files]
Source: "C:\Librography\{#MyAppExeName}"; DestDir: "{app}"; Flags: ignoreversion
Source: "C:\Librography\*"; DestDir: "{app}"; Flags: ignoreversion recursesubdirs createallsubdirs
; NOTE: Don't use "Flags: ignoreversion" on any shared system files
[Icons]
Name: "{autoprograms}\{#MyAppName}"; Filename: "{app}\{#MyAppExeName}"
Name: "{autodesktop}\{#MyAppName}"; Filename: "{app}\{#MyAppExeName}"; Tasks: desktopicon
[Run]
Filename: "{app}\{#MyAppExeName}"; Description: "{cm:LaunchProgram,{#StringChange(MyAppName, '&', '&&')}}"; Flags: nowait postinstall skipifsilent
@@ -0,0 +1,58 @@
@echo off
echo Criando a pasta data, utilizadas pelo MySQL
set mypath=C:\Librography
net stop MySql
set mysqlpath=%mypath%\mysql
if not exist "%mysqlpath%\data" mkdir "%mysqlpath%\data"
echo Inicializando o MySQL. Criando o conteúdo da pasta data
"%mysqlpath%/bin/mysqld.exe" --initialize-insecure --user=mysql --basedir="%mysqlpath%" --datadir="%mysqlpath%\data"
echo Definindo o MySQL como um serviço
"%mysqlpath%\bin\mysqld.exe" --install MySQL
echo Iniciando o serviço criado
sc start MySQL
echo Verificando se o serviço esta ativo
:INITDATA
sc query "MySQL" | find "RUNNING"
if "%ERRORLEVEL%"=="0" (
echo Serviço ativo ...
echo Configurando a base de dados...
echo Definindo uma senha para o usuário root...
:: "%mysqlpath%\bin\mysql.exe" -u root --skip-password -e "ALTER USER 'root'@'localhost' IDENTIFIED BY 'goldenowl';"
:: echo Criando o usuário utilizado pela aplicação e atribuindo as permissões dele
:: "%mysqlpath%\bin\mysql.exe" -u root -p goldenowl -e "CREATE USER 'appLibrography'@'localhost' IDENTIFIED BY 'app1Librography';GRANT CREATE, SELECT, INSERT, UPDATE, DELETE ON *.* TO 'appLibrography'@'localhost';FLUSH PRIVILEGES;"
::echo Criando o banco de dados da aplicação
::"%mysqlpath%\bin\mysql.exe" -u appLibrography -p app1Librography -e "CREATE DATABASE appLibrography;"
:: echo Criando a tabela utilizada pela a aplicação
:: "%mysqlpath%\bin\mysql.exe" -i C:\Librography\Install_Files\CreateDBScript.sql
) else (
echo Serviço ainda não iniciado, aguardando 5 segundos
ping 127.0.0.1 -n 6 > nul
goto INITDATA
)