equal
deleted
inserted
replaced
1650 #label: '-' |
1650 #label: '-' |
1651 ) |
1651 ) |
1652 #(#MenuItem |
1652 #(#MenuItem |
1653 #label: 'Save Project File' |
1653 #label: 'Save Project File' |
1654 #translateLabel: true |
1654 #translateLabel: true |
1655 #value: #saveProject |
1655 #value: #saveProjectFile |
1656 #enabled: #hasProjectSelectedAndProjectFilenameHolder |
1656 #enabled: #hasProjectSelectedAndProjectFilenameHolder |
1657 ) |
1657 ) |
1658 #(#MenuItem |
1658 #(#MenuItem |
1659 #label: 'Save Project Code' |
1659 #label: 'Save Project Code' |
1660 #translateLabel: true |
1660 #translateLabel: true |
3647 |
3647 |
3648 ! |
3648 ! |
3649 |
3649 |
3650 buildClassLibrary |
3650 buildClassLibrary |
3651 "compile a binary class library in the projects directory" |
3651 "compile a binary class library in the projects directory" |
3652 |p dir f| |
3652 |p dir f diagnosticFile diagnostic error textBox| |
3653 |
3653 |
3654 p := self currentProject. |
3654 p := self currentProject. |
3655 p isNil ifTrue:[ |
3655 p isNil ifTrue:[ |
3656 self information:'No project selected'. |
3656 self information:'No project selected'. |
3657 ^ self |
3657 ^ self |
3670 f := dir construct:'Make.proto'. |
3670 f := dir construct:'Make.proto'. |
3671 f exists ifFalse:[ |
3671 f exists ifFalse:[ |
3672 (self confirm:'''Make.proto'' does not exist in project directory\\Create ?' withCRs) ifFalse:[ |
3672 (self confirm:'''Make.proto'' does not exist in project directory\\Create ?' withCRs) ifFalse:[ |
3673 ^ self |
3673 ^ self |
3674 ]. |
3674 ]. |
3675 p buildMakefiles. |
3675 self buildMakefiles. |
3676 ]. |
3676 ]. |
3677 |
3677 |
3678 "/ check for Makefile ... |
3678 "/ check for Makefile ... |
3679 f := dir construct:'Makefile'. |
3679 f := dir construct:'Makefile'. |
3680 f exists ifFalse:[ |
3680 f exists ifFalse:[ |
3682 ^ self |
3682 ^ self |
3683 ]. |
3683 ]. |
3684 p createMakefile. |
3684 p createMakefile. |
3685 ]. |
3685 ]. |
3686 |
3686 |
3687 |
3687 "/ now, execute the makefile found there ... |
|
3688 diagnosticFile := Filename newTemporary. |
|
3689 diagnostic := diagnosticFile writeStream. |
|
3690 error := false. |
|
3691 |
|
3692 [ |
|
3693 self withCursor:Cursor wait do:[ |
|
3694 OperatingSystem |
|
3695 executeCommand:'make' |
|
3696 inputFrom:nil |
|
3697 outputTo:diagnostic |
|
3698 errorTo:diagnostic |
|
3699 inDirectory:(dir pathName) |
|
3700 onError:[error := true]. |
|
3701 ]. |
|
3702 |
|
3703 diagnostic close. |
|
3704 |
|
3705 textBox := TextBox new. |
|
3706 textBox initialText:(diagnosticFile readStream contents). |
|
3707 textBox title:'Make Diagnostic output:'. |
|
3708 textBox readOnly:true. |
|
3709 textBox noCancel. |
|
3710 textBox label:'Make Diagnostic output'. |
|
3711 textBox extent:(600@250); sizeFixed:true. |
|
3712 textBox showAtPointer. |
|
3713 |
|
3714 ] valueNowOrOnUnwindDo:[ |
|
3715 diagnosticFile delete |
|
3716 ]. |
3688 |
3717 |
3689 |
3718 |
3690 ! |
3719 ! |
3691 |
3720 |
3692 buildLoadAllFile |
3721 buildLoadAllFile |
4059 "/ selectedNode changed. |
4088 "/ selectedNode changed. |
4060 ] |
4089 ] |
4061 ] |
4090 ] |
4062 ! |
4091 ! |
4063 |
4092 |
4064 saveProject |
4093 saveProjectFile |
4065 |d p| |
4094 |d p| |
4066 |
4095 |
4067 self modifiedChannel value ifTrue:[ |
4096 self modifiedChannel value ifTrue:[ |
4068 (self confirm:'Changes not confirmed; save anyway ?') ifFalse:[^ self] |
4097 (self confirm:'Changes not confirmed; save anyway ?') ifFalse:[^ self] |
4069 ]. |
4098 ]. |