diff --git a/PrismLauncher-Linux-x86_64.AppImage b/PrismLauncher-Linux-x86_64.AppImage new file mode 100644 index 0000000..ff41b5e Binary files /dev/null and b/PrismLauncher-Linux-x86_64.AppImage differ diff --git a/prismlauncher.cfg b/prismlauncher.cfg index 3c5cd39..ff93ea8 100644 --- a/prismlauncher.cfg +++ b/prismlauncher.cfg @@ -1,90 +1,2156 @@ -[General] -ApplicationTheme=system -AutoCloseConsole=false -AutomaticJavaDownload=true -AutomaticJavaSwitch=true -BackgroundCat=rory-flat -CatOpacity=100 -CentralModsDir= -CloseAfterLaunch=false -ConfigVersion=1.2 -ConsoleFont=DejaVu Sans Mono -ConsoleFontSize=11 -ConsoleMaxLines=100000 -ConsoleOverflowStop=true -CustomGLFWPath= -CustomOpenALPath= -DownloadsDir= -DownloadsDirWatchRecursive=false -EnableFeralGamemode=false -EnableMangoHud=false -Env=@Variant(\0\0\0\b\0\0\0\0) -FlameKeyOverride= -IconTheme=iOS -IconsDir=icons -IgnoreJavaCompatibility=false -IgnoreJavaWizard=false -InstSortMode=Name -InstanceDir= -JProfilerPath= -JVisualVMPath= -JavaArchitecture=64 -JavaDir= -JavaPath= -JavaRealArchitecture=amd64 -JavaSignature=e9f96915f53f53dd23ae07fd17b0984538fdf4a7 -JavaVendor=Microsoft -JavaVersion=17.0.15 -JsonEditor= -JvmArgs= -Language=fr -LaunchMaximized=false -MCEditPath= -MSAClientIDOverride= -MainWindowState="@ByteArray(AAAA/wAAAAD9AAAAAAAAAxwAAAO1AAAABAAAAAQAAAAIAAAACPwAAAADAAAAAQAAAAEAAAAeAGkAbgBzAHQAYQBuAGMAZQBUAG8AbwBsAEIAYQByAwAAAAD/////AAAAAAAAAAAAAAACAAAAAQAAABYAbQBhAGkAbgBUAG8AbwBsAEIAYQByAQAAAAD/////AAAAAAAAAAAAAAADAAAAAQAAABYAbgBlAHcAcwBUAG8AbwBsAEIAYQByAQAAAAD/////AAAAAAAAAAA=)" -MaxMemAlloc=6096 -MenuBarInsteadOfToolBar=false -MetaURLOverride= -MinMemAlloc=512 -MinecraftWinHeight=480 -MinecraftWinWidth=854 -ModDependenciesDisabled=false -ModDownloadGeometry=@ByteArray(AdnQywADAAAAAAI8AAAAuwAABTIAAAOmAAACPgAAAM0AAAUwAAADpAAAAAAAAAAAB4AAAAI+AAAAzQAABTAAAAOk) -ModMetadataDisabled=false -ModrinthToken= -NumberOfConcurrentDownloads=6 -NumberOfConcurrentTasks=10 -NumberOfManualRetries=1 -OnlineFixes=false -PagedGeometry=@ByteArray(AdnQywADAAAAAAMoAAAAoAAAB4EAAAODAAADKgAAALIAAAd/AAADgQAAAAAAAAAAB4AAAAMqAAAAsgAAB38AAAOB) -PastebinCustomAPIBase= -PastebinType=3 -PermGen=128 -PostExitCommand= -PreLaunchCommand= -ProxyAddr=127.0.0.1 -ProxyPass= -ProxyPort=8080 -ProxyType=None -ProxyUser= -QuitAfterGameStop=false -RecordGameTime=true -RequestTimeout=60 -SelectedInstance= -ShowConsole=false -ShowConsoleOnError=true -ShowGameTime=true -ShowGameTimeWithoutDays=false -ShowGlobalGameTime=true -SkinsDir=skins -SkipModpackUpdatePrompt=false -StatusBarVisible=true -TechnicClientID= -ToolbarsLocked=false -UseDiscreteGpu=false -UseNativeGLFW=false -UseNativeOpenAL=false -UseZink=false -UserAgentOverride= -WideBarVisibility_mods="@ByteArray(11111111111,RHJ21JFskmD4uTZ+QmHCEy7StmI=)" -WrapperCommand= + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Minecraft-Installer/prismlauncher.cfg at main · PixPix20/Minecraft-Installer · GitHub + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + +
+ Skip to content + + + + + + + + + + + +
+
+ + + + + + + + + + + + + + + + + +
+ +
+ + + + + + + + +
+ + + + + +
+ + + + + + + + + +
+
+
+ + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + +
+
+ + + + +
+ +
+ +
+
+ +
+ + + + + + + + + + + + + + + + + + + + + + +
+
+
+ + + diff --git a/start_launcher.sh b/start_launcher.sh index 4decb74..d2a3413 100644 --- a/start_launcher.sh +++ b/start_launcher.sh @@ -7,96 +7,111 @@ VERSION=1.0 #Verification du stockage : OK #creation des dossiers : OK #creation de la config : OK -#creation du compte : NOK -#sys de deplacement des files : NOK -#sys de lancement/ telechargement du launcher : NOK +#creation du compte : OK mais A VOIR +#sys de deplacement des files : OK +#sys de lancement: OK +#telechargement du launcher : OK #On verifie qu'il y a assez de place pour installer minecraft en plus de garder un peu de place pour le reste max_storage=2147483648 #2Go, le stockage max de l'afs, je deconseille fortement d'augmenter cette valeur ! used_storage=$(du -sb "$HOME/afs" | awk '{print $1}') #La taille actuelle de votre afs minecraft_storage=943718400 #900Mo, j'utilise cette valeur si vous voulez jouer avec un modpack qui est lourd margin_storage=419430400 #400Mo, marge de securité pour que vous puissiez utiliser l'afs aprés l'installation du jeu, je deconseille de modifier cette valeur - afs="$HOME/afs" - launcher_name="PrismLauncher" -minecraft_path="$afs/minecraft" -launcher_config_path="$minecraft_path/config" -instances_path="$minecraft_path/Instances" -mods_path="$minecraft_path/mods" -java_path="$minecraft_path/java" +minecraft_path="$afs/minecraft" #dossier qui contient minecraft la conf du launcher etc +launcher_config_path="$minecraft_path/config" #dossier qui contient les configurations du launcher +instances_path="$minecraft_path/Instances" #dossier qui contient les instances minecraft +mods_path="$minecraft_path/mods" #Dossier qui contient les mods minecraft +java_path="$minecraft_path/java" #Dossier qui contient java(installe auto) downloads_path="$HOME/Downloads" prismlocal_path="$HOME/.local/share/PrismLauncher" -appimage="$minecraft_path/PrismLauncher-Linux-x86_64.AppImage" -url="https://github.com/PrismLauncher/PrismLauncher/releases/download/9.4/PrismLauncher-Linux-x86_64.AppImage" +appimage="$minecraft_path/PrismLauncher-Linux-x86_64.AppImage" #Dossier sense contenir le .appimage du launcher +url="https://github.com/PrismLauncher/PrismLauncher/releases/download/9.4/PrismLauncher-Linux-x86_64.AppImage" #URL du github pour telecharger le launcher -check_storage(){ - if [ $used_storage+$minecraftstorage+$margin_storage -gt "$max_storage" ]; then +total=$(($used_storage+$minecraft_storage+$margin_storage)) +check_storage(){ #VALIDE +if [ $total-gt$max_storage ]; then printf "Impossible d'installer minecraft, il n'y a pas assez de place." - printf "\tEssayez de supprimer quelques fichiers, regardez dans les configuration (du -h --max-depth=1 ~/.confs) pour connaitre la taille des differentes configuration" - printf "\tNote: Chez moi la configuration de Discord faisait plus de 700Mo et celle de Firefox plus de 600Mo" + printf "\n\tEssayez de supprimer quelques fichiers, regardez dans les configuration (du -h --max-depth=1 ~/.confs) pour connaitre la taille des differentes configuration" + printf "\n\tNote: Chez moi la configuration de Discord faisait plus de 700Mo et celle de Firefox plus de 600Mo" return 1 else return 0 fi } -check_path(){ +check_path(){ #VALIDE #Verfication de l'arbo du dossier minecraft - if [ -f "$minecraft_path" ]; then - mkdir -p $minecraft_path $launcher_config_path $instances_path $mods_path $java_path + if [ ! -f "$minecraft_path" ]; then + mkdir $minecraft_path $launcher_config_path $instances_path $mods_path $java_path + else if [ ! -f "$instances_path" ]; then - mkdir -p $instances_path + mkdir $instances_path fi if [ ! -f "$mods_path" ]; then - mkdir -p $mods_path + mkdir $mods_path fi if [ ! -f "$java_path" ]; then - mkdir -p $java_path + mkdir $java_path fi if [ ! -f "$launcher_config_path" ]; then - mkdir -p $launcher_config_path + mkdir $launcher_config_path fi if [ ! -f "$downloads_path" ]; then - mkdir -p $downloads_path + mkdir $downloads_path fi fi } -check_config(){ +check_config(){ #VALIDE if [ ! -f "launcher_config_path/prismlauncher.cfg" ]; then - curl -L -o "$launcher_config_path/" "https://github.com/PixPix20/Minecraft-Installer/blob/main/prismlauncher.cfg" - awk -F '=' -v varname=="DownloadsDir" -v varvalue="$downloads_path" '$1 == varname { $2 = "\""varvalue"\"" } { print }' "$launcher_config_path/prismlaucnher.cfg" - awk -F '=' -v varname=="InstanceDir" -v varvalue="$instances_path" '$1 == varname { $2 = "\""varvalue"\"" } { print }' "$launcher_config_path/prismlaucnher.cfg" - awk -F '=' -v varname=="CentralModsDir" -v varvalue="$mods_path" '$1 == varname { $2 = "\""varvalue"\"" } { print }' "$launcher_config_path/prismlaucnher.cfg" - awk -F '=' -v varname=="JavaDir" -v varvalue="$java_path" '$1 == varname { $2 = "\""varvalue"\"" } { print }' "$launcher_config_path/prismlaucnher.cfg" - fi + wget -P "$launcher_config_path/" "https://raw.githubusercontent.com/PixPix20/Minecraft-Installer/refs/heads/main/prismlauncher.cfg" + sed -i "s|DownloadsDir=|DownloadsDir=$downloads_path|" $launcher_config_path/prismlauncher.cfg + sed -i "s|InstanceDir=|InstanceDir=$instances_path|" $launcher_config_path/prismlauncher.cfg + sed -i "s|CentralModsDir=|CentralModsDir=$mods_path|" $launcher_config_path/prismlauncher.cfg + sed -i "s|JavaDir=|JavaDir=$java_path|" $launcher_config_path/prismlauncher.cfg +fi } check_account(){ #TODO: A voir - while [ ! -f "$launcher_conig_path/accounts.sh" ]; do + while [ ! -f "$launcher_config_path/accounts.sh" ]; do sleep 2 done cp $HOME/.local/share/PrismLauncher/accounts.json $launcher_config_path } -check_launcher(){ +check_launcher(){ #VALIDE if [ ! -f "$appimage" ]; then echo "Téléchargement de PrismLauncher..." mkdir -p "$(dirname "$appimage")" - curl -L -o "$appimage" "$url" - chmod +x "$appimage" + #curl -L -o "$appimage" "$url" + wget -P "$appimage" "$url" +chmod +x "$appimage" fi } -cop_files(){ +cop_files(){ #VALIDE if [ ! -f "$prismlocal_path" ]; then mkdir -p $prismlocal_path fi - cp $launcher_config_file/* $prismlocal_path + cp $launcher_config_path/* $prismlocal_path } + +start_launcher(){ + nix-shell -p appimage-run --run "appimage-run $appimage" +} + +#installation +#check_storage +check_path +check_config +cop_files +check_launcher +echo fin +start_launcher && check_account # doit se faire en para