Jump to content

[TOPIC: topicViewTemplate]
[GLOBAL: userSmallPhoto]
Photo

Conditional Assembly for Differing Builds in numerous Countries
Started by troylyndon Aug 03 2016 05:01 AM

- - - - -
4 replies to this topic
[TOPIC CONTROLS]
This topic has been archived. This means that you cannot reply to this topic.
[/TOPIC CONTROLS]
[modOptionsDropdown]
[/modOptionsDropdown]
[reputationFilter]
[TOPIC: post.html]
#1

troylyndon

[GLOBAL: userInfoPane.html]
troylyndon
  • Contributor

  • 617 posts
  • Corona SDK

Is there any provision that allows me to determine what lines of code to include in a build based upon flags I set? I will have to include numerous content files in varying languages, depending upon the build. I'd like to keep a single source file using conditional assembly if possible. Anyone know if Corona can support this?



[TOPIC: post.html]
#2

Alex@Panc

[GLOBAL: userInfoPane.html]
Alex@Panc
  • Corona Geek

  • 1,733 posts
  • Corona SDK

[TOPIC: post.html]
#3

Rob Miracle

[GLOBAL: userInfoPane.html]
Rob Miracle
  • Moderator

  • 26,075 posts
  • Enterprise

Are you planning on having multiple entries in the App Store and Google Play?



[TOPIC: post.html]
#4

troylyndon

[GLOBAL: userInfoPane.html]
troylyndon
  • Contributor

  • 617 posts
  • Corona SDK

[TOPIC: post.html]
#5

Rob Miracle

[GLOBAL: userInfoPane.html]
Rob Miracle
  • Moderator

  • 26,075 posts
  • Enterprise

At the moment, if you are on a Mac you can use symbolic links and a small shell script to do something like this. Windows with shortcuts and a .bat file might also work, but I've not really done any bat file code since like Windows 98, so I'm not sure what it's capacity is.

 

But lets say you have four languages you want to support and you have files like:

 

strings-en.lua

strings-es.lua

strings-fr.lua

strings-de.lua etc.

 

Put them in a folder that's not in the folder with your main.lua. Lets say your project folder is called myProject and you have a folder named myProject-code at the same level.

 

In side the myProject folder (where main.lua lives). you can do:

 

ln -s ../myProject-code/strings-en.lua strings.lua

 

That will create a symbolic link or pointer to the English version of the file. If you want French, change the first file name to the french version. Now this would be annoying to type a lot or if you had multiple language files. But you could write a simple shell script that you could pass the language in on the command line and the script could setup your symlinks for you.

 

Rob




[topic_controls]
[/topic_controls]