It is currently Wed Apr 26, 2017 10:33 am



Welcome
Welcome to rfobasic

You are currently viewing our boards as a guest, which gives you limited access to view most discussions and access our other features. By joining our free community, you will have access to post topics, communicate privately with other members (PM), respond to polls, upload content, and access many other special features. In addition, registered members also see less advertisements. Registration is fast, simple, and absolutely free, so please, join our community today. **You are not required to provide truthful information to any registration questions. Be whomever you wish to be.!


Post new topic Reply to topic  [ 2 posts ] 
Author Message
 Post subject: Unpacking from assets to \data
Unread postPosted: Tue Dec 13, 2016 2:45 pm 
Offline

Joined: Wed Feb 20, 2013 3:25 pm
Posts: 423
Location: Italy
Hi,

It would be very useful to have a simple way to unpack resources (selected in the Compiler for inclusion, but other than GW-related files) from assets to \data.
Could the solution be to programmatically use MAKE_SURE_IS_ON_SD() provided by GW? Then also IS_APK() would be needed... But what if the program doesn't use GW?
Could maybe a new option in the compiler trigger this unpacking at installation time?
Or maybe the solution could be to create a COMPILER_UTILS.bas (containing MAKE_SURE_IS_ON_SD() and IS_APK()) to be included in the .bas file? But then if the program already uses GW.bas there would be a conflict... We don't have #define and #ifdef. The recommendation could be to include either GW or COMPILER_UTILS but not both... it sounds somewhat brittle.
Then the adopted solution should be documented in some way...

Luca


Top
 Profile  
 
 Post subject: Re: Unpacking from assets to \data
Unread postPosted: Tue Dec 13, 2016 3:26 pm 
Offline

Joined: Wed Feb 20, 2013 3:25 pm
Posts: 423
Location: Italy
But after all we do have #define and #ifdef. ;) Consider this:

Code:
file1.bas:
if !def_function_f
  def_function_f=1
  fn.def f()
    fn.rtn 999
  fn.end
endif

file2.bas:
if !def_function_f
  def_function_f=1
  fn.def f()
    fn.rtn 999
  fn.end
endif

file3.bas:
include "file1.bas"
include "file2.bas"
? f()


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 2 posts ] 


Who is online

Users browsing this forum: No registered users and 0 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
suspicion-preferred