home *** CD-ROM | disk | FTP | other *** search
/ Amiga Plus 2002 #3 / Amiga Plus CD - 2002 - No. 03.iso / AmigaPlus / Tools / Development / envCPP31 / Install < prev    next >
Encoding:
Text File  |  2002-01-01  |  27.1 KB  |  910 lines

  1. (complete 0)
  2.  
  3. (onerror
  4.  
  5.     (if (> @ioerr 0)
  6.  
  7.         (
  8.             (delete "env:INSTALLOPTIONS")
  9.  
  10.             (message "An error has occurred. Please contact GoldED Studio support.")
  11.         )
  12.     )
  13. )
  14.  
  15. ; initialize return code
  16.  
  17. (textfile (dest "env:COMPONENTINSTALL") (append "INCOMPLETE"))
  18.  
  19. ; initialize strings
  20.  
  21. (if (= @installer-version 0)
  22.  
  23.     (set #cpp_esc "")
  24.     (set #cpp_esc "p")
  25. )
  26.  
  27. (if (= @language "deutsch")
  28.  
  29.     (
  30.  
  31.         (set #cpp_welcome        "Willkommen beim Setup für die C/C++-Erweiterung !")
  32.  
  33.         (set #cpp_copyright      "Mit der C/C++Erweiterung wird Material anderer Entwickler installiert. Entsprechende Inhalte werden mit Genehmigung der Rechteinhaber mitgeliefert, sind aber kein Bestandteil von GoldED Studio und fallen nicht unter dessen Nutzungsbedingungen.")
  34.  
  35.         (set #cpp_disclaimer     "THE AMIGA NDK IS COPYRIGHT TO AND DISTRIBUTED WITH PERMISSION OF AMIGA INC. 'AMIGA' AND THE 'BOING BALL' ARE REGISTERED TRADE MARKS OF AMIGA INC. ALL RIGHTS RESERVED. VBCC IS COPYRIGHTED TO AND DISTRIBUTED WITH PERMISSION OF VOLKER BARTHELMANN. GCC IS DISTRIBUTED UNDER THE TERMS OF THE GNU PUBLIC LICENSE. FDTOPRAGMA WAS CREATED BY DIRK STOECKER AND HAS BEEN PLACED IN THE PUBLIC DOMAIN.")
  36.  
  37.         (set #cpp_missing        "Die folgende Komponente kann nicht installiert werden, da sie wegen des grossen Umfangs nur mit der CD-ROM-Version dieser Software ausgeliefert wird:")
  38.  
  39.         (set #cpp_optional       "Optionale Komponenten auswählen:")
  40.  
  41.         (set #cpp_optional_help  "Installieren Sie einen C/C++-Compiler, wenn Sie noch keinen Compiler besitzen oder die vorhandene Installation aktualisieren möchten. Installieren Sie das NDK, wenn Sie die Online-Hilfe-Funktion benutzen möchten (empfohlen).")
  42.  
  43.         (set #cpp_optional_ndk   "Native Developer Toolkit OS3.9")
  44.  
  45.         (set #cpp_optional_cc    "C/C++-Compiler")
  46.  
  47.         (set #cpp_compiler       "Compiler installieren oder aktualisieren:")
  48.  
  49.         (set #cpp_compiler_vbcc  "vbcc0.8a (ANSI C), 15MB")
  50.  
  51.         (set #cpp_missing_vbcc   "vbcc0.8a (ANSI C)")
  52.  
  53.         (set #cpp_compiler_gg    "gcc2.95.3-4 (ANSI C/C++), 50 MB")
  54.  
  55.         (set #cpp_missing_gg     "gcc2.95.3-4 (ANSI C/C++)")
  56.  
  57.         (set #cpp_installndk     "Installation des Native Developer Toolkits...")
  58.  
  59.         (set #cpp_installvbcc    "Installation von vbcc...")
  60.  
  61.         (set #cpp_installgg      "Installation von gcc (GeekGadgets)...")
  62.  
  63.         (set #cpp_uninstalling   "Die C/C++-Erweiterung wird entfernt ...")
  64.  
  65.         (set #cpp_badversion     "Diese Software benötigt GoldED Studio AIX Service Pack 10 !")
  66.  
  67.         (set #cpp_startup        "Assigns für vbcc in s:user-startup aufnehmen (empfohlen) ?")
  68.  
  69.         (set #cpp_support        "Legen Sie fest, welche C/C++-Compiler unterstützt werden sollen (Sie können mehrere Compiler auswählen):")
  70.  
  71.         (set #cpp_other          "Anderer Compiler")
  72.  
  73.         (set #cpp_install        "Installieren")
  74.  
  75.         (set #cpp_uninstall      "Entfernen")
  76.  
  77.         (set #cpp_golded         "Bitte installieren Sie GoldED, bevor Sie diese Installation ausführen !")
  78.  
  79.         (set #cpp_registry       "Registry wird aktualisiert...")
  80.  
  81.         (set #cpp_language       "Einige Komponenten dieser Erweiterung liegen in verschiedenen Sprachversionen vor. Wählen Sie eine Sprache aus:")
  82.  
  83.         (set #cpp_parser         "Farbhervorhebung für C/C++ konfigurieren")
  84.  
  85.         (set #cpp_parser_help    "Die Einstellung der Farbhervorhebung wirkt sich stark auf die Arbeitsgeschwindigkeit des Editors aus. Auf Rechnern ohne Grafikkarte (ECS/AGA) sollte die Farbhervorhebung deaktiviert werden.")
  86.  
  87.         (set #cpp_parser_max     "Maximale Details")
  88.  
  89.         (set #cpp_parser_std     "Normal")
  90.  
  91.         (set #cpp_parser_min     "Schnell")
  92.  
  93.         (set #cpp_parser_none    "Keine Farbhervorhebung (ECS/AGA)")
  94.  
  95.         (set #cpp_words          "Automatische Groß/Kleinschreibung für C/C++ konfigurieren")
  96.  
  97.         (set #cpp_words_help     "Die automatische Korrektur der Groß/Kleinschreibung erleichtert die fehlerfreie Eingabe typischer AmigaOS-Funktions- und Strukturnamen. Diese Einstellung wirkt sich auf die Arbeitsgeschwindigkeit und den Speicherverbrauch aus.")
  98.  
  99.         (set #cpp_words_on       "Korrektur aktivieren")
  100.  
  101.         (set #cpp_words_none     "Korrektur abschalten")
  102.  
  103.         (set #cpp_remove         "Diese Compiler entfernen:")
  104.  
  105.         (set #cpp_remove_vbcc    "vbcc")
  106.  
  107.         (set #cpp_remove_gg      "GeekGadgets (gcc)")
  108.  
  109.         (set #cpp_inlines        "Inline-Dateien werden erzeugt...") 
  110.  
  111.         (set #cpp_fd2pragma      "Fehler beim Erzeugen der Inline-Dateien !\n\nWeitere Angaben finden Sie in der Datei t:fd2pragma.log.")
  112.     )
  113.  
  114.     ; ELSE
  115.  
  116.     (
  117.         (set #cpp_welcome        "Welcome to the setup for the C/C++ add-on !")
  118.  
  119.         (set #cpp_copyright      "The C/C++ setup installs material provided by other developers and companies. Such material is included with permission of the copyright owners but is not to part of GoldED Studio and not subject to its terms of usage.")
  120.  
  121.         (set #cpp_disclaimer     "THE AMIGA NDK IS COPYRIGHT TO AND DISTRIBUTED WITH PERMISSION OF AMIGA INC. 'AMIGA' AND THE 'BOING BALL' ARE REGISTERED TRADE MARKS OF AMIGA INC. ALL RIGHTS RESERVED. VBCC IS COPYRIGHTED TO AND DISTRIBUTED WITH PERMISSION OF VOLKER BARTHELMANN. GCC IS DISTRIBUTED UNDER THE TERMS OF THE GNU PUBLIC LICENSE. FDTOPRAGMA WAS CREATED BY DIRK STOECKER AND HAS BEEN PLACED IN THE PUBLIC DOMAIN.")
  122.  
  123.         (set #cpp_missing        "The following component can not be installed because it is only included with the CD-ROM version of this software (due to its size):")
  124.  
  125.         (set #cpp_optional       "Select optional components for installation:")
  126.  
  127.         (set #cpp_optional_help  "Install a C/C++ compiler if none is installed so far or if you want to upgrade the current installation. Install the NDK if you whish to use the online help (recommended).")
  128.  
  129.         (set #cpp_optional_ndk   "Native Developer Toolkit OS3.9")
  130.  
  131.         (set #cpp_optional_cc    "C/C++ compiler")
  132.  
  133.         (set #cpp_compiler       "Install or upgrade a compiler:")
  134.  
  135.         (set #cpp_compiler_vbcc  "vbcc0.8a (ANSI C), 15MB")
  136.  
  137.         (set #cpp_missing_vbcc   "vbcc0.8a (ANSI C)")
  138.  
  139.         (set #cpp_compiler_gg    "gcc2.95.3-4 (ANSI C/C++), 50 MB")
  140.  
  141.         (set #cpp_missing_gg     "gcc2.95.3-4 (ANSI C/C++)")
  142.  
  143.         (set #cpp_installndk     "Installing Native Developer Toolkit...")
  144.  
  145.         (set #cpp_installvbcc    "Installing vbcc...")
  146.  
  147.         (set #cpp_installgg      "Installation von gcc (GeekGadgets)...")
  148.  
  149.         (set #cpp_uninstalling   "Uninstalling C/C++ add-on ...")
  150.  
  151.         (set #cpp_badversion     "This software requires GoldED Studio AIX Service Pack 10 !")
  152.  
  153.         (set #cpp_startup        "Add assigns for vbcc to s:user-startup (recommended) ?")
  154.  
  155.         (set #cpp_support        "Choose the C/C++-compilers to be supported (you may select more than one compiler):")
  156.  
  157.         (set #cpp_other          "Other compiler")
  158.  
  159.         (set #cpp_install        "Install")
  160.  
  161.         (set #cpp_uninstall      "Uninstall")
  162.  
  163.         (set #cpp_golded         "Please install GoldED before you install this add-on !")
  164.  
  165.         (set #cpp_registry       "Updating registry ...")
  166.  
  167.         (set #cpp_language       "Some components of this software support multiple languages. Choose a language:")
  168.  
  169.         (set #cpp_parser         "Configure C/C++ syntax highlighting")
  170.  
  171.         (set #cpp_parser_max     "Maximum details")
  172.  
  173.         (set #cpp_parser_std     "Normal")
  174.  
  175.         (set #cpp_parser_min     "Fast")
  176.  
  177.         (set #cpp_Parser_none    "No syntax highlighting (ECS/AGA)")
  178.  
  179.         (set #cpp_parser_help    "Settings for color-coded text drastically affect performance of the editor. You should disable colorcoded text on ECS/AGA Amigas without a graphics card.")
  180.  
  181.         (set #cpp_words          "Configure automatic case correction for C/C++")
  182.  
  183.         (set #cpp_words_help     "Automatic case correcion simplifies correct input of typical AmigaOS function names and structure names. This settings affects performance and memory usage.")
  184.  
  185.         (set #cpp_words_on       "Enable case correction")
  186.  
  187.         (set #cpp_words_none     "Disable case correction")
  188.  
  189.         (set #cpp_remove         "Uninstall these compilers:")
  190.  
  191.         (set #cpp_remove_vbcc    "vbcc")
  192.  
  193.         (set #cpp_remove_gg      "GeekGadgets (gcc)")
  194.  
  195.         (set #cpp_inlines        "Generating inline files...")    
  196.  
  197.         (set #cpp_fd2pragma      "Error detected while generating inline files !\n\nSee t:fd2pragma.log for details.")
  198.     )
  199. )
  200.  
  201. ; procedures (input: <compilername>, <arg1>, <arg2>, <arg3>,)
  202.  
  203. (procedure cpp_proc_install
  204.  
  205.     ; install compiler-specific files
  206.  
  207.     (set target (cat "golded:add-ons/c++/compilers/" compilername))
  208.  
  209.     (makedir target)
  210.  
  211.     (set compilerspecific (cat "compilers/" compilername))
  212.  
  213.     (if (exists compilerspecific)
  214.  
  215.         (copyfiles
  216.  
  217.             (source compilerspecific)
  218.  
  219.             (dest target)
  220.  
  221.             (all)
  222.         )
  223.     )
  224.  
  225.     ; update registry
  226.  
  227.     (working #cpp_registry)
  228.  
  229.     (run (cat "golded:add-ons/regedit/regedit script=install.bat label=" compilername " " arg1 " " arg2 " " arg3))
  230. )
  231.  
  232. ; main installation
  233.  
  234. (if (exists "golded:" (noreq))
  235.  
  236.     (
  237.         (set vernum (getversion "golded:golded"))
  238.  
  239.         (set ver (/ vernum 65536))
  240.         (set rev (- vernum (* ver 65536)))
  241.  
  242.         (set version (+ (* 1000 ver) rev))
  243.  
  244.         (if (< version 7010)
  245.  
  246.             (
  247.                 (message #cpp_badversion)
  248.  
  249.                 (exit (quiet))
  250.             )
  251.         )
  252.  
  253.         ; read command passed in to our script in the env variable INSTALLOPTIONS
  254.  
  255.         (if (exists "env:INSTALLOPTIONS" (noreq))
  256.  
  257.             ; (getenv) may not be used without checking if var exists (installer bug)
  258.  
  259.             (
  260.                 (set cpp_installmode (getenv "INSTALLOPTIONS"))
  261.  
  262.                 (if (= cpp_installmode "UNINSTALL")
  263.  
  264.                     (working #cpp_uninstalling)
  265.  
  266.                     ; ELSE
  267.  
  268.                     (if (= cpp_installmode "INSTALLQUIET")
  269.  
  270.                         (working #cpp_welcome)
  271.  
  272.                         (message #cpp_welcome)
  273.                     )
  274.                 )
  275.             )
  276.  
  277.             (set cpp_installmode "ASK")
  278.         )
  279.  
  280.         (if (= cpp_installmode "ASK")
  281.  
  282.             (
  283.                 (if
  284.  
  285.                     (askbool
  286.  
  287.                         (prompt #cpp_welcome)
  288.  
  289.                         (choices
  290.  
  291.                             #cpp_install
  292.                             #cpp_uninstall
  293.                         )
  294.  
  295.                         (help @askbool_help)
  296.                     )
  297.  
  298.                     (set cpp_installmode "INSTALL")
  299.  
  300.                     (set cpp_installmode "UNINSTALL")
  301.                 )
  302.  
  303.                 (if (= cpp_installmode "INSTALL")
  304.  
  305.                     (welcome)
  306.                 )
  307.             )
  308.         )
  309.  
  310.         (delete "env:INSTALLOPTIONS")
  311.  
  312.         ; verify directory structure
  313.  
  314.         (makedir "golded:etc")
  315.  
  316.         (makedir "golded:etc/api")
  317.  
  318.         (makedir "golded:etc/syntax")
  319.  
  320.         (makedir "golded:etc/images")
  321.  
  322.         (makedir "golded:etc/images/toolbar")
  323.  
  324.         (makedir "golded:etc/libs")
  325.  
  326.         (makedir "golded:etc/uninstall")
  327.  
  328.         (makedir "golded:add-ons")
  329.  
  330.         (if (= cpp_installmode "UNINSTALL")
  331.  
  332.             ; uninstall
  333.  
  334.             (
  335.                 (run ("programs/remassigns <>NIL: BASEDIR golded:add-ons/c++/ndk_39"))
  336.                 (run ("programs/remassigns <>NIL: BASEDIR golded:add-ons/c++/tools/cprefs/bin"))
  337.  
  338.                 ; update registry
  339.  
  340.                 (working #cpp_registry)
  341.  
  342.                 (if (exists ("golded:etc/uninstall/envCPP.bat"))
  343.  
  344.                     (
  345.                         (run "golded:add-ons/regedit/regedit script=golded:etc/uninstall/envCPP.bat label=uninstall")
  346.  
  347.                         (delete "golded:etc/uninstall/envCPP.bat")
  348.                     )
  349.  
  350.                     (run "golded:add-ons/regedit/regedit script=install.bat label=uninstall")
  351.                 )
  352.  
  353.                 ; remove compilers
  354.  
  355.                 (run "programs/wbstart icon=\"uninstall-vbcc\"")
  356.  
  357.                 (run "programs/wbstart icon=\"////bonus/geekgadgets/uninstall-gg\"")
  358.  
  359.                 ; clean up startup sequence
  360.  
  361.                 (run "programs/stripstartup <>NIL: sectionname golded-c++   lines 5")
  362.                 (run "programs/stripstartup <>NIL: sectionname golded-ide-c lines 5")
  363.  
  364.                 (exit (quiet))
  365.             )
  366.  
  367.             ; install
  368.  
  369.             (
  370.                 (message (cat #cpp_copyright "\n\n" #cpp_disclaimer))
  371.  
  372.                 ; do not suggest installation if already installed
  373.  
  374.                 (if (exists "gg:" (noreq))
  375.  
  376.                     (if (exists "vbcc:" (noreq))
  377.  
  378.                         (set installcompilers 0)
  379.  
  380.                         (set installcompilers 1)
  381.                     )
  382.  
  383.                     (if (exists "vbcc:" (noreq))
  384.  
  385.                         (set installcompilers 2)
  386.  
  387.                         (set installcompilers 3)
  388.                     )
  389.                 )
  390.  
  391.                 (if (exists "golded:add-ons/c++/ndk_39")
  392.  
  393.                     (if (= installcompilers 0)
  394.  
  395.                         (set options 0)
  396.  
  397.                         (set options 1)
  398.                     )
  399.  
  400.                     (if (= installcompilers 0)
  401.  
  402.                         (set options 2)
  403.  
  404.                         (set options 3)
  405.                     )
  406.                 )
  407.  
  408.                 ; query optional components (do not suggest installation if already installed)
  409.  
  410.                 (if (exists "golded:add-ons/c++/ndk_39")
  411.  
  412.                     (set options
  413.  
  414.                         (askoptions
  415.  
  416.                             (prompt #cpp_optional)
  417.  
  418.                             (help #cpp_optional_help)
  419.  
  420.                             (choices
  421.  
  422.                                 (cat #cpp_esc #cpp_optional_cc)
  423.  
  424.                                 (cat #cpp_esc #cpp_optional_ndk)
  425.                             )
  426.  
  427.                             (default options)
  428.                         )
  429.                     )
  430.  
  431.                     ; ELSE
  432.  
  433.                     (
  434.                         ; do not offer NDK as optional component (NDK not yet installed but required)
  435.  
  436.                         (set options
  437.  
  438.                             (askoptions
  439.  
  440.                                 (prompt #cpp_optional)
  441.  
  442.                                 (help #cpp_optional_help)
  443.  
  444.                                 (choices
  445.  
  446.                                     (cat #cpp_esc #cpp_optional_cc)
  447.                                 )
  448.  
  449.                                 (default options)
  450.                             )
  451.                         )
  452.  
  453.                         (set options (+ options 2))
  454.                     )
  455.                 )
  456.  
  457.                 (if (in options 0)
  458.  
  459.                     (set installcompilers
  460.  
  461.                         (askoptions
  462.  
  463.                             (prompt #cpp_compiler)
  464.  
  465.                             (help #cpp_optional_help)
  466.  
  467.                             (choices
  468.  
  469.                                 (cat #cpp_esc #cpp_compiler_vbcc)
  470.  
  471.                                 (cat #cpp_esc #cpp_compiler_gg)
  472.                             )
  473.  
  474.                             (default installcompilers)
  475.                         )
  476.                     )
  477.  
  478.                     ; ELSE
  479.  
  480.                     (set installcompilers 0)
  481.                 )
  482.  
  483.                 ; check existing installation
  484.  
  485.                 (set supportcompiler 0)
  486.  
  487.                 (if (or (exists "golded:add-ons/c++/compilers/sas-c") (exists "sc:" (noreq)))
  488.  
  489.                     (set supportcompiler (+ supportcompiler 1))
  490.                 )
  491.  
  492.                 (if (or (in installcompilers 0) (or (exists "golded:add-ons/c++/compilers/vbcc") (exists "vbcc:" (noreq))))
  493.  
  494.                     (set supportcompiler (+ supportcompiler 2))
  495.                 )
  496.  
  497.                 (if (or (in installcompilers 1) (or (exists "golded:add-ons/c++/compilers/gcc") (exists "gg:" (noreq))))
  498.  
  499.                     (set supportcompiler (+ supportcompiler 4))
  500.                 )
  501.  
  502.                 (if (or (exists "golded:add-ons/c++/compilers/stormc") (exists "stormsys:" (noreq)))
  503.  
  504.                     (set supportcompiler (+ supportcompiler 8))
  505.                 )
  506.  
  507.                 (if (exists "golded:add-ons/c++/compilers/generic")
  508.  
  509.                     (set supportcompiler (+ supportcompiler 16))
  510.                 )
  511.  
  512.                 ; choose options
  513.  
  514.                 (set supportcompiler
  515.  
  516.                     (askoptions
  517.  
  518.                         (prompt #cpp_support)
  519.  
  520.                         (help @askoptions-help)
  521.  
  522.                         (choices
  523.  
  524.                             (cat #cpp_esc "SAS/C"    )
  525.                             (cat #cpp_esc "vbcc"     )
  526.                             (cat #cpp_esc "gcc"      )
  527.                             (cat #cpp_esc "StormC 3" )
  528.                             (cat #cpp_esc #cpp_other )
  529.                         )
  530.  
  531.                         (default supportcompiler)
  532.                     )
  533.                 )
  534.  
  535.                 (if (not (= supportcompiler 0))
  536.  
  537.                     (
  538.                         ; choose language
  539.  
  540.                         (if (exists "env:LANGUAGE" (noreq))
  541.  
  542.                             (
  543.                                 (set @language (getenv "LANGUAGE"))
  544.  
  545.                                 (if (= @language "deutsch")
  546.  
  547.                                     (set language 1)
  548.                                     (set language 0)
  549.                                 )
  550.                             )
  551.  
  552.                             ; ELSE
  553.  
  554.                             (
  555.                                 (if (= @language "deutsch")
  556.  
  557.                                     (set language 1)
  558.                                     (set language 0)
  559.                                 )
  560.  
  561.                                 (set language
  562.  
  563.                                     (askchoice
  564.  
  565.                                         (prompt #cpp_language)
  566.  
  567.                                         (help @askchoice-help)
  568.  
  569.                                         (choices
  570.  
  571.                                             (cat #cpp_esc "English")
  572.                                             (cat #cpp_esc "Deutsch")
  573.                                         )
  574.  
  575.                                         (default language)
  576.                                     )
  577.                                 )
  578.                             )
  579.                         )
  580.  
  581.                         (set syntax
  582.  
  583.                             (askchoice
  584.  
  585.                                 (prompt #cpp_parser)
  586.  
  587.                                 (help #cpp_parser_help)
  588.  
  589.                                 (choices
  590.  
  591.                                     (cat #cpp_esc #cpp_parser_max )
  592.                                     (cat #cpp_esc #cpp_parser_std )
  593.                                     (cat #cpp_esc #cpp_parser_min )
  594.                                     (cat #cpp_esc #cpp_parser_none)
  595.                                 )
  596.  
  597.                                 (default 2)
  598.                             )
  599.                         )
  600.  
  601.                         (set words
  602.  
  603.                             (askchoice
  604.  
  605.                                 (prompt #cpp_words)
  606.  
  607.                                 (help #cpp_words_help)
  608.  
  609.                                 (choices
  610.  
  611.                                     (cat #cpp_esc #cpp_words_on  )
  612.                                     (cat #cpp_esc #cpp_words_none)
  613.                                 )
  614.  
  615.                                 (default 0)
  616.                             )
  617.                         )
  618.  
  619.                         ; make empty folders
  620.  
  621.                         (makedir "golded:add-ons/c++")
  622.  
  623.                         (makedir "golded:add-ons/c++/compilers")
  624.  
  625.                         ; install basic files
  626.  
  627.                         (copyfiles
  628.  
  629.                             (source "c++")
  630.  
  631.                             (dest "golded:add-ons/c++")
  632.  
  633.                             (all)
  634.                         )
  635.  
  636.                         ; install toolbar images
  637.  
  638.                         (copyfiles
  639.  
  640.                             (source "toolbar")
  641.  
  642.                             (dest "golded:etc/images/toolbar")
  643.  
  644.                             (all)
  645.                         )
  646.  
  647.                         ; install ndk
  648.  
  649.                         (if (in options 1)
  650.  
  651.                             (if (exists "////bonus/ndk_39")
  652.  
  653.                                 (
  654.                                     (working #cpp_installndk)
  655.  
  656.                                     ; copy NDK
  657.  
  658.                                     (copyfiles
  659.  
  660.                                         (source "////bonus/ndk_39")
  661.  
  662.                                         (dest "golded:add-ons/c++/ndk_39")
  663.  
  664.                                         (all)
  665.  
  666.                                         (nogauge)
  667.                                     )
  668.  
  669.                                     ; generate proto
  670.  
  671.                                     (working #cpp_inlines)
  672.  
  673.                                     (execute "fd2pragma.bat sfd=golded:add-ons/c++/ndk_39/include/sfd includes=golded:add-ons/c++/ndk_39/include/include_h")
  674.  
  675.                                     ; use original proto if fd2pragma reports error
  676.  
  677.                                     (if (exists "t:fd2pragma.error")
  678.  
  679.                                         (
  680.                                             (message #cpp_fd2pragma)
  681.  
  682.                                             (copyfiles
  683.  
  684.                                                 (source "////bonus/ndk_39")
  685.  
  686.                                                 (dest "golded:add-ons/c++/ndk_39")
  687.  
  688.                                                 (pattern "(proto|inline)")
  689.  
  690.                                                 (nogauge)
  691.  
  692.                                                 (optional "force")
  693.                                             )
  694.                                         )
  695.                                     )
  696.                                 )
  697.  
  698.                                 ; ELSE
  699.  
  700.                                 (message (cat #cpp_missing "\n\n" #cpp_optional_ndk))
  701.                             )
  702.                         )
  703.  
  704.                         ; install vbcc
  705.  
  706.                         (if (in installcompilers 0)
  707.  
  708.                             (if (exists "////bonus/vbcc")
  709.  
  710.                                 (
  711.                                     (working #cpp_installvbcc)
  712.  
  713.                                     (run "programs/wbstart icon=\"install-vbcc\"")
  714.                                 )
  715.  
  716.                                 ; ELSE
  717.  
  718.                                 (message (cat #cpp_missing "\n\n" #cpp_missing_vbcc))
  719.                             )
  720.                         )
  721.  
  722.                         ; install gcc
  723.  
  724.                         (if (in installcompilers 1)
  725.  
  726.                             (if (exists "////bonus/geekgadgets")
  727.  
  728.                                 (
  729.                                     (working #cpp_installgg)
  730.  
  731.                                     (run "programs/wbstart icon=\"////bonus/geekgadgets/install-gg\"")
  732.                                 )
  733.  
  734.                                 ; ELSE
  735.  
  736.                                 (message (cat #cpp_missing "\n\n" #cpp_missing_gg))
  737.                             )
  738.                         )
  739.  
  740.                         ; add cprefs to path
  741.  
  742.                         (set commandline ("assign c: \"%s\" add\n" (expandpath "golded:add-ons/c++/tools/cprefs/bin")))
  743.  
  744.                         (startup "golded-ide-c"
  745.  
  746.                             (prompt #startup_ask)
  747.  
  748.                             (help #startup_ask_help)
  749.  
  750.                             (command commandline)
  751.                         )
  752.  
  753.                         (run "programs/stripstartup <>NIL: sectionname golded-c++ lines 5")
  754.  
  755.                         (run commandline)
  756.  
  757.                         ; choose arguments for updating registry via script
  758.  
  759.                         (if (= language 0)
  760.  
  761.                             (set arg1 "e")
  762.                             (set arg1 "d")
  763.                         )
  764.  
  765.                         (if (= syntax 0)
  766.  
  767.                             (set arg2 "syntax-detailed")
  768.                         )
  769.  
  770.                         (if (= syntax 1)
  771.  
  772.                             (set arg2 "syntax-normal")
  773.                         )
  774.  
  775.                         (if (= syntax 2)
  776.  
  777.                             (set arg2 "syntax-fast")
  778.                         )
  779.  
  780.                         (if (= syntax 3)
  781.  
  782.                             (set arg2 "syntax-off")
  783.                         )
  784.  
  785.                         (if (= words 0)
  786.  
  787.                             (set arg3 "words-normal")
  788.                         )
  789.  
  790.                         (if (= words 1)
  791.  
  792.                             (set arg3 "words-off")
  793.                         )
  794.  
  795.                         ; install shared presets
  796.  
  797.                         (working #cpp_registry)
  798.  
  799.                         (run (cat "golded:add-ons/regedit/regedit script=install.bat label=shared " arg1 " " arg2 " " arg3))
  800.  
  801.                         ; install supportcompiler-specific presets
  802.  
  803.                         (if (in supportcompiler 4)
  804.  
  805.                             (
  806.                                 (set compilername "generic")
  807.  
  808.                                 (cpp_proc_install)
  809.                             )
  810.                         )
  811.  
  812.                         (if (in supportcompiler 3)
  813.  
  814.                             (
  815.                                 (set compilername "stormc")
  816.  
  817.                                 (cpp_proc_install)
  818.                             )
  819.                         )
  820.  
  821.                         (if (in supportcompiler 2)
  822.  
  823.                             (
  824.                                 (set compilername "gcc")
  825.  
  826.                                 (cpp_proc_install)
  827.                             )
  828.                         )
  829.  
  830.                         (if (in supportcompiler 1)
  831.  
  832.                             (
  833.                                 (set compilername "vbcc")
  834.  
  835.                                 (cpp_proc_install)
  836.                             )
  837.                         )
  838.  
  839.                         (if (in supportcompiler 0)
  840.  
  841.                             (
  842.                                 (set compilername "sas-c")
  843.  
  844.                                 (cpp_proc_install)
  845.                             )
  846.                         )
  847.  
  848.                         ; install ixemul library
  849.  
  850.                         (copylib
  851.  
  852.                             (source "libs/ixemul.library")
  853.  
  854.                             (dest "golded:etc/libs")
  855.                         )
  856.  
  857.                         (copylib
  858.  
  859.                             (source "libs/ixnet.library")
  860.  
  861.                             (dest "golded:etc/libs")
  862.                         )
  863.  
  864.                         ; install autorun macro
  865.  
  866.                         (copyfiles
  867.  
  868.                             (source "autorun/c++.rexx")
  869.  
  870.                             (dest "golded:etc/autorun")
  871.                         )
  872.  
  873.                         (run (cat "golded:add-ons/regedit/regedit autorunrexx golded:etc/autorun/c++.rexx autodelete"))
  874.  
  875.                         ; prepare uninstallation
  876.  
  877.                         (copyfiles
  878.  
  879.                            (source "install.bat")
  880.  
  881.                            (dest "golded:etc/uninstall")
  882.  
  883.                            (newname "envCPP.bat")
  884.                         )
  885.  
  886.                         ; installation completed
  887.  
  888.                         (textfile (dest "env:COMPONENTINSTALL") (append "OK"))
  889.  
  890.                         (complete 100)
  891.  
  892.                         (set @default-dest "golded:add-ons/")
  893.  
  894.                         (if (= cpp_installmode "INSTALL")
  895.  
  896.                             (exit)
  897.  
  898.                             (exit (quiet))
  899.                         )
  900.                     )
  901.                 )
  902.             )
  903.         )
  904.     )
  905.  
  906.     (message #cpp_golded)
  907. )
  908.  
  909. (exit (quiet))
  910.