[Scons-users] Scons and ant

William Blevins wblevins001 at gmail.com
Tue Mar 3 00:20:19 EST 2015


Owen,

Well, I'm not sure how you were trying to do this looking at your code.
You never call the SCons Install builder though I suppose you could use
Copy: http://www.scons.org/doc/production/HTML/scons-user.html#idp14496624
Copy as a command or an Execute will always be invoked, and you may not
desire that behavior.

You should be able to simply "env_android.Install( '/Users/dev/.pic', '#
platform/android/java/bin/PIC-release-unsigned.apk' )":
http://www.scons.org/doc/production/HTML/scons-user.html#chap-install

Then of course you run this builder doing "scons /Users/dev/.pic" since the
install location is the target.  I usually alias all my install files to
something convenient like "install" via the Alias command:
http://www.scons.org/doc/production/HTML/scons-user.html#chap-alias

If you want to rename the file, then use InstallAs instead.

V/R,
William



On Tue, Mar 3, 2015 at 12:02 AM, Owen Alanzo Hogarth <gurenchan at gmail.com>
wrote:

> Here's a pastebin of my scons build file: http://pastebin.com/36H6PeAi
>
> towards the bottom there's an ANT_TARGET=
> "/Users/dev/pic/src/platform/android/java/bin/PIC-release-unsigned.apk"
>
> That gets built.
>
> Now I would like to move that to a directory that's not located inside the
> SConstruct folder structure.
>
> to /Users/dev/.pic/
>
> No matter what, I cannot seem to actually move the file
> "/Users/dev/pic/src/platform/android/java/bin/PIC-release-unsigned.apk"
> to my desired location
> /Users/dev/.pic/
>
> Anything that I can do to do this last step?
>
> On Tue, Mar 3, 2015 at 10:57 AM, William Blevins <wblevins001 at gmail.com>
> wrote:
>
>> Owen,
>>
>> Can you give a concrete example?
>>
>> I don't know the context for "It tacks on the install location at the end
>> of my current directory".
>>
>> Please define Install command source X and target Y, plus said directory
>> Z, or better yet, paste your SConscript?
>>
>> If I do, Install('/usr/bin', hello) then the target "hello" will be
>> installed in "/usr/bin".
>>
>> V/R,
>> William
>>
>> On Mon, Mar 2, 2015 at 9:45 PM, Owen Alanzo Hogarth <gurenchan at gmail.com>
>> wrote:
>>
>>> Hi Russel
>>>
>>> That was it, I ended up doing:
>>>
>>> env.Command(target='local.properties',
>>>        source='/Users/dev/pic/src/platform/android/java/build.xml',
>>>        action='/usr/local/bin/ant release -f $SOURCE')
>>>
>>> for anyone who might have issues in the future.
>>>
>>> One more question, when using the install builder I'll get my project
>>> installed like:
>>>
>>> /Users/dev/pic/src/platform/android/java/usr/bin
>>>
>>> It tacks on the install location at the end of my current directory.
>>> The only thing that I can think of is that I am not building a Program
>>> but a SharedLibrary, but I don't see why that should make a difference.
>>>
>>>
>>> On Tue, Mar 3, 2015 at 1:08 AM, Russel Winder <russel at winder.org.uk>
>>> wrote:
>>>
>>>> On Mon, 2015-03-02 at 17:34 +0800, Owen Alanzo Hogarth wrote:
>>>> > […]
>>>> >
>>>> > env.Command('/usr/local/bin/ant release -f',
>>>> > ['/Users/dev/pic/src/platform/android/java/build.xml'],
>>>> > ['/Users/dev/pic/src/platform/android/java/bin'])
>>>> […]
>>>>
>>>> I think you misread the Command section of the manual. The first
>>>> parameter is the targets to be made, the second the sources, and the
>>>> third the command template string. Something more along the lines of:
>>>>
>>>>     env.Command('/Users/dev/pic/src/platform/android/java/bin/thing',
>>>>       ['/Users/dev/pic/src/platform/android/java/build.xml'] +
>>>> Glob('sources_pattern'),
>>>>       '/usr/local/bin/ant release -f')
>>>>
>>>> which would need a lot of doctoring for your situation, I have just
>>>> shown something that will fail but hopefully guides you to the right
>>>> thing.
>>>>
>>>> --
>>>> Russel.
>>>>
>>>> =============================================================================
>>>> Dr Russel Winder      t: +44 20 7585 2200   voip:
>>>> sip:russel.winder at ekiga.net
>>>> 41 Buckmaster Road    m: +44 7770 465 077   xmpp: russel at winder.org.uk
>>>> London SW11 1EN, UK   w: www.russel.org.uk  skype: russel_winder
>>>>
>>>> _______________________________________________
>>>> Scons-users mailing list
>>>> Scons-users at scons.org
>>>> https://pairlist4.pair.net/mailman/listinfo/scons-users
>>>>
>>>>
>>>
>>> _______________________________________________
>>> Scons-users mailing list
>>> Scons-users at scons.org
>>> https://pairlist4.pair.net/mailman/listinfo/scons-users
>>>
>>>
>>
>> _______________________________________________
>> Scons-users mailing list
>> Scons-users at scons.org
>> https://pairlist4.pair.net/mailman/listinfo/scons-users
>>
>>
>
> _______________________________________________
> Scons-users mailing list
> Scons-users at scons.org
> https://pairlist4.pair.net/mailman/listinfo/scons-users
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://pairlist4.pair.net/pipermail/scons-users/attachments/20150303/b248d412/attachment-0001.html>


More information about the Scons-users mailing list