ubuntu19.10上用源碼安裝freemind


個人非常喜歡freemind軟件,該軟件在ubuntu19.10上不能直接使用sudo apt-get install freemind命令直接安裝,很不方便。而使用源碼方式安裝,里面卻有很多坑,為此折騰了幾個小時。

現記錄如下以備后查。原創不易,轉載請注明出處!

環境

  • 系統:ubuntu19.10-x64
  • 軟件:
    • ant: Apache Ant(TM) version 1.10.6 compiled on July 11 2019
    • freemind: freemind-src-1.0.1.tar.gz
    • java:openjdk version "1.8.0_232"

1、安裝前先安裝必須軟件,sudo apt-get install ant libcanberra-gtk-module, 下載 freemind-src-1.0.1.tar.gz(https://sourceforge.net/projects/freemind/files/freemind/1.0.1/freemind-src-1.0.1.tar.gz/download),並解壓到 Document 目錄下,如下

albter@tyrone:~/Documents/freemind$ ls
accessories                       doc                   images                     Resources_bg.properties  Resources_gl.properties  Resources_pl.properties     Resources_vi.properties
build.xml                         eclipe_templates      lib                        Resources_ca.properties  Resources_hr.properties  Resources_pt_BR.properties  Resources_zh_CN.properties
check_for_duplicate_resources.sh  freemind              license                    Resources_cs.properties  Resources_hu.properties  Resources_pt_PT.properties  Resources_zh_TW.properties
de                                freemind_actions.xsd  mac_file_association.xslt  Resources_da.properties  Resources_id.properties  Resources_ro.properties     tests
dictionaries.properties           freemind.bat          mindmap_menus.xml          Resources_de.properties  Resources_it.properties  Resources_ru.properties     version.properties
dictionary_de.ortho               freemind.properties   mkdmg.sh                   Resources_el.properties  Resources_ja.properties  Resources_se.properties     windows-launcher
dictionary_en.ortho               freemind.sh           patterns_updater.xslt      Resources_en.properties  Resources_ko.properties  Resources_sk.properties
dictionary_es.ortho               freemindw.bat         patterns.xml               Resources_es.properties  Resources_lt.properties  Resources_sl.properties
dictionary_fr.ortho               freemind.xsd          plugins                    Resources_et.properties  Resources_nb.properties  Resources_sr.properties
dictionary_nl.ortho               history.txt           readme.txt                 Resources_eu.properties  Resources_nl.properties  Resources_tr.properties
dictionary_ru.ortho               html                  Resources_ar.properties    Resources_fr.properties  Resources_nn.properties  Resources_uk_UA.properties

  注意在使用README里面的步驟時不要加sudo,也就是直接在該目錄下執行

  • chmod +x *.sh    # 賦予該目錄下的sh文件執行權限
  • ant dist
  • ant post
  • ant run    # 運行freemind

2、執行ant dist后會在~/Document下生成bin文件夾,情況如下

albter@tyrone:~/Documents/bin$ ls
classes dist

3、把dist文件夾拷貝到/usr/local/lib下並改名

sudo cp -r  ~/Documents/bin/dist  /usr/local/lib/freemind1.0.1

sudo chmod +x  /usr/local/lib/freemind1.0.1/freemind.sh

sudo ln -s  /usr/local/lib/freemind1.0.1/freemind.sh  freemind

4、拷貝.freemind(https://github.com/tianzong2019/toolset/blob/master/freemind.tar.gz)目錄到用戶根目錄下

albter@tyrone:~/.freemind$ ls
auto.mmfilter  auto.properties  log.0  log.0.1  patterns.xml

5、這樣在終端上執行freemind命令即可打開freemind軟件,只是不能lock到ubuntu的啟動器(俗話說的菜單欄)上

解決方法是,拷貝freemind.desktop(https://github.com/tianzong2019/toolset/blob/master/freemind.zip)到/usr/share/applications下

6、啟動器上的freemind圖標顯示

復制~/Documents/freemind/windows-launcher/FreeMind.ico 到 /usr/local/lib/freemind1.0.1下面

修改freemind.desktop文件

Icon=FreeMindWindowIcon
為
Icon=/usr/local/lib/freemind1.0.1/FreeMind.ico

這樣圖標就顯示正常了。~_~

-


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM