Skip to content

Commit f50539a

Browse files
update docs, binaries. linux still TODO.
1 parent 9ae7677 commit f50539a

40 files changed

+156
-82
lines changed

BUILDING.md

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
## Building from source
2+
1. run `./gradlew windowsNatives`
3+
2. run `./gradlew linuxNatives`
4+
3. Clone the repo on a mac. Copy the files you just built (from the `libs` folder) to the mac
5+
4. On the mac, run `./gradlew OSXNatives`
6+
5. run `./gradle dist` to generate a .jar file with all the dependencies bundled
7+
8+
### Dependencies for Building on Linux
9+
Right now the Windows and Linux binaries, sdl2gdx needs to be built on Linux. The binaries for Windows are cross-compiled.
10+
11+
The following packages (or equivalents) are needed:
12+
13+
```
14+
ant
15+
build-essential
16+
mingw-w64
17+
```
18+
19+
If you've built C stuff for different platforms and bitnesses, you probably have all this stuff. If not, use your package manager to get them all. It should be something like this if you're on Ubuntu or Debian or whatever:
20+
21+
```
22+
sudo apt-get install ant build-essential mingw-w64
23+
```
24+
25+
You also need to install cross compiled 32 and 64 bit versions of SDL, e.g.
26+
27+
```
28+
./configure --host=i686-w64-mingw32 ; make ; sudo make install
29+
./configure --host=x86_64-w64-mingw32 ; make ; sudo make install
30+
```
31+
32+
33+
### Dependencies for Building on OS X
34+
The OS X binaries currently must be built on OS X. It is probably possible to build the Windows and Linux binaries here too, but I haven't tried that out.
35+
36+
The dependencies are pretty much the same (gradle, ant, g++). These packages can be installed from homebrew.

README.md

Lines changed: 9 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
# Java SDL - GDX Controllers
22

3+
Plug plug plug, this library was made for [RetroWar 8bit Party Battle](http://retrowar.net)!
4+
35
## What
46

57
This library provides APIs at three layers:
@@ -33,7 +35,7 @@ project(":desktop") {
3335
compile "com.badlogicgames.gdx:gdx-controllers:$gdxVersion"
3436
- compile "com.badlogicgames.gdx:gdx-controllers-desktop:$gdxVersion"
3537
- compile "com.badlogicgames.gdx:gdx-controllers-platform:$gdxVersion:natives-desktop"
36-
+ compile "uk.co.electronstudio.retrowar:dsfdsf:1.0.+"
38+
+ compile "uk.co.electronstudio.retrowar:sdl2gdx:1.0.+"
3739
}
3840
}
3941
```
@@ -47,7 +49,7 @@ You can make your project depend on SDLJava.
4749
```diff
4850
project(":core") {
4951
dependencies {
50-
+ compile "uk.co.electronstudio.retrowar:dsfdsf:1.0.+"
52+
+ compile "uk.co.electronstudio.retrowar:sdl2gdx:1.0.+"
5153
}
5254
}
5355
```
@@ -78,6 +80,9 @@ try {
7880
}
7981
```
8082

83+
## API Documentation
84+
85+
[electronstudio.github.io/sdl2gdx/](https://electronstudio.github.io/sdl2gdx/)
8186

8287
## You might also like
8388
* [Jamepad](https://github.com/williamahartman/Jamepad) - Java SDL Joystick library
@@ -89,39 +94,6 @@ try {
8994
sdl2gdx is distributed under GPL+Classpath license, the same as OpenJDK itself, so you will have no
9095
problem using it anywhere you use OpenJDK.
9196

92-
## Building from source
93-
1. run `./gradlew windowsNatives`
94-
2. run `./gradlew linuxNatives`
95-
3. Clone the repo on a mac. Copy the files you just built (from the `libs` folder) to the mac
96-
4. On the mac, run `./gradlew OSXNatives`
97-
5. run `./gradle dist` to generate a .jar file with all the dependencies bundled
98-
99-
### Dependencies for Building on Linux
100-
Right now the Windows and Linux binaries, Jamepad needs to be built on Linux. The binaries for Windows are cross-compiled.
101-
102-
The following packages (or equivalents) are needed:
103-
104-
```
105-
ant
106-
build-essential
107-
mingw-w64
108-
```
109-
110-
If you've built C stuff for different platforms and bitnesses, you probably have all this stuff. If not, use your package manager to get them all. It should be something like this if you're on Ubuntu or Debian or whatever:
111-
112-
```
113-
sudo apt-get install ant build-essential mingw-w64
114-
```
115-
116-
You also need to install cross compiled 32 and 64 bit versions of SDL, e.g.
117-
118-
```
119-
./configure --host=i686-w64-mingw32 ; make ; sudo make install
120-
./configure --host=x86_64-w64-mingw32 ; make ; sudo make install
121-
```
122-
123-
124-
### Dependencies for Building on OS X
125-
The OS X binaries currently must be built on OS X. It is probably possible to build the Windows and Linux binaries here too, but I haven't tried that out.
97+
## Building from source
12698

127-
The dependencies are pretty much the same (gradle, ant, g++). These packages can be installed from homebrew.
99+
See [BUILDING](BUILDING.md)

build.gradle

Lines changed: 78 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,22 @@
11
apply plugin: "java"
2-
apply plugin: 'maven'
32

4-
group = 'com.github.WilliamAHartman'
3+
buildscript{
4+
repositories {
5+
jcenter()
6+
}
7+
dependencies{
8+
classpath 'com.jfrog.bintray.gradle:gradle-bintray-plugin:1.8.1'
9+
}
10+
}
11+
12+
13+
14+
//apply plugin: 'maven'
15+
apply plugin: 'com.jfrog.bintray'
16+
apply plugin: 'maven-publish'
17+
18+
19+
//group = 'com.github.WilliamAHartman'
520

621
sourceCompatibility = 1.8
722
targetCompatibility = 1.8
@@ -106,17 +121,68 @@ artifacts {
106121
archives javadocJar
107122
}
108123

109-
// To specify a license in the pom:
110-
install {
111-
repositories.mavenInstaller {
112-
pom.project {
113-
licenses {
114-
license {
115-
name 'zlib License'
116-
url 'http://www.zlib.net/zlib_license.html'
117-
distribution 'repo'
118-
}
124+
def pomConfig = {
125+
licenses {
126+
license {
127+
name "GPLv3 with Classpath Exception"
128+
url "https://www.gnu.org/software/classpath/license.html"
129+
distribution "repo"
130+
}
131+
}
132+
developers {
133+
developer {
134+
id "electronstudio"
135+
name "Electron Studio"
136+
137+
}
138+
}
139+
140+
scm {
141+
url "https://github.com/electronstudio/"
142+
}
143+
}
144+
145+
publishing {
146+
publications {
147+
mavenPublication(MavenPublication) {
148+
from components.java
149+
artifact sourcesJar {
150+
classifier "sources"
151+
}
152+
artifact javadocJar {
153+
classifier "javadoc"
154+
}
155+
groupId 'uk.co.electronstudio.sdl2gdx'
156+
artifactId 'sdl2gdx'
157+
version '1.0.0'
158+
159+
pom.withXml {
160+
def root = asNode()
161+
root.appendNode('description', 'LibGDX extension library')
162+
root.appendNode('name', 'sdl2gdx')
163+
root.appendNode('url', 'https://github.com/electronstudio/sdl2gdx')
164+
root.children().last() + pomConfig
119165
}
120166
}
121167
}
168+
//publish.dependsOn jar, sourcesJar, javadocJar, generatePomFileForMavenPublicationPublication
122169
}
170+
171+
String keyString = new File('/Volumes/Home/richard/bintray.key').text.trim()
172+
173+
bintray {
174+
user = 'electronstudio' //System.getenv('BINTRAY_USER')
175+
key = keyString //System.getenv('BINTRAY_KEY')
176+
publications = ['mavenPublication']
177+
publish = true
178+
override = true
179+
pkg {
180+
repo = 'sdl2gdx'
181+
name = 'sdl2gdx'
182+
// userOrg = 'electronstudio'
183+
licenses = ['Apache-2.0']
184+
vcsUrl = 'https://github.com/electronstudio/sdl2gdx.git'
185+
}
186+
}
187+
188+
bintrayUpload.dependsOn publish

docs/allclasses-frame.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
<!-- NewPage -->
33
<html lang="en">
44
<head>
5-
<!-- Generated by javadoc (1.8.0_181) on Sun Dec 02 05:07:33 GMT 2018 -->
5+
<!-- Generated by javadoc (1.8.0_181) on Sun Dec 02 06:07:16 GMT 2018 -->
66
<title>All Classes (sdl2gdx API)</title>
77
<meta name="date" content="2018-12-02">
88
<link rel="stylesheet" type="text/css" href="stylesheet.css" title="Style">

docs/allclasses-noframe.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
<!-- NewPage -->
33
<html lang="en">
44
<head>
5-
<!-- Generated by javadoc (1.8.0_181) on Sun Dec 02 05:07:33 GMT 2018 -->
5+
<!-- Generated by javadoc (1.8.0_181) on Sun Dec 02 06:07:16 GMT 2018 -->
66
<title>All Classes (sdl2gdx API)</title>
77
<meta name="date" content="2018-12-02">
88
<link rel="stylesheet" type="text/css" href="stylesheet.css" title="Style">

docs/constant-values.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
<!-- NewPage -->
33
<html lang="en">
44
<head>
5-
<!-- Generated by javadoc (1.8.0_181) on Sun Dec 02 05:07:33 GMT 2018 -->
5+
<!-- Generated by javadoc (1.8.0_181) on Sun Dec 02 06:07:16 GMT 2018 -->
66
<title>Constant Field Values (sdl2gdx API)</title>
77
<meta name="date" content="2018-12-02">
88
<link rel="stylesheet" type="text/css" href="stylesheet.css" title="Style">

docs/deprecated-list.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
<!-- NewPage -->
33
<html lang="en">
44
<head>
5-
<!-- Generated by javadoc (1.8.0_181) on Sun Dec 02 05:07:33 GMT 2018 -->
5+
<!-- Generated by javadoc (1.8.0_181) on Sun Dec 02 06:07:16 GMT 2018 -->
66
<title>Deprecated List (sdl2gdx API)</title>
77
<meta name="date" content="2018-12-02">
88
<link rel="stylesheet" type="text/css" href="stylesheet.css" title="Style">

docs/help-doc.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
<!-- NewPage -->
33
<html lang="en">
44
<head>
5-
<!-- Generated by javadoc (1.8.0_181) on Sun Dec 02 05:07:33 GMT 2018 -->
5+
<!-- Generated by javadoc (1.8.0_181) on Sun Dec 02 06:07:16 GMT 2018 -->
66
<title>API Help (sdl2gdx API)</title>
77
<meta name="date" content="2018-12-02">
88
<link rel="stylesheet" type="text/css" href="stylesheet.css" title="Style">

docs/index-all.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
<!-- NewPage -->
33
<html lang="en">
44
<head>
5-
<!-- Generated by javadoc (1.8.0_181) on Sun Dec 02 05:07:33 GMT 2018 -->
5+
<!-- Generated by javadoc (1.8.0_181) on Sun Dec 02 06:07:16 GMT 2018 -->
66
<title>Index (sdl2gdx API)</title>
77
<meta name="date" content="2018-12-02">
88
<link rel="stylesheet" type="text/css" href="stylesheet.css" title="Style">

docs/index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
<!-- NewPage -->
33
<html lang="en">
44
<head>
5-
<!-- Generated by javadoc (1.8.0_181) on Sun Dec 02 05:07:33 GMT 2018 -->
5+
<!-- Generated by javadoc (1.8.0_181) on Sun Dec 02 06:07:16 GMT 2018 -->
66
<title>sdl2gdx API</title>
77
<script type="text/javascript">
88
tmpTargetPage = "" + window.location.search;

0 commit comments

Comments
 (0)