* * * *

Privacy Policy

Blog italiano

Clicca qui se vuoi andare al blog italiano su Lazarus e il pascal.

Forum ufficiale

Se non siete riusciti a reperire l'informazione che cercavate nei nostri articoli o sul nostro forum vi consiglio di visitare il
Forum ufficiale di Lazarus in lingua inglese.

Lazarus 1.0

Trascinare un file nel programma
DB concetti fondamentali e ZeosLib
Recuperare codice HTML da pagina web
Mandare mail con Lazarus
Stabilire il sistema operativo
Esempio lista in pascal
File INI
Codice di attivazione
Realizzare programmi multilingua
Lavorare con le directory
Utilizzare Unità esterne
TTreeView
TTreeview e Menu
Generare controlli RUN-TIME
LazReport, PDF ed immagini
Intercettare tasti premuti
Ampliare Lazarus
Lazarus e la crittografia
System Tray con Lazarus
UIB: Unified Interbase
Il file: questo sconosciuto
Conferma di chiusura di un applicazione
Liste e puntatori
Overload di funzioni
Funzioni a parametri variabili
Proprietà
Conversione numerica
TImage su Form e Panel
Indy gestiore server FTP lato Client
PopUpMenu sotto Pulsante (TSpeedButton)
Direttiva $macro
Toolbar
Evidenziare voci TreeView
Visualizzare un file Html esterno
StatusBar - aggirare l'errore variabile duplicata
Da DataSource a Excel
Le permutazioni
Brute force
Indy 10 - Invio email con allegati
La gestione degli errori in Lazarus
Pascal Script
Linux + Zeos + Firebird
Dataset virtuale
Overload di operatori
Lavorare con file in formato JSON con Lazarus
Zeos ... dietro le quinte (prima parte)
Disporre le finestre in un blocco unico (come Delphi)
Aspetto retrò (Cmd Line)
Lazarus 1.0
Come interfacciare periferica twain
Ubuntu - aggiornare free pascal e lazarus
fpcup: installazioni parallele di lazarus e fpc
Free Pascal e Lazarus sul Raspberry Pi
Cifratura: breve guida all'uso dell'algoritmo BlowFish con lazarus e free pascal.
Creare un server multithread
guida all'installazione di fpc trunk da subversion in linux gentoo
Indice
DB concetti fondamentali e connessioni standard
Advanced Record Syntax
DB concetti fondamentali e DBGrid
DB concetti fondamentali e TDBEdit, TDBMemo e TDBText
Advanced Record Syntax: un esempio pratico
Superclasse form base per programmi gestionali (e non)
Superclasse form base per programmi gestionali (e non) #2 - log, exception call stack, application toolbox
Superclasse form base per programmi gestionali (e non) #3 - traduzione delle form
Superclasse form base per programmi gestionali (e non) #4 - wait animation
Un dialog per la connessione al database:TfmSimpleDbConnectionDialog
Installare lazarus su mac osx sierra
immagine docker per lavorare con lazarus e free pascal
TDD o Test-Driven Development
Benvenuto! Effettua l'accesso oppure registrati.
Aprile 16, 2024, 09:38:38 am

Inserisci il nome utente, la password e la durata della sessione.

62 Visitatori, 0 Utenti

Autore Topic: progetto web forum lazaruspascal.it  (Letto 181786 volte)

nomorelogic

  • Global Moderator
  • Hero Member
  • *****
  • Post: 2870
  • Karma: +20/-4
Re:progetto web forum lazaruspascal.it
« Risposta #225 il: Maggio 08, 2013, 09:04:37 am »
rieccomi qua
nei sorgenti nulla di nuovo ma ho provato a lavorare un po' con extjs e json come base dati (nessun database).

questi sorgenti per ora non li posto in svn (sono pigro e non è ancora completo, carica sempre la stessa foto :P) ma li metto volentieri qua per chi vuole provare

1) prima di tutto scaricate l'ultima versione ad oggi di extjs da http://www.sencha.com/products/extjs/download/: ext-4.2.0-gpl.zip
2) decomprimete lo zip scaricato in /var/www/extjs
3) create la cartella /var/www/ffextjs42 ed eseguite un chmod 777
4) in /var/ext/ffextjs42, create il file: fishfact_extjs42.pspage e copiateci il contenuto seguente:
Codice: [Seleziona]
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<title>Fishfact Demo</title>
    <link rel="stylesheet" type="text/css" href="../extjs/examples/shared/example.css" />

    <!-- GC -->

    <script type="text/javascript" src="../extjs/examples/shared/include-ext.js"></script>
    <script type="text/javascript" src="../extjs/examples/shared/options-toolbar.js"></script>

    <!-- page specific -->
    <script type="text/javascript" src="fishfact_e42_grid.js"></script>
</head>
<body>
    <h1>Fishfact Demo</h1>
    <p>This example show how use pspage with extjs 4.2 and json data file.</p>

    <!-- a place holder for the grid. requires the unique id to be passed in the javascript function, and width and height ! -->
    <div id="example-grid"></div>
</body>
</html>
5) nella stessa cartella create il file fishfact_e42_grid.js con il seguente contenuto
Codice: [Seleziona]
Ext.require([
    'Ext.data.*',
    'Ext.grid.*'
]);



Ext.onReady(function() {

    Ext.define('User',{
        extend: 'Ext.data.Model',
        fields: [
           {name: 'speciesno', type: 'string'},
           {name: 'category', type: 'string'},
           {name: 'commonname', type: 'string'},
           {name: 'speciesname', type: 'string'},
           {name: 'lengthcm', type: 'int'},
           {name: 'lengthin', type: 'int'},
           {name: 'notes', type: 'string'}       
         ]
    });

 var Grid1BiolifeStore = Ext.create('Ext.data.Store', {
        storeId: 'Grid1BiolifeStore',
        model: 'User',
        autoLoad: true,
        proxy: {
            type: 'ajax',
            url : '../data/biolife.json',
            reader: {type: 'json'}
        }
    });


 var Grid1Grid = new Ext.grid.GridPanel({
      store: Grid1BiolifeStore,
      /* renderTo: 'example-grid', */
      title: 'Fish list',
      width: 640,
      height: 210,
        forceFit: true,
        split: true,
        region: 'north',
    columns: [
      {
        id: 'speciesno',
        header: "Species No",
        sortable: true,
        dataIndex: 'speciesno'
      },{
        id: 'category',
        header: "Category",
        sortable: true,
        dataIndex: 'category'
      },{
        id: 'commonname',
        header: "Common Name",
        sortable: true,
        dataIndex: 'commonname'
      },{
        id: 'speciesname',
        header: "Species Name",
        sortable: true,
        dataIndex: 'speciesname'
      },{
        id: 'lengthcm',
        header: "Length (cm)",
        sortable: true,
        dataIndex: 'lengthcm'
      },{
        id: 'lengthin',
        header: "Length (in)",
        sortable: true,
        dataIndex: 'lengthin'
      }
    ]

});


    // define a template to use for the detail view
    var bookTplMarkup = [
        '<TABLE WIDTH=100% CELLPADDING=0 CELLSPACING=0 STYLE="page-break-before: always">',
        '<COL WIDTH=128*>',
        '<COL WIDTH=128*>',
        '<TR>',
        '<TD COLSPAN=2 WIDTH=100% VALIGN=TOP STYLE="border: none; padding: 0cm">',
        '<H3>{commonname}</H3> <a href="{DetailPageURL}" target="_blank">{Title}</a><br/>',
        '</TD>',
        '</TR>',
        '<TR VALIGN=TOP>',
        '<TD WIDTH=50% STYLE="border: none; padding: 0cm">',
        '<img src="../data/ffimg/Angelfish_Blue_Angelfish.gif"><br>',
        '</TD>',
        '<TD WIDTH=50% STYLE="border: none; padding: 0cm">',
        'Species No: {speciesno}<br/>',
        'Category: {category}<br/>',
        'Common Name: {commonname}<br/>',
        'Species Name: {speciesname}<br/>',
        'Length (cm): {lengthcm}<br/>',
        'Length (in): {lengthin}<br/>',
        '</TD>',
        '</TR>',
        '<TR>',
        '<TD COLSPAN=2 WIDTH=100% VALIGN=TOP STYLE="border: none; padding: 0cm">',
        '<H4>Notes:</H4>{notes}',
        '</TD>',
        '</TR>',
        '</TABLE>'

    ];
    var bookTpl = Ext.create('Ext.Template', bookTplMarkup);
   
   
      Ext.create('Ext.Panel', {
        renderTo: 'example-grid',
        frame: true,
        title: 'Biolife',
        width: 580,
        height: 650,
        layout: 'border',
        items: [
            Grid1Grid, {
                id: 'detailPanel',
                title: 'Detail',
                region: 'center',
                bodyPadding: 7,
                bodyStyle: "background: #ffffff;",
                html: 'Please select a fish to see additional details.'
            }
        ]
    });
   


   // update panel body on selection change
    Grid1Grid.getSelectionModel().on('selectionchange', function(sm, selectedRecord) {
        if (selectedRecord.length) {
            var detailPanel = Ext.getCmp('detailPanel');
            detailPanel.update(bookTpl.apply(selectedRecord[0].data));
        }
    });

   


});
6) nella cartella /var/www/data, create il file biolife.json con dentro:
Codice: [Seleziona]
[
    {"speciesno"  : "90020",
     "category"   : "Triggerfishy",
     "commonname" : "Clown Triggerfish",
     "speciesname": "Ballistoides conspicillum",
     "lengthcm"   : 50,
     "lengthin"   : 20,
     "notes"      : "..."
     },
    {"speciesno"  : "90030",
     "category"   : "Snapper",
     "commonname" : "Red Emperor",
     "speciesname": "Lutjanus sebae",
     "lengthcm"   : 60,
     "lengthin"   : 24,
     "notes"      : "..."
     },
     
    {"speciesno" : "90050",                "category"    : "Wrasse",
     "commonname": "Giant Maori Wrasse",   "speciesname": "Cheilinus undulatus",
     "lengthcm": 229,                 "lengthin" : 90,
     "notes": "This is the largest of all the wrasse.  It is found in dense reef areas, feeding on a wide variety of mollusks, fishes, sea urchins, crustaceans, and other invertebrates. In spite of its immense size, divers find it a very wary fish."},
    {"speciesno" : "90070",                "category"    : "Angelfish",
     "commonname": "Blue Angelfish",       "speciesname": "Pomacanthus nauarchus",
     "lengthcm": 30,                  "lengthin" : 12,
     "notes"      : "Habitat is around boulders, caves, coral ledges and crevices in shallow waters.  Swims alone or in groups."},
    {"speciesno" : "90080",                "category"    : "Cod",
     "commonname": "Lunartail Rockcod",    "speciesname": "Variola louti",
     "lengthcm": 80,                  "lengthin" : 31,
     "notes"      : "Also known as the coronation trout.  It is found around coral reefs from shallow to very deep waters.  Feeds primarily on small fishes."},
    {"speciesno" : "90090",                "category"    : "Scorpionfish",
     "commonname": "Firefish",             "speciesname": "Pterois volitans",
     "lengthcm": 38,                  "lengthin" : 15,
     "notes"      : "Also known as the turkeyfish.  Inhabits reef caves and crevices.  The firefish is usually stationary during the day, but feeds actively at night.  Favorite foods are crustaceans."},
    {"speciesno" : "90100",                "category"    : "Butterflyfish",
     "commonname": "Ornate Butterflyfish", "speciesname": "Chaetodon Ornatissimus",
     "lengthcm": 19,                  "lengthin" : 7,
     "notes"      : "Normally seen in pairs around dense coral areas from very shallow to moderate depths.  The butterflyfish feeds mainly on coral polyps and anemones."     },
     
    {"speciesno" : "90110",                "category"    : "Shark",
     "commonname": "Swell Shark",          "speciesname": "Cephaloscyllium ventriosum",
     "lengthcm": 102,                 "lengthin" : 40,
     "notes"      : "Inhabits shallow reef caves and crevices and kelp beds along the coast and offshore islands.  This shark feeds at night on fishes and crustaceans and is totally harmless to divers."},
    {"speciesno" : "90120",                "category"    : "Ray",
     "commonname": "Bat Ray",              "speciesname": "Myliobatis californica",
     "lengthcm": 56,                  "lengthin" : 22,
     "notes"      : "Also know as the grinder ray because of its flat grinding teeth used to crush its meal of crustaceans or invertebrates.  Inhabits bays, sloughs, and kelp beds with sandy bottoms."},
    {"speciesno" : "90130",                "category"    : "Eel",
     "commonname": "California Moray",     "speciesname": "Gymnothorax mordax",
     "lengthcm": 150,                 "lengthin" : 59,
     "notes"      : "This fish hides in a shallow-water lair with just its head protruding during the day.  At night it feeds on octopuses, crustaceans, and small fish close by."},
    {"speciesno" : "90140",                "category"    : "Cod",
     "commonname": "Lingcod",              "speciesname": "Ophiodon elongatus",
     "lengthcm": 150,                 "lengthin" : 59,
     "notes"      : "Widely found from near the shore to very deep waters.  Young fish stay on sand or mud bottoms of bays and inshore areas.  The lingcod is a voracious predator, eating many different fishes and octopuses."},
    {"speciesno" : "90150",                "category"    : "Sculpin",
     "commonname": "Cabezon",              "speciesname": "Scorpaenichthys marmoratus",
     "lengthcm": 99,                  "lengthin" : 39,
     "notes"      : "Often called the great marbled sculpin.  Found over rocky or shell-encrusted bottoms from shallow to moderately deep waters.  It feeds primarily on crustaceans and mollusks."},
    {"speciesno" : "90160",                "category"    : "Spadefish",
     "commonname": "Atlantic Spadefish",   "speciesname": "Chaetodiperus faber",
     "lengthcm": 90,                  "lengthin" : 35,
     "notes"      : "Found in mid-water areas around reefs, wrecks and bridges.  The tiny, all-black juveniles drift motionless in the shallows, looking like leaves and pods of mangrove."},
    {"speciesno" : "90170",                "category"    : "Shark",
     "commonname": "Nurse Shark",          "speciesname": "Ginglymostoma cirratum",
     "lengthcm": 400,                 "lengthin" : 157,
     "notes"      : "Frequently found under rock or reef ledges.  Carnivorous with well-developed organs for scent and vibration detection."},
     
    {"speciesno" : "90180",                "category"    : "Ray",
     "commonname": "Spotted Eagle Ray",    "speciesname": "Aetobatus narinari",
     "lengthcm": 200,                 "lengthin" : 79,
     "notes"      : "Found in reef areas and sandy bottoms.  The spotted eagle ray has a poisonous spine on its tail and incredibly powerful jaws to crush oysters, clams, and numerous crustaceans.  Divers report large schools during breeding season."},
    {"speciesno" : "90190",                "category"    : "Snapper",
     "commonname": "Yellowtail Snapper",   "speciesname": "Ocyurus chrysurus",
     "lengthcm": 75,                  "lengthin" : 30,
     "notes"      : "Prefers to congregate in loose groups in the open water above reef areas.  Has well-developed teeth and usually feeds at night on small fishes, crustaceans, and plankton."},
    {"speciesno" : "90200",                "category"    : "Parrotfish",
     "commonname": "Redband Parrotfish",   "speciesname": "Sparisoma Aurofrenatum",
     "lengthcm": 28,                  "lengthin" : 11,
     "notes"      : "Inhabits reef areas.  The parrotfish's teeth are fused together, enabling them to scrape away hard coral outer skeletons to get at polyps inside.  These fish are thought to be a major factor in reef recycling."},
    {"speciesno" : "90210",                "category"    : "Barracuda",
     "commonname": "Great Barracuda",      "speciesname": "Sphyraena barracuda",
     "lengthcm": 150,                 "lengthin" : 59,
     "notes"      : "Young barracuda live in inshore seagrass beds, while adults range from inshore channels to the open ocean.  The barracuda feeds on a wide variety of fishes."},
    {"speciesno" : "90220",                "category"    : "Grunt",
     "commonname": "French Grunt",         "speciesname": "Haemulon flavolineatum",
     "lengthcm": 30,                  "lengthin" : 12,
     "notes"      : "The French grunt drifts in large groups in sheltered reef areas during the day.  It forages nearby for other fish at night."},
    {"speciesno" : "90230",                "category"    : "Snapper",
     "commonname": "Dog Snapper",          "speciesname": "Lutjanus jocu",
     "lengthcm": 90,                  "lengthin" : 35,
     "notes"      : "This fish is named for its elongated canine teeth at the front of the upper jaw.  It is solitary and wary and stays in the deep reef or submerged wreck areas.  Not very common anywhere."},
     
    {"speciesno" : "90240",                "category"    : "Grouper",
     "commonname": "Nassau Grouper",       "speciesname": "Epinephelus striatus",
     "lengthcm": 91,                  "lengthin" : 36,
     "notes"      : "Found around shallow coral reefs and seagrass beds, feeding mainly on fishes."},

    {"speciesno" : "90250",                "category"    : "Wrasse",
     "commonname": "Bluehead Wrasse",      "speciesname": "Thalassoma bifasciatum",
     "lengthcm": 15,                  "lengthin" : 6,
     "notes"      : "Found in coral reefs, rocky flats, reef sand, and seagrass habitats.  This is one of the most successful ''cleaner fish'' in the tropical West Atlantic.  It feeds on the parasites of other fish, who come to the wrasse to be cleaned."},
    {"speciesno" : "90260",                "category"    : "Jack",
     "commonname": "Yellow Jack",          "speciesname": "Gnathanodon speciousus",
     "lengthcm": 90,                  "lengthin" : 35,
     "notes"      : "Inhabits reef and mid-water areas, feeding on invertebrates and small fishes.  The adult is one of the few jacks without teeth."},
    {"speciesno" : "90270",                "category"    : "Surfperch",
     "commonname": "Redtail Surfperch",    "speciesname": "Amphistichus rhodoterus",
     "lengthcm": 40,                  "lengthin" : 16,
     "notes"      : "Inhabits exposed sandy shorelines to shallow depths.  Feeds on sand-dwelling crustaceans and mollusks."},
    {"speciesno" : "90280",                "category"    : "Croaker",
     "commonname": "White Sea Bass",       "speciesname": "Atractoscion nobilis",
     "lengthcm": 150,                 "lengthin" : 59,
     "notes"      : "Schools are found over rocky bottoms and around kelp forest canopies.  Not a true bass, this is the largest of the croakers on the Pacific Coast.  It feeds in mid-water on squid, anchovies, and sardines."},
    {"speciesno" : "90290",                "category"    : "Greenling",
     "commonname": "Rock Greenling",       "speciesname": "Hexagrammos lagocephalus",
     "lengthcm": 60,                  "lengthin" : 24,
     "notes"      : ""},
    {"speciesno" : "90300",                "category"    : "Wrasse",
     "commonname": "Senorita",             "speciesname": "Oxyjulis californica",
     "lengthcm": 25,                  "lengthin" : 10,
     "notes"      : ""},
    {"speciesno" : "90310",                "category"    : "Smelt",
     "commonname": "Surf Smelt",           "speciesname": "Hypomesus pretiosus",
     "lengthcm": 25,                  "lengthin" : 10,
     "notes"      : ""}
     
     
]
7) l'immagine /var/www/data/ffimg/Angelfish_Blue_Angelfish.gif già l'avete (è su svn), purtroppo per ora carica solo e sempre questa :P
8 ) sul browser mettete l'indirizzo: http://127.0.0.1/ffextjs42/fishfact_extjs42.pspage ed avrete una griglia extjs con tanto di dettaglio (yes, we ajax) quando cliccate su una riga (vedi allegato).

Ora credo che mi fermerò con le demo, quello che c'era da verificare s'è verificato e ci sono molti spunti per sviluppi futuri.
Guardando a come si scrive con pspage ci sono molte cose da fare per migliorare il tutto e credo che sia ora di tornare per un po' alla teoria (la pratica dimostra che la strada è fattibile). Spero di ricevere un sacco di critiche e spunti su tutti i livelli :D



PS:
questa demo, se guardate nel file .pspage, non fa sfoggio dei tag <#pspage> ma non dimenticate che un file pspage è un file html e la traduzione c'è comunque ;)
« Ultima modifica: Maggio 08, 2013, 09:22:03 am da nomorelogic »
Imagination is more important than knowledge (A.Einstein)

xinyiman

  • Administrator
  • Hero Member
  • *****
  • Post: 3249
  • Karma: +12/-0
Re:progetto web forum lazaruspascal.it
« Risposta #226 il: Maggio 08, 2013, 01:44:01 pm »
Nomore direi che ti meriti davvero un applauso, hai tirato su davvero un bel progetto. Secondo me quello che gli permetterebbe di avere qualcosa in più è la possibilità di avere il sistema di reportistica.
Ieri è passato, domani è futuro, oggi è un dono...

nomorelogic

  • Global Moderator
  • Hero Member
  • *****
  • Post: 2870
  • Karma: +20/-4
Re:progetto web forum lazaruspascal.it
« Risposta #227 il: Maggio 08, 2013, 05:29:36 pm »
in effetti qualcosa per produrre report servirebbe, forse anche più di un altro motore DB (almeno per ora)

direi che bisognerebbe produrre pdf in modo agevole, qualche idea?


Edit:
@xinyiman
se non ricordo male in passato mi avevi già accennato ad un componente

Edit2:
non ricordavo male: lazreport :)
ancora non lo conosco, gli darò un'occhiata; se ci sono esempi sono i benvenuti :P
« Ultima modifica: Maggio 08, 2013, 06:34:01 pm da nomorelogic »
Imagination is more important than knowledge (A.Einstein)

xinyiman

  • Administrator
  • Hero Member
  • *****
  • Post: 3249
  • Karma: +12/-0
Re:progetto web forum lazaruspascal.it
« Risposta #228 il: Maggio 08, 2013, 09:04:30 pm »
Lazreport lo trovi tra i componenti standard, poi installi anche powerpdf e dopo aggiungi l'addons pdfexport che trovi sempre sotto la cartella di lazreport.

Guarda i messaggi a questa pagina ti torneranno sicuramente utili...poi se serve io sono qui
Ieri è passato, domani è futuro, oggi è un dono...

Nephilim

  • Newbie
  • *
  • Post: 2
  • Karma: +0/-0
Re:progetto web forum lazaruspascal.it
« Risposta #229 il: Ottobre 27, 2013, 12:29:24 pm »
Scusate...ma questo progetto sta andando avanti o si è fermato cosi? :o

nomorelogic

  • Global Moderator
  • Hero Member
  • *****
  • Post: 2870
  • Karma: +20/-4
Re:progetto web forum lazaruspascal.it
« Risposta #230 il: Ottobre 27, 2013, 03:43:22 pm »
"eppur si muove", come verrebbe da dire contro ciò che sembra, piano ma si muove.
dopo un lungo stop, recentemente, mi sono rimesso a pensare ad un sistema per produrre pdf, come da ultimo post.
non ho scelto lazreport ma Free JPDF Pascal https://github.com/jepafi/Free-JPDF-Pascal/.

purtroppo alla lentezza, attualmente, no ho risorse per rimediare: si tratta ancora di un esperimento.

comunque sia non è ancora di un prodotto maturo da usare in produzione. :)


Edit:
a scanso di equivoci: con "lentezza" intendevo lentezza nello sviluppo e non performance del modulo ;)
« Ultima modifica: Ottobre 27, 2013, 03:54:32 pm da nomorelogic »
Imagination is more important than knowledge (A.Einstein)

xinyiman

  • Administrator
  • Hero Member
  • *****
  • Post: 3249
  • Karma: +12/-0
Re:progetto web forum lazaruspascal.it
« Risposta #231 il: Ottobre 27, 2013, 07:15:22 pm »
Caro Nomorelogic come mai hai scelto quel componente e non lazreport che è il componente ufficiale di lazarus per i report?
Ieri è passato, domani è futuro, oggi è un dono...

nomorelogic

  • Global Moderator
  • Hero Member
  • *****
  • Post: 2870
  • Karma: +20/-4
Re:progetto web forum lazaruspascal.it
« Risposta #232 il: Ottobre 27, 2013, 09:07:42 pm »
quel progetto è un porting di FPDF http://www.fpdf.org/ che è una classe per php appunto per la creazione di file pdf.

rispetto a lazreport è più adatto allo scripting (lazreport "obbliga" all'uso di lazarus o quantomeno bisogna avere delle conoscenze in merito, mentre vorrei che per la prima versione sia sufficiente un semplice editor di testo).

dopo averlo provato mi sono convinto anche per la velocità di esecuzione: veramente leggero.
Imagination is more important than knowledge (A.Einstein)

xinyiman

  • Administrator
  • Hero Member
  • *****
  • Post: 3249
  • Karma: +12/-0
Re:progetto web forum lazaruspascal.it
« Risposta #233 il: Ottobre 27, 2013, 09:13:55 pm »
In effetti sono motivazioni più che valide :)
Ieri è passato, domani è futuro, oggi è un dono...

xinyiman

  • Administrator
  • Hero Member
  • *****
  • Post: 3249
  • Karma: +12/-0
Re:progetto web forum lazaruspascal.it
« Risposta #234 il: Aprile 17, 2014, 07:53:18 pm »
Nomore, mi piacerebbe testare il progetto sotto raspbian. Ho modificato il file compile.sh e mi restituisce
Codice: [Seleziona]
Free Pascal Compiler version 2.6.2-8+rpi1+b1 [2014/03/25] for arm
Copyright (c) 1993-2012 by Florian Klaempfl and others
Target OS: Linux for ARMHF
Compiling pspage_module.lpr
Compiling udmpspage.pas
Compiling upspage.pas
Compiling ./externalsrc/pascalscript/Source/uPSCompiler.pas
Compiling ./externalsrc/pascalscript/Source/uPSUtils.pas
uPSUtils.pas(727,33) Fatal: Internal error 200502052
Fatal: Compilation aborted
Error: /usr/bin/ppcarm returned an error exitcode (normal if you did not specify a source file to be compiled)

Idee?
Ieri è passato, domani è futuro, oggi è un dono...

nomorelogic

  • Global Moderator
  • Hero Member
  • *****
  • Post: 2870
  • Karma: +20/-4
Re:progetto web forum lazaruspascal.it
« Risposta #235 il: Aprile 17, 2014, 08:08:16 pm »
che versione di fpc stai usando?
Imagination is more important than knowledge (A.Einstein)

xinyiman

  • Administrator
  • Hero Member
  • *****
  • Post: 3249
  • Karma: +12/-0
Re:progetto web forum lazaruspascal.it
« Risposta #236 il: Aprile 17, 2014, 08:09:45 pm »
2.6.2
Ieri è passato, domani è futuro, oggi è un dono...

nomorelogic

  • Global Moderator
  • Hero Member
  • *****
  • Post: 2870
  • Karma: +20/-4
Re:progetto web forum lazaruspascal.it
« Risposta #237 il: Aprile 17, 2014, 08:20:12 pm »
2.6.2

c'era anche scritto nel tuo post precedente, non l'ho letto...

pare che ci sia un bug quando si compila per ARM con -fPIC
http://bugs.freepascal.org/view.php?id=19729


però... mi hai battuto sul tempo ;)
Imagination is more important than knowledge (A.Einstein)

xinyiman

  • Administrator
  • Hero Member
  • *****
  • Post: 3249
  • Karma: +12/-0
Re:progetto web forum lazaruspascal.it
« Risposta #238 il: Aprile 17, 2014, 08:21:17 pm »
Quindi come ovviare?!
Ieri è passato, domani è futuro, oggi è un dono...

nomorelogic

  • Global Moderator
  • Hero Member
  • *****
  • Post: 2870
  • Karma: +20/-4
Re:progetto web forum lazaruspascal.it
« Risposta #239 il: Aprile 17, 2014, 11:43:22 pm »
il bug è stato risolto nella versione 2.7.1, la trunk.

bisognerebbe provare a compilare dopo aver installato quella versione di fpc sul raspberry...

ho trovato questo articolo ed al suo interno c'è scritto come installare fpc 2.7.1 da subversion, c'è anche lo script ;)

il link è
http://www.michellcomputing.co.uk/blog/2012/11/lazarus-on-the-raspberry-pi/

ti anticipo lo script (nel link anche lo script per lazarus)

Codice: [Seleziona]
# Goto FreePascal folder.
cd ~/FreePascal

# Initial checkout to 2.7.1 folder (only required on first run).
# svn co http://svn.freepascal.org/svn/fpc/trunk 2.7.1

# Update previous checkout snapshot.
svn up 2.7.1

# Export the checkout to working folder.
svn export --force 2.7.1 fpctmp

# Change to fpc working folder.
cd fpctmp
 
# Build the compiler.
make all OPT='-gl -O3p3' -j 8 FPMAKEOPT="-T 8" FPC=/usr/lib/fpc/2.6.0/ppcarm

# Install compiler.
sudo make install PP=compiler/ppcarm PREFIX=/usr -j 8 FPMAKEOPT="-T 8"

# Symlink the installed compiler.
sudo rm -f /usr/bin/ppcarm
sudo ln -s /usr/lib/fpc/2.7.1/ppcarm /usr/bin/ppcarm

# Install sources.
sudo make install sourceinstall PREFIX=/usr

# Symlink source path.
sudo rm -f /usr/share/fpcsrc
sudo ln -sf /usr/share/src/fpc-2.7.1/fpc /usr/share/fpcsrc

# Create fpc.cfg.
sudo /usr/lib/fpc/2.7.1/samplecfg /usr/lib/fpc/2.7.1 /etc

# Remove working folder.
cd ..
rm -rf fpctmp

Se ci provi prima di me, fai sapere come va a finire che sono interesato anche io ;)



Edit:
nello script, la riga
Codice: [Seleziona]
make all OPT='-gl -O3p3' -j 8 FPMAKEOPT="-T 8" FPC=/usr/lib/fpc/2.6.0/ppcarm
serve a costruire il compilatore 2.7.1 usando fpc 2.6.0
tu hai installata la versione 2.6.2, cerca la fullpath giusta ;)

Edit 2:
se leggi nell'articolo, il tizio dice che ha dovuto usare una SD card da 8GB e di aver ridotto la RAM dedicata alla GPU da 128 a 64 MB

« Ultima modifica: Aprile 17, 2014, 11:51:32 pm da nomorelogic »
Imagination is more important than knowledge (A.Einstein)

 

Recenti

How To

Utenti
  • Utenti in totale: 785
  • Latest: gmax
Stats
  • Post in totale: 18769
  • Topic in totale: 2232
  • Online Today: 80
  • Online Ever: 900
  • (Gennaio 21, 2020, 08:17:49 pm)
Utenti Online
Users: 0
Guests: 62
Total: 62

Disclaimer:

Questo blog non rappresenta una testata giornalistica poiché viene aggiornato senza alcuna periodicità. Non può pertanto considerarsi un prodotto editoriale ai sensi della legge n. 62/2001.