Skip to content

Commit f1dfc10

Browse files
committed
Merge pull request playgameservices#108 from claywilkinson/master
Adding Windows script for making Eclipse compatible project structure.
2 parents cfc5e2d + 744e001 commit f1dfc10

2 files changed

Lines changed: 37 additions & 1 deletion

File tree

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ Pick a set of instructions below depending on whether you're using Eclipse or An
4848

4949
<h3>If you're using Eclipse...</h3>
5050

51-
1. From the command line run Scripts/make_eclipse_compat. This creates the directory structure needed to import the projects correctly.
51+
1. From the command line run Scripts/make_eclipse_compat (or Scripts/make_eclipse_compat.cmd on Windows). This creates the directory structure needed to import the projects correctly.
5252
1. Start Eclipse
5353
1. Import the Google Play Services library project (available for download through the SDK manager):
5454
1. Click **File | Import | Android | Existing Android Code into Workspace**

Scripts/make_eclipse_compat.cmd

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
:: This is based on the shell script with the same name. #!/bin/sh
2+
:: echo off
3+
4+
:: check to make sure we are in the base directory.
5+
if NOT exist BasicSamples (
6+
echo "*** Error: this script must be run from the base directory of your working copy."
7+
exit /B 1
8+
)
9+
10+
echo "Making eclipse-compatible projects..."
11+
if NOT exist eclipse_compat mkdir eclipse_compat
12+
13+
echo "Converting each sample"
14+
15+
for %%i in (BeGenerous ButtonClicker TypeANumber CollectAllTheStars2 TrivialQuest TrivialQuest2 SkeletonTbmp libraries\BaseGameUtils) do (
16+
echo "Preparing %%i..."
17+
if NOT exist eclipse_compat\%%i mkdir eclipse_compat\%%i
18+
copy BasicSamples\%%i\src\main\AndroidManifest.xml eclipse_compat\%%i
19+
20+
:: # copy resources
21+
if exist eclipse_compat\%%i\res ( rd /s /q eclipse_compat\%%i\res)
22+
xcopy /e /i BasicSamples\%%i\src\main\res\*.* eclipse_compat\%%i\res
23+
24+
:: # copy source files
25+
if exist eclipse_compat\%%i\src ( rd /s /q eclipse_compat\%%i\src)
26+
mkdir eclipse_compat\%%i\src
27+
xcopy /e /i BasicSamples\%%i\src\main\java\* eclipse_compat\%%i\src
28+
29+
:: # copy libs
30+
if exist eclipse_compat\%%i\libs ( rd /s /q eclipse_compat\%%i\libs)
31+
mkdir eclipse_compat\%%i\libs
32+
xcopy /e /i Scripts\eclipse_aux\*.jar eclipse_compat\%%i\libs
33+
)
34+
35+
echo "Eclipse-compatible folders generated in eclipse_compat\"
36+

0 commit comments

Comments
 (0)