发布GUI应用程序时如何禁用进入开发环境

发布于 2025-02-10 22:41:34 字数 147 浏览 1 评论 0原文

我已经使用尖叫声制作了一个GUI应用程序,我想向公众提供,而无需他们知道该程序是使用尖叫制作的。我想禁用我释放的吱吱声图像中的所有SmallTalk开发工具。我该怎么做? Pharo具有OpenWorldWithSpec。吱吱声5.3有类似的东西吗?

I have made a GUI application using Squeak, which I want to make available to the public without them necessarily knowing that the program was made using Squeak. I want to disable all the Smalltalk development tools in the Squeak image that I release. How can I do this? Pharo has openWorldWithSpec. Is there something similar in Squeak 5.3?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

人海汹涌 2025-02-17 22:41:34

曾经有一个称为 lockdown 现在无法下载。

但是,似乎至少部分地包含在吱吱声中。为了禁用编程设施,您应该在 workspace 或从 world菜单中运行(如果自定义):

preferences disableProgrammerFacilities

with:

disableProgrammerFacilities
    "Warning: do not call this lightly!  It disables all access to menus, debuggers, halos.  There is no guaranteed return from this, which is to say, you cannot necessarily reenable these things once they are disabled -- you can only use whatever the UI of the current project affords, and you cannot even snapshot -- you can only quit. 

     You can completely reverse the work of this method by calling the dual Preferences method enableProgrammerFacilities, provided you have left yourself leeway to bring about a call to that method.

    To set up a system that will come up in such a state, you have to request the snapshot in the same breath as you disable the programmer facilities.  To do this, put the following line into the 'do' menu and then evaluate it from that 'do' menu:

         Preferences disableProgrammerFacilities.

You will be prompted for a new image name under which to save the resulting image."

    Beeper beep.
    (self 
        confirm: 'CAUTION!!
This is a drastic step!
Do you really want to do this?') 
            ifFalse: 
                [Beeper beep.
                ^self inform: 'whew!'].
    self disable: #cmdDotEnabled.   "No user-interrupt-into-debugger"
    self compileAccessorForPreferenceNamed: #cmdGesturesEnabled value: false.   "No halos, etc."
    self compileAccessorForPreferenceNamed: #cmdKeysInText value: false.    "No user commands invokable via cmd-key combos in text editor"
    self enable: #noviceMode.   "No control-menu"
    self disable: #warnIfNoSourcesFile.
    self disable: #warnIfNoChangesFile.
    Smalltalk saveAs

There was once a package called Lockdown which is now impossible to download.

However, it seems that it has been, at least partially, included in Squeak itself. To disable programming facilities you should run at Workspace or from the World menu (if you customize it):

Preferences disableProgrammerFacilities

Which does:

disableProgrammerFacilities
    "Warning: do not call this lightly!  It disables all access to menus, debuggers, halos.  There is no guaranteed return from this, which is to say, you cannot necessarily reenable these things once they are disabled -- you can only use whatever the UI of the current project affords, and you cannot even snapshot -- you can only quit. 

     You can completely reverse the work of this method by calling the dual Preferences method enableProgrammerFacilities, provided you have left yourself leeway to bring about a call to that method.

    To set up a system that will come up in such a state, you have to request the snapshot in the same breath as you disable the programmer facilities.  To do this, put the following line into the 'do' menu and then evaluate it from that 'do' menu:

         Preferences disableProgrammerFacilities.

You will be prompted for a new image name under which to save the resulting image."

    Beeper beep.
    (self 
        confirm: 'CAUTION!!
This is a drastic step!
Do you really want to do this?') 
            ifFalse: 
                [Beeper beep.
                ^self inform: 'whew!'].
    self disable: #cmdDotEnabled.   "No user-interrupt-into-debugger"
    self compileAccessorForPreferenceNamed: #cmdGesturesEnabled value: false.   "No halos, etc."
    self compileAccessorForPreferenceNamed: #cmdKeysInText value: false.    "No user commands invokable via cmd-key combos in text editor"
    self enable: #noviceMode.   "No control-menu"
    self disable: #warnIfNoSourcesFile.
    self disable: #warnIfNoChangesFile.
    Smalltalk saveAs
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文