Skip to content

Commit

Permalink
Initial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
DerCodeDev committed May 19, 2023
0 parents commit 0180865
Show file tree
Hide file tree
Showing 8 changed files with 523 additions and 0 deletions.
38 changes: 38 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
target/
!.mvn/wrapper/maven-wrapper.jar
!**/src/main/**/target/
!**/src/test/**/target/

### IntelliJ IDEA ###
.idea/modules.xml
.idea/jarRepositories.xml
.idea/compiler.xml
.idea/libraries/
*.iws
*.iml
*.ipr

### Eclipse ###
.apt_generated
.classpath
.factorypath
.project
.settings
.springBeans
.sts4-cache

### NetBeans ###
/nbproject/private/
/nbbuild/
/dist/
/nbdist/
/.nb-gradle/
build/
!**/src/main/**/build/
!**/src/test/**/build/

### VS Code ###
.vscode/

### Mac OS ###
.DS_Store
101 changes: 101 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,101 @@
# VMD Converter für Coktel Vision Spiele (Deutsch)
Entwickelt von DerCodeDev (Samir Ademi) & [CrystalBen](https://wiki.scummvm.org/index.php?title=User:CrystalBen) (Benjamin Funke)

Coktel Vision war ein französicher Spieleentwickler und war bekannt für seine an Addy / Addy Junior / Adiboo Spielereihen.
der seine Spiele auf zwei verschiedenen Enginen entwickelt hat namens DEV6 und DEV7.

# Anforderungen:
Du brauchst du nur ffmpeg
# Wie installiere ich ffmpeg auf Windows?
1. Lade ffmpeg [herunter](https://www.gyan.dev/ffmpeg/builds/)
2. Extrahiere die ZIP Datei (am besten auf die C: Parition)
3. Dann überprüfe ob alles richtig extrahiert wurde.
4. Nun öffene die Systemumgebungsvariablen.
5. Dann klicke auf Neu und gebe den Namen der Variable ein.
6. Nun klicke auf Datei durchsuchen und suche ffmpeg.exe und wähle diese aus.
7. dann drücke OK.
8. dann drücke OK erneut.
9. und nun zum allerletzen mal OK.
10. Nun öffene die CMD und gebe ffmpeg -version ein nun sollte eine Ausgabe erfolgen: ffmpeg version Versionsnummer

# Wie installiere ich ffmpeg unter Linux?
1. Öffene ein Terminal und gebe sudo apt install ffmpeg -y ein.
2. Nach der Installation gebe ffmpeg -version ein
3. Diese Ausgabe sollte angezeigt werden: ffmpeg version und dann die Versionsnummer

## Unterstütze Spiele:

- Adi Jr. (DEV6)
- Addy Junior (DEV6)
- Addy 4

## Bald unterstützte Spiele:
- Adiboo 3 (DEV7)
- Addy 5 (DEV7)

# VMD Converter for Coktel Vision Games (English)
Coktel Vision was a french Game Developer, Coktel was known for the familar Adi / Adiboo Games series.
Coktel had back then two Engines DEV6 and DEV7.
Developed by DerCodeDev & [CrystalBen](https://wiki.scummvm.org/index.php?title=User:CrystalBen) (Benjamin Funke)

# Requirements:
you only need to have ffmpeg
# How to install ffmpeg on Windows?
1. Download ffmpeg [here](https://www.gyan.dev/ffmpeg/builds/)
2. Extract the Zip File into a Folder (recommended is to extract the Folder ffmpeg to the root of your C Partiton)
3. then check if you have in C:\ffmpeg\bin a ffmpeg.exe if so you can continue.
4. now went to System environment variables and press on Environmentvariables.
5. then press on New at the Section variables.
6. now under Name of Variable type ffmpeg and for Value of variable press on Browse File and search for ffmpeg.exe.
7. then press OK.
8. then press OK again.
9. and then for the very last time press OK.
10. now open a cmd and type fffmpeg -version, to check if it works now. you should get some output like: ffmpeg version and then the versionumber.

# How to install ffmpeg under Linux?
1. open a Terminal and write sudo apt install ffmpeg -y
2. after the Installation test if ffmpeg was installed sucessfully via ffmpeg -version
3. you should get some output like: ffmpeg version and then your versionnumber

## Supported Games:
- AJ's World of Discovery
- Adiboo 2 (DEV6)
- Adi 4.0 (DEV6)

## Games that are supported soon:
- Adiboo 3 (DEV7)
- Addy 5 (DEV7)

# VMD Converter pour Coktel Vision Jeux (Français)
Développé par DerCodeDev (Samir Ademi) & [CrystalBen](https://wiki.scummvm.org/index.php?title=User:CrystalBen) (Benjamin Funke)
Coktel Vision était francais Développeur pour Jeux. le de connu Adi / Adibou Jeux series devlopee a.
Coktel etait deux Game moteur DEV6 et DEV7

# Logiciels requis:
Vous n'avez besoin que de ffmpeg
# Comment Installer ffmpeg sur Windows?
1. Téléchargé ffmpeg [ici](https://www.gyan.dev/ffmpeg/builds/)
2. extrait ZIP Fichier (Recommende: C: Parition)
3. maintenant vérifier le Fichier correctement extrait.
4. Nun lancer System environment.
5. Cliquez sur Nouvelle et gebe den Namen de Variable ein.
6. Cliquez sur Parcourir le fichier et suche ffmpeg.exe choisir de maintenant le exe de.
7. Cliquez sur OK.
8. Cliquez sur OK en nouveau.
9. et maintenant cliquez sur OK pour la dernière fois.
10. Le lancer cmd entrer ffmpeg -version sortir comme: ffmpeg version numéro de version.

# Comment Installer ffmpeg sur Linux?
1. lancer Terminal and write sudo apt install ffmpeg -y
2. entre maintenant ffmpeg -version
3. la sortie ressemble à ceci: ffmpeg version numéro de version.


## Supportée Jeux
- Adibou 1
- Adibou 2 (DEV6)
- Adi 4 (DEV6)
- Adibou presente Dessin (DEV7)
## Bientot supportée Jeux
- Adibou 3 (DEV7)
- Adi 5 (DEV7)
51 changes: 51 additions & 0 deletions pom.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>org.example</groupId>
<artifactId>VMDConverter</artifactId>
<version>1.0-SNAPSHOT</version>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<maven.compiler.source>11</maven.compiler.source>
<maven.compiler.target>11</maven.compiler.target>
</properties>
<dependencies>
<dependency>
<groupId>org.openjfx</groupId>
<artifactId>javafx-controls</artifactId>
<version>20</version>
</dependency>
<dependency>
<groupId>org.openjfx</groupId>
<artifactId>javafx-fxml</artifactId>
<version>20</version>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.8.0</version>
<configuration>
<release>11</release>
</configuration>
</plugin>
<plugin>
<groupId>org.openjfx</groupId>
<artifactId>javafx-maven-plugin</artifactId>
<version>0.0.6</version>
<executions>
<execution>
<!-- Default configuration for running -->
<!-- Usage: mvn clean javafx:run -->
<id>default-cli</id>
<configuration>
<mainClass>dev.samir.vmdconverter.App</mainClass>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</project>
45 changes: 45 additions & 0 deletions src/main/java/dev/samir/vmdconverter/App.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
package dev.samir.vmdconverter;

import javafx.application.Application;
import javafx.fxml.FXMLLoader;
import javafx.scene.Parent;
import javafx.scene.Scene;
import javafx.scene.image.Image;
import javafx.stage.Stage;

import java.io.IOException;

/**
* JavaFX App
*/
public class App extends Application {

private static Scene scene;

@Override
public void start(Stage stage) throws IOException {
scene = new Scene(loadFXML("vmdconverter"));
stage.setResizable(false);
stage.setTitle("VMD Converter");
stage.setScene(scene);
stage.getIcons().add(new Image("https://i.ibb.co/8mg6GLm/icon.png"));
stage.show();
}

static void setRoot(String fxml) throws IOException {
scene.setRoot(loadFXML(fxml));
}

private static Parent loadFXML(String fxml) throws IOException {
FXMLLoader fxmlLoader = new FXMLLoader(App.class.getResource(fxml + ".fxml"));
return fxmlLoader.load();
}

public static void main(String[] args) {
launch();
}

public static Scene getScene() {
return scene;
}
}
136 changes: 136 additions & 0 deletions src/main/java/dev/samir/vmdconverter/AppController.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,136 @@
package dev.samir.vmdconverter;

import dev.samir.vmdconverter.utils.ConsoleOutput;
import javafx.concurrent.Task;
import javafx.event.ActionEvent;
import javafx.fxml.FXML;
import javafx.scene.control.*;
import javafx.stage.DirectoryChooser;
import javafx.stage.FileChooser;
import dev.samir.vmdconverter.converter.VMDConverter;

import java.io.File;
import java.io.PrintStream;


public class AppController {

private static String fileName;

@FXML
private TextField inputField;

@FXML
private TextField outputField;

@FXML
private RadioButton rb3;

@FXML
private RadioButton rb4;

@FXML
private TextArea consoleLog;


@FXML
public void inputFieldBrowseButton(final ActionEvent actionEvent) {
actionEvent.consume();
final FileChooser fileChooser = new FileChooser();
fileChooser.setTitle("Select your VMD File!");
fileChooser.getExtensionFilters().add(new FileChooser.ExtensionFilter("VMD File (*.vmd)", "*.vmd"));
final File selectedFile = fileChooser.showOpenDialog(App.getScene().getWindow());
if (selectedFile != null) {
inputField.setText(selectedFile.getAbsolutePath());
fileName = selectedFile.getName().replaceAll(".VMD", "").replace(".vmd", "");

}
}

@FXML
public void outputFieldBrowseButton(final ActionEvent actionEvent) {
actionEvent.consume();
final DirectoryChooser directoryChooser = new DirectoryChooser();
directoryChooser.setTitle("Select your output file location!");
final File selectedDirectory = directoryChooser.showDialog(App.getScene().getWindow());

if (selectedDirectory != null) {
outputField.setText(selectedDirectory.getAbsolutePath());
}
}

@FXML
public void initialize() {
ConsoleOutput consoleOutput = new ConsoleOutput(consoleLog);
PrintStream consolePrintStream = new PrintStream(consoleOutput);
System.setOut(consolePrintStream);
}


@FXML
public void startButton(final ActionEvent actionEvent) {
actionEvent.consume();
if (inputField.getText().isEmpty() || inputField.getText() == null) {
showErrorMessage();
return;
}
if (outputField.getText().isEmpty() || outputField.getText() == null) {
showErrorMessage();
return;
}
if (!rb3.isSelected() && !rb4.isSelected()) {
showErrorMessage();
return;
}

if (rb4.isSelected()) {
Task<Void> conversionTask = new Task<>() {
@Override
protected Void call() throws Exception {
VMDConverter.convertVideoMP4(inputField.getText(), outputField.getText());
return null;
}
};
ConsoleOutput consoleOutput = new ConsoleOutput(consoleLog);
PrintStream consolePrintStream = new PrintStream(consoleOutput);
System.setOut(consolePrintStream);

Thread conversionThread = new Thread(conversionTask);
conversionThread.setDaemon(true);
conversionThread.start();

return;
}
if (rb3.isSelected()) {
Task<Void> conversionTask = new Task<>() {
@Override
protected Void call() throws Exception {
VMDConverter.convertVideoMP3(inputField.getText(), outputField.getText());
return null;
}
};
ConsoleOutput consoleOutput = new ConsoleOutput(consoleLog);
PrintStream consolePrintStream = new PrintStream(consoleOutput);
System.setOut(consolePrintStream);

Thread conversionThread = new Thread(conversionTask);
conversionThread.setDaemon(true);
conversionThread.start();

}
}


private void showErrorMessage() {
Alert alert = new Alert(Alert.AlertType.ERROR);
alert.setTitle("Error Dialog");
alert.setHeaderText("Look, an Error Dialog");
alert.setContentText("Please fill out all fields properly.");
alert.showAndWait();
}

public static String getFilename() {
return fileName;
}
}

Loading

0 comments on commit 0180865

Please sign in to comment.