filemorph

Check-in [d3339908cc]
Login

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

Overview
Comment:Tweak software registration process
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1:d3339908cc35aaa464b9e8adb3ffa870416f3a18
User & Date: kevin 2015-10-11 22:21:08
Context
2015-10-11
22:31
Fix for registration bug check-in: 1c19e9c194 user: kevin tags: trunk
22:21
Tweak software registration process check-in: d3339908cc user: kevin tags: trunk
15:41
Updated build check-in: 82b813cad8 user: kevin tags: trunk
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to filemorph.pl.

11
12
13
14
15
16
17


18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
use File::Spec::Functions;
use File::Copy::Recursive qw(dircopy );
use Env qw(HOME);
use File::Path qw(remove_tree);
use File::Copy::Recursive qw (rmove);
our $DOS;



BEGIN {

    if ($Config{osname} eq "darwin") {
        my $frameworkpath = "$Bin/Contents/Frameworks/Tcl.framework/Tcl";
        $ENV{'PERL_TCL_DL_PATH'} = $frameworkpath;
    }
    if ($Config{osname} eq "MSWin32") {
      require Win32::GUI;
      Win32::GUI->import ();
        $DOS = Win32::GUI::GetPerlWindow();
        Win32::GUI::Hide($DOS);
        if (exists $ENV{PAR_PROGNAME}) {
            my $libtarget = "$ENV{TMP}/lib";
            my $libsrc    = "$ENV{PAR_TEMP}/inc/script/Tcl/lib";
            rmove($libsrc, $libtarget);
            my $bintarget = "$ENV{TMP}/bin";
            my $binsrc    = "$ENV{PAR_TEMP}/inc/script/Tcl/bin";
            rmove($binsrc, $bintarget);







>
>







|
|
|
|







11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
use File::Spec::Functions;
use File::Copy::Recursive qw(dircopy );
use Env qw(HOME);
use File::Path qw(remove_tree);
use File::Copy::Recursive qw (rmove);
our $DOS;

print "FileMorph is starting up...\n";

BEGIN {

    if ($Config{osname} eq "darwin") {
        my $frameworkpath = "$Bin/Contents/Frameworks/Tcl.framework/Tcl";
        $ENV{'PERL_TCL_DL_PATH'} = $frameworkpath;
    }
    if ($Config{osname} eq "MSWin32") {
        require Win32::GUI;
        Win32::GUI->import();
        $DOS = Win32::GUI::GetPerlWindow();
    #    Win32::GUI::Hide($DOS);
        if (exists $ENV{PAR_PROGNAME}) {
            my $libtarget = "$ENV{TMP}/lib";
            my $libsrc    = "$ENV{PAR_TEMP}/inc/script/Tcl/lib";
            rmove($libsrc, $libtarget);
            my $bintarget = "$ENV{TMP}/bin";
            my $binsrc    = "$ENV{PAR_TEMP}/inc/script/Tcl/bin";
            rmove($binsrc, $bintarget);

Changes to scriptlibs/regproc/regproc.tcl.

233
234
235
236
237
238
239

240
241
242
243
244
245
246
...
256
257
258
259
260
261
262

263
264
265
266
267
268
269

270
271
272
273

274

275
276
277
278
279
280
281
...
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
    proc setLic {} {
	variable serial
	variable serialbase
	variable datadir
	variable appname
	variable regwindow
	variable appstore


	if {$serial == ""} {
	    tk_messageBox -icon warning -title "Incorrect Serial Number" -message "Incorrect Serial Number" -detail "Incorrect serial number. The application will exit now." -parent .number
	    exit
	}

	set count 20000
................................................................................
	puts $output
	
	if {$output >= 0} {
	    cd $datadir
	    set lic [open $datadir/lic.dat w]
	    puts $lic "$serial"
	    close $lic

	    tk_messageBox -icon info -title "Thank You" -message "Thank You" -detail "Thank you for registering $appname." -parent .number
	    destroy .number
	    #display window that was hidden
	    catch {wm deiconify .}

	} else {
	    if {$expired == 1} {

		tk_messageBox -icon warning -title "Incorrect Serial Number" -message "Incorrect Serial Number" -detail "Incorrect serial number. The application will exit now." -parent .number
		exit
	    }
	    

	    tk_messageBox -icon warning -title "Incorrect Serial Number" -message "Incorrect Serial Number" -detail "Incorrect serial number. Please try again." -parent .number

	    regproc::getReg
	}
    }



    #generate license numbers
................................................................................
	ttk::frame .number.bottom.upper
	pack .number.bottom.upper -side top -fill both -expand no


	ttk::frame .number.bottom.lower -padding 5
	pack .number.bottom.lower -side bottom -fill both -expand no

	bind .number <Return> {regproc::setLic; destroy .number; raise .}
	ttk::button .number.bottom.lower.install -text "Register" -default active -command {regproc::setLic; destroy .number; raise .}
	ttk::button .number.bottom.lower.cancel -text "Cancel" -command "regproc::exitIfExpired; destroy .number; raise ."
	pack  .number.bottom.lower.install .number.bottom.lower.cancel  -side right -fill both -expand no
	
	::tk::PlaceWindow .number widget .

	wm deiconify .number
	focus .number.bottom.lower.install
	if {[tk windowingsystem] eq "aqua"} {







>







 







>







>



<
>

>







 







|
|
|







233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
...
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275

276
277
278
279
280
281
282
283
284
285
...
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
    proc setLic {} {
	variable serial
	variable serialbase
	variable datadir
	variable appname
	variable regwindow
	variable appstore
	variable expired

	if {$serial == ""} {
	    tk_messageBox -icon warning -title "Incorrect Serial Number" -message "Incorrect Serial Number" -detail "Incorrect serial number. The application will exit now." -parent .number
	    exit
	}

	set count 20000
................................................................................
	puts $output
	
	if {$output >= 0} {
	    cd $datadir
	    set lic [open $datadir/lic.dat w]
	    puts $lic "$serial"
	    close $lic
		grab release .number
	    tk_messageBox -icon info -title "Thank You" -message "Thank You" -detail "Thank you for registering $appname." -parent .number
	    destroy .number
	    #display window that was hidden
	    catch {wm deiconify .}

	} else {
	    if {$expired == 1} {
		grab release .number
		tk_messageBox -icon warning -title "Incorrect Serial Number" -message "Incorrect Serial Number" -detail "Incorrect serial number. The application will exit now." -parent .number
		exit
	    }

	    grab release .number
	    tk_messageBox -icon warning -title "Incorrect Serial Number" -message "Incorrect Serial Number" -detail "Incorrect serial number. Please try again." -parent .number
		destroy .number
	    regproc::getReg
	}
    }



    #generate license numbers
................................................................................
	ttk::frame .number.bottom.upper
	pack .number.bottom.upper -side top -fill both -expand no


	ttk::frame .number.bottom.lower -padding 5
	pack .number.bottom.lower -side bottom -fill both -expand no

	bind .number <Return> {grab release .number; regproc::setLic; destroy .number; raise .}
	ttk::button .number.bottom.lower.install -text "Register" -default active -command {grab release .number; regproc::setLic; destroy .number; raise .}
	ttk::button .number.bottom.lower.cancel -text "Cancel" -command "grab release .number; regproc::exitIfExpired; destroy .number; raise ."
	pack  .number.bottom.lower.install .number.bottom.lower.cancel  -side right -fill both -expand no
	
	::tk::PlaceWindow .number widget .

	wm deiconify .number
	focus .number.bottom.lower.install
	if {[tk windowingsystem] eq "aqua"} {