Skip to content

Build Documentation

simonsasse edited this page Jan 11, 2024 · 9 revisions

Introduction

Welcome to the build documentation for the amos2023ws03-gui-frame-diff project — a tool designed for analyzing and presenting differences in various video files. This documentation outlines the process of building the different modules that form part of the project.

Prerequisites

  • Java (Working at least with JDK Coretto 17.0.9)
  • Gradle (Working at least with version 7.4.2)

For detailed information please refer to the corresponding readme of the respective libraries.

Building and Running the modules

Library 1

The VideoGenerator consists of the library and an example project.

library

  1. build in VideoGenerator/library
    • ./gradlew assemble
  2. Run the unit tests
    • ./gradlew test

example

  1. build in VideoGenerator/example
    • ./gradlew assemble
  2. download test assets
    • ./gradlew downloadAndUnzipTestAssets
  3. to run unit tests
    • ./gradlew test
  4. For the next steps we assume, that emulator and adb are installed (usually at $ANDROID_HOME/{emulator,platform-tools}) and in the PATH
    • emulator -list-avds
  5. start the emulator without loading a previous snapshot
    • emulator -avd Pixel_3a_API_34_extension_level_7_x86_64 -no-snapshot-load -wipe-data
  6. if the emulator says that it cant connect to adb, we need to restart the adb server
    • adb kill-server && adb start-server
  7. to run android tests
    • ./gradlew connectedAndroidTest
  8. installing the debug apk into the emulator
    • adb install app/build/outputs/apk/debug/app-debug.apk
  9. To run the app, one needs to click the appropriate icon in the emulator or by running this adb shell command
    • adb shell am start -n de.guiframediff.videogeneratorexample/de.guiframediff.videogeneratorexample.MainActivity -a android.intent.action.MAIN -c android.intent.category.LAUNCHER --splashscreen-show-icon

Library 2

  1. Build a jar file:
    • ./gradlew assemble
  2. Download test assets:
    • ./gradlew downloadAndUnzipTestAssets
  3. To run tests:
    • ./gradlew test

GUI

  1. Build a jar file:
    • ./gradlew assemble
  2. To run tests:
    • ./gradlew :test
    • The colon prevents tests from lib1 and lib2 to run as well.
  3. To build a native application for the current OS:
    • ./gradlew createDistributable
  4. Run the app without creating an executable (call 1. before):
    • ./gradlew :run
Clone this wiki locally