Software Development for Saratov SFD'09: How It Was
In 2009, a rotation of personnel took place at the SSESU (Saratov Social and Economic University), as a result of which Saratov Software Freedom Day was no longer possible there.
The baton of SFD in Saratov was picked up by SSU.
The organizers of SSU were mainly people with a technical bias, and therefore this year Saratov SFD turned out to be significantly more technically advanced than before.
For the organization of SFD 2009, several software products were developed at SSU (up to drivers for Linux!).
The organization of Saratov SFD 2009 took into account the experience of previous years.
A special site was opened dedicated to this event sfd.sgu.ru
The site is actually a project in the open source project management system of the Redmine cc.sgu.ru/redmine applied in the Computer Center of SSU cc.sgu.ru .
Redmine is written in Ruby on Rails and is currently considered the best Open Source Bug Tracker / Project Management System.
It was decided to make the SFD project in the VTshnoy project management system (and not for example raise a separate instance of the same Redmine) in order to:
As a result, the organizers faced a number of problems:
These problems were resolved by developing a plugin for Redmine (no change to Redmine source codes).
In the future, it is planned to refactor it (split it into separate plugins by function) and put it in opensource. Here are just a few pieces of code:
To popularize open source software, to make it possible for visitors to directly interact with this software, as well as to visually advertise the event at SSU, it was decided to use the electronic kiosk that remained at the EC after the implementation of the informatization project of Saratov municipal institutions.
And of course, free software was supposed to be on the kiosk.
But as it turned out, the iron filling of the kiosk was not very free ...
under the GeneralTouch touch screen there were very old proprietary drivers for Xfree86 graphics that were not compatible with modern Xorg and there was still a wild bike from some enthusiast linuxportal.ru/forums/index.php/ m / 81607 / # msg_81607(there is some kind of service there somehow disguised this touch screen as some other one which also has old and third-party firewood), which also did not work ...
We decided why not try to write normal firewood yourself? Moreover, Xorg includes drivers for Elotouch touchscreens also connected to a COM port like our GeneralTouch, and besides that, from the “cyclist” we got the protocol by which GeneralTouch works.
We opened the sources of xorg-x11-drv-elographics , we look, but the format of the main Touch package is exactly the same! (We don’t have the format of other GeneralTouch packages) ...
They removed the initialization and other unnecessary pieces, compiled ... It worked!
Subsequently, our patch was taken upstream
Conclusion ... do not be afraid to program ... take on practically useful and interesting tasks ...
Before writing firewood, looking at the source xorg-x11-drv-elographics, even some of the former Olympiad athletes from TsOPa (Center for the Olympiad Training at SSU) said : PS. As already written in the topic this year, Saratov SFD 2010 also holds the Saratov State University. As they say welcome!
The baton of SFD in Saratov was picked up by SSU.
The organizers of SSU were mainly people with a technical bias, and therefore this year Saratov SFD turned out to be significantly more technically advanced than before.
For the organization of SFD 2009, several software products were developed at SSU (up to drivers for Linux!).
The organization of Saratov SFD 2009 took into account the experience of previous years.
A special site was opened dedicated to this event sfd.sgu.ru
Work on the site
The site is actually a project in the open source project management system of the Redmine cc.sgu.ru/redmine applied in the Computer Center of SSU cc.sgu.ru .
Redmine is written in Ruby on Rails and is currently considered the best Open Source Bug Tracker / Project Management System.
It was decided to make the SFD project in the VTshnoy project management system (and not for example raise a separate instance of the same Redmine) in order to:
- to refine the VTshniy redmine for people from the outside (SFD has become the
“ray of light in the dark kingdom"at the moment the only publicly available / Open Source project of the VTs) - to draw the attention of potential new personnel to the EC
- emphasize the affiliation of the Exhibition Center to the organization of this event
As a result, the organizers faced a number of problems:
- Redmine out of the box does not support different styles for different projects
- Redmine has many fields that the average speaker does not need when adding an application for participation (status, priority, assigned, etc.)
- Redmine does not support the use of javascript in themes (in fact, a theme is one CSS)
These problems were resolved by developing a plugin for Redmine (no change to Redmine source codes).
In the future, it is planned to refactor it (split it into separate plugins by function) and put it in opensource. Here are just a few pieces of code:
Adding CSS, removing unnecessary fields for non-project participants, and adding JS:
- def view_layouts_base_html_head(context = { })
- ret=''
- project = context[:project]
- baseurl = url_for(:controller => 'wiki', :action => 'index', :id => project) + '/../../..'
- if not project.nil?
- if not User.current.member_of?(project)
- if File.exists?("#{RAILS_ROOT}/public/themes/#{project.identifier}/stylesheets/non_member.css")
- ret+= stylesheet_link_tag(baseurl + "/themes/#{project.identifier}/stylesheets/non_member.css")
- end
- end
- if File.exists?("#{RAILS_ROOT}/public/themes/#{project.identifier}/js/project.js")
- ret+=javascript_include_tag(baseurl + "/themes/#{project.identifier}/js/project.js")
- end
-
- end
- return ret
- end
Substitution of functions of redmine itself from the plugin (per-project themes):
- require_dependency 'redmine/themes'
-
- module CSSPatch
- def self.included(base) # :nodoc:
- base.send(:include, InstanceMethods)
-
- base.class_eval do
- alias_method_chain :path_to_stylesheet, :perproject
- end
- end
-
- module InstanceMethods
- # Adds a rates tab to the user administration page
- def path_to_stylesheet_with_perproject(source)
-
- th = String.new(Setting.ui_theme)
- if not @project.nil?
- projecttheme = "#{RAILS_ROOT}/public/themes/#{@project.identifier}"
- if File.exists?(projecttheme)
- th = @project.identifier
- end
- end
- @current_theme ||= Redmine::Themes.theme(th)
- stylesheet_path((@current_theme && @current_theme.stylesheets.include?(source)) ?
- "/themes/#{@current_theme.dir}/stylesheets/#{source}" : source)
-
- end
-
- end
- end
-
-
- ApplicationHelper.send(:include, CSSPatch)
Drivers for the touch screen of the Electronic Kiosk
To popularize open source software, to make it possible for visitors to directly interact with this software, as well as to visually advertise the event at SSU, it was decided to use the electronic kiosk that remained at the EC after the implementation of the informatization project of Saratov municipal institutions.
And of course, free software was supposed to be on the kiosk.
But as it turned out, the iron filling of the kiosk was not very free ...
under the GeneralTouch touch screen there were very old proprietary drivers for Xfree86 graphics that were not compatible with modern Xorg and there was still a wild bike from some enthusiast linuxportal.ru/forums/index.php/ m / 81607 / # msg_81607(there is some kind of service there somehow disguised this touch screen as some other one which also has old and third-party firewood), which also did not work ...
We decided why not try to write normal firewood yourself? Moreover, Xorg includes drivers for Elotouch touchscreens also connected to a COM port like our GeneralTouch, and besides that, from the “cyclist” we got the protocol by which GeneralTouch works.
We opened the sources of xorg-x11-drv-elographics , we look, but the format of the main Touch package is exactly the same! (We don’t have the format of other GeneralTouch packages) ...
They removed the initialization and other unnecessary pieces, compiled ... It worked!
Subsequently, our patch was taken upstream
Conclusion ... do not be afraid to program ... take on practically useful and interesting tasks ...
Before writing firewood, looking at the source xorg-x11-drv-elographics, even some of the former Olympiad athletes from TsOPa (Center for the Olympiad Training at SSU) said : PS. As already written in the topic this year, Saratov SFD 2010 also holds the Saratov State University. As they say welcome!
"Почитал код драйвера и мне стало страшно :(
Думаю будет разумнее попытаться найти готовые дрова - низкоуровневое программирование это слишком тяжко на мой взгляд."