forked from markfguerra/GLWallpaperService
-
Notifications
You must be signed in to change notification settings - Fork 2
/
readme-contribute.txt
133 lines (93 loc) · 6.6 KB
/
readme-contribute.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
Project Setup - GLWallpaperService
==================================
Discussion Group:
http://groups.google.com/group/glwallpaperservice
Repository:
https://github.com/markfguerra/GLWallpaperService/
Intended Audience
-----------------
This document is for developers who want to improve GLWallpaperService. It shows you how to download the source code to to improve it (or break it) as you please using Eclipse.
If you're only interested in using the software to make an OpenGL Wallpaper, this isn't for you. Instead, look at readme.txt for info on how to get and install the Jar.
Install required software
-------------------------
To start, make sure install Eclipse the latest Android SDK are installed. Optionally, install git. Follow the instructions provided by those software projects to do so.
Eclipse: http://wiki.eclipse.org/FAQ_Where_do_I_get_and_install_Eclipse%3F
Android SDK: http://developer.android.com/sdk/installing.html
Git: http://git-scm.com/
Also, if you plan on using git, we recommend you make an account on github.
http://github.com/
Folder Setup
------------
We are going to make two folders in this document. One will contain the code itself, and another will contain the Eclipse workspace. If you prefer that they both be in the same folder, do so. As if I could stop you ;)
Go to where you're putting all this stuff.
cd /path/to/your/folder
Make a folder for your workspace.
mkdir workspace
Get the code
------------
Download the source code. You can do so using git or just a regular old download.
For a direct download, go here. Extract the zip into a sub folder:
https://github.com/markfguerra/GLWallpaperService/zipball/master
If you use github, please fork this code from their web interface:
https://github.com/markfguerra/GLWallpaperService
Then you want to make a local clone of your github fork. Github will provide you with your own Url. My clone command looks like this:
git clone [email protected]:markfguerra/GLWallpaperService.git
A new folder will be created automatically, called GLWallpaperService/ containing your source code.
Visit this link if you need help using github:
http://help.github.com/
Start Eclipse
-------------
Open Eclipse and choose the folder you just created for your workspace. When it finishes loading, click the Arrow to go to the workbench.
Set up the Android SDK
----------------------
To set up the Android SDK for this project:
In the menu, go to Eclipse->Preferences. Go to the Android section.
Give it the location of your Android SDK folder. Give it a minute to figure things out.
Select Android 2.1 (Api level 7) then click Ok.
Import the code into the workspace
----------------------------------
In the Eclipse menu, choose File->New->"Android Project"
Choose "Create new project from existing source"
For the location click browse and select the "GLWallpaperService" folder. To be more specific, the project source folder is a sub-folder of the root. The root is the folder that contains the LICENSE file.
Select "Android 2.1-update1" as your build target. This is API Level 7.
For the Project Name, type "GLWallpaperService"
Repeat these steps for the "GLWallpaperTest" folder. Use the project name "GLWallpaperTest"
The code will now be in your workspace.
Library Project Setup
---------------------
Select the GLWallpaperService project in Eclipse and view its properties. Choose Android from the list, and check the "Is Library" check box.
Now view the same Android Properties page for the Test project. Under "Library", click "add" and choose GLWallpaperService. Apply and hit Ok.
Resolving build errors
----------------------
Most people should have a working project at this point. However, some folks encounter build errors when they first import the code into their workspace. There are a couple of tricks to help you fix them.
First and foremost, make sure you have the latest versions of the Android SDK and Eclipse plugin. This is important, because older versions of the developer tools handle Library Projects differently, so if you have an old version this may cause problems.
You may have to fix the Project Properties. Right-click on the "GLWallpaperService" project in the Package Explorer. Select "Android Tools"->"Fix Project Properties".
Also fix the project properties for "GLWallpaperTest" the same way.
In the menu, click on Project->Clean to clean all projects.
In Package Explorer, right-click on the GLWallpaperService project and click on "Refresh". Do the same for GLWallpaperTest.
You may need to click on Project->Clean to clean all projects again after the refresh.
Your errors should go away at this point. If not, try using a programming Q&A site such as stackoverflow.com and also search Google.
To Run
------
Save your work. By default, saving will also compile your code in Eclipse.
Plug in your Android Device to your computer, if you have one. If you don't plug in an Android device, the emulator will launch when you run the code. You may need create an Android Emulator if you havn't done so already.
In the Menu, choose Run->"Run Configurations".
Choose "Android Application"
Click on the "New" button. This is the button with the plus sign on it.
The name of the run configuration is New_configuration. Change it if you like.
Click "Browse..." to choose a project. Select GLWallpaperTest. This is a sample wallpaper that comes with the code.
Click Apply. Click Run.
The wallpaper will now install on your device or emulator. Use the regular Android live wallpaper picker to select "GL Wallpaper Test Project". You should see a 3D rotating cube.
Now that your run configuration is set up, you can run New_configuration any time by using the Toolbar icon.
Creating GLWallpaperService.jar
-------------------------------
Do the following to create the JAR file, which is convenient for use in projects.
In the Eclipse menu, click File -> Export
Choose "JAR File"
On the "JAR Export" screen, choose only GLWallpaperService.java. You do not need to include other files.
Make note of where the JAR will be saved and click Finish
Contribute your code
--------------------
If you do something cool with this software, we would love it if you would share your changes with us. Even if your changes still need some polishing. Don't worry, we're friendly :)
If you are using git and github, push your changes to your fork and send us a pull request. If you're not using those fancy things, we want to hear from you anyway. Send us a message and we'll work something out.
Thanks for your interest in this project. Good luck coding!