Skip to content

Commit 5f9ba7b

Browse files
committed
Build sdlplugin
1 parent e509757 commit 5f9ba7b

File tree

17 files changed

+603
-415
lines changed

17 files changed

+603
-415
lines changed

.idea/assetWizardSettings.xml

Lines changed: 62 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/misc.xml

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

app/src/main/res/values/arrays.xml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -43,14 +43,14 @@
4343

4444
<string-array name="language_standard_entries">
4545
<item>""</item>
46-
<item>c90 - Support all ISO C90 programs (certain GNU extensions that conflict with ISO C90 are disabled). Same as -ansi for C code.</item>
47-
<item>c99 - ISO C99. This standard is substantially completely supported, modulo bugs and floating-point issues (mainly but not entirely relating to optional C99 features from Annexes F and G)</item>
48-
<item>c11 - ISO C11, the 2011 revision of the ISO C standard. This standard is substantially completely supported, modulo bugs, floating-point issues (mainly but not entirely relating to optional C11 features from Annexes F and G) and the optional Annexes K (Bounds-checking interfaces) and L (Analyzability).</item>
46+
<item>c90 - Support all ISO C90 programs.</item>
47+
<item>c99 - ISO C99.</item>
48+
<item>c11 - ISO C11, the 2011 revision of the ISO C standard.</item>
4949
<item>gnu90 - GNU dialect of ISO C90 (including some C99 features).</item>
5050
<item>gnu99 - GNU dialect of ISO C99.</item>
5151
<item>gnu11 - GNU dialect of ISO C11.</item>
5252
<item>c++11 - The 2011 ISO C++ standard plus amendments.</item>
53-
<item>gnu++11 - GNU dialect of -std=c++11.</item>
53+
<item>gnu++11</item>
5454
<item>c++14 - The 2014 ISO C++ standard plus amendments.</item>
5555
</string-array>
5656

sdlplugin/build.gradle

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ android {
2121
buildToolsVersion rootProject.ext.buildToolsVersion
2222

2323
defaultConfig {
24-
applicationId "com.pdaxrom.cctools.sdlplugin"
24+
applicationId "com.duy.c.cpp.compiler.sdlplugin"
2525
minSdkVersion rootProject.ext.minSdkVersion
2626
targetSdkVersion rootProject.ext.targetSdkVersion
2727
versionCode 3
@@ -58,5 +58,8 @@ dependencies {
5858
androidTestImplementation 'com.android.support.test:runner:1.0.1'
5959
androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.1'
6060
implementation fileTree(dir: 'libs', include: ['*.jar'])
61-
61+
implementation "com.android.support:appcompat-v7:$androidSupportVersion"
62+
implementation "com.android.support:support-v4:$androidSupportVersion"
63+
implementation "com.android.support:support-annotations:$androidSupportVersion"
64+
implementation "com.android.support:design:$androidSupportVersion"
6265
}

sdlplugin/proguard-rules.pro

Lines changed: 100 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,100 @@
1+
####################################################################################################
2+
####################################################################################################
3+
####################################################################################################
4+
######################################### PROGUARD #################################################
5+
####################################################################################################
6+
####################################################################################################
7+
####################################################################################################
8+
9+
# This is a configuration file for ProGuard.
10+
# http://proguard.sourceforge.net/index.html#manual/usage.html
11+
-dontusemixedcaseclassnames
12+
-dontskipnonpubliclibraryclasses
13+
-verbose
14+
15+
# Optimization is turned off by default. Dex does not like code run
16+
# through the ProGuard optimize and preverify steps (and performs some
17+
# of these optimizations on its own).
18+
#-dontoptimize
19+
#-dontpreverify
20+
21+
# If you want to enable optimization, you should include the
22+
# following:
23+
-optimizations !code/simplification/arithmetic,!code/simplification/cast,!field/*,!class/merging/*
24+
-optimizationpasses 5
25+
-allowaccessmodification
26+
#
27+
# Note that you cannot just include these flags in your own
28+
# configuration file; if you are including this file, optimization
29+
# will be turned off. You'll need to either edit this file, or
30+
# duplicate the contents of this file and remove the include of this
31+
# file from your project's proguard.config path property.
32+
33+
-keep public class * extends android.app.Activity
34+
-keep public class * extends android.app.Application
35+
-keep public class * extends android.app.Service
36+
-keep public class * extends android.content.BroadcastReceiver
37+
-keep public class * extends android.content.ContentProvider
38+
-keep public class * extends android.app.backup.BackupAgent
39+
-keep public class * extends android.preference.Preference
40+
-keep public class * extends android.support.v4.app.Fragment
41+
-keep public class * extends android.support.v4.app.DialogFragment
42+
-keep public class * extends com.actionbarsherlock.app.SherlockListFragment
43+
-keep public class * extends com.actionbarsherlock.app.SherlockFragment
44+
-keep public class * extends com.actionbarsherlock.app.SherlockFragmentActivity
45+
-keep public class * extends android.app.Fragment
46+
-keep public class com.android.vending.licensing.ILicensingService
47+
48+
# For native methods, see http://proguard.sourceforge.net/manual/examples.html#native
49+
-keepclasseswithmembernames class * {
50+
native <methods>;
51+
}
52+
53+
-keep public class * extends android.view.View {
54+
public <init>(android.content.Context);
55+
public <init>(android.content.Context, android.util.AttributeSet);
56+
public <init>(android.content.Context, android.util.AttributeSet, int);
57+
public void set*(...);
58+
}
59+
60+
-keepclasseswithmembers class * {
61+
public <init>(android.content.Context, android.util.AttributeSet);
62+
}
63+
64+
-keepclasseswithmembers class * {
65+
public <init>(android.content.Context, android.util.AttributeSet, int);
66+
}
67+
68+
-keepclassmembers class * extends android.app.Activity {
69+
public void *(android.view.View);
70+
}
71+
72+
# For enumeration classes, see http://proguard.sourceforge.net/manual/examples.html#enumerations
73+
-keepclassmembers enum * {
74+
public static **[] values();
75+
public static ** valueOf(java.lang.String);
76+
}
77+
78+
-keep class * implements android.os.Parcelable {
79+
public static final android.os.Parcelable$Creator *;
80+
}
81+
82+
-keepclassmembers class **.R$* {
83+
public static <fields>;
84+
}
85+
86+
-keep class android.support.v4.app.** { *; }
87+
-keep interface android.support.v4.app.** { *; }
88+
-keep class com.actionbarsherlock.** { *; }
89+
-keep interface com.actionbarsherlock.** { *; }
90+
# The support library contains references to newer platform versions.
91+
# Don't warn about those in case this app is linking against an older
92+
# platform version. We know about them, and they are safe.
93+
-dontwarn android.support.**
94+
-dontwarn com.google.ads.**
95+
-dontwarn com.makeramen.roundedimageview.**
96+
-dontwarn kellinwood.security.**
97+
-dontwarn org.spongycastle.**
98+
99+
-keep class org.libsdl.app.** { *; }
100+
-keep class com.duy.c.cpp.compiler.sdlplugin.** { *; }

sdlplugin/src/main/AndroidManifest.xml

Lines changed: 30 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,25 @@
1-
<?xml version="1.0" encoding="utf-8"?>
2-
<!-- Replace com.pdaxrom.cctools.sdlplugin with the identifier of your game below, e.g.
1+
<?xml version="1.0" encoding="utf-8"?><!-- Replace com.pdaxrom.cctools.sdlplugin with the identifier of your game below, e.g.
32
com.gamemaker.game
43
-->
54
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
6-
package="com.pdaxrom.cctools.sdlplugin"
7-
android:versionCode="2"
8-
android:versionName="1.1"
9-
android:installLocation="auto">
5+
xmlns:tools="http://schemas.android.com/tools"
6+
package="com.pdaxrom.cctools.sdlplugin"
7+
android:installLocation="auto"
8+
android:versionCode="2"
9+
android:versionName="1.1">
1010

1111
<!-- Android 2.3.3 -->
12-
<uses-sdk android:minSdkVersion="10" android:targetSdkVersion="19" />
13-
<!-- <uses-feature android:glEsVersion="0x00020000" /> -->
14-
<uses-feature android:name="android.hardware.touchscreen" android:required="false" />
15-
<uses-permission android:name="android.permission.INTERNET"/>
16-
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
17-
12+
<uses-sdk
13+
android:minSdkVersion="10"
14+
android:targetSdkVersion="19" />
15+
<!-- <uses-feature android:glEsVersion="0x00020000" /> -->
16+
<uses-feature
17+
android:name="android.hardware.touchscreen"
18+
android:required="false" />
19+
20+
<uses-permission android:name="android.permission.INTERNET" />
21+
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
22+
1823
<!-- Create a Java class extending sdlpluginActivity and place it in a
1924
directory under src matching the package, e.g.
2025
src/com/gamemaker/game/MyGame.java
@@ -24,13 +29,19 @@
2429
2530
An example Java class can be found in README-android.txt
2631
-->
27-
<application android:label="@string/app_name"
28-
android:icon="@drawable/ic_launcher"
29-
android:allowBackup="true"
30-
android:theme="@android:style/Theme.NoTitleBar.Fullscreen">
31-
<activity android:name="sdlpluginActivity"
32-
android:label="@string/app_name"
33-
android:configChanges="orientation|keyboard|keyboardHidden|screenSize">
32+
<application
33+
android:allowBackup="false"
34+
android:fullBackupContent="false"
35+
android:icon="@drawable/ic_launcher"
36+
android:label="@string/app_name"
37+
android:theme="@android:style/Theme.NoTitleBar.Fullscreen"
38+
tools:ignore="GoogleAppIndexingWarning">
39+
40+
<activity
41+
android:name="com.duy.c.cpp.compiler.sdlplugin.sdlpluginActivity"
42+
android:configChanges="orientation|keyboard|keyboardHidden|screenSize"
43+
android:label="@string/app_name">
44+
3445
<intent-filter>
3546
<action android:name="android.intent.action.MAIN" />
3647
<category android:name="android.intent.category.LAUNCHER" />
25.5 KB
Loading

sdlplugin/src/main/java/com/pdaxrom/cctools/sdlplugin/Utils.java renamed to sdlplugin/src/main/java/com/duy/c/cpp/compiler/sdlplugin/Utils.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
package com.pdaxrom.cctools.sdlplugin;
1+
package com.duy.c.cpp.compiler.sdlplugin;
22

33
import java.io.BufferedInputStream;
44
import java.io.File;

sdlplugin/src/main/java/com/pdaxrom/cctools/sdlplugin/sdlpluginActivity.java renamed to sdlplugin/src/main/java/com/duy/c/cpp/compiler/sdlplugin/sdlpluginActivity.java

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,4 @@
1-
package com.pdaxrom.cctools.sdlplugin;
2-
3-
import java.io.File;
4-
import java.io.IOException;
5-
import java.io.InputStream;
6-
7-
import org.libsdl.app.SDLActivity;
1+
package com.duy.c.cpp.compiler.sdlplugin;
82

93
import android.app.AlertDialog;
104
import android.app.ProgressDialog;
@@ -21,6 +15,14 @@
2115
import android.view.Gravity;
2216
import android.widget.TextView;
2317

18+
import com.pdaxrom.cctools.sdlplugin.R;
19+
20+
import org.libsdl.app.SDLActivity;
21+
22+
import java.io.File;
23+
import java.io.IOException;
24+
import java.io.InputStream;
25+
2426
public class sdlpluginActivity extends SDLActivity {
2527
private static final String TAG = "CCTools SDL plugin";
2628

0 commit comments

Comments
 (0)