GLBasic forum

Main forum => GLBasic - en => Topic started by: fjsantosb on 2009-Sep-15

Title: URGENT: License Problem
Post by: fjsantosb on 2009-Sep-15
Hi all,

I have a problem with my glbasic licence.
THe problem is when i try to use the following function (which MRTaToad sharing in other post):

INLINE
   extern "C" int system ( const char * command );
ENDINLINE

FUNCTION openWeb:
   INLINE
      system( "open http://www.mywebpage.com" );
   ENDINLINE
ENDFUNCTION


The compiler says, Demo mode: This command would require NET or 3D addon.
I am using net commands, which i have licence (my licence is for 2d and net), but the program start in demo mode.
I need 3d licence for use this command?? :S.

Best Regards, fjsantos.
Title: Re: URGENT: License Problem
Post by: amarliani on 2009-Sep-15
AFAIK yes, inline commands need full license.
Title: Re: URGENT: License Problem
Post by: trucidare on 2009-Sep-15
Yep need full license.

The Command what you need (open in webbrowser) will be available in one of the next updates.
include links to appstore on iphone.

Title: Re: URGENT: License Problem
Post by: MrTAToad on 2009-Sep-15
If you dont want to pay for the Net/3D add-on, the following also works on a Mac (and hopefully an iPhone :)

Code: GLBasic [Select]
LOCAL vv

SHELLCMD("open http://www.bbc.co.uk",TRUE,TRUE,vv)
Title: Re: URGENT: License Problem
Post by: Kitty Hello on 2009-Sep-15
If it's not working on iPhone (can someone test, please!?)

Try this:
make a text file: "iPhoneTools.mm"

Write this:
Code: GLBasic [Select]
#import <UIKit/UIApplication.h>

// change the ?id=... according to your app
extern "C" void AppStore()
{
        NSURL *appStoreUrl = [NSURL URLWithString:@"http://phobos.apple.com/WebObjects/MZStore.woa/wa/viewSoftware?id=329485776&mt=8&s=143441"];
        [[UIApplication sharedApplication] openURL:appStoreUrl];
}
 

Replace the part of the URL _after_ the ?id= with the thing you get from the iTunes store. Mine was:
itms://itunes.apple.com/WebObjects/MZStore.woa/wa/viewSoftware?id=329485776&mt=8&s=143441 (http://itms://itunes.apple.com/WebObjects/MZStore.woa/wa/viewSoftware?id=329485776&mt=8&s=143441)

In your main game write:
Code: GLBasic [Select]
REQUIRE "iPhoneTools.mm"
IMPORT "C" void AppStore();

...
AppStore();
 

The bad thing is, that the REQUIRE of an .mm file will break the Win32 compiler, which is very stupid. GLBasic definitely needs a preprocessor in the next version.





Title: Re: URGENT: License Problem
Post by: trucidare on 2009-Sep-15
No normal glbasic user can compile .mm files for iphone because sdk agreements from apple. (no headers and libs provided)
Title: Re: URGENT: License Problem
Post by: fjsantosb on 2009-Sep-15
Hi,

First of all i have to say, this community is awesome!
I didn't know i need premium licence to use inline command, sorry! I didn't buy because i don't use any 3d (well al least for now!).
MrTAToad, i tryed your piece of code (thanks again for all your support!), and didn't work! :(.
And for mm file, as trucidare said, because of sdk agreements from apple, we can't provide any header of file, that aren't part of glbasic.
I suppose, i will wait for the next release, and don't include any 'More Games' url on this one.
Anyway, thanks all for your great support.

Great Tool, great community.

Best Regards, fjsantos.
Title: Re: URGENT: License Problem
Post by: Kitty Hello on 2009-Sep-15
OK, I'll implement a WEBEND command then, that will END, but open a URL afterwards. That way you can go AppStore on iPhone and show "more files" at the end of your program.
Title: Re: URGENT: License Problem
Post by: MrTAToad on 2009-Sep-15
That'll be useful!
Title: Re: URGENT: License Problem
Post by: fjsantosb on 2009-Sep-15
That will be great, thanks!
Best regards, fjsantos.
Title: Re: URGENT: License Problem
Post by: codegit on 2009-Sep-15
OK, I'll implement a WEBEND command then, that will END, but open a URL afterwards. That way you can go AppStore on iPhone and show "more files" at the end of your program.

Thanks this will be exactly what I need.
Title: Re: URGENT: License Problem
Post by: MrTAToad on 2009-Sep-15
It might be worth making sure that SHELLEND and this new command call GLB_ON_QUIT before they end, incase any tidying up stuff there is missed.
Title: Re: URGENT: License Problem
Post by: Kitty Hello on 2009-Sep-15
Yes, and: They do.
Title: Re: URGENT: License Problem
Post by: MrTAToad on 2009-Sep-15
Good!
Title: Re: URGENT: License Problem
Post by: codegit on 2009-Sep-17
Are these commands in version 7.115?? Or are they still coming?  =D
Title: Re: URGENT: License Problem
Post by: Kitty Hello on 2009-Sep-17
Not, yet, sorry.