Tags:
create new tag
, view all tags

TWiki Personal - for developers

This is the developer's view of TWikiPersonal: Not needed to install or run the personal TWiki, but relevant if you want to know how it is done or how to extend it. The initial discussion about this topic is available at PortableTWiki, I'd like to avoid copying it.



Motivation

Having a standalone TWiki application has enough uses to make me try creating one:

  • Develop and test plugins or TWiki applications locally: On my development machine, I used to run TWiki on two or three virtual hosts in Apache. This is a pain with regard to keeping Apache and TWiki configuration in synch, and with regard to file ownership and permissions.
  • Use TWiki as a personal information manager (PIM): I want to use TWiki because I'm familiar with it and because it has the features I want. I don't want to configure and run Apache for that, and I don't want to download, configure and run VMware player and a VM for that, especially when I am on Windows.
  • Creating and presenting content with SlideShowPlugin when there's no friendly TWiki server near you, e.g. on a customer site without guest (W)LAN or in a hotel/train where WLAN might be available, but with inacceptable price, throughput, or both.

Security considerations

As already stated: TWiki-Personal is for personal use. It is assumed that one person uses it on one system. Most TWiki security mechanisms have been switched off. If other people are using the same system, you need to trust each other.

  • Portable TWiki only responds to clients on the same system (technically: listens to localhost only).
  • The configuration file LocalSite.cfg is just a plaintext file on your local disc.
  • If you intend to "open up" your Portable TWiki to others, please enable appropriate security mechanisms. They are available with configure, just disabled per default.

Building TWiki-Personal

TWiki-Personal is not only easy to use, it is also much easier to build than its predecessors. This is, of course, due to the fact that Perl has evolved since then. We have a packaging system to contain the Perl runtime (based on CPAN:PAR::Packer), and a pure-perl webserver (CPAN:plackup). So, if you can't wait until I've tested enough to provide the download, roll out your own:

Perl prerequisites

In addition to the modules to run TWiki, you need to install the following modules and their dependencies:

TWiki part

Right now, building the personal distribution is done only with the help of a new tool in TWikiDevContrib. There are just two commands to be run. For brevity, we assume that you have .../TWikidevContrib/tools on your PATH, and that you are in the base directory of a checkout - otherwise just adapt the paths.

  • On the platform where you have your SVN checkout:
    twikidev collect --manifest TWPDistrib/lib/MANIFEST --root core --destination /tmp/twiki-personal --clean
    This command will collect (sic!) all files from core and from the default extensions to the destination path. The trick is in the special MANIFEST file dedicated to this purpose. It contains TWiki's default distribution plus our own copy of CGI.pm to safeguard against incompatible versions, and in particular the PSGIEngineContrib needed to run TWiki from a pure-perl webserver. In addition, there's a starter script runPersonal.pl and an initial LocalSite.cfg.orig. So, it is rather easy to bundle with a different set of extensions by just providing a modified MANIFEST!
  • Then, move the directory /tmp/twiki-personal to a location which is accessible by the target platform.
  • On the target platform, run:
    twikidev packtwp --root twiki-personal
    The --root is the directory you just created. This procedure packs all perl modules from your local installation and all TWiki modules to one CPAN:PAR archive. On Windows, the Perl executable will be packed as well; on Linux, we assume that you have Perl available, so the procedure will create just a Perl script.

The old instructions are here, for comparison, and for a rough description what the tool does:

  1. Start with a TWiki 6.0.1 distribution in the directory of your choice.
  2. Apply a Patch to the distribution. A few core changes could not be avoided, they will go into the next release.
  3. Don't configure TWiki using Apache or another web server.
  4. Install Plugins.PSGIEngineContrib into this TWiki.
  5. Start a console / terminal, change to the root directory of your TWiki.
  6. Create the executable:
    pp --clean --addfile=lib --lib=lib --module=TWiki::Contrib::PSGIEngineContrib::PARLoader tools/runpsgi.pl
  7. You now have a file called a.exe (on Windows) or a.out (on Linux). Rename as you wish.
  8. You now can delete all files in the lib directory with exception of LocalSite.cfg.
  9. Done! You are now ready to proceed with step 3 of the installation instructions.

-- Contributors: Harald Jörg - 2015-04-19

Discussion

MarceloRiveraSilva discovered that in version 6.0.2-alpha User Interface Internationalization doesn't work. I have created a new version 6.0.3-alpha, it is available for download from sourceforge here: https://sourceforge.net/projects/twiki/files/TWiki-Personal/TWiki-Personal-Win-6.0.3-alpha.zip/download As always: Feedback is welcome!

-- Harald Jörg - 2016-08-20

Edit | Attach | Watch | Print version | History: r5 < r4 < r3 < r2 < r1 | Backlinks | Raw View | Raw edit | More topic actions
Topic revision: r5 - 2016-08-20 - HaraldJoerg
 
  • Learn about TWiki  
  • Download TWiki
This site is powered by the TWiki collaboration platform Powered by Perl Hosted by OICcam.com Ideas, requests, problems regarding TWiki? Send feedback. Ask community in the support forum.
Copyright © 1999-2017 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.