Please login or register.

Login with username, password and session length
Advanced search  

News:

Forum rules - please read before posting, it can save you a lot of time.

Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Messages - HCDaniel

Pages: 1 2 3 [4] 5 6 ... 12
46
WME Lite / Re: Android, how to set up project?
« on: October 26, 2015, 07:15:33 AM »
Android SDK standalone install on Windows (Vista):

  • Download and install the "standalone SDK" executable for Windows. I chose "install for all users when prompted". The installer puts all files into this folder "C:\Program Files\Android\android-sdk" and creates some shortcuts in the start menu.
  • Start the "SDK manager" from the start menu as administrator (was required on my PC at least). If unsure, do not deselect anything. If you are sure, deselect the installation of the most recent SDK (currently 6.0) if you want to avoid a big download. Do not deselect anything else.
  • Select "SDK Platform" only for the 2 entries "Android 2.3.3 (API 10)" and "Android 3.1 (API 12)". To see API 12, you need to check "Obsolete" in the bottom of the window. Then, select the most recent "Android SDK build-tools" (currently 23.0.1). Install and then close the SDK manager.
  • For a working command line, the 2 paths "C:\Program Files\Android\android-sdk\tools" (for "android") and "C:\Program Files\Android\android-sdk\platform-tools" (for "adb") need to be in your path. Add them to the "path" environment variable separated by ";". My path variable now has 3 paths added, so it looks like this: "<a looong list of folders...>;C:\Program Files\apache-ant-1.9.6\bin;C:\Program Files\Android\android-sdk\tools;C:\Program Files\Android\android-sdk\platform-tools;"
  • Check that typing "android" in a new command line window will show the SDK manager again (just close it when it appears), and that the "adb" command is recognized.

47
WME Lite / Re: Android, how to set up project?
« on: October 26, 2015, 07:01:41 AM »
Ant installation on Windows (Vista):

  • A "Java Development Kit" (JDK) is required, a "Java Runtime Environment" alone is not sufficient. If there is nothing, or only a JRE installed, please download & install a JDK. In my case, I have a JDK installed here: C:\Program Files\Java\jdk1.7.0_25
  • Download the "binary distribution" of Ant as .zip file. Extract it to your "program files" folder. On my PC it was much faster to extract to the Desktop first, and then move the generated folder to "Program files". I now have a folder "C:\Program Files\apache-ant-1.9.6" with ant, but it is not yet recognized by the system.
  • According to the instructions (http://ant.apache.org/manual/install.html#installing) I need to set 3 environment variables. I go to "System" -> "Advanced System Settings" -> "Environment Variables" (loosely translated to English).
  • I need to add ant's "bin" path to the path variable. "Path" already exists as a system variable, so I add "C:\Program Files\apache-ant-1.9.6\bin" at the end, separated by ";".
  • ANT_HOME and JAVA_HOME do not exist, so I add them as user variables. I set ANT_HOME to "C:\Program Files\apache-ant-1.9.6" and JAVA_HOME to my JDK root "C:\Program Files\Java\jdk1.7.0_25" (I have a rather old JDK).
  • After saving all my changes, I open a new command prompt. Now "ant" is recognized as a command, and (correctly) says sth. like "build.xml not found".

48
WME Lite / Re: Android, how to set up project?
« on: October 25, 2015, 01:34:34 PM »
Let me dig out my old windows vista pc, then I'll see how to do this on windows.

49
WME Lite / Re: Android, how to set up project?
« on: October 25, 2015, 12:58:01 PM »
I can't give you a complete guide on how to setup your system. But basically, you need to install Java and then ant. For Linux, you simply use the package manager of the distribution. For Windows, you can download an .exe file for installing Java. Then you can download and install ant as per the instructions on the ant website (here http://ant.apache.org/manual/install.html#installing are generic install instructions).

Your install was successful, if you open a command prompt, and type "java" without an error message (like "command not found"), and then repeat the same for "ant".

Finally, the Android SDK (whether installed standalone or in combination with Android Studio) should be in your path as well, so that when you type "android", something else than an error message appears (typically the "Android SDK Manager" GUI should appear). If it doesn't, you should add the "tools" subdirectory from the base directory of the Android SDK to your path, then it should work. (I have set my path as follows:
Code: [Select]
export PATH=$PATH:/opt/android/android-sdk-linux/platform-tools/:/opt/android/android-sdk-linux/tools/ to have both "android" and "adb" (you might need that one later) available in Linux.)

If these commands are available in your command prompt, the build instructions should work. Just go to the "wmelite/android" directory and type the commands.



50
WME Lite / Re: Android, how to set up project?
« on: October 25, 2015, 10:25:18 AM »
This should work for you with a recent wmelite checkout:

Code: [Select]
hg status .

in wmelite/android shows that all my local modifications are the native libraries added:

Code: [Select]
daniel@androiduser-Aspire-V3-772:~/wmelite/android$ hg status .
? libs/AdBuddiz-2.4.4.jar
? libs/armeabi-v7a/libSDL2.so
? libs/armeabi-v7a/libbass.so
? libs/armeabi-v7a/libfreeimage.so
? libs/armeabi-v7a/libgnustl_shared.so
? libs/armeabi-v7a/libmain.so
? libs/armeabi/libSDL2.so
? libs/armeabi/libbass.so
? libs/armeabi/libfreeimage.so
? libs/armeabi/libgnustl_shared.so
? libs/armeabi/libmain.so
? libs/x86/libSDL2.so
? libs/x86/libbass.so
? libs/x86/libfreeimage.so
? libs/x86/libgnustl_shared.so
? libs/x86/libmain.so

At first a file called "local.properties" is required:

Code: [Select]
daniel@androiduser-Aspire-V3-772:~/wmelite/android$ android update project --path .
Updated local.properties
Updated file ./proguard-project.txt

Now all should be set for a debug build with ant:

Code: [Select]
daniel@androiduser-Aspire-V3-772:~/wmelite/android$ ant clean debug
Buildfile: /home/daniel/wmelite/android/build.xml

-check-env:
 [checkenv] Android SDK Tools Revision 24.4.0
 [checkenv] Installed at /opt/android/android-sdk-linux

-setup:
     [echo] Project Name: SDLActivity
  [gettype] Project Type: Application

-pre-clean:

clean:
[getlibpath] Library dependencies:
[getlibpath] No Libraries
   [subant] No sub-builds to iterate on

-set-mode-check:

-set-debug-files:

-check-env:
 [checkenv] Android SDK Tools Revision 24.4.0
 [checkenv] Installed at /opt/android/android-sdk-linux

-setup:
     [echo] Project Name: SDLActivity
  [gettype] Project Type: Application

-set-debug-mode:

-debug-obfuscation-check:

-pre-build:

-build-setup:
[getbuildtools] Using latest Build Tools: 19.1.0
     [echo] Resolving Build Target for SDLActivity...
[gettarget] Project Target:   Android 4.0.3
[gettarget] API level:        15
     [echo] ----------
     [echo] Creating output directories if needed...
    [mkdir] Created dir: /home/daniel/wmelite/android/bin
    [mkdir] Created dir: /home/daniel/wmelite/android/bin/res
    [mkdir] Created dir: /home/daniel/wmelite/android/bin/rsObj
    [mkdir] Created dir: /home/daniel/wmelite/android/bin/rsLibs
    [mkdir] Created dir: /home/daniel/wmelite/android/gen
    [mkdir] Created dir: /home/daniel/wmelite/android/bin/classes
    [mkdir] Created dir: /home/daniel/wmelite/android/bin/dexedLibs
     [echo] ----------
     [echo] Resolving Dependencies for SDLActivity...
[dependency] Ordered libraries:
[dependency]
[dependency] ------------------
[dependency] API<=15: Adding annotations.jar to the classpath.
     [echo] ----------
     [echo] Building Libraries with 'debug'...
   [subant] No sub-builds to iterate on

-code-gen:
[mergemanifest] Merging AndroidManifest files into one.
[mergemanifest] Manifest merger disabled. Using project manifest only.
     [echo] Handling aidl files...
     [aidl] No AIDL files to compile.
     [echo] ----------
     [echo] Handling RenderScript files...
     [echo] ----------
     [echo] Handling Resources...
     [aapt] Generating resource IDs...
     [echo] ----------
     [echo] Handling BuildConfig class...
[buildconfig] Generating BuildConfig class.

-pre-compile:

-compile:
    [javac] Compiling 5 source files to /home/daniel/wmelite/android/bin/classes
    [javac] Note: /home/daniel/wmelite/android/src/org/libsdl/app/SDLActivity.java uses or overrides a deprecated API.
    [javac] Note: Recompile with -Xlint:deprecation for details.

-post-compile:

-obfuscate:

-dex:
      [dex] input: /home/daniel/wmelite/android/bin/classes
      [dex] input: /opt/android/android-sdk-linux/tools/support/annotations.jar
      [dex] input: /home/daniel/wmelite/android/libs/AdBuddiz-2.4.4.jar
      [dex] Pre-Dexing /opt/android/android-sdk-linux/tools/support/annotations.jar -> annotations-2da80f7fba88282179c6a4e41fc58588.jar
      [dex] Pre-Dexing /home/daniel/wmelite/android/libs/AdBuddiz-2.4.4.jar -> AdBuddiz-2.4.4-be83e5349564857c26edd123b8ec492c.jar
      [dex] Converting compiled files and external libraries into /home/daniel/wmelite/android/bin/classes.dex...
       [dx] Merged dex A (32 defs/39,1KiB) with dex B (2 defs/1,1KiB). Result is 34 defs/46,1KiB. Took 0,1s
       [dx] Merged dex A (34 defs/46,1KiB) with dex B (75 defs/95,4KiB). Result is 109 defs/160,9KiB. Took 0,1s

-crunch:
   [crunch] Crunching PNG Files in source dir: /home/daniel/wmelite/android/res
   [crunch] To destination dir: /home/daniel/wmelite/android/bin/res
   [crunch] Processing image to cache: /home/daniel/wmelite/android/res/drawable-hdpi/ic_launcher.png => /home/daniel/wmelite/android/bin/res/drawable-hdpi/ic_launcher.png
   [crunch]   (processed image to cache entry /home/daniel/wmelite/android/bin/res/drawable-hdpi/ic_launcher.png: 0% size of source)
   [crunch] Processing image to cache: /home/daniel/wmelite/android/res/drawable-mdpi/ic_launcher.png => /home/daniel/wmelite/android/bin/res/drawable-mdpi/ic_launcher.png
   [crunch]   (processed image to cache entry /home/daniel/wmelite/android/bin/res/drawable-mdpi/ic_launcher.png: 0% size of source)
   [crunch] Processing image to cache: /home/daniel/wmelite/android/res/drawable-xhdpi/ic_launcher.png => /home/daniel/wmelite/android/bin/res/drawable-xhdpi/ic_launcher.png
   [crunch]   (processed image to cache entry /home/daniel/wmelite/android/bin/res/drawable-xhdpi/ic_launcher.png: 105% size of source)
   [crunch] Processing image to cache: /home/daniel/wmelite/android/res/drawable-xxhdpi/ic_launcher.png => /home/daniel/wmelite/android/bin/res/drawable-xxhdpi/ic_launcher.png
   [crunch]   (processed image to cache entry /home/daniel/wmelite/android/bin/res/drawable-xxhdpi/ic_launcher.png: 59% size of source)
   [crunch] Crunched 4 PNG files to update cache

-package-resources:
     [aapt] Creating full resource package...

-package:
[apkbuilder] Current build type is different than previous build: forced apkbuilder run.
[apkbuilder] Creating SDLActivity-debug-unaligned.apk and signing it with a debug key...

-post-package:

-do-debug:
 [zipalign] Running zip align on final apk...
     [echo] Debug Package: /home/daniel/wmelite/android/bin/SDLActivity-debug.apk
[propertyfile] Creating new property file: /home/daniel/wmelite/android/bin/build.prop
[propertyfile] Updating property file: /home/daniel/wmelite/android/bin/build.prop
[propertyfile] Updating property file: /home/daniel/wmelite/android/bin/build.prop
[propertyfile] Updating property file: /home/daniel/wmelite/android/bin/build.prop

-post-build:

debug:

BUILD SUCCESSFUL
Total time: 21 seconds

I added the complete console output, for you to check at which point it differs at your side. I have not added any game data, so my app would finally not do anything when started. For small game packages, just add game data as assets (renamed to .png, like described in the wiki).

Now you should be able to install the debug build with

Code: [Select]
daniel@androiduser-Aspire-V3-772:~/wmelite/android$ ant installd
Buildfile: /home/daniel/wmelite/android/build.xml

-set-mode-check:

-set-debug-files:

install:
     [echo] Installing /home/daniel/wmelite/android/bin/SDLActivity-debug.apk onto default emulator or device...
     [exec] error: device '(null)' not found
     [exec] - waiting for device -

I do not have a device connected right now, otherwise the app would install (you need to enable developer settings and USB debugging).

Hope it helps.

51
WME Lite / Re: Android, how to set up project?
« on: October 24, 2015, 01:27:19 PM »
You just need the "android" tool from the SDK, and probably you need to install "ant" separately. If you already downloaded Android Studio, the SDK is already installed (somewhere).

52
WME Lite / Re: Android, how to set up project?
« on: October 24, 2015, 10:52:15 AM »
Hello I followed the instructions here: http://res.dead-code.org/doku.php/wmelite:building

But they do not seem to tell me how to set up the Android project itself. Do I use Eclipse or Android Studio? I tried loading it into Android studio and it doesnt seem to want to take the Android source. Any help? Thanks.

I don't use Android Studio to build, but you might try to generate a project if you like. There should be a wizard that helps you with that. I use the standalone tools to create a project with sth. like that

Code: [Select]
android update project --path=.

and to build I then use ant:

Code: [Select]
ant clean debug

should build a version with your debug developer key, and you can install it to an attached device (or emulator) with

Code: [Select]
ant installd

If you've never worked a lot on the command line, trying to generate an Android Studio project might be the better way to go. I'm not sure you would want to use Eclipse, as this is no longer supported by Google for quite a while now (I wonder whether you'll still find an Eclipse based Android IDE at all).

53
WME Lite / Re: Special font characters in wme android
« on: October 11, 2015, 04:37:31 PM »
Although it should not be necessary to change the "Charset" line if you have converted all your strings to UTF-8 (the functions in question should then not be called anymore), if it works, it works :) Glad I could help.

54
WME Lite / Re: Special font characters in wme android
« on: October 11, 2015, 09:09:14 AM »
There might be several reasons:

1) The "FreeType" library doesn't "like" your font file. In case you use the regular "wme" (and not "wmelite") on Windows, you cannot trust what you see on Windows, because wme uses a different library for font rendering. You can try to run wmelite on Windows as well, my preferred way is to replace "wme_D3D9.exe" in the "WME Dev Tools" folder with a renamed "wmelite.exe", and add all the library dependencies as well. Then you can switch between "regular" and "lite" WME in "Project Manager" just by changing the "Use DirectX9" setting (from my memory, the setting is called differently).

2) Code page mismatch. In case you are using a code page for your text (and not UTF-8), there might be issues. I tried to implement a default for encoded strings in the "WMELiteFunctions.java", which defaults to "US-ASCII". If that is an issue for you, search the two lines that read:

      Charset charset = Charset.forName("US-ASCII");

and supply the proper name for your encoding. This is sort-of experimental, as there is no guarantee that a special charset (except for the ones that are supported by default) exists. Worst case you could supply your own here. But going for UTF-8 is in my view the better choice.

I hope that one of the two issues is the cause for your problem, and that you can fix it this way. Please post your findings.

55
WME Lite / Re: game in obb file
« on: October 11, 2015, 08:57:40 AM »
I was just about to advise you to check which path your "external" storage directory points to :)

For distribution with Google Play, the OBB file will be downloaded during installation of the app, and you do not have the possibility to change the target directory. So your method is correct for the "final" app.

I don't know whether the system can be fooled such that, for your experiments, you replace Environment.getExternalStorageDirectory() with the path to your "real" SD card, and then it will try to mount the OBB file there. Apps like "ES File Explorer" might show the real path. If you try, please post the results.

56
WME Lite / Re: Error runing wme game in Android
« on: October 10, 2015, 05:23:06 PM »
Yes, if you compile SDL from sources, the Java part needs to be updated separately, this is a constant source of annoyance, but cannot be helped.

If you use assets for placing your game data, there might be a limit to the max. size of the asset. Google Play will limit your app to 50MB anyway. But there might be another limit of you sideload a bigger asset directory. Looks like you saw a 64MB limit. For games of this size, expansion files (OBB files) are a good way for distribution.


57
WME Lite / Re: Error runing wme game in Android
« on: September 27, 2015, 06:12:50 PM »
Hi, when I try to run the game, seeing the logfile everything looks fine until these lines:

09-26 17:57:41.026    3278-3314/org.libsdl.app V/org.libsdl.app﹕ AssetDir: Request to open asset at path: raw success=TRUE
09-26 17:57:41.026    3278-3314/org.libsdl.app V/org.libsdl.app﹕ AssetDir: close handle
09-26 17:57:41.116    3278-3314/org.libsdl.app V/org.libsdl.app﹕ AssetDir: Request to open asset at path: raw success=TRUE
09-26 17:57:41.116    3278-3314/org.libsdl.app V/org.libsdl.app﹕ AssetDir: next filename=ProjectMan.log
09-26 17:57:41.116    3278-3314/org.libsdl.app V/org.libsdl.app﹕ AssetDir: next filename=SceneEdit.log
09-26 17:57:41.116    3278-3314/org.libsdl.app V/org.libsdl.app﹕ AssetDir: next filename=SpriteEdit.log
09-26 17:57:41.116    3278-3314/org.libsdl.app V/org.libsdl.app﹕ AssetDir: next filename=WindowEdit.log
09-26 17:57:41.116    3278-3314/org.libsdl.app V/org.libsdl.app﹕ AssetDir: next filename=wme.log
09-26 17:57:41.116    3278-3314/org.libsdl.app V/org.libsdl.app﹕ AssetDir: next filename=wme_demo.wpr
09-26 17:57:41.116    3278-3314/org.libsdl.app V/org.libsdl.app﹕ AssetDir: next filename=NULL
09-26 17:57:41.116    3278-3314/org.libsdl.app V/org.libsdl.app﹕ AssetDir: close handle
09-26 17:57:41.116    3278-3314/org.libsdl.app V/org.libsdl.app﹕ DirectoryOperations: opendir('/data\') success=FALSE
09-26 17:57:41.116    3278-3314/org.libsdl.app V/org.libsdl.app﹕ 17:57:41:   Registered 0 files in 0 package(s)
09-26 17:57:41.116    3278-3314/org.libsdl.app V/org.libsdl.app﹕ 17:57:41: Initializing scripting engine...
09-26 17:57:41.116    3278-3314/org.libsdl.app V/org.libsdl.app﹕ 17:57:41:   Script compiler is NOT available
09-26 17:57:41.116    3278-3314/org.libsdl.app V/org.libsdl.app﹕ 17:57:41: Error opening file 'startup.settings'
09-26 17:57:41.116    3278-3314/org.libsdl.app V/org.libsdl.app﹕ 17:57:41: CBGame::LoadSettings failed for file 'startup.settings'
09-26 17:57:41.116    3278-3314/org.libsdl.app V/org.libsdl.app﹕ 17:57:41: Error loading game settings.
09-26 17:57:41.116    3278-3314/org.libsdl.app V/org.libsdl.app﹕ 17:57:41:
09-26 17:57:41.116    3278-3314/org.libsdl.app V/org.libsdl.app﹕ 17:57:41: Shutting down...
09-26 17:57:41.116    3278-3314/org.libsdl.app V/org.libsdl.app﹕ 17:57:41: Shutting down scripting engine

I placed my 'data' directory into 'raw' directory and changed the getGameFilePath() and getGamePackagePath() in WMELiteFunctions.java like the documentation indicates.

The log line "DirectoryOperations: opendir('/data\') success=FALSE" indicates that wme didn't find the data directory?

What is the problem?

wme on android can only execute compiled games, there is no script compiler available. place your compiled packages into the "raw" directory and try again.

58
WME Lite / Re: 64 bit apps?
« on: July 18, 2015, 08:33:44 AM »
Should be ok again now.

59
WME Lite / Re: 64 bit apps?
« on: July 17, 2015, 07:22:09 AM »
Can you make a first trial with the dependencies here:

https://bitbucket.org/hcdaniel/wmelite-rapaki-edition/downloads/dep_ios_20150717.zip

and my fork of wmelite? I tried the demo project in the simulator (ipad 2), and apart from running slow, it looked ok.

There might still be issues with the libraries, I don't think I have set "minphoneos" correctly everywhere.

BTW: These should in principle run as well with the original wmelite, when you replace the paths to the dependent libraries appropriately, and add the proper BASS libraries yourself. I have not tested that.

60
WME Lite / Re: 64 bit apps?
« on: July 13, 2015, 08:11:40 AM »
It would be cool if you could simply test my project on a device, once I have it building and running in the simulator at least.

Pages: 1 2 3 [4] 5 6 ... 12

Page created in 0.044 seconds with 23 queries.