Skip to content

Commit

Permalink
Initial Commit
Browse files Browse the repository at this point in the history
  • Loading branch information
PulseBeat02 committed Dec 14, 2021
0 parents commit b2c4d1d
Show file tree
Hide file tree
Showing 39 changed files with 2,535 additions and 0 deletions.
69 changes: 69 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
# Java
.mtj.tmp/
*.class
*.jar
*.war
*.ear
*.nar
hs_err_pid*

# Maven
target/
pom.xml.tag
pom.xml.releaseBackup
pom.xml.versionsBackup
pom.xml.next
pom.xml.bak
release.properties
dependency-reduced-pom.xml
buildNumber.properties
.mvn/timing.properties
.mvn/wrapper/maven-wrapper.jar

# Gradle
bin/
build/
.gradle
.gradletasknamecache
gradle-app.setting
!gradle-wrapper.jar

# IntelliJ
out/
.idea/
.idea_modules/
*.iml
*.ipr
*.iws

# Eclipse
.settings/
tmp/
.metadata
.classpath
.project
*.tmp
*.bak
*.swp
*~.nib
local.properties
.loadpath
.factorypath

# NetBeans
nbproject/private/
nbbuild/
dist/
nbdist/
nbactions.xml
nb-configuration.xml

# Visual Studio Code
.vscode/
.code-workspace

# OS X
.DS_Store

# Server
./server
21 changes: 21 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
MIT License

Copyright (c) 2021 Brandon Li

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
67 changes: 67 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
# Static EMC Installers

Static EMC Installers is a lightweight library which downloads
an assortment of static compiled executables to your respective
operating system. It detects what type of operating system you are using
and installs the proper binary.

## Setup
1) Add Jitpack to your repositories:

Maven:
```xml
<repository>
<id>jitpack.io</id>
<url>https://jitpack.io</url>
</repository>
```

Gradle Groovy:
```groovy
maven { url 'https://jitpack.io' }
```

Gradle Kotlin DSL:
```kotlin
maven("https://jitpack.io")
```

2) Add the repository into your project:

Maven
```xml
<dependency>
<groupId>com.github.MinecraftMediaLibrary</groupId>
<artifactId>emc-installers</artifactId>
<version>master-SNAPSHOT</version>
</dependency>
```

Gradle Groovy:
```groovy
implementation 'com.github.MinecraftMediaLibrary:emc-installers:master-SNAPSHOT'
```

Gradle Kotlin DSL:
```kotlin
implementation("com.github.MinecraftMediaLibrary:emc-installers:master-SNAPSHOT")
```

## Usage
Using the library is pretty easy. Define an `FFmpegInstaller`
using the factory methods: (as an example)

```java
// Creates an installer with default installation directory
final FFmpegInstaller installer = FFmpegInstaller.create();

// Creates an installer with the installation directory "path/to/dir"
final FFmpegInstaller installer = FFmpegInstaller.create(Paths.get("path/to/dir"));

// Downloads the FFmpeg executable
final Path executable = installer.download();
```

That's it!


77 changes: 77 additions & 0 deletions build.gradle.kts
Original file line number Diff line number Diff line change
@@ -0,0 +1,77 @@
plugins {
java
`java-library`
`maven-publish`
id("com.github.hierynomus.license-base") version "0.16.1"
}

group = "io.github.pulsebeat02"
version = "v1.0.1"

repositories {
mavenCentral()
}

dependencies {
compileOnlyApi("com.google.guava:guava:31.0.1-jre")
testRuntimeOnly("com.google.guava:guava:31.0.1-jre")
compileOnlyApi("uk.co.caprica:vlcj:4.7.1")
testRuntimeOnly("uk.co.caprica:vlcj:4.7.1")
compileOnlyApi("uk.co.caprica:vlcj-natives:4.1.0")
testRuntimeOnly("uk.co.caprica:vlcj-natives:4.1.0")
compileOnlyApi("net.java.dev.jna:jna:5.9.0")
testRuntimeOnly("net.java.dev.jna:jna:5.9.0")
compileOnlyApi("net.java.dev.jna:jna-platform:5.9.0")
testRuntimeOnly("net.java.dev.jna:jna-platform:5.9.0")
}

sourceSets {
main {
java {
srcDir("src/main/java")
}
resources {
srcDir("src/main/resources")
}
}
}

tasks {
java {
sourceCompatibility = JavaVersion.VERSION_1_8
targetCompatibility = JavaVersion.VERSION_1_8
}
publish {
dependsOn(clean)
dependsOn(build)
}
}

publishing {
repositories {
maven {
setUrl("https://pulsebeat02.jfrog.io/artifactory/pulse-gradle")
credentials {
username = ""
password = ""
}
}
}
publications {
create<MavenPublication>("maven") {
from(components["java"])
}
}
}

subprojects {

apply(plugin = "com.github.hierynomus.license-base")

license {
header = rootProject.file("LICENSE")
encoding = "UTF-8"
mapping("java", "SLASHSTAR_STYLE")
includes(listOf("**/*.java", "**/*.kts"))
}
}
Binary file added gradle/wrapper/gradle-wrapper.jar
Binary file not shown.
5 changes: 5 additions & 0 deletions gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-7.3-bin.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
Loading

0 comments on commit b2c4d1d

Please sign in to comment.