Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/ci-workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,10 @@ jobs:
- name: Install KRPC as a Local Library
run: |
mvn install:install-file \
-Dfile=./src/main/resources/krpc-java-0.5.2.jar \
-Dfile=./src/main/resources/krpc-java-0.5.4.jar \
-DgroupId=io.github.krpc \
-DartifactId=krpc-java \
-Dversion=0.5.2 \
-Dversion=0.5.4 \
-Dpackaging=jar

- name: Set up JDK 17
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/release-new-version.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,10 @@ jobs:
- name: Install KRPC as a Local Library
run: |
mvn install:install-file \
-Dfile=./src/main/resources/krpc-java-0.5.2.jar \
-Dfile=./src/main/resources/krpc-java-0.5.4.jar \
-DgroupId=io.github.krpc \
-DartifactId=krpc-java \
-Dversion=0.5.2 \
-Dversion=0.5.4 \
-Dpackaging=jar

- name: Set up JDK 17
Expand Down
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ manobras, e pilotar rovers.
---
É necessário ter o [Java](https://java.com/pt-BR/) instalado para utilizar o "MechPeste.jar".
Uma versão mais atualizada do
mod [KRPC](https://github.com/krpc/krpc/releases/download/v0.5.2/krpc-0.5.2.zip)
mod [KRPC](https://github.com/krpc/krpc)
pode ser instalada diretamente do aplicativo MechPeste pelo menu Arquivo > Instalar KRPC.

## **Como instalar:**
Expand Down Expand Up @@ -78,14 +78,14 @@ mover para o alvo, desviando dos obstáculos à frente.

Agora o MechPeste tem como base o gerenciador de dependências Maven. Para poder instalar a biblioteca
do KRPC no entanto, como não está disponível no repositório público do Maven, é necessário fazer o download
e instalar a biblioteca KRPC em sua versão 0.5.2 com o seguinte comando:
e instalar a biblioteca KRPC em sua versão 0.5.4 com o seguinte comando:

``` bash
mvn install:install-file \
-Dfile=<CAMINHO_DO_DOWNLOAD>\krpc-java-0.5.2.jar \
-Dfile=<CAMINHO_DO_DOWNLOAD>\krpc-java-0.5.4.jar \
-DgroupId=io.github.krpc \
-DartifactId=krpc-java \
-Dversion=0.5.2 \
-Dversion=0.5.4 \
-Dpackaging=jar \
```
Substitua `<CAMINHO_DO_DOWNLOAD>` pela pasta onde está o arquivo do KRPC. Isso instalará essa biblioteca
Expand Down
4 changes: 2 additions & 2 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

<groupId>com.pesterenan</groupId>
<artifactId>MechPeste</artifactId>
<version>0.7.1</version>
<version>0.8.0</version>

<build>
<plugins>
Expand Down Expand Up @@ -85,7 +85,7 @@
<dependency>
<groupId>io.github.krpc</groupId>
<artifactId>krpc-java</artifactId>
<version>0.5.2</version>
<version>0.5.4</version>
</dependency>
<dependency>
<groupId>org.javatuples</groupId>
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/com/pesterenan/model/ActiveVessel.java
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ public class ActiveVessel {
protected Stream<Float> totalMass;
public ReferenceFrame surfaceReferenceFrame;
public float totalCharge;
public float gravityAcel;
public double gravityAcel;
public CelestialBody currentBody;
public Stream<Double> altitude;
public Stream<Double> surfaceAltitude;
Expand Down
9 changes: 3 additions & 6 deletions src/main/java/com/pesterenan/updater/KrpcInstaller.java
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@

public class KrpcInstaller {
static final int BUFFER = 2048;
private static final String KRPC_GITHUB_LINK = "https://github.com/krpc/krpc/releases/download/v0.5.2/krpc-0.5.2.zip";
private static final String KRPC_GITHUB_LINK = "https://github.com/krpc/krpc/releases/download/v0.5.4/krpc-0.5.4.zip";
private static String KSP_FOLDER = null;

public static String getKspFolder() {
Expand All @@ -39,13 +39,11 @@ public static void downloadAndInstallKrpc() {
public static void downloadKrpc() {
URL krpcLink;
try {

krpcLink = new URL(KRPC_GITHUB_LINK);
ReadableByteChannel readableByteChannel = Channels.newChannel(krpcLink.openStream());
FileOutputStream fos = new FileOutputStream(KSP_FOLDER + "\\krpc-0.5.2.zip");
FileOutputStream fos = new FileOutputStream(KSP_FOLDER + "\\krpc-0.5.4.zip");
fos.getChannel().transferFrom(readableByteChannel, 0, Long.MAX_VALUE);
fos.close();

} catch (IOException e) {
InstallKrpcDialog.setStatus("Não foi possível fazer o download do KRPC");
}
Expand All @@ -59,7 +57,7 @@ public static void unzipKrpc() {
}
BufferedOutputStream dest;
// zipped input
FileInputStream fis = new FileInputStream(KSP_FOLDER + "\\krpc-0.5.2.zip");
FileInputStream fis = new FileInputStream(KSP_FOLDER + "\\krpc-0.5.4.zip");
ZipInputStream zis = new ZipInputStream(new BufferedInputStream(fis));
ZipEntry entry;
while ((entry = zis.getNextEntry()) != null) {
Expand Down Expand Up @@ -89,5 +87,4 @@ public static void unzipKrpc() {
InstallKrpcDialog.setStatus("Não foi possível fazer instalar o KRPC");
}
}

}
2 changes: 1 addition & 1 deletion src/main/resources/MechPesteBundle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ installer_dialog_btn_cancel = Cancel
installer_dialog_btn_download = Download file and install
installer_dialog_pnl_path = Path to KSP's folder\:
installer_dialog_title = KRPC Installer
installer_dialog_txt_info = <html>Here you can download the latest version of KRPC to use with MechPeste.<br>The app will connect and download the 0.5.2 version from the original KRPC's Github.</html>
installer_dialog_txt_info = <html>Here you can download the latest version of KRPC to use with MechPeste.<br>The app will connect and download the 0.5.4 version from the original KRPC's Github.</html>
lbl_stat_ready = Ready.
main_mn_file = File
main_mn_help = Help
Expand Down
2 changes: 1 addition & 1 deletion src/main/resources/MechPesteBundle_pt.properties
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ installer_dialog_btn_cancel = Cancelar
installer_dialog_btn_download = Fazer download e instalar
installer_dialog_pnl_path = Caminho para a Pasta do KSP\:
installer_dialog_title = Instalador do KRPC
installer_dialog_txt_info = <html>Aqui voc\u00ea pode baixar a \u00faltima vers\u00e3o do KRPC para usar com o MechPeste.<br>O app ir\u00e1 se conectar e baixar a vers\u00e3o 0.5.2 do Github original do KRPC.</html>
installer_dialog_txt_info = <html>Aqui voc\u00ea pode baixar a \u00faltima vers\u00e3o do KRPC para usar com o MechPeste.<br>O app ir\u00e1 se conectar e baixar a vers\u00e3o 0.5.4 do Github original do KRPC.</html>
lbl_stat_ready = Pronto.
main_mn_file = Arquivo
main_mn_help = Ajuda
Expand Down
Binary file not shown.