root/sources/minwin.diff

Revision 176, 5.1 kB (checked in by Gregor, 2 years ago)

--

  • dsss.conf

    old new  
     1name = minwin 
     2 
     3[*] 
     4version (!Windows) { 
     5    version (GNU) { 
     6        buildflags = -fversion=GTK 
     7    } else { 
     8        buildflags = -version=GTK 
     9    } 
     10} 
     11 
     12[minwin] 
     13prebuild = genlibs.d 
     14 
     15exclude = minwin/libs.d minwin/motif.d minwin/samples/* 
     16version (Windows) { 
     17    exclude += minwin/gtk.d minwin/x11.d 
     18} else { 
     19    exclude += minwin/win32.d minwin/mswindows.d 
     20} 
     21 
     22postinstall = install minwin/libs.d $INCLUDE_PREFIX/minwin 
  • genlibs.d

    old new  
     1/** 
     2 * Generate libs.d for minwin 
     3 *  
     4 * Authors: 
     5 *  Gregor Richards 
     6 *  
     7 * License: 
     8 *  Copyright (c) 2006  Gregor Richards 
     9 *   
     10 *  Permission is hereby granted, free of charge, to any person obtaining a 
     11 *  copy of this software and associated documentation files (the "Software"), 
     12 *  to deal in the Software without restriction, including without limitation 
     13 *  the rights to use, copy, modify, merge, publish, distribute, sublicense, 
     14 *  and/or sell copies of the Software, and to permit persons to whom the 
     15 *  Software is furnished to do so, subject to the following conditions: 
     16 *   
     17 *  The above copyright notice and this permission notice shall be included in 
     18 *  all copies or substantial portions of the Software. 
     19 *   
     20 *  THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 
     21 *  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 
     22 *  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 
     23 *  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 
     24 *  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 
     25 *  FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 
     26 *  DEALINGS IN THE SOFTWARE. 
     27 */ 
     28 
     29import std.file; 
     30import std.stdio; 
     31import std.string; 
     32 
     33import hcf.process; 
     34 
     35int main() 
     36{ 
     37    char[] libsbuf; 
     38     
     39    version (Windows) {} else { 
     40        // use pkg-config 
     41        PStream ps = new PStream("pkg-config --libs gtk+-2.0"); 
     42        char[] pss; 
     43        char[][] libs; 
     44        pss = ps.readLine(); 
     45        ps.close(); 
     46 
     47        libsbuf = "version (build) { pragma(link"; 
     48 
     49        libs = split(pss); 
     50        foreach (lib; libs) { 
     51            if (lib.length < 2 || 
     52                lib[0..2] != "-l") continue; 
     53            libsbuf ~= ", \"" ~ lib[2..$] ~ "\""; 
     54        } 
     55        libsbuf ~= ");\n"; 
     56         
     57        // now make sure it gets set to GTK 
     58        libsbuf ~= "pragma(export_version, \"GTK\"); }\n"; 
     59    } 
     60     
     61    std.file.write("minwin/libs.d", cast(void[]) libsbuf); 
     62     
     63    return 0; 
     64} 
  • minwin/all.d

    old new  
    3333  import minwin.listbox; 
    3434  import minwin.canvas; 
    3535  import minwin.scroll; 
     36  import minwin.libs; 
    3637} 
  • minwin/button.d

    old new  
    1818  import minwin.peerimpl; 
    1919  import minwin.logging; 
    2020  import std.string; 
     21  import std.c.string; 
    2122  import minwin.peer; 
    2223} 
    2324 
  • minwin/combo.d

    old new  
    1515  import minwin.window; 
    1616  import minwin.peerimpl; 
    1717  import std.string; 
     18  import std.c.string; 
    1819  import minwin.logging; 
    1920} 
    2021 
  • minwin/group.d

    old new  
    1919  import minwin.peerimpl; 
    2020  import minwin.logging; 
    2121  import std.string; 
     22  import std.c.string; 
    2223} 
    2324 
    2425// lightweight group of other children - no peer 
  • minwin/label.d

    old new  
    1616  import minwin.window; 
    1717  import minwin.peerimpl; 
    1818  import std.string; 
     19  import std.c.string; 
    1920  import minwin.logging; 
    2021} 
    2122 
  • minwin/listbox.d

    old new  
    1818  import minwin.window; 
    1919  import minwin.peerimpl; 
    2020  import std.string; 
     21  import std.c.string; 
    2122  import minwin.logging; 
    2223} 
    2324 
  • minwin/text.d

    old new  
    1616  import minwin.window; 
    1717  import minwin.peerimpl; 
    1818  import std.string; 
     19  import std.c.string; 
    1920  import minwin.logging; 
    2021} 
    2122 
  • minwin/window.d

    old new  
    1212 
    1313private { 
    1414  import std.string; 
     15  import std.c.string; 
    1516  import minwin.peerimpl; 
    1617  import minwin.font; 
    1718  import minwin.event; 
Note: See TracBrowser for help on using the browser.