Android GLB v12

Previous topic - Next topic

spicypixel

Yes check the output in the previous post as well ;)
http://www.spicypixel.net | http://www.facebook.com/SpicyPixel.NET

Comps Owned - ZX.81, ZX.48K, ZX.128K+2, Vic20, C64, Atari-ST, A500.600.1200, PC, Apple Mini-Mac.

Ian Price

Quote from: spicypixel on 2013-Nov-27
Yes check the output in the previous post as well ;)
Ahh, but you were editing while I was typing my response. That wasn't there when I started answering. ;)
I came. I saw. I played.

spacefractal

#17
You diddent say which compile error it is. Property it's a manifest issue, so try delete the android folder from the distribution any try again.

Edit:

Make sure to compile to android, not windows. That error happens due ANDRIOD variable have been defined. windows dosent like that.

And for android issue, it's properly due a old androidmanifest.xml issue. Try delete the whole android folder from distribution folder and try again.
Genius.Greedy Mouse - Karma Miwa - Spot Race - CatchOut - PowerUp Elevation - The beagle Jam - Cave Heroes 2023 - https://spacefractal.itch.io/

spicypixel

Quote from: spacefractal on 2013-Nov-27
You diddent say which compile error it is. Property it's a manifest issue, so try delete the android folder from the distribution any try again.

Edit:

Make sure to compile to android, not windows. That error happens due ANDRIOD variable have been defined. windows dosent like that.

Deleted the Android folder pressed the Trash Icon and now I have this...

Code (glbasic) Select


_______________________________________
*** Configuration: ANDROID ***
precompiling:
GPC - GLBasic Precompiler V.10.060 SN:4ebaa1d3 - 3D, NET
Wordcount:420 commands
compile+link:
running glb_build.bat
Using ANDROID_TARGET="android-14"
You can use "C:\Users\Snoop\Desktop\Android Extras\AndroidExtras\distribute\Android\glb_android_build.bat" to change the API level and SDK path.
%ANDROIDSDK% not set. Using GLBasic's default target-14, Android 4.0



.
BUILD STAGE 1: Create Icons for various size
'AndroidIcons.exe' is not recognized as an internal or external command,
operable program or batch file.
BUILD STAGE 2: Start compiler (android.bat)
Q:\Compiler\platform\android\bin\..\android-sdk-windows
Updated and renamed default.properties to project.properties
Updated local.properties
Added file C:\Users\Snoop\Desktop\Android Extras\AndroidExtras\distribute\Android\build.xml
Added file C:\Users\Snoop\Desktop\Android Extras\AndroidExtras\distribute\Android\proguard-project.txt
.
BUILD STAGE 3: Build a debug build
   [subant] No sub-builds to iterate on

BUILD FAILED
Q:\Compiler\platform\android\android-sdk-windows\tools\ant\build.xml:650: The following error occurred while executing this line:
Q:\Compiler\platform\android\android-sdk-windows\tools\ant\build.xml:691: null returned: 1

Total time: 3 seconds
.
BUILD STAGE 4: Build a release build
   [subant] No sub-builds to iterate on

BUILD FAILED
Q:\Compiler\platform\android\android-sdk-windows\tools\ant\build.xml:650: The following error occurred while executing this line:
Q:\Compiler\platform\android\android-sdk-windows\tools\ant\build.xml:691: null returned: 1

Total time: 3 seconds
Picked up _JAVA_OPTIONS: -Xms256m -Xmx512m
.
HOW TO INSTALL? Install by invoke this command:
"Q:\Compiler\platform\android\bin\..\android-sdk-windows\platform-tools\adb.exe" install -r "C:\Users\Snoop\Desktop\Android Extras\AndroidExtras\distribute\Android/bin/glbasic-debug.apk"
.
HOW TO SIGN? Sign it by invoke this command:
"Q:\Compiler\platform\android\bin\glb_code_sign.bat" "C:\Users\Snoop\Desktop\Android Extras\AndroidExtras\distribute\Android"
.
Android=C:\Users\Snoop\Desktop\Android Extras\AndroidExtras\distribute\Android
success
_______________________________________
*** Finished ***
Elapsed: 9.9 sec. Time: 20:48
Build: 1 succeeded.


This is what I get when Compiling :-/
http://www.spicypixel.net | http://www.facebook.com/SpicyPixel.NET

Comps Owned - ZX.81, ZX.48K, ZX.128K+2, Vic20, C64, Atari-ST, A500.600.1200, PC, Apple Mini-Mac.

spicypixel

However...... My old AndroidExtras project does compile (with the new AE being used) ???????????
http://www.spicypixel.net | http://www.facebook.com/SpicyPixel.NET

Comps Owned - ZX.81, ZX.48K, ZX.128K+2, Vic20, C64, Atari-ST, A500.600.1200, PC, Apple Mini-Mac.

spacefractal

Do you uses v11 or v12? I'm have only tested for v12.

Also it's seen you have not updated the glbasic correctly. Androidicons.exe is missing, which fixed tablet icons issue.

Howover not home yet to checks anything....
Genius.Greedy Mouse - Karma Miwa - Spot Race - CatchOut - PowerUp Elevation - The beagle Jam - Cave Heroes 2023 - https://spacefractal.itch.io/

spicypixel

Ok got it to compile, I deleted the androidicon.png from the folder and all was good, this was mentioned to me before now I think about it, but why include it in the zip knowing it will cause problems, that just doesn't make sense. Or am I missing something?
http://www.spicypixel.net | http://www.facebook.com/SpicyPixel.NET

Comps Owned - ZX.81, ZX.48K, ZX.128K+2, Vic20, C64, Atari-ST, A500.600.1200, PC, Apple Mini-Mac.

spicypixel

Quote from: spacefractal on 2013-Nov-27
Do you uses v11 or v12? I'm have only tested for v12.

Also it's seen you have not updated the glbasic correctly. Androidicons.exe is missing, which fixed tablet icons issue.

Howover not home yet to checks anything....

I'm using GLB11 and like I say I managed to get it to compile, need to test now, but in reply to your question the Androidicons.exe along with the blitzmax files are in the bin folder already.
http://www.spicypixel.net | http://www.facebook.com/SpicyPixel.NET

Comps Owned - ZX.81, ZX.48K, ZX.128K+2, Vic20, C64, Atari-ST, A500.600.1200, PC, Apple Mini-Mac.

spacefractal

#23
Please do more patient, when there is bugs. there can stil been some few issues left (like ian found in the inapp). Im will fix those in the next releases.

in glb_build.bat, the line:
AndroidIcons.exe" "|%GLB_PROJ_PATH%|"

should changes to:
"%HERE%\AndroidIcons.exe" "|%GLB_PROJ_PATH%|"

Then AndroidIcons.exe should start correctly and create tablet icons from ther icon.png or icon128.png (so the app is can been "designed for tables"). This is all the exe does and included the source code for it (im perfer blitzmax to write small tools like this).


About androidicon.png:
im thinks its a issue in glbasic v10, which glbasic create those icons? Those was also auto created as im remember. Howover in v12 its does compile fine, even that icon might exists,. That property why im diddent notice that bug.

PS. Im guess this thread accicently have been hijacked and just been clean up to split up the AndroidExtras issues?
Genius.Greedy Mouse - Karma Miwa - Spot Race - CatchOut - PowerUp Elevation - The beagle Jam - Cave Heroes 2023 - https://spacefractal.itch.io/

MrPlow

Thanks spacefractal!!!
Comp:
Speccy-48k, Speccy-128k, Amigas, PCs

MrPlow

Sorry for this hassle ... but couldnt find what you meant in the glb bat file

Code (glbasic) Select
@ECHO OFF
ECHO running glb_build.bat
:: install Android SDK, Android NDK
:: install JDK

set HERE=%~dp0

:: set JAVA_HOME=C:\Program Files (x86)\Java\jdk1.6.0_24

IF "%JAVA_HOME%"=="" (
  ECHO please set environment variable JAVA_HOME=C:\Program Files ^(x86^)\Java\jdk1.xx...
  GOTO EOF
)

set ANDROID_TARGET=android-8

:: use !var! within if ( here ) - otherwise if var has () inside, everything breaks
setlocal enabledelayedexpansion

IF EXIST "%GLB_PROJ_PATH%\glb_android_build.bat" (
  CALL "!GLB_PROJ_PATH!\glb_android_build.bat"
  ECHO Specified ANDROID_TARGET="!ANDROID_TARGET!". Please verify your AndroidManifext.xml, too.
) ELSE (
  ECHO Using ANDROID_TARGET="!ANDROID_TARGET!"
  ECHO You can use "!GLB_PROJ_PATH!\glb_android_build.bat" to change the API level and SDK path.
)

IF "%ANDROIDSDK%"=="" (
  ECHO %%ANDROIDSDK%% not set. Using GLBasic's default target-8, Android 2.2
  set ANDROIDSDK=!HERE!..\android-sdk-windows
)
IF NOT EXIST "%ANDROIDSDK%\tools\android.bat" (
  ECHO "please set environment variable ANDROIDSDK=..."
  ECHO so I can find "%%ANDROIDSDK%%\tools\android.bat"
  GOTO EOF
)


if not exist "%ANDROIDSDK%\tools\ant\bin\ant.bat" (
  ECHO "%%ANDROIDSDK%%\tools\ant\bin\ant.bat" does not exist.
  ECHO go, get it from http://ant.apache.org/bindownload.cgi
  GOTO EOF
)
set PATH=%JAVA_HOME%\bin;%SystemRoot%\system32;%SystemRoot%;%SystemRoot%\System32\Wbem

:: GLB_PROJ_PATH=C:\Users\GF\Documents\GLBasic\_support\distribute\Android
::  --silent

ECHO.
ECHO.
ECHO.


ECHO BUILD STAGE 1: Compile and pack RELEASE
call "%ANDROIDSDK%\tools\android.bat" update project --name "glbasic" --path "%GLB_PROJ_PATH%" --target "%ANDROID_TARGET%"
cd /D "%GLB_PROJ_PATH%"

:: remove errors if low on heap memory
set _JAVA_OPTIONS=-Xms256m -Xmx512m


call "%ANDROIDSDK%\tools\ant\bin\ant.bat" release -q > NUL

ECHO .
ECHO BUILD STAGE 2: Build DEBUG and install on device
:: install (debug?)
call "%ANDROIDSDK%\tools\ant\bin\ant.bat" debug install -q

ECHO finished Android build-script.
Comp:
Speccy-48k, Speccy-128k, Amigas, PCs

spicypixel

When you copy the files over from the zip into you GLB Program Files directory it will overwrite the glb_build.bat, check that you have copied everything over correctly buddy.
http://www.spicypixel.net | http://www.facebook.com/SpicyPixel.NET

Comps Owned - ZX.81, ZX.48K, ZX.128K+2, Vic20, C64, Atari-ST, A500.600.1200, PC, Apple Mini-Mac.

spacefractal

you should not delete the Whole folder, but more replace the files from the 3 folders inside the compiler/Android. If you did deleted Android folder first, then you might need to reinstall glbasic v12. glbasic uses glb_build to build the apk files as well icons.
Genius.Greedy Mouse - Karma Miwa - Spot Race - CatchOut - PowerUp Elevation - The beagle Jam - Cave Heroes 2023 - https://spacefractal.itch.io/

MrPlow

Did nt delete anything just copied over and selected overwrite all...
so is my build bat file incorrect or incomplete?

Also I did a debug on my program and first thing it says is Error 3 - is that something I can ignore or rule out?
Comp:
Speccy-48k, Speccy-128k, Amigas, PCs

spacefractal

its mightbeen inkomplete. im look on tjhat tomorrow.

its should look like this:

Code (glbasic) Select

@ECHO OFF
ECHO running glb_build.bat
:: install Android SDK, Android NDK
:: install JDK

set HERE=%~dp0
set DEF=%~p0

:: set JAVA_HOME=C:\Program Files (x86)\Java\jdk1.6.0_24

IF "%JAVA_HOME%"=="" (
  ECHO please set environment variable JAVA_HOME=C:\Program Files ^(x86^)\Java\jdk1.xx...
  GOTO EOF
)

set ANDROID_TARGET=android-14

:: use !var! within if ( here ) - otherwise if var has () inside, everything breaks
setlocal enabledelayedexpansion

IF EXIST "%GLB_PROJ_PATH%\glb_android_build.bat" (
  CALL "!GLB_PROJ_PATH!\glb_android_build.bat"
  ECHO Specified ANDROID_TARGET="!ANDROID_TARGET!". Please verify your AndroidManifext.xml, too.
) ELSE (
  ECHO Using ANDROID_TARGET="!ANDROID_TARGET!"
  ECHO You can use "!GLB_PROJ_PATH!\glb_android_build.bat" to change the API level and SDK path.
)

IF "%ANDROIDSDK%"=="" (
  ECHO %%ANDROIDSDK%% not set. Using GLBasic's default target-14, Android 4.0
  set ANDROIDSDK=!HERE!..\android-sdk-windows
)
IF NOT EXIST "%ANDROIDSDK%\tools\android.bat" (
  ECHO "please set environment variable ANDROIDSDK=..."
  ECHO so I can find "%%ANDROIDSDK%%\tools\android.bat"
  GOTO EOF
)


if not exist "%ANDROIDSDK%\tools\ant\bin\ant.bat" (
  ECHO "%%ANDROIDSDK%%\tools\ant\bin\ant.bat" does not exist.
  ECHO go, get it from http://ant.apache.org/bindownload.cgi
  GOTO EOF
)
set PATH=%JAVA_HOME%\bin;%SystemRoot%\system32;%SystemRoot%;%SystemRoot%\System32\Wbem

:: GLB_PROJ_PATH=C:\Users\GF\Documents\GLBasic\_support\distribute\Android
::  --silent

ECHO.
ECHO.
ECHO.

ECHO .
ECHO BUILD STAGE 1: Create Icons for various size
"%HERE%\AndroidIcons.exe" "|%GLB_PROJ_PATH%|"

ECHO BUILD STAGE 2: Start compiler (android.bat)
ECHO %ANDROIDSDK%
call "%ANDROIDSDK%\tools\android.bat" update project --name "glbasic" --path "%GLB_PROJ_PATH%" --target "%ANDROID_TARGET%" --subprojects
cd /D "%GLB_PROJ_PATH%"

ECHO .
ECHO BUILD STAGE 3: Build a debug build
call "%ANDROIDSDK%\tools\ant\bin\ant.bat" debug -q

ECHO .
ECHO BUILD STAGE 4: Build a release build
set _JAVA_OPTIONS=-Xms256m -Xmx512m
call "%ANDROIDSDK%\tools\ant\bin\ant.bat" release -q

ECHO .
ECHO HOW TO INSTALL? Install by invoke this command:
ECHO "%ANDROIDSDK%\platform-tools\adb.exe" install -r "%GLB_PROJ_PATH%/bin/glbasic-debug.apk"

ECHO .
ECHO HOW TO SIGN? Sign it by invoke this command:
ECHO "%HERE%glb_code_sign.bat" "%GLB_PROJ_PATH%"
ECHO .
Genius.Greedy Mouse - Karma Miwa - Spot Race - CatchOut - PowerUp Elevation - The beagle Jam - Cave Heroes 2023 - https://spacefractal.itch.io/