Windows Build - Unnecessary cmd window

You must Login before you can answer or comment on any questions.

Hi there,

After following a lot of the instructions on http://www.dionysopoulos.me/blog/packaging-titanium-dekstop-apps-on-windows, I finally got a build up and running on a Windows machine with Titanium Desktop 1.1.

When I build a version of my application on Windows, this is the command I use:

E:\dev\ti\build\titanium_desktop\win32>python tibuild.py -n -o win32 -t bundle -a . -s C:\ProgramData\Titanium -d e:\dev\ti\build e:\dev\ti\build\tmp
and this is the output that I get:
[echo] Calling out to Titanium Build
    [mkdir] Created dir: E:\dev\ti\build\dist\eye-fi
     [exec] Staging Eye-Fi Center
     [exec]     -> Copying contents from E:\dev\ti\build\tmp to E:\dev\ti\build\Eye-Fi Center
     [exec]     -> Copying installer from C:\ProgramData\Titanium\sdk\win32\1.1.0\installer to E:\dev\ti\build\Eye-Fi Center
     [exec]     -> Copying runtime to E:\dev\ti\build\Eye-Fi Center
     [exec]     -> E:\dev\ti\build\Eye-Fi Center\modules\tiapp\1.1.0\\tiappmodule.dll does not exist
     [exec]         -> Copying C:\ProgramData\Titanium\modules\win32\tiapp\1.1.0 ==> E:\dev\ti\build\Eye-Fi Center\modules\tiapp\1.1.0
     [exec]     -> E:\dev\ti\build\Eye-Fi Center\modules\tifilesystem\1.1.0\\tifilesystemmodule.dll does not exist
     [exec]         -> Copying C:\ProgramData\Titanium\modules\win32\tifilesystem\1.1.0 ==> E:\dev\ti\build\Eye-Fi Center\modules\tifilesystem\1.1.0
     [exec]     -> E:\dev\ti\build\Eye-Fi Center\modules\tiplatform\1.1.0\\tiplatformmodule.dll does not exist
     [exec]         -> Copying C:\ProgramData\Titanium\modules\win32\tiplatform\1.1.0 ==> E:\dev\ti\build\Eye-Fi Center\modules\tiplatform\1.1.0
     [exec]     -> E:\dev\ti\build\Eye-Fi Center\modules\tiui\1.1.0\\default.css does not exist
     [exec]         -> Copying C:\ProgramData\Titanium\modules\win32\tiui\1.1.0 ==> E:\dev\ti\build\Eye-Fi Center\modules\tiui\1.1.0
     [exec]     -> E:\dev\ti\build\Eye-Fi Center\modules\fieyehelper\1.1.0\\fieyehelpermodule.dll does not exist
     [exec]         -> Copying C:\ProgramData\Titanium\modules\win32\fieyehelper\1.1.0 ==> E:\dev\ti\build\Eye-Fi Center\modules\fieyehelper\1.1.0
     [exec]     -> E:\dev\ti\build\Eye-Fi Center\modules\fieyelocale\1.1.0\\fieyelocalemodule.dll does not exist
     [exec]         -> Copying C:\ProgramData\Titanium\modules\win32\fieyelocale\1.1.0 ==> E:\dev\ti\build\Eye-Fi Center\modules\fieyelocale\1.1.0
     [exec]     -> E:\dev\ti\build\Eye-Fi Center\modules\ticodec\1.1.0\\ticodecmodule.dll does not exist
     [exec]         -> Copying C:\ProgramData\Titanium\modules\win32\ticodec\1.1.0 ==> E:\dev\ti\build\Eye-Fi Center\modules\ticodec\1.1.0
     [exec]     -> E:\dev\ti\build\Eye-Fi Center\modules\tidatabase\1.1.0\\tidatabasemodule.dll does not exist
     [exec]         -> Copying C:\ProgramData\Titanium\modules\win32\tidatabase\1.1.0 ==> E:\dev\ti\build\Eye-Fi Center\modules\tidatabase\1.1.0
     [exec]     -> E:\dev\ti\build\Eye-Fi Center\modules\timedia\1.1.0\\timediamodule.dll does not exist
     [exec]         -> Copying C:\ProgramData\Titanium\modules\win32\timedia\1.1.0 ==> E:\dev\ti\build\Eye-Fi Center\modules\timedia\1.1.0
     [exec]     -> E:\dev\ti\build\Eye-Fi Center\modules\timonkey\1.1.0\\timonkeymodule.dll does not exist
     [exec]         -> Copying C:\ProgramData\Titanium\modules\win32\timonkey\1.1.0 ==> E:\dev\ti\build\Eye-Fi Center\modules\timonkey\1.1.0
     [exec]     -> E:\dev\ti\build\Eye-Fi Center\modules\tinetwork\1.1.0\\tinetworkmodule.dll does not exist
     [exec]         -> Copying C:\ProgramData\Titanium\modules\win32\tinetwork\1.1.0 ==> E:\dev\ti\build\Eye-Fi Center\modules\tinetwork\1.1.0
     [exec]     -> E:\dev\ti\build\Eye-Fi Center\modules\tiprocess\1.1.0\\tiprocessmodule.dll does not exist
     [exec]         -> Copying C:\ProgramData\Titanium\modules\win32\tiprocess\1.1.0 ==> E:\dev\ti\build\Eye-Fi Center\modules\tiprocess\1.1.0
     [exec]     -> E:\dev\ti\build\Eye-Fi Center\modules\tiworker\1.1.0\\tiworkermodule.dll does not exist
     [exec]         -> Copying C:\ProgramData\Titanium\modules\win32\tiworker\1.1.0 ==> E:\dev\ti\build\Eye-Fi Center\modules\tiworker\1.1.0
     [exec]     -> Copying kboot.exe to E:\dev\ti\build\Eye-Fi Center
     [exec] Version: ImageMagick 6.7.0-3 2011-05-26 Q16 http://www.imagemagick.org
     [exec] Copyright: Copyright (C) 1999-2011 ImageMagick Studio LLC
     [exec] Features: OpenMP   
     [exec] 
     [exec]     -> Launching: C:\ProgramData\Titanium\sdk\win32\1.1.0\ReplaceVistaIcon.exe "E:\dev\ti\build\Eye-Fi Center\Eye-Fi Center.exe" "E:\dev\ti\build\Eye-Fi Center\Resources\_converted_icon.ico"
     [move] Moving 889 files to E:\dev\ti\build\dist\eye-fi\Eye-Fi Center
Any time I double click on the .exe file which is produced from this build, a cmd window is opened which prints out all the log messages that I'd usually see in Titanium Developer.

Is there any way to suppress this cmd window - I don't really want to distribute an .exe file which pops up a weird cmd window.

Sean

— asked 2 years ago by Sean O Shea
1 Comment
  • I tried packaging the with the -p option to create the .msi installer. That didn't seem to help though - the cmd window still appears.

    — commented 2 years ago by Sean O Shea

2 Answers

That window should only occur when your application is run with the --debug flag. I tried to reproduce this on my Windows 7 using 1.2.0 RC1 and wasn't able it show the console window. The console window would only be shown for me when running w/ --debug.

— answered 2 years ago by Josh Roesslein
answer permalink
2 Comments
  • Hi Josh,

    I'm simply double clicking on the resulting .exe file when the app builds. I'm not passing a -debug flag or anything like that. Do you see anything amiss with the parameters I'm passing to the tibuild.py file? Are the parameters that I'm passing any different to the parameters which are used on Appcelerator's cloud-based build servers?

    I've been trying this with the 1.1 version of Titanium Desktop. Would love to move to 1.2, but http://jira.appcelerator.org/browse/TIDESK-650 is preventing me from doing so right now.

    I'll try building the application on the Appcelerator build servers and see if that makes any difference in whether the cmd windows shows or not.

    Sean

    — commented 2 years ago by Sean O Shea

  • Hey Josh,

    I tried packaging the app via the Appcelerator cloud service and I got an error saying: 'NodeType' object has no attribute 'rfind'. As I have 2 custom desktop C modules as part of my project, I'm not even sure I can build the application on the Appcelerator cloud servers?

    One other point I failed to include in my original question is that I'm building and bundling my own version of the Titanium Desktop 1.1 runtime in the application. I'm building from 1.1 source using scons and that seems to work fine - I'm not sure building from source would have an impact on the cmd window showing up, but thought it worthwhile to mention.

    Sean

    — commented 2 years ago by Sean O Shea

Turns out that this was all related to how I was building the runtime. Following the instructions at http://developer.appcelerator.com/doc/desktop/building, the debug param passed in the scons command results in a runtime built in 'debug' mode which resulted in the cmd window appearing all the time. If you remove the 'debug' parameter when building the runtime from source, the cmd window goes away.

Your Answer

Think you can help? Login to answer this question!