QuickWho

Check-in [d9c371b7b0]
Login

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:Additional refinements for Windows build
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1:d9c371b7b0d5892e6ac96a53c3602682aa7ebe82
User & Date: kevin 2016-04-06 03:29:54
Context
2016-04-06
03:39
Clean up indentation in c file check-in: dbc5b70080 user: kevin tags: trunk
03:29
Additional refinements for Windows build check-in: d9c371b7b0 user: kevin tags: trunk
2016-04-05
03:25
Update quickwho.c check-in: 2fdbf11fbd user: kevin tags: trunk
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to QuickWho.py.

334
335
336
337
338
339
340

341
342
343
344
345
346
347
        

    #draw the GUI
    def drawGUI(self):

        self.title('QuickWho')
        self.option_add('*tearOff', FALSE)

        
        
        if self.isAqua():
            self.tk.call('fullscreen::fullscreen', self)
 
        #make the menu
        self.mb = Menu(self)







>







334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
        

    #draw the GUI
    def drawGUI(self):

        self.title('QuickWho')
        self.option_add('*tearOff', FALSE)
        self.tk.call('wm', 'iconphoto', self, '-default', self.logo)
        
        
        if self.isAqua():
            self.tk.call('fullscreen::fullscreen', self)
 
        #make the menu
        self.mb = Menu(self)

Added build.bat.

























































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
SET COPYCMD=/Y


set pythondir="C:\Users\kevin\AppData\Local\Programs\Python\Python35"

if exist dist\ (
rmdir dist\ /s /q
)

if exist QuickWho.exe (
del QuickWho.exe
)

call windres icons.rc -o coff -o icons.o
call windres versioninfo.rc -o coff -o versioninfo.o
call buildexe %pythondir%

call xcopy %pythondir% dist\QuickWho /s /i /y

call xcopy scriptlibs dist\QuickWho\tcl\tk8.6  /s /i /y
call xcopy winlibs dist\QuickWho\tcl\tk8.6  /s /i /y
::call xcopy msgcat dist\QuickWho\tcl /s /i /y
call xcopy  C:\Strawberry\c\bin\*.dll dist\QuickWho\
call xcopy QuickWho.exe dist\QuickWho\
call xcopy QuickWho.py dist\QuickWho\
call xcopy ToolTip.py dist\QuickWho\


Added buildexe.bat.



>
1
gcc icons.o versioninfo.o quickwho.c -I %1\include -L%1\libs -L%1\DLLs -lShlwapi -lpython35 -o QuickWho.exe

Added icons.rc.



>
1
APPICONS ICON "quickwho.ico"

Changes to quickwho.c.

3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
..
40
41
42
43
44
45
46
47
48
49
50
51
52
#include <shlobj.h>
#include <shlwapi.h>
#include <tchar.h>
 
int main(int argc, char *argv[])
{
   
    Py_SetProgramName(argv[0]);
    Py_Initialize();

     TCHAR exedir [MAX_PATH];

  
  #if 0 
  GetModuleFileName(NULL, exedir, MAX_PATH);
................................................................................
  if (!SetCurrentDirectory(exedir)) {

    TCHAR errmsg[512];
    FormatMessage(FORMAT_MESSAGE_FROM_SYSTEM,0, GetLastError(),0,errmsg,1024,NULL);
    _tprintf( TEXT("The working dir is %s, and the error is %s/n"), exedir,errmsg );
  }

 
    PyRun_SimpleString("exec(open(\"QuickWho.py\").read())");
    Py_Finalize();
 
    return 0;
}







<







 







|





3
4
5
6
7
8
9

10
11
12
13
14
15
16
..
39
40
41
42
43
44
45
46
47
48
49
50
51
#include <shlobj.h>
#include <shlwapi.h>
#include <tchar.h>
 
int main(int argc, char *argv[])
{
   

    Py_Initialize();

     TCHAR exedir [MAX_PATH];

  
  #if 0 
  GetModuleFileName(NULL, exedir, MAX_PATH);
................................................................................
  if (!SetCurrentDirectory(exedir)) {

    TCHAR errmsg[512];
    FormatMessage(FORMAT_MESSAGE_FROM_SYSTEM,0, GetLastError(),0,errmsg,1024,NULL);
    _tprintf( TEXT("The working dir is %s, and the error is %s/n"), exedir,errmsg );
  }

	PySys_SetArgv(argc, argv);
    PyRun_SimpleString("exec(open(\"QuickWho.py\").read())");
    Py_Finalize();
 
    return 0;
}

Added versioninfo.rc.











































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
1 VERSIONINFO
FILEVERSION 6, 0, 0, 0
PRODUCTVERSION 6, 0, 0, 0
FILEOS 4
FILETYPE 1
{
    BLOCK "StringFileInfo" {
        BLOCK "040904E4" {
            VALUE "FileDescription", "Internet domain information, with style"
            VALUE "OriginalFilename", "QuickWho"
            VALUE "CompanyName", "WordTech Communications LLC"
            VALUE "FileVersion", "6.0.0"
            VALUE "LegalCopyright", "(c) 2016 WordTech Communications LLc"
            VALUE "ProductName", "QuickWho"
            VALUE "ProductVersion", "6.0.0"
        }
    }
    BLOCK "VarFileInfo" {
        VALUE "Translation", 0x409, 1252
    }
}